Philipp :emacs: :nixos: on Nostr: Potentially stupid #haskell question, but if I have a "Ptr a" to some memory (in my ...
Potentially stupid #haskell question, but if I have a "Ptr a" to some memory (in my case, Ptr CFloat), how do I get a ByteString from that? I could cast to "Ptr CChar", I suppose, and then use "packCStringLen"? Would be cool to not have to copy anything though.
Published at
2024-07-10 07:14:53Event JSON
{
"id": "91b6d373dfb0aa50f9f34a0cf8f37ea39fbe3d1ed84a190ebd3e9f368b06cfa0",
"pubkey": "ac4affaf50335b62981fe0ffff6059e4fb619f4934d6f40082175acb87737e5f",
"created_at": 1720595693,
"kind": 1,
"tags": [
[
"t",
"haskell"
],
[
"proxy",
"https://fosstodon.org/users/pmidden/statuses/112760959378436339",
"activitypub"
]
],
"content": "Potentially stupid #haskell question, but if I have a \"Ptr a\" to some memory (in my case, Ptr CFloat), how do I get a ByteString from that? I could cast to \"Ptr CChar\", I suppose, and then use \"packCStringLen\"? Would be cool to not have to copy anything though.",
"sig": "98339d2f88c11229d7a61f8a3716851154a69b10c484d9d966df7b815baa7162a19883161233a004a48ccd777453deb5a908ca4095bd5da5f53e3c69c71d4734"
}