babashka 2025-05-11

I’ve been exposing utilities from cpp to Clojure/bb environment, works pretty fine. Just published a repo (still updating) with a demo pod. Sharing the link here for anyone who might be interesting: https://github.com/lotuc/pod-cpp

🎉 6

> defrecord/deftype currently only support protocol implementations, found: clojure.lang.ILookup 🥲

✅ 2

Initially I wanted to use deftype to control the behavior of ILoopkup in addition to implementing some protocols. But it doesn't look like it can be done. It was mostly a quality of life improvement, no big deal if bb doesn't allow it. 😉

there's one supported way to do this in bb, you can read this blog: https://blog.wsscode.com/guide-to-custom-map-types/

This looks like what I was trying to do! Thanks! 😁

Ohhh, it looks like BB supports reifying ILookup!

> Type: java.lang.UnsupportedOperationException > Message: babashka reify only supports implementing a single interface Awww So close...

@frozenlock what are you trying to do?