News for hackers. Stuff that matters.
Re:Scala Native with Denys Shabalin – Software Engineering D... by densh on Wednesday October 18, 2017 @10:33PM (#15505066)
JVM startup is really painful for short to medium time running apps, this is the niche we’re trying to address.
Re:Scala Native with Denys Shabalin – Software Engineering D... by nerdponx on Wednesday October 18, 2017 @10:38PM (#15505083)
I meant, "compile bytecode to machine code." The fact that nobody does it is a sign that it's not a good idea. I guess I was just wondering why.
Re:Scala Native with Denys Shabalin – Software Engineering D... by rpeden on Wednesday October 18, 2017 @11:02PM (#15505180)
Excelsior JET does it, and it works Scala. So you can already compile JVM targeted Scala to native code that way if you want to. JET is fairly expensive, though.
Re:Scala Native with Denys Shabalin – Software Engineering D... by densh on Wednesday October 18, 2017 @10:47PM (#15505119)
Scala is a relatively simple language in the end of the compiler pipeline. We just take lowered ASTs and emit our SSA representation from there because it’s easy it to implement it this way. You can totally do something similar from the bytecode.
Re:Scala Native with Denys Shabalin – Software Engineering D... by pjmlp on Thursday October 19, 2017 @01:13AM (#15505620)
Lots of people do it.

Besides ExcelsiorJET named in a sibling answer, the JDKs from Aicas, IBM, PTC, STMicroelectronics, Google with their ART implementation and a few smaller vendors for the embedded market.

Also Oracle just added initial AOT on Java 9, with plans to extend it to other platforms, and eventually (long term plan) rewrite everything in Java as part of Project Metropolis.

Oracle also had AOT compilers before Sun's acquisition, like JServe and JRockit.

Why does it seem no one does it?

Sun was religiously against AOT, leaving it to third party commercial vendors.

And since the rise of FOSS most developers think it is outrageous to pay for compilers, only Fortune 500s buy such compilers.

Re:Scala Native with Denys Shabalin – Software Engineering D... by nerdponx on Thursday October 19, 2017 @04:02PM (#15511094)
Are they all proprietary/closed-source? When I was first learning about Clojure I really wanted a native JVM compiler, but as a hobbyist I was not about to go all-in on an enterprise compiler. The only FOSS solution I found was GCJ.

That, and "the JVM startup is slow!" seems to be a popular argument against Clojure and Scala here on the Intertubes.

Re:Scala Native with Denys Shabalin – Software Engineering D... by pacala on Thursday October 19, 2017 @09:45AM (#15507797)
How about generating .so, callable from other environments, for example CPython?
Re:Scala Native with Denys Shabalin – Software Engineering D... by densh on Thursday October 19, 2017 @11:01AM (#15508492)
This is on our roadmap, stay tuned.