Why Nostr? What is Njump?
2025-03-24 16:55:12
in reply to

Joe on Nostr: nprofile1q…fsu6u I ran into this while working on this thing: My experience, is ...

I ran into this while working on this thing:
https://github.com/joe-warren/opencascade-hs

My experience, is either you use Foreign.ForeignPtr in your FFI code, which means you miss out on the SomeArguments -> Ptr CDouble -> IO () type function:
https://hackage.haskell.org/package/base-4.20.0.1/docs/Foreign-ForeignPtr.html

Or, you pass Foreign.Ptr in your FFI code, you get the "low level function in terms of IO", but you have to do the dirty work of writing a pure abstraction using unsafePerformIO and System.Mem.Weak (addFinalizer)

I did the latter, but I'm not sure I'd recommend it
Author Public Key
npub1a45v6dy0nnjk92kqqjlv37zvp7pnwydtx6ymwhnhhsjpja6tca6sratqwu