4 ms·
What a wonderful excuse to dive back into Clojure! This looks fantastic. I wonder what neat stuff might be made in Clojure thanks to a C FFI that wasn’t doable
by nucleogenesis 2mo ago
What a wonderful excuse to dive back into Clojure! This looks fantastic. I wonder what neat stuff might be made in Clojure thanks to a C FFI that wasn’t doable on top of the JVM.
- busterarm 2mo agoI've been diving back into Clojure just recently and this will be something I'll be trying to use immediatley.
- pjmlp 2mo agoNote that nowadays with Panama, there are more FFI opportunities in JVM implementations as well. Although it is rather verbose, and it is easier to have a C header and run jextract on it, instead of the manual boilerplate. No idea how well AI tooling would manage.
- ramblurr 2mo agoCoffi is a great library that makes Panama FFI/FFM painless without interop. https://github.com/IGJoshua/coffi https://github.com/IGJoshua/coffi For example look at this arc from sqlite4clj https://github.com/andersmurphy/sqlite4clj/blob/master/src/sqlite4clj/impl/api.clj https://github.com/andersmurphy/sqlite4clj/blob/master/src/s... it's very elegant. (Also can plug my own libvips wrapper using coffi https://github.com/outskirtslabs/vips https://github.com/outskirtslabs/vips) Using FFI/FFM "vanilla" with java interop is also viable, and in my experience the SOTA models do just fine with it (with or without jextract).
- pjmlp 2mo agoGreat overview, thanks!