3 ms·
For programs less than about 10k lines or so, Lua exists in a class of its own. It offers nearly optimal start up latency and the interpreter is fast enough tha
by norir 2y ago
For programs less than about 10k lines or so, Lua exists in a class of its own. It offers nearly optimal start up latency and the interpreter is fast enough that it can interpret said 10k lines about as fast as python can run hello, world. This means you can iterate by configuring your editor to save on every keystroke and in a terminal run say `ls foo.lua | entr -c lua(jit) foo.lua` and get nearly instantaneous feedback with every keystroke.
I feel so much more empowered with this workflow than anything else out there. It is like a persistent repl (though you do have to teach yourself how not to write infinite loops regularly). The setup is so much lighter weight than an lsp and is actually more responsive. Indeed, when I get feedback this frequently and quickly, I find that I have little need for more advanced features.
Eventually though, the lack of a type system does become a problem as refactoring becomes difficult. I also dislike some of the syntax. But there is a great solution to both of these problems: use Lua to write a compiler for a new language and fix those problems. That's what I did, so now I don't use Lua anymore. But without Lua, I don't think I would have gotten to where I am now.
- beakertoadstool 2y ago[dead]