
u/med_i_terranian

A DSL for Gemma4 that transpiles into Clojure
When I discovered AI coding in 2024, I was immediately thinking: how do I run something like this on my own computer?
Obviously, it wasn't possible then, and remains impossible now... Or does it?
Gemma4's release is what finally got the ball rolling for me. There was a cheap model that could run on not-state-of-the-art hardware, and do reasoning, and even a bit of coding (with some help). So I tried about 10 different prototypes trying to get Gemma4 running locally to produce code, or at least snippets of code. Mainly targetting Python, since there's a billion lines of the stuff Gemma4 and other models slurped up and "knows".
But, I couldn't get Gemma4 to output anything useful in strict Python. Even with a RAG, language graph, linter, etc. It was just too difficult and slow and hallucinated even simplistic scripts. So, I put it on the backburner, kept watching Primeagen, and kept hearing about Uncle Bob and his LISPs.
I had no clue what a LISP was, but upon reading about it, I thought that this possibly the key to the entire problem. Namely the REPL, code as data, writing the AST directly. So I set out again on the harness, but with a new approach.
Since LLMs don't really like symbols, (as in the typically cost several tokens, and can induce hallucination) I thought Gemma4 would need some kind of intermediate language that serves as a go-between. So thus: the unnamed DSL that transpiles into Clojure was born. I chose Clojure because it made making the DSL significantly easier and less time consuming and less annoying to debug, its a LISP, something about it just feels right, and it compiles to the JVM. So tons of functionality.
So the harness > plans out an architecture > structures it in json > the coding task gets handed over to the coding Gemma4 > The coding Gemma4 then writes the unnamed DSL directly into the REPL, which handles the whitespace (which represents the infamous paranthesis heavy LISP code), provides context, internal error messages, validation, etc. > the compiler writes all of this to a json > if the DSL "code" fails for any reason, it is able to reason with the REPLs error messages on it's own and repair itself.
Of course, this kind of ignores the fact that the language itself has to be built up so it has enough features to make it feel general. It's not there yet. But I just had a few complex (for a Gemma model) specs, that it was able to solve both with and without self repair, and it's really exciting!
is LLM coding accepted in the Clojure community?
reddit.comEssentially, I have been wanting to play this old java game thats been offline since 2011. It was great. But it was deceptively simple. I've got the game running locally and have been implementing features but the scope is just so massive it would be nice to have a keen eye (or Claude) to help implement and review.
So this requires some background; this is a truly dead game. I just tried to find images of it on google images and there was nothing. There are also no descriptions of it that I can seem to find. I grabbed the jar from archive.org and had to decompile it. I was young when I played it so most of the mechanics went over my head. Thankfully archive.org also archived the entire game manual, so that was great to work off. Probably because they explicitly wanted crawlers on their htm's, so I am thankful for their foresight. Their original developer is a really interesting fellow, and the game has a strange history of ownership.
Essentially, I have been wanting to play this old java game thats been offline since 2011. It was great. But it was deceptively simple. I've got the game running locally and have been implementing features but the scope is just so massive it would be nice to have a keen eye (or Claude) to help implement and review.
Please feel free to DM me if interested in the project and I will provide more of a background. Peace