← Back to context

Comment by syngrog66

3 years ago

Lisp is good

"hellp world" being a 784k exe is bad

I'm writing go in my dayjob right now, and my reaction was "hey under a megabyte for a runtime with GC is pretty good!"

So I checked just now, and my hello world for go was 1.9M. And you're well within your rights to just declare "the fact that go is even worse doesn't make Janet good" but let's be honest - plenty of people have accepted go's compromises, so something coming in at better than half the size is relatively much better.

edit: out of curiosity i used gcc to make hello worlds in C and C++, which came in at 32k and 37k respectively.

  • But those executables have run-times in shared libraries.

    It sounds as if Janet's run-time is statically linked; it could also be built as a .so?

    Shared library calls (and variable references) are ugly, though. Unless you have a large number of Janet programs, the space saving isn't worth the shared library tax.

What are you comparing the size to?

I think Lua is in the same range, so this seems reasonable (but obviously much larger than anything without an included runtime).

That doesn't seem that bad to me for a Lisp.

Common Lisp / SBCL equivalent for me is 41MB.

Clojure überjar size for the same is 4.6MB.

There is a cost to having so much language ("all the language, all the time") available at different stages of the program lifecycle (macroexpand, compile, runtime, ...). Not sure if a Janet program can run eval, but it still has a garbage collector, etc.

Even a Go equivalent is 1.9MB.