Hacker News new | ask | show | jobs
by vthriller 2620 days ago
The answer to that would depend on the CL implementation, since not all of them can do AOT compilation.
2 comments

Not really...

It's in the CL standard, and compliant implementations support it. SBCL, LispWorks, Allegro, CCL, and others all do AOT native compilation, from the REPL and via eval (which should be avoided, in any case). ABCL does AOT compilation to JVM bytecode, and Clisp to its own bytecode.

It's a cool feature for Nim to have, but claiming to be the first makes them look bad.

Several Lisp implementations even do similar things which were shown in the video: compiling Lisp to C/C++, then calling the C or C++ compiler, then loading the compiled code into a running Lisp, replacing/extending code.

For example ECL. The maintainer of ECL also showed how to write inline C in a Lisp function and compile/load that in a REPL - using only a couple of lines of code - basically a C REPL inside Lisp.

https://www.reddit.com/r/lisp/comments/bgwtsh/fun_ecl_hack/

But the same can be said about Nim, this ability depends on the implementation.