Ask HN: Smallest cross-platform language runtime?
Rationale: I often write little tools, and often I need to run them in the future (frequently on different computers). I’d like to use C#, but getting a tool chain and development environment is a painful multi-gigabyte commitment. Today, I like Deno for its trivial deployment and smallish (80 MB) footprint (and VS Code+TypeScript is a great development environment, although not very small), but I’m not sure it will be around for the long term. Node is similar, but much more painful to setup.
Zig’s compiler (another smallish download) is intriguing, but it’s probably too low level when I only run the programs a few times a year (meaning I don’t want to write low level, fast code—-I’ll trade speed for ease of writing code or small footprint).
Tcl/Tk seems promising (I’ve heard it can be as small as a few megabytes). Any reason I shouldn’t use Tcl?
I’m sure there’s a Lisp option, but I haven’t found one with as small of a footprint as I thought should exist.
11 comments
[ 1.3 ms ] story [ 36.1 ms ] threadGo can be just a few MB onto the low 10s
My only concern is that I’ve heard the language is simple to the point that it requires writing a lot of code that wouldn’t be necessary with something higher level (similar to Zig, but at least no manual memory management and Go’s channels sound great).
Good suggestion!
Edit: I also just remembered that my other experience with Go was the template library used in Hugo. I recall that being a negative experience, but hopefully something I’ll mostly be able to avoid.
The lack of a standard lib is certainly JavaScript’s biggest weakness. Deno provides one, but I’m not certain it will stand the test of time.
https://github.com/hofstadter-io/hof
https://en.wikipedia.org/wiki/Tiny_C_Compiler
https://www.lua.org/download.html is only a few hundred KB
I also like Lua, but the last time I used it (admittedly 10 years ago), the closest thing to a standard library was minimal. Maybe worth another look, thanks!
I'll give Forth another look, but in the past I found the language to be difficult to read and modify.
[1]: https://nim-lang.org/blog/2022/12/21/version-20-rc.html [2]: https://nim-lang.org/blog/2022/11/11/a-cost-model-for-nim.ht...