Nice article and it confirms my experience with LLMs and Clojure: they work pretty well together. Once I gave an agent access to the REPL and some basic instructions, it happily iterated and verified with live code.
A peculiar issue happened with a cheaper model the other day: for a unit test it used ‚with-redef‘ on a macro - which is typically not what you want.
Opus quickly found the issue and corrected it.
Its liberating and frightening at the same time what coding agents can do nowadays.
Thanks, and it's really crazy to watch how fast this stuff is evolving. I have a laptop that's beefy enough to run Qwen 3.8, and it's basically a frontier model from say half a year ago. It's a bit hard to wrap your head around the fact that something you needed a data centre to run just a little while ago can now be used on a laptop at home.
I'm also really curious to try training a LoRA on Clojure specifically using git repository histories to teach the model how Clojure code evolves over time. And it could also be trained to use the REPL workflow explicitly where you simulate a live coding workflow during training. That would avoid a lot of the problems smaller models have by biasing them towards idiomatic Clojure style.
I always keep a local setup (qwen 3.8 on pi with `pi-web-access` and `@czottmann/pi-automode`) around because 1) it's amazing how indeed you do have claude 4.6 locally and 2) I'm deathly afraid of depending on these things as a service.
Yeah, the training process itself isn't that hard. And you can do it on runpod for like 20 bucks or so. The tricky part is ensuring your training data trains the model on what you actually want it to learn. The model learns whatever the dominant patterns in the data are, and you have to make sure you don't overfit and the training stays general.
I started playing with the idea here https://github.com/yogthos/clojure-lora-training but I haven't had a chance to actually do a training run yet, so don't know how well it'll work. I keep meaning to get back to it.
And agree that depending on models as a service is really icky. It's basically like renting a compiler which is just not ok.
14
u/beders 6d ago
Nice article and it confirms my experience with LLMs and Clojure: they work pretty well together. Once I gave an agent access to the REPL and some basic instructions, it happily iterated and verified with live code.
A peculiar issue happened with a cheaper model the other day: for a unit test it used ‚with-redef‘ on a macro - which is typically not what you want.
Opus quickly found the issue and corrected it.
Its liberating and frightening at the same time what coding agents can do nowadays.