← Back to context

Comment by kragen

22 days ago

You seem to have misunderstood this remark:

> It seems sort of wasteful of tokens!

This was referring to the LLMs' tendency to blat out hundreds of tokens into a single tool call, not to Clojure.

The REPL in the part of the presentation you link to only evaluates two forms, (range 10) and (bounce!), neither of which takes much advantage of homoiconicity.

cchase88 was talking about a degree of homoiconicity in Tcl that has been abandoned by most dialects of Lisp:

  : ~; tclsh
  % proc deproc {name} {return [list proc $name [info args $name] [info body $name]]}
  % deproc deproc
  proc deproc name {return [list proc $name [info args $name] [info body $name]]}

(That might look wrong, but it's actually correct. In Tcl the list {name} is exactly the same as the quasiquoted string "name" and the bare word name.)

  % proc ack {m n} {
      if {$m == 0} {
          expr {$n + 1}
      } elseif {$n == 0} {
          ack [expr {$m - 1}] 1
      } else {
          ack [expr {$m - 1}] [ack $m [expr {$n - 1}]]
      }
  }
  % deproc ack
  proc ack {m n} {
      if {$m == 0} {
          expr {$n + 1}
      } elseif {$n == 0} {
          ack [expr {$m - 1}] 1
      } else {
          ack [expr {$m - 1}] [ack $m [expr {$n - 1}]]
      }
  }

You can't do that in Racket or SBCL, but it does exist in Clojure; it's clojure.repl/source. However, the part of the presentation you link to doesn't use anything similar, and it's not really a mainstream part of Lisp development anymore, the way it was 50 years ago.

I don't think I'm missing the point. LLMs don't use Python's REPL because it's not that efficient, while properly built harness will eagerly utilize Clojure REPL if given a chance. Without "blating out hundreds of tokens".

  • You replied to my remark, which was about the token efficiency of a behavior I've observed LLMs engaging in when they use languages including Python and JavaScript, by claiming that Clojure has good token efficiency. Now, maybe Clojure has great token efficiency, or maybe it doesn't, but either way, that's irrelevant to the question I was talking about, which is whether this behavior wastes tokens when using non-Clojure languages such as Python and JavaScript. Nothing about Clojure could possibly be relevant to that question, so your reply suggests that you misunderstood what I was saying. There's no point in getting defensive about that — it's probably my fault in the first place for writing unclearly, and at any rate you aren't being evaluated on HermeneuticsBench, you're just trying to communicate with some jackass on HN.

    However, the reason I thought this model behavior was relevant is that, if the LLMs are squandering tokens by failing to take advantage of the REPL facilities available in Python and Node, they might also squander tokens in the same way when attempting to use languages with better REPL facilities, such as (let's stipulate) Clojure. It sounds like you've observed that my prediction is incorrect in real life. Can you go into more detail? Which harness and which models have you seen good results with, and can you show an excerpt of a transcript?

    Without evidence, I suspect that the behavior may be due to LLMs being trained to do well on noninteractive (one-shot) SWE benchmark tasks.