News for hackers. Stuff that matters.
Re:Scala Native with Denys Shabalin – Software Engineering D... by binarynate on Thursday October 19, 2017 @01:59AM (#15505753)
Interesting question - I hadn't thought about compiling the JVM bytecode to machine code. It looks like there is a Java frontend for LLVM that achieves that: https://llvm.org/svn/llvm-project/java/trunk/docs/java-front...

One of the things that appeals to me about Scala Native is its interoperability with C, which I suspect is something that the LLVM Java frontend doesn't provide.

Re:Scala Native with Denys Shabalin – Software Engineering D... by nerdponx on Friday October 20, 2017 @09:18AM (#15515496)
Doesn't the JVM have some kind of native FFI?
Re:Scala Native with Denys Shabalin – Software Engineering D... by binarynate on Sunday October 22, 2017 @02:44AM (#15525490)
I suspect the built-in Java Native Interface (JNI) won't work when compiling bytecode to native code, since the JNI methods require a pointer to the JVM (passing a pointer to the JVM to C functions or calling methods on the JVM class in C++). Perhaps an FFI library like this could work, though: https://github.com/jnr/jnr-ffi .