Jolt: running Clojure on Chez Scheme
12 points by Yogthos
12 points by Yogthos
I used to think: we've got coding agents now. What are people coding with coding agents? This is what: like re-implementing significant portion of Java standard library in Scheme. It is obviously possible and used to be dauntingly laborious: now it can be done. Really a perfect use case for coding agents.
Thank you for sharing.
Thanks, and this kind of thing is kind of the ideal use case in my opinion because the semantics are already well defined, and there are a lot of existing Clojure libraries to test against. Doing this stuff by hand wouldn't be difficult, but it would be pure drudgery. Which is why nobody bothered doing it before I suspect.
There's always been a chicken and egg problem when implementing dialects on a different runtime since you couldn't get existing libraries to run, and there was little point in using a language port if you couldn't lean on the existing ecosystem of well tested libraries. Now you can have your cake and eat it too so to speak. Simply have the LLM write shims for the APIs to map them to the host platform.
A particularly nice part with Scheme is that it's easy to do metaprogramming in user space, so Jolt doesn't need to bake in a comprehensive Java API in the core itself. If somebody wants to use a particular library and they need additional shims for it, it's trivial to do that in their project or by making a wrapper library. I ended up taking this approach with stuff like time and HTTP libraries since I didn't want the core itself to be dependent on additional system libraries.
Overall, pretty happy with how this turned out. And I've already been having some fun making desktop apps with it. I had the idea of using Gaussian splats to paint, so I prototyped a little app to try out the concept on top of Jolt. This is the kind of stuff I've been wanting to do with Clojure, but using the JVM on the desktop always felt incredibly clunky.