Re:MIT Scheme on Apple Silicon
by moron4hire on Tuesday December 28, 2021 @10:18AM
(#29714522)
No, it's not a stretch at all. This is just nerd contrarianism.
[ Parent
| on HN ]
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?
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
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
They’re talking about the web.
I'm comfortable making that distinction. JavaScript isn't executed like normal, native code, so... I still agree.
When the majority of programs in the world can't be "run" according to your definition, you might want to reconsider your definition.
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.
> Is there a way for me to run a Java program as native machine code?
Yes [1].