News for hackers. Stuff that matters.
Re:ARM Mac Impact on Intel by MaxBarraclough on Monday June 22, 2020 @04:43AM (#23598325)
> If you develop on x86, then you're going to want to deploy on x86

I can see this making sense to Torvalds, being a low-level guy, but is it true for, say, Java web server code?

Amazon are betting big on Graviton in EC2. It's no longer just used in their 'A1' instance-types, it's also powering their M6g, C6g, and R6g instance-types.

https://aws.amazon.com/about-aws/whats-new/2019/12/announcin...

Re:ARM Mac Impact on Intel by vbezhenar on Monday June 22, 2020 @05:20AM (#23598519)
I agree about Java. I'm using Windows to write Java but deploy on Linux and it works. I used to deploy on Itanium and also on some IBM Power with little-endian and I never had any issues with Java. It's very cross-platform.

Another example is android apps development. Most developers use x86_64 CPU and run emulator using intel android image. While I don't have vast experience, I did write few apps and never had any issue because of arch mismatch.

High level languages mostly solved that issue.

Also note that there are some ARM laptops in the wild already. You can either use Windows or Linux. But I don't see that every cloud or android developer hunting for that laptop.

Re:ARM Mac Impact on Intel by ravedave5 on Monday June 22, 2020 @12:00PM (#23601696)
It works until it doesn't. We had issues where classes were loaded in a different order on linux causing issues that we could not repro on windows.
Re:ARM Mac Impact on Intel by MaxBarraclough on Monday June 22, 2020 @12:33PM (#23602170)
Interesting, but in that case you changed OS rather than changing CPU ISA, so not quite the same thing.
Re:ARM Mac Impact on Intel by mark-r on Monday June 22, 2020 @01:33PM (#23603070)
No, it's exactly the same thing. The more variables you change, the harder it will be to debug a problem.
Re:ARM Mac Impact on Intel by api on Monday June 22, 2020 @07:01AM (#23598958)
I've deployed C++ code on ARM in production that was developed on X64 without a second thought, though I did of course test it first. If it compiles and passes unit tests, 99.9% of the time it will run without issue.

Going from ARM to X64 is even less likely to have issues as X64 is more permissive about things like unaligned access.

People are making far too big a deal out of porting between the two. Unless the code abuses undefined behaviors in ways that you can get away with on one architecture and not the other, there is usually no issue. Differences in areas like strong/weak memory ordering, etc., are hidden behind APIs like posix mutexes or std::atomic and don't generally have to be worried about.

The only hangup is usually vector intrinsic or ASM code, and that is not found in most software.

For higher level languages like Go or Java, interpreted languages like JavaScript or Python, or more modern languages with fewer undefined edge cases like Rust, there is almost never an issue.

This is just not a big deal unless you're a systems person (like Linus) or developing code that is really really close to the metal.

Re:ARM Mac Impact on Intel by bluGill on Monday June 22, 2020 @08:13AM (#23599331)
I've developed for x86, and deployed on x86. Some years later we decided to add arm support. Fixing the only on arm bug made our x86 software more stable. Turns out some 1 in a million issues on x86 that on arm happen often enough that we could isolate them and then fix them.

Thus I encourage everyone to target more than one platform as it makes the total better. This even though there are platform specific issues that won't happen on the other (like the compiler bug we found)

Re:ARM Mac Impact on Intel by josephg on Monday June 22, 2020 @09:39AM (#23600042)
Apparently Apple had macos working for years on x86 before they switched their computers to intel CPUs. The justification at the time was exactly this - by running their software on multiple hardware platforms, they found more bugs and wrote better code. And obviously it made the later hardware transition to intel dramatically easier.

I would be surprised if Apple didn’t have internal prototypes of macos running on their own Arm chips for the last several years. Most of the macos / iOS code is shared between platforms, so it’s already well optimized for arm.

Re:ARM Mac Impact on Intel by jki275 on Monday June 22, 2020 @10:02AM (#23600278)
They've had it deployed worldwide on ARM -- every iPhone and iPad runs it on an ARM chip.
Re:ARM Mac Impact on Intel by pjmlp on Monday June 22, 2020 @07:45AM (#23599163)
To add to your example, everyone that targets mobile devices with native code tends to follow a similar path.

Usually making the application run in the host OS is much more productive than dealing with the emulator/simulator.

Re:ARM Mac Impact on Intel by headmelted on Monday June 22, 2020 @11:07AM (#23601045)
Most of my work outside of the day job is developed on x86 and deployed on ARM.

Unless you're talking about native code (and even then, I've written in the past about ways this can be managed more easily), then no, it really doesn't matter.

If you're developing in NodeJS, Ruby, .NET, Python, Java or virtually any other interpreted or JIT-ed language, you were never building for an architecture, you were building for a runtime, and the architecture is as irrelevant to you as it ever was.

Re:ARM Mac Impact on Intel by labcomputer on Monday June 22, 2020 @12:38PM (#23602233)
> Python

Well I can't speak to some of the others... but Conda doesn't work at all on ARM today (maybe that will change with the new ARM Macs, though), which is annoying if you want to use it on, say, a Raspberry Pi for hobby projects.

Additionally, many scientific Python packages use either pre-compiled binaries or compile them at install-time, for performance. They're just Python bindings for some C or Fortran code. Depending on what you're doing, that may make it tricky to find a bug that only triggers in production.

Re:ARM Mac Impact on Intel by headmelted on Tuesday June 23, 2020 @04:09AM (#23611143)
Sorry, yes this is an exception.

Also one I've come across myself so I'm a bit disappointed I didn't call this out. So... kudos!