data-science

luke 2025-01-12T16:31:02.567979Z

Anyone have any experience and opinions on if or how the new Foreign Function and Memory API (FFM) could be used from Clojure? It looks nicer than any of the earlier options I've seen, but curious if folks have opinions on how it fits in, especially relative to the Techascent tech.v3.datatype.ffi tools.

👀 1
🕵️‍♂️ 1
phronmophobic 2025-01-12T19:14:44.569779Z

I think clojure already has a really good story for calling native libraries irrespective of the new FFM API. The new FFM API doesn't really make anything possible that wasn't already possible before. I think the main benefits to expect are better performance and fewer dependencies.

phronmophobic 2025-01-12T19:15:55.641939Z

I know https://github.com/IGJoshua/coffi implements the new API. dtype-next already has an implementation agnostic API for ffi. I don't think it currently supports the latest FFM API, but I assume it will at some point.

phronmophobic 2025-01-12T19:20:05.631069Z

I made a more detailed comparison of the various options here, https://docs.google.com/spreadsheets/u/1/d/e/2PACX-1vQAiX80h3wsbwo7qv8aAOp2TFLO6V2dJV5Ay24xihhKObDhT7HwS0nbZGUPxLjaJc9rSwoN-tNksFda/pubhtml

❤️ 2
luke 2025-01-12T20:06:45.086619Z

awesome, thanks for the info!