News for hackers. Stuff that matters.
Re:Apple starting to alert users that it will end 32-bit app... by xenadu02 on Thursday April 12, 2018 @12:30AM (#16817983)
Backwards-compatibility is an interesting story on the mac. The Objective-C ABI on 32-bit macOS is what is called the "fragile" runtime because it has the fragile base class problem. Originally Objective-C had the same design flaw as C++: the ivars of every class had to be in the header for all to see so the compiler could rely on the binary layout. A subclass' ivars would be offset by the compiler by examining the layout of every superclass, then baked into the binary.

In the modern (all iOS and 64-bit macOS) runtime the ivar offsets are patched up at runtime so the layout of classes (including base classes) can change without breaking compatibility.

Working around the limitations of the 32-bit Objective-C runtime imposes significant costs, it is far from a simple recompile with a different pointer size. It also adds a lot to the size of the installed OS.

Re:Apple starting to alert users that it will end 32-bit app... by mrpippy on Thursday April 12, 2018 @12:56AM (#16818114)
There are also a whole bunch of APIs left out of 64-bit macOS, including almost all of Carbon that dealt with UIs (HIToolbox, ATSUI, QuickDraw, Nav Services, Dialog/Menu/Font Manager, etc). None of these APIs have received anything more than bare maintenance in the last 10 years, and evolving the system while keeping them operational has not been easy.

In a way, this is the true last step of the Mac OS X transition that started in 2001--the removal of the transitional APIs that made it possible.

Re:Apple starting to alert users that it will end 32-bit app... by Twisell on Thursday April 12, 2018 @03:30AM (#16818729)
I find it interesting in perspective of the Swift language their are now pushing.

Theoretically would’nt programms written in pure Swift today be able to compile for any new hardware plateform, thus avoiding the kind of issues that 32/64 switch faced?

Re:Apple starting to alert users that it will end 32-bit app... by AstralStorm on Thursday April 12, 2018 @03:39AM (#16818764)
Instead you get issues with updating from Swift 1.x to 7.x.

The educational story of this sort is the transition between python 2 and 3... not ever done for some packages.

Re:Apple starting to alert users that it will end 32-bit app... by saagarjha on Thursday April 12, 2018 @12:53PM (#16822749)
Swift is a new language, so it’s sure to have source breakage in the first few versions. The compiler is now backwards compatible, though.
Re:Apple starting to alert users that it will end 32-bit app... by spronkey on Thursday April 12, 2018 @05:53AM (#16819326)
So much this. When you're a small team, this sort of thing can basically mean having a product vs not.
Re:Apple starting to alert users that it will end 32-bit app... by npunt on Thursday April 12, 2018 @12:40AM (#16818029)
It's kind of sad we're in this state in 2018 because Apple launched 7 low end machines [1] back in 2006 that didn't have 64-bit support. Even though those are long gone, their software support legacy remains. Apple could have transitioned directly to x64 and saved themselves the headache (afaict, maybe these problems would have persisted?).

[1] http://lowendmac.com/2006/core-duo-macs/

Re:Apple starting to alert users that it will end 32-bit app... by mrpippy on Thursday April 12, 2018 @12:48AM (#16818073)
Apple couldn't have gone straight to 64-bit apps on Intel--the OS and frameworks just weren't ready yet. The Intel machines shipped starting with 10.4.3, which only supported 64-bit command-line apps/daemons. Only with 10.5 (released in late 2007, 18 months after the first Intel machines) were full graphical 64-bit apps supported (on both ppc64 and x86_64).
Re:Apple starting to alert users that it will end 32-bit app... by wtallis on Thursday April 12, 2018 @12:56AM (#16818113)
Firmware was an issue, too. The first generation of Macs with 64-bit processors still used 32-bit EFI and booted a 32-bit kernel that could run 64-bit applications.
Re:Apple starting to alert users that it will end 32-bit app... by mrpippy on Thursday April 12, 2018 @01:17AM (#16818209)
True, it wasn't until 10.6 that a 64-bit kernel was available, and only newer machines got to use it.

https://arstechnica.com/gadgets/2009/08/mac-os-x-10-6/5/

Re:Apple starting to alert users that it will end 32-bit app... by yuhong on Thursday April 12, 2018 @01:54AM (#16818370)
I had a blog article about the entire mess that was often confused (there was actually three modes): http://yuhongbao.blogspot.ca/2009/09/mac-os-xs-64-bit-modes....
Re:Apple starting to alert users that it will end 32-bit app... by rz2k on Thursday April 12, 2018 @01:26AM (#16818246)
The oldest Macs that support Sierra (10.12) or High Sierra (10.13) are from 2009. You may be able to bypass these restrictions which are often based on graphics chips through kernel extensions, but discontinued support for 32bit probably has much more to do with older software than older hardware.

If you want to find unusual problems with older Apple hardware for the sake of reusability, take a look at the firmware from around that time. It was just weird enough to make it similar to standards but often too difficult to support a decade later. In a decade, people are going to say the same about the not-quite NVMe SSD interfaces in current Macs.

Re:Apple starting to alert users that it will end 32-bit app... by jammi on Thursday April 12, 2018 @02:23AM (#16818467)
What's worse is that they had already been transitioning to 64bit hardware with the PowerMac G5 and iMac G5 models since 2003.

Anyhow, I doubt they'd have had time to make a solid 64bit x86_64 SDK even if they had delayed the hardware to late 2006. They had never stopped maintaining the x86 port of OS X (aka Rhapsody, Open Step, NeXT Step), just stopped shipping it as a product, because their strategy was and still is to package their OS in hardware boxes. They started shipping x86 boxes to developers in the form of the x86 development box, which was a (32bit) Pentium 4 shoehorned into a Power Mac G5 case. Its OS is also what leaked to the early x86 hackintosh scene; before Apple shipped their own x86 Macs. I ran it on an custom Athlon64 box and a ThinkPad T42.

Since they already had the x86 port, it was an easy switch at a time when all x86 hardware from Intel was still 32bit. If they knew Intel would adopt x86_64 from AMD, one option could've been to ship with AMD CPU's on the first models, but I'm not sure how well that'd have turned out logistically or whether it'd have made a huge difference.

Re:Apple starting to alert users that it will end 32-bit app... by yuhong on Thursday April 12, 2018 @01:50AM (#16818358)
They wanted to avoid NetBurst (including Prescott and Cedar Mill) and picked Yonah which was 32-bit only instead.
Re:Apple starting to alert users that it will end 32-bit app... by saagarjha on Thursday April 12, 2018 @12:55PM (#16822773)
I never did understand why this couldn’t be backported to 32-bit. Was it something like a lack of bits for tagging, or something more mundane like nobody wanting to support 32-bit?