6 ms·
The only issue have faced with generating Lisp/scheme code, especially on small models, is that it always misses some closing parenthesis. However, because the
by calgoo 1mo ago
The only issue have faced with generating Lisp/scheme code, especially on small models, is that it always misses some closing parenthesis. However, because the small core language, you can use structured output in the LLMs that support it and it works quite well.
- regularfry 1mo agoI found that explicit instructions to keep nesting depth below a limit helps limit the damage. That limit was 5 in my case, which can be inconveniently tight in some situations.
- drob518 1mo agoIn the Clojure world, there is a small utility that is pretty popular called clj_paren_repair (part of clojure-mcp-light: https://github.com/bhauman/clojure-mcp-light/blob/main/src/clojure_mcp_light/paren_repair.clj https://github.com/bhauman/clojure-mcp-light/blob/main/src/c...) that uses parinfer’s indentation algorithm to help repair out of whack Lisp parens (and brackets and braces for Clojure). It’s easy to expose this as a skill or tool. I had Pi create me a tool in 60 seconds. I have to say that before I discovered it, I had no time for parinfer (paredit all the way, baby), but this really does the trick as often the model gets the indentation correct (from being trained on so much Python??).