Hacker News new | ask | show | jobs
by smoldesu 1636 days ago
It's also a bit disingenuous to say it's "on Apple Silicon" when you're running it through a translation layer that won't exist in a few year's time. I'd wager the reason why the GNU folks say it doesn't run on ARM is because... it doesn't. Running it as an x86 program is mandatory, apparently.
4 comments

Well they do say that they need rosetta just to compile, that once compiled it "works", though I agree it's still too shallow of an article.
Apple Silicon has a (mostly) hardware translation layer, which this software is running on.

There's a special aarch64 build of the software available, so it clearly runs on ARM. Perhaps there's some kind of issue specifically on macOS that makes the existing ARM port incompatible with Apple's ARM implementation?

> Apple Silicon has a (mostly) hardware translation layer…

I can’t imagine what you mean by this, Rosetta 2 is a binary translation system implemented in software, based on QuickTransit. There are a few features implemented in Apple Silicon to make translation easier and more efficient, such as supporting Intel memory ordering, but thats about it.

I think it’s reasonable to worry about how long rosetta2 will be available. The first version, that allowed Intel Macs to run PowerPC binaries, was available for 5 years. Having said that, there’s no guarantee versions of MacOS beyond 5 years time will run on today’s M1 anyway (though M1 compatible versions will likely still get updates beyond then).

I can't say what Apple will do, but I'm really hoping they'll keep Rosetta 2 around for longer than Rosetta 1.

For starters, the Mac became a lot more popular in the Intel era than it ever was while on PPC, so there's a much larger quantity of legacy software that Apple would be cutting off. Secondly, the overall user experience of running apps via Rosetta 2 seems to be a lot better than Rosetta 1. And for Apple, Rosetta 2 was developed in-house and doesn't require continuous licensing fees to keep around (not that I'm particularly sympathetic to Apple's pocketbook.)

And for Apple, Rosetta 2 was developed in-house and doesn't require continuous licensing fees to keep around (not that I'm particularly sympathetic to Apple's pocketbook.)

I don't think any of those things matter; Apple will stop supporting Rosetta 2 as quickly as they can. They announced the transition to Apple Silicon will be two years and unless something unforeseen happens, that's what it's going to be.

I suspect that Rosetta 2 won't be available for new Apple Silicon Macs running macOS five years from now.

Of course, no matter how many years in advance Apple warns that a particular technology is going to be deprecated, that never stops people from complaining vociferously when it happens.

A great example is 32-bit apps, where Apple gave something like an 8-year heads-up that 32-bit apps were going away, which happened a few years ago but it's not hard to find threads on HN where people are still complaining about it.

> A great example is 32-bit apps, where Apple gave something like an 8-year heads-up that 32-bit apps were going away, which happened a few years ago but it's not hard to find threads on HN where people are still complaining about it.

But actually, I personally believe that the actual reason Apple killed 32bit support was because they didn't want to build it into Rosetta. (And they didn't want Intel computers to be able to run anything their new Apple Silicon computers could not.)

Before Apple Silicon was on the horizon, it was no problem for Apple to keep 32 bit and carbon libraries around for eight years because they might as well, it's not doing any harm.

(I'm also one of the people who was/is mad about 32 bit support, but I acknowledge that my opinion on the matter has no bearing on what Apple will decide to do.)

But actually, I personally believe that the actual reason Apple killed 32bit support was because they didn't want to build it into Rosetta. (And they didn't want Intel computers to be able to run anything their new Apple Silicon computers could not.)

I doubt it; that’s not how Apple rolls. They’re not like Microsoft which keeps legacy technologies around for backwards compatibility for several years after a technology is no longer mainstream.

Reasonable people can disagree but Apple is about the present and the future, not the past. Sure, they could have kept Carbon around or pick your favorite framework from the past but that’s generally not their thing.

Occasionally something from their past reappears, like the QuickDraw GX font format from the 90s that became the basis for today’s variable fonts on the web.

Apple has always been fine with some software not making the leap to the next operating system or processor architecture.

We’ve seen this going back to 68K to PowerPC then to Intel and now ARM.

Being able to run x86 operating systems (Windows) natively on Intel Macs was a huge selling point not that long ago and now it’s an afterthought that current buyers (mostly) don’t care about. Microsoft would bring Windows for ARM to Apple Silicon and so far, they haven’t.

And while this is all going on, Macs have never been more popular.

x86-32 was removed because it’s significantly less secure and performant than x86-64 and there were unfixable issues with the ABI like fragile ObjC superclasses. Don’t need any secret projects to explain that. The only people who seem to still have a problem are video game developers, who should maybe try writing clean code.

32-bit isn’t completely gone, it’s still on watchOS.

I would say it is more of the legacy codes that Apple don't want to keep providing support for backward compatibility. And it uses up spaces in your drive if they need to keep 32-bit library in case for those app that are running in that level.

Microsoft want to do that but it will be a huge risk since it will alienate their enterprise consumers.

> But actually, I personally believe that the actual reason Apple killed 32bit support was because they didn't want to build it into Rosetta.

Rosetta 2 contains functionality to correctly emulate 32-bit Intel code.

For Rosetta (1), QuickTransit was bought up by IBM. Rosetta disappeared not very long after that.
Rosetta 2 has nothing to do with Rosetta 1 (other than the name), nor any other company’s software.
Looks like QuickTransit was a jit engine which was the base of Rosetta 1. Rosetta 2 is AOT translation.
They’re both based on QuickTransit, but Rosetta 2 has an AOT mode as well as JIT. I’m sure the R2 engine is more advanced than the original engine, Apple employed several engineers from the original team, but it still uses and is based on licensed tech.
My understanding is that Rosetta 2 is based on LLVM.

Even the company that made QuickTransit is gone now, having been bought out by IBM a decade ago.

My understanding is that Apple hired a lot of the staff of Transitive, and had a more or less do whatever you want license with source access. Ad that the AOT mode is based on LLVM, but the JIT piece is still pretty core to the design (hence why other JITs run well on top of it).
So Java, Groovy, Scala, Kotlin and Clojure aren't running on x86, nor ARM, nor Apple Silicon?
In a lot of ways, yes. Their runtimes are so massive that saying they "run" on any of those architectures is a stretch of what is actually happening at a lower level.
In "a lot of ways", sure, but definitely not by the most common meaning of "program x runs on y architecture", and not the one being used by most people in this thread.

If you ask any random programmer if "Java runs on x86", 99% of them will say either "yes" or "I don't know what x86 is". Similarly, if you ask them "does Kotlin run on the SPARC architecture", they'll say "I don't know" and, if you give them some time to find [1], they'll amend to "no".

To be precise: the meaning being used by most programmers (and here) is "either the compiled binaries, the virtual machine, or the interpreter runs directly on the given architecture" - which clearly excludes MIT Scheme running on Rosetta, just as (to take a less controversial example) the fact that might be able to run the JVM on qemu on SPARC doesn't mean that the JVM runs on SPARC.

Thinking about the various levels of abstraction of VM's and interpreters is a fun exercise in general, but I don't think it's constructive in this particular situation.

[1] https://openjdk.java.net/jeps/381

No, it's not a stretch at all. This is just nerd contrarianism.
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".
> 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

I'm comfortable making that distinction. JavaScript isn't executed like normal, native code, so... I still agree.
> 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

Depending on code, a quite large fraction of your java code is run as x86 machine code at any times. It hardly gets more native than that.
Is it not running on Apple Silicon?