News for hackers. Stuff that matters.
Re:MIT Scheme on Apple Silicon by smoldesu on Tuesday December 28, 2021 @10:30AM (#29714632)
Well, let's see. Is there a way for me to run a Java program as native machine code? Or is the code that I'm executing still a runtime that interprets a program?
Re:MIT Scheme on Apple Silicon by ebruchez on Tuesday December 28, 2021 @01:59PM (#29716736)
Yes there is, although it's not in widespread use yet. [1]

For Scala, there is, separately, Scala Native. [2]

Both have ahead-of-time (AOT) compilers that compile down to the target architecture.

[1] https://www.graalvm.org/reference-manual/native-image/ [2] https://github.com/scala-native/scala-native

Re:MIT Scheme on Apple Silicon by maratc on Tuesday December 28, 2021 @10:34AM (#29714671)
The vast majority of the programs in the world are written in Javascript, and there's no way for you to "run" them if by that you mean "natively".
Re:MIT Scheme on Apple Silicon by andrewxdiamond on Tuesday December 28, 2021 @01:25PM (#29716355)
> The vast majority of the programs in the world are written in Javascript

Where is this coming from? What about the literal thousands and thousands of programs on your OS right now? Or the thousands of systems that power large corporations that predate JavaScript popularity?

Sure the language is popular right now, but software development has a much longer history than the last 10 years

Re:MIT Scheme on Apple Silicon by saagarjha on Tuesday December 28, 2021 @03:47PM (#29717941)
They’re talking about the web.
Re:MIT Scheme on Apple Silicon by smoldesu on Tuesday December 28, 2021 @10:49AM (#29714807)
I'm comfortable making that distinction. JavaScript isn't executed like normal, native code, so... I still agree.
Re:MIT Scheme on Apple Silicon by maratc on Tuesday December 28, 2021 @11:01AM (#29714935)
When the majority of programs in the world can't be "run" according to your definition, you might want to reconsider your definition.
Re:MIT Scheme on Apple Silicon by ithkuil on Tuesday December 28, 2021 @02:57PM (#29717340)
Since we're enjoying a nitpick picnic you can compile JS AOT to Java with rhino and then to native code with GCJ
Re:MIT Scheme on Apple Silicon by robbedpeter on Tuesday December 28, 2021 @12:09PM (#29715623)
You're redefining the terms, native and interpreted programs are differentiated by the execution layer, and it has nothing to do with where a majority of programs live.
Re:MIT Scheme on Apple Silicon by rjsw on Tuesday December 28, 2021 @04:07PM (#29718184)
> Is there a way for me to run a Java program as native machine code?

Yes [1].

[1] https://en.wikipedia.org/wiki/GNU_Compiler_for_Java