babashka

lotuc 2025-05-11T14:10:57.228949Z

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
2025-05-11T21:46:40.929429Z

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

✅ 2
2025-05-12T12:37:28.948779Z

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. 😉

borkdude 2025-05-12T12:38:46.413519Z

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

2025-05-12T12:47:32.390729Z

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

2025-05-11T22:22:25.514819Z

Ohhh, it looks like BB supports reifying ILookup!

2025-05-11T22:42:27.613569Z

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

borkdude 2025-05-12T06:08:27.025989Z

@frozenlock what are you trying to do?