4 ms·
My favorite implementations are partcl[1] (600 lines) and Picol[2] (500 lines by Salvatore Sanfilippo). [1] https://github.com/zserge/partcl https://github.com
by pmarin 5y ago
My favorite implementations are partcl[1] (600 lines) and Picol[2] (500 lines by Salvatore Sanfilippo).
[1] https://github.com/zserge/partcl https://github.com/zserge/partcl
[2] http://oldblog.antirez.com/post/picol.html http://oldblog.antirez.com/post/picol.html
- int_19h 5y agoSo far as I can tell, the reason why they're so small is because they implement "everything is a string" literally - so e.g. appending to a list is basically concat. This is good enough as a proof of concept, and neatly showcases just how simple the language itself really is; but perf would be abysmal even by Tcl standards as soon as you get more than a few dozen items per list. LIL tries to be a minimalist but practical embeddable implementation, so it has basic optimizations like representing lists more efficiently internally. The price, of course, is code size, but also C API complexity.