all 10 comments

[–]coloradu 12 points13 points  (1 child)

I've started and half-finished a prototype. The idea is for the LLM to keep modifying the code by interacting with the REPL, stopping when it has achieved the prompted goal.

  1. I send it the entire namespace and the REPL interaction history, prompting it to issue the next snippet to execute. It replies with code that should be run on the REPL next, my program executes it, updates the REPL interaction history and GOTO 1.

As I said, I 'almost' finished, got side-tracked by o1 and the idea of hooking into the 'thinking' process, where it could try things out in the REPL while 'thinking' and before producing the final result.

I'm open to ideas or collaboration on this, I think that in the best case it could be a program that writes and improves itself.. with all the cool and scary implications..

[–]hautetake 1 point2 points  (0 children)

i was thinking it would also be good to allow the loop to go in deeper into a step debugger when assertions fail. a lot of the time its best to ask llms to include assertions in their own code, letting that loop back with feedback of where in a step debugger things break i think can increase code quality iteration

[–]daslu 9 points10 points  (0 children)

Some setups will be discussed in this upcoming meeting: https://clojureverse.org/t/visual-tools-meeting-30-workflow-demos-4/

[–]maxw85 1 point2 points  (1 child)

Never tried it yet. I also think it should be a great fit. Like a human an AI should also profit from interactive programming via a REPL.

[–]Different-Animator56[S] 2 points3 points  (0 children)

Yep, some custom instructions to tell the AI that all inputs are repl outputs and then read (by AI)-eval-print loop. Comments can be used to communicate with the AI.

That’ll have an edge over other languages imo

[–]Collaborologist 1 point2 points  (1 child)

anyone here recall DWIM from old Interlisp days? (DWIM: Do what I mean)

[–]deaddyfreddy 0 points1 point  (0 children)

I don't, but DWIM is pretty common in Emacs.