logoalt Hacker News

An agent in 100 lines of Lisp

153 pointsby jamiebeachlast Tuesday at 9:21 PM30 commentsview on HN

Comments

skapadiatoday at 10:02 AM

This is beautiful, I can't deny that. But the claim that Claude Code is a fixed set of tools is quite wrong. Claude Code regularly generates new code to carry out tasks, and you can choose to promote those tasks to skills, workflows, etc.

goranmoomintoday at 6:27 AM

I like Lisp, I’ve used Common Lisp with a passion, but this doesn’t seem like a valid argument for Lisp.

Homoiconicity, as I understand, is that the code is structured data that is easy to programmatically modify, hence allowing Lisp macros. While some might disagree, I see Rust macros as the closest thing that demonstrates homoiconicity in mainstream Algol-based languages, as Rust macros modify the loosely structured token stream to produce new Rust code.

Eval, on the other hand, that’s more of a capability that comes from Lisp’s runtime, which used to be unique when Lisp was thriving, but not anymore — JS, Python, Ruby, all of the runtime-based languages have an eval function. The fact that they are not used as much is more of a security issue, not a capability issue, and I am not sure how having eval can be argued as Lisp being the language of agents.

show 1 reply
rcarmotoday at 9:39 AM

This is a thing of beauty, no matter what the general feeling in the comments seems to be against LISP. And yeah, you can do it in JS/TS/Python/etc., but somehow it doesn’t feel as elegant.

hankbondtoday at 3:43 AM

Maybe this is a reductive comment, but how does this differ from just letting your agent bash tool a `python -c` command (or anything of that class)? I'm not really getting where this is a "wow" moment?

It is always nice to appreciate how much power you get out of (Model + the absolute bare minimum of control flow). There is just so much baked into the models now that given an inch they will take a mile.

show 5 replies
sroericktoday at 8:45 AM

I made an interpreted lisp and stored the AST in postgres and exposed the functions with htmx, and honestly it works pretty great.

elijtoday at 9:24 AM

it is also possible to sandbox elisp at least. I allow pure functions through by default: https://github.com/elij/macher-agent/blob/main/macher-agent-... -- more an interpreter then straight eval but works as author states

scarredwaitstoday at 9:15 AM

Nice, but this is the equivalent of always running with `--dangerously-skip-permissions` with all the security implications of that.

show 2 replies
emp17344today at 4:37 AM

Littered with AI writing tells.

show 1 reply