News for hackers. Stuff that matters.
Re:Testing the Jai Compiler by Dude2023 on Friday March 16, 2018 @04:22AM (#16599327)
It compiles now? I thought it was a C++ transpiler.
Re:Testing the Jai Compiler by Ace17 on Friday March 16, 2018 @02:07PM (#16602658)
Honest question: (besides compile times) what are the advantages of directly generating machine code, instead of generating C++ code?

Doesn't it actually reduce the set of target platforms, while making the compiler harder to debug (by making its output mostly non-human readable)?

Re:Testing the Jai Compiler by dalailambda on Friday March 16, 2018 @08:08PM (#16604893)
One of the major reasons that would influence a language like Jai is that once you do that, even if your generated C/++ is fairly optimal, you still have to go through another slower compiler. Jai's compiler is fairly optimised for speed and I think that would be an unacceptable trade off.

On the target platform side, a video game tends to have a fairly well known set of platforms it will run on (new PC's, PS4, Xbox), so I think this is an acceptable trade off.

And just a final note, the generated C/++ would be very unreadable anyway, unless it was a direct transpiler, at which point you lose a lot of the benefits of having a new language.

Re:Testing the Jai Compiler by runevault on Friday March 16, 2018 @02:34PM (#16602890)
by generating C++ code you automatically gain C++ baggage. By generating machine code you are tied directly to how the machine works. If you don't want to deal with something like RAII you'd have to find ways to generate code that doesn't do that, where as machine code you just tell it how to exactly move memory around etc.
Re:Testing the Jai Compiler by runevault on Friday March 16, 2018 @12:13PM (#16601603)
It's been using LLVM or directly writing x86-64 directly (based on config) for over a year now. Maybe over 2, but for a long time they've been away from transpiling.
Re:Testing the Jai Compiler by sambeau on Friday March 16, 2018 @05:35AM (#16599533)
I believe it also has an LLVM backend these days