Hacker News new | ask | show | jobs
by 0xpgm 56 days ago
Presumably a DSL would allow you to do more heavy lifting in your specific domain with less tokens.

Let's way you wanted to do a web application using LLMs. Using a web framework would cost less tokens than using the vanilla underlying language (Python, PHP, whatever..), which is again way less tokens than building up from assembly (an LLM should be able to do this given enough time and compute).

2 comments

I hadn't thought of that! Writing a program in fewer tokens* has been Lisp's advantage all along. If, because of token economics, the same advantage accrued at the LLM level, I dare say certain people would be pleased (as would I):

https://news.ycombinator.com/item?id=21232352 (Oct 2019)

https://news.ycombinator.com/item?id=4766191 (Nov 2012)

https://news.ycombinator.com/item?id=694700 (July 2009)

* in the older sense of "token", meaning that one measures a program in AST size rather than lines of code

---

Edit: ok, this is what I get for not reading the article:

> For LLMs, less code means fewer tokens, and tokens are what you pay for so you spend less on development

I came to the same conclusion over the last year. The Lisp family, especially used with a CL REPL, present a lot of inherent advantages for agentic coding.

Ironically, this comment of mine from a few days ago touches on a lot of the points from this article and was flagged to death:

https://news.ycombinator.com/item?id=49924013

Note also that WebAssembly's text format is S-expression based. For conciseness I presume?

And easy parsing of course.
Awesome! thanks for sharing these :)
But writing good DSLs requires one to be great at going up the ladder of abstraction. Not that LLMs can't do it, but they stuggle and choose the path of least resistance. That's easier even if it results in more code.