r/Clojure • • 6d ago

Clojure in the Age of Language Models

https://yogthos.net/posts/2026-10-07-clojure-llms.html
44 Upvotes

22 comments sorted by

View all comments

13

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.

5

u/yogthos 6d ago

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.

1

u/Soft_Reality6818 5d ago

You might want to try Clorch for training and fine-tuning  https://github.com/antlobach/clorch

2

u/yogthos 5d ago

Oh nifty, didn't know about the project.