An unofficial, read-only Hacker News reader. Join the beta →

I checked Clojure's core with Lean and found unreported bugs (opens external site)

238 points by encyclopedism 2 days ago | s.conao3.com | 84 comments on HN

View full thread · View on Hacker News

Comment thread (9)

  1. Interesting, why? Whenever I have used LLMs with Lisps, they always get tripped up balancing parentheses due to the tokenization.
    Replies (4)
    1. abstraction with macros, minimal syntax (((except these), and giving the LLM direct access to a REPL, to test as stuff is written.

      I have used Lisps with LLMs a bit. I toyed around with an indented Lisp I developed with LLMs, to get rid of all the parenthesis, maybe make the LLM more capable of writing it since it looked somewhat closer to Python. I still play around with it, its nice to look at.

    2. Have written millions of lines of lisp with LLMs (mostly clojure). I have never had this issue in any meaningful quantity comparable to forgetting ; or } (which happens, but is very rare and immediately fixed)
      Replies (2)
      1. IME small models definitely fail horribly with lisps. Qwen code and I think I tried 3.6 both choked on closing parens to the point they struggled to get anything at all to ever be syntactically correct.
        Replies (1)
        1. Finally, a justifiable reason to indent Lisp like C.
          Replies (1)
          1. i did this as a joke for fun www.margeux.com/studio.html
      2. I've not regularly run into LLMs generating braces wrong, but what they seem to do every damn day is get the boundaries of replacement regions wrong when using sed or python to make text substitutions, which shows up as unbalanced braces. I've always had a hard time getting consistent compliance when I tell them to use structural editing tools only.
    3. The REPL loop is really fast for prototyping. The parens balancing thing hasn't been an issue for like 18 months.
    4. Opus 5.5 seems to be pretty good at elisp (at least as far as results go, I can't comment on the quality of the code).