Jun 08

I’ve been watching reaction to the Apple announcement. On the one side, there are a lot of long-time Mac fans who have been expressing a kind of unfocused pessimism. Something about the move makes them really unhappy at a subconscious level, but they seem unable to express exactly what.

Then on the other hand, there are lots of people saying “Hey, it’s just a computer, it’ll still run OS X and be pretty and be a Mac even if it has a Pentium 4 inside.” I think that’s not quite true, in a fairly subtle way. To understand why, though, you need to understand the Mac religion.

Apple have been forced to make the move because the desktop CPU marketplace, while still competitive, is only competitive around a single instruction set–the one that has gradually evolved from the original 8086. The x86 instruction set dominates the desktop, in CPUs from VIA, Intel, Transmeta, AMD and others. It’s even somewhat strong in the embedded space. Compiler technology for x86 advances far faster than for any other instruction set.

So let’s be clear: x86 is completely dominant. And it blows. That’s what makes the move so hard for many Mac-heads to accept. The Mac has always been about doing what’s technically right, not what’s most popular.

For instance, I vastly prefer the clean simplicity of the 6502 to the ugliness of the Z80, having written code for both. The 680×0 was a joy to write for compared to the 8086 thru 80486.

Moving up out of the realm of processors, SCSI was clearly superior to IDE. USB was obviously the right thing, even if serial ports and ADB were far more popular and USB peripherals were initially almost impossible to find. Firewire is better in every way than USB 2.0 HiSpeed.

In the software layer, the way the Mac filesystem works is a pain in the ass to write for, but the way the system behaves to the end user as a result is clearly the right way. (Programs don’t break when you move them, files launch to the application you last edited them with, and so on.)

In short, the Mac has always been about picking the best technology and doing what’s right. But now suddenly there’s going to be an x86 CPU in the middle of it all–kludge after kludge piled on top of the original 8086 design. And recall, IBM chose that because it sucked, they didn’t want to choose something that might threaten their real computer systems. Worse, the Mac isn’t even going to be using leading-edge AMD 64 bit x86 CPU, it’s going to be a 32 bit Intel processor.

Basically, the Mac community is being served a shit sandwich. It may still be the finest ciabatta bread, the freshest pickles and lettuce–but there’s going to be a huge turd in the middle, and some of us are having a hard time preparing to swallow it, even though we know it may be necessary–because as the saying goes, “Eat shit! Fifty billion flies can’t be wrong!”

Jun 06

It wasn’t much fun following Apple during the 90s. The transition from mono to color was painful, as it involved whole new chunks of OS and a different processor. The transition from Motorola 680×0 to PowerPC was also ugly and painful, and a lot of software simply stopped working and was never fixed. Those of us who had 680×0-based Macs quickly found them made forcibly obsolete long before they would normally have become unusable. Then came OS X, and a bunch more machines were forcibly obsoleted, more software broke, and more developers gave up.

Things have been looking pretty good in the Apple world recently, though. The technically adept have been flocking to switch to the Mac, the OS keeps getting faster and better rather than bigger and flakier, and open source and Java software now runs better on OS X than on Windows.

And now, here we go again. Except that this time, it’s going to be much worse. Whereas PowerPC processors were able to emulate 680×0 at acceptable speed, it’s going to be a lot tougher to try and emulate a 3GHz PowerPC G5 on any kind of Intel chip, even the kind shipping next year. Everyone who uses Metrowerks CodeWarrior for their Mac development (i.e. all those big old legacy Carbon applications from the 68K days) is going to be out of luck, as they’ll first have to drag their entire codebase over to Xcode, and then spend weeks (according to Jobs) fixing up the code. So one thing’s for sure–we’ll be waiting years for another release of Quark XPress this time, too.

The core problem is that the x86 is a lot less like the PowerPC than the PowerPC is like the 680×0. For starters, the x86 stores all its numbers half backwards and half forwards–the least significant bytes are stored first, but within a byte the most significant bits are stored first. (That kind of ugliness is fairly typical of Intel designs, which are legendarily unpleasant to program for at low level.) Any program that does bit or byte manipulation is likely to break. The PowerPC also has a lot more registers than the x86, which means that emulation is tough.

Ultimately, though, the fact that the x86 is a hideously ugly design doesn’t matter too much, because hardly anyone touches machine code these days.

Still, will Apple be able to pull off this kind of screwing around with their developer and user communities again? I don’t know. The more interesting question is why they are willing to risk it. With Nintendo, Sony and Microsoft all using PowerPC cores in their next-generation console systems, it really seems like a strange time to switch to Intel CPUs. Plus, if you want an x86 with PC-crushing performance and price, why not choose AMD rather than Intel?

One possible reason is that Apple is strongest in laptops, and IBM has singularly failed to deliver a G5 that can be stuck inside a laptop. AMD isn’t all that in laptops either, which would explain why Intel. But then again, there’s no reason why laptops can’t continue to use the G4, save for the perception that the G4 is “obsolete”, a perception which Apple itself has to take the blame for. Jobs says that there are no plans for improvements to PowerPC for the next few years. I don’t know whether that’s true or not; we’ll see.

Then there’s the intriguing possibility that Apple would like users to be able to run WINE. On the one hand, people could then switch to a Mac and still run their Windows software on it, for free. On the other hand, who would bother to develop Mac software if everyone could run Windows software? One possible answer might be to bring back Yellow Box for x86, which allowed Cocoa (NeXTStep) software to run on Windows. Still, even without WINE, software developers might just say “Hey, you want to run our software on your Mac? Just dual-boot into Windows!” (Jobs has already said that they’re not going to do anything to stop people running Windows on the Mac.)

So WINE on the Mac and Intel CPUs in the Mac could either be a colossal disaster that will kill the platform, or the best thing to ever happen to the Mac. I’m not going to pretend I know which is the case. I do know one thing, though: I’m sure as hell not going to buy a new Mac now, and I had been hoping to upgrade some time during the next year. No, I’m going to sit quiet and see what happens. I’ll want to see all my core applications available in native x86 versions, and an x86 based Mac that blows the doors off the G5, before I spend more money on Apple hardware. And as with the last round of turmoil (the switch to OS X), if it all goes disastrously wrong I’ll just switch to Linux everywhere.

Jan 06

It’s something I’ve wanted to see happen for a couple of decades now, and finally it’s happening: Intel are getting their asses handed to them by a better CPU maker, in this case AMD.

If you weren’t in the computer industry in the 80s, you might not be aware that IBM picked the x86 processor series for the IBM PC specifically because it sucked. IBM sold lots of high end workstations and word processing systems, and made good money doing so; the last thing it wanted was for the PC to eat into that market. So, they made a PC which was good enough to satisfy hobbyists, but hopefully crap enough not to compete with IBM’s serious business hardware.

What IBM didn’t foresee was companies like Compaq taking the basic PC design and improving it. Soon the PC’s memory was no longer limited to 640K, it had a real FPU, a 16 bit processor, larger and larger hard drives supported via vendor-specific extended versions of MS-DOS, and so on.

Still, by the late 80s it was clear that the x86 architecture was a mess. Even Intel engineers realized it. So, they started to design a completely new CPU with a clean, modern RISC-based design. The result was the Intel i860.

Unfortunately, the i860 was designed with an 80s PC mindset, and its performance was horrible as soon as you started to context-switch. It would have worked fine for single-tasking MS-DOS systems, but it was a dog as soon as you wanted pre-emptive multi-tasking. And by the early 90s, when Intel started pushing migration to i860, PC users had begun looking at the Apple Macintosh and Commodore Amiga and asking “Why can’t I do that?” Worse still, other RISC chips like the PowerPC were quickly outpacing the i860.

So the i860 bombed. Intel went back to trying to solve the x86s fundamental problems by throwing more and more transistors at it. Which is why we now have Pentium chips that dissipate 45W of power to run at the same speed as 15W PowerPCs.

People outside the computer industry often don’t realize that Intel aren’t really a technology company; they’re a marketing company. They’re very like Microsoft, in fact—they achieved success by being lucky enough to get picked by IBM, developed a near monopoly, and became fantastically rich. The difference is that whereas Microsoft has continued to dominate by acting illegally to preserve its monopoly, Intel has dominated by spending huge amounts of money on marketing.

The current egregious Intel marketing is “Centrino”. You’ve heard of it, and you probably think you want it, but chances are you don’t know what it really is. You might even think it’s a kind of low-power CPU. Well, it’s not–in fact, it’s just a code word. All “Centrino” really means is that the computer has a Pentium M CPU, an Intel chipset, and a motherboard with Intel wireless networking. It’s pure marketing, designed to force laptop manufacturers to buy everything from Intel instead of just the CPU. However, if the ads said “Buy a computer made entirely by Intel”, they wouldn’t be quite so compelling, would they?

Similarly, average people go into computer stores demanding a Pentium 4. They have no idea what a Pentium 4 is, let alone how it compares to the alternatives, but the saturation advertising has convinced them that they need one. When I tell people (such as my parents) that they can get an AMD system for hundreds of dollars less that’ll run all the same software faster, they find it hard to believe. If they’ve heard of AMD at all, they have some vague memory about Athlon chips being hot. (They were, when they were first released. Now they use less power than Intel Pentium 4 chips.)

In short, Intel CPUs are overpriced, oversized and tend to overheat. They are badly designed, but Intel compensates by using more silicon and more transistors to work around the bad design. Intel CPUs don’t sell on technical merit or bang-for-the-buck, and never have.

But back in the 90s, Intel decided to try again. This time they got help from HP, who had at least managed to achieve modest success with a RISC-based design in their PA-RISC “Bobcat” workstations in the 1990s, and had a next-generation CPU on the drawing board that would try to take the next step beyond RISC. Intel’s engineers got to work, and the new CPU was named Itanium.

HP also owned the DEC Alpha design. The Alpha was the fastest processor around, and was in use in every university science department where there was a need for number-crunching on the desktop. So HP killed it, perhaps out of hubris, or perhaps because of “Not Invented Here” syndrome.

Initially, forecasts for Itanium were rosy. Forecasts, remember, are made by marketing people and business people, not by engineers who know about Intel’s design history. Major vendors signed on to sell Itanium workstations and servers; SGI killed their own MIPS RISC CPU, predicting that Itanium would take over, and IDC expected $30 billion in Itanium server sales by 2001.

The big problem with introducing any new CPU is that businesses generally want to run Windows, which is built for x86. Initially, Intel’s answer to this problem of legacy back-compatibility was that software companies (i.e. Microsoft) would just have to recompile all their code for the Itanium. Of course, it’s now 2005 and Microsoft has just announced that it’s cancelling all plans for an Itanium version of Windows XP, even though OS X and Linux are both running on 64 bit hardware.

Meanwhile, AMD had used some of the design ideas from the DEC Alpha and put them into their x86 chip designs, and called the result Athlon. When the Athlon began beating the Pentium CPUs in performance, Intel quickly started shoveling an x86 compatibility mode into the Itanium design. It was a mess, and the chip’s power consumption ballooned to 130W. Itanium’s performance running x86 code was worse than the competing x86-only hardware; it was so bad that when they threw in the towel and implemented emulation instead, the emulator ran x86 code twice as fast.

Unfortunately, in the mean time AMD had added 64 bit features to their x86 design. The result was a chip with 64 bit power and full x86 compatibility with no slowdown, called Opteron.

So we reach today. Rather than shipping $30 billion of Itanium systems by 2001, Intel hoped to ship 100,000 Itanium systems in 2004. In the mean time, AMD predicted that they would have shipped 2,000,000 Opterons by the end of the year.

Update: Tony Finch tells me that the i860 wasn’t actually a total flop, and that it found a niche in embedded systems. There, it didn’t matter if it handled multi-tasking poorly, and the code could reasonably be hand-optimized in the appropriate places for the i860’s pipelined arithmetic unit—something compilers weren’t good at at the time.

Quite likely true; embedded software is one of those weird parts of the industry that I know very little about, almost its own separate world, where people run strange OSs like QNX and write programs in odd languages like FORTH. Still, a niche is a long way from what Intel wanted to achieve with the i860. I’m sure they’ll find a niche for Itanic too, but it’s still a flop when judged by what they planned it to be.