> Friction_cost is the energy lost to errors, retries, and misunderstandings when actually using the tool. [...] if the tool is very low friction, agents will revel in it like panthers in catnip, as I’ll discuss in the Desire Paths section.
This is why I think Ruby is such a great language for LLMs. Yeah, it's token-efficient, but that's not my point [0]. The DWIM/TIMTOWTDI [1] culture of Ruby libraries is incredible for LLMs. And LLMs help to compound exactly that.
For example, I recently published a library, RatatuiRuby [2], that feeds event objects to your application. It includes predicates like `event.a?` for the "a" key, and `event.enter?` for the Enter key. When I was implementing using the library, I saw the LLM try `event.tilde?`, which didn't exist. So... I added it! And dozens more [3]. It's great for humans and LLMs, because the friction of using it just disappears.
EDIT: I see that this was his later point exactly! FTA:
> What I did was make their hallucinations real, over and over, by implementing whatever I saw the agents trying to do [...]
[0]: Incidentally, Matz's static typing design, RBS, keeps it even more token-efficient as it adds type annotations. The types are in different files than the source code, which means they don't have to be loaded into context. Instead, only static analysis errors get added to context, which saves a lot of tokens compared to inline static types.
[1]: Do What I Mean / There Is More Than One Way To Do It
This is why I think Ruby is such a great language for LLMs. Yeah, it's token-efficient, but that's not my point [0]. The DWIM/TIMTOWTDI [1] culture of Ruby libraries is incredible for LLMs. And LLMs help to compound exactly that.
For example, I recently published a library, RatatuiRuby [2], that feeds event objects to your application. It includes predicates like `event.a?` for the "a" key, and `event.enter?` for the Enter key. When I was implementing using the library, I saw the LLM try `event.tilde?`, which didn't exist. So... I added it! And dozens more [3]. It's great for humans and LLMs, because the friction of using it just disappears.
EDIT: I see that this was his later point exactly! FTA:
> What I did was make their hallucinations real, over and over, by implementing whatever I saw the agents trying to do [...]
[0]: Incidentally, Matz's static typing design, RBS, keeps it even more token-efficient as it adds type annotations. The types are in different files than the source code, which means they don't have to be loaded into context. Instead, only static analysis errors get added to context, which saves a lot of tokens compared to inline static types.
[1]: Do What I Mean / There Is More Than One Way To Do It
[2]: https://www.ratatui-ruby.dev
[3]: https://git.sr.ht/~kerrick/ratatui_ruby/commit/1eebe98063080...