Settings

Theme

I checked Clojure's core with Lean and found unreported bugs

s.conao3.com

54 points by encyclopedism · 19 comments

Reader

3 threads
krosaen

Having long admired clojure and Rich, I wonder what Rich makes of AI / agentic coding. I can imagine him having something really interesting and surprising to say, or being very anti-AI in an entertaining and persuasive way that ultimately feels destined to be a losing argument.

  • nextos

    He has a very elaborate anti-LLM stance: https://www.linkedin.com/pulse/ai-tool-rich-hickey-kjl8e

    Sadly, posted on LinkedIn, but in a nutshell, he claims that LLMs are not a tool, they are intrinsic automation.

    And by using them, you are kinda giving up.

    • vegnus

      I was sad when I read this. I thought Clojure + LLMs was like a match made in heaven for some reason

      • Zambyte

        Interesting, why? Whenever I have used LLMs with Lisps, they always get tripped up balancing parentheses due to the tokenization.

        • devin

          The REPL loop is really fast for prototyping. The parens balancing thing hasn't been an issue for like 18 months.

        • casion

          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)

        • vegnus

          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. It I still play around with it, its nice to look at.

dmead

I'm not sure the lisp community could consider these bugs.

Lisp/clojure/scheme etc is inherently untyped. These libs don't guarantee anything near to the level that a formal verification would suggest.

If this were the haskell standard lib however, that would be news.

  • pron

    Even the types in Haskell are far too weak to be included in what we mean by "formal verification" (not to say they're not useful for some things, just that this is not the level of specification that formal verification is typically about). If we rank the strength of properties we can express with types in Clojure as 0 and in Haskell as 3 (or, say, 7 with refinement types), then the strength of types required for formal verification (e.g. in a language like Idris) would be 100.

  • jeremyjh

    The article I read described clear correctness bugs unrelated to types.

  • packetlost

    Some of these issues are actually quite bad and don't have anything to do with types at all

  • mtlmtlmtlmtl

    Lisp is not untyped. It is dynamically typed.

  • articulatepang

    Types have nothing to do with it. For example, the first bug in the article is about an infinite loop in a core data structure:

    “[…] reduce it, the call never returns once the vector has 65505 or more elements.”

    > These libs don't guarantee anything near to the level that a formal verification would suggest.

    This is just plain wrong. A lisp library can absolutely make performance and correctness guarantees, and formal methods can refute or verify those guarantees. A type system is just a special kind of formal method that can rule out certain classes of bugs.

  • iorekz

    I'm glad I checked your other comments! Beautiful counter bait

vegnus

Looks like Rich needs to get back to his hammock

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection