News for hackers. Stuff that matters.
Re:Compilers for Free by andyonthewings on Thursday January 24, 2019 @08:52PM (#18994869)
The Haxe compiler is also an interpreter of the Haxe programming language, and it is properly treated as one of the many back-end targets of the compiler.

Moreover, the interpreter is also used as the macro runtime, that means Haxe macros can run arbitrary "real" Haxe code during compilation, e.g. checking the current git branch name or current time and inject the result as a static read-only string in the code.

Re:Compilers for Free by grawprog on Thursday January 24, 2019 @09:26PM (#18995043)
DMD also comes with a built in D interpreter, RDMD, allowing you to use D as a scripting language with a compiled binary. This can be embedded or called from your D program allowing your program to have a scripting layer written in the same language as the compiled binary. As far as I know, executing a .d file with RDMD is nearly as fast as running a compiled binary.
Re:Compilers for Free by sifoobar on Thursday January 24, 2019 @11:30PM (#18995572)
I've read about D's compile time evaluation but have no personal experience. I know both Rust and C++ are pushing in the same direction.

From what I can see, it's simply an embedded interpreter for the same language; which means that it probably runs about as fast as interpreters in general (that is, significantly slower than D). I would love to be wrong and learn something new, though.

Starting from an interpreter means it's already there, the only difference is when code is evaluated. And embedding it simply means linking the interpreter library. Snigl and D are sort of approaching Lisp from different angles.

Re:Compilers for Free by renox on Friday January 25, 2019 @07:33AM (#18997384)
Jai will go even more in this direction allowing even to do system calls, Jon Blow demoed a compile-time HW accelerated game..
Re:Compilers for Free by wtetzner on Friday January 25, 2019 @11:27AM (#18999474)
Many Lisps already support this; Common Lisp, Racket, Clojure, etc.