Hacker News new | past | comments | ask | show | jobs | submit login

One system I work with exposes a CLI. The whole system is written in C, and the CLI is basically just a frontend for a bunch of commands that take in [int argc, char argv]. It is, to misquote Greenspun's tenth, an ad-hoc, informally-specified, bug-ridden, slow implementation of a proper REPL.

My secret wish is to replace it with an embedded TCL REPL. TCL isn't perfect, but it's pretty easy to interface with C, and it fits on small targets. My main problem (aside from lack of time) is that I'd actually need a tiny version that would fit within dozens of kilobytes of code. Closest I've found is Jim [1], which is 100-200kB (depending on features). Compare that with Lua, which fits under 100kB (though excluding its standard library).

[1] http://jim.tcl.tk/index.html/doc/www/www/index.html





> One system I work with exposes a CLI. The whole system is written in C, and the CLI is basically just a frontend for a bunch of commands that take in [int argc, char argv]. It is, to misquote Greenspun's tenth, an ad-hoc, informally-specified, bug-ridden, slow implementation of a proper REPL.

Sounds like a poor man's execline:

https://skarnet.org/software/execline/


I might have some time this summer, feel free to contact and explain ;)


I wish I could, but it's all for stupid-secret projects :(




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: