Solipsism Gradient

Rainer Brockerhoff’s blog

Browsing Posts tagged iPad

Re: iPad time

1 comment

Via John Gruber, I just saw an interesting post by Steve Cheney:

It?s pretty evident that Apple isn?t wed to individual suppliers. Not only are they back to creating their own chips, but they are also one of the only ‘compute’ companies to have used each of the top 3 processor architectures over time – ARM, x86, and Power PC.

…This week Apple confined developers to a specific set of tools (XCode [sic]).

…By telling developers to move to XCode tools, Apple is setting the stage to potentially switch architectures.

…In 2003, Apple advised developers to switch to XCode tools. …2 years later Apple moved to Intel across its entire Mac line.

…perhaps the A4 is NOT an ARM architecture. In fact, it?s highly possible that the A4 is a dual core Power Architecture…

The last sentence is of course false, as Gruber says; the A4 does run ARM code.

While I don’t think that forcing developers to switch to Xcode (which is the correct spelling) means that Apple will soon be switching architectures on their iPad/iPhone line, or on their desktop/laptop line for that matter, Xcode does offer developers a future-proof environment that hasn’t been commented on by other observers: the Clang/LLVM project. Briefly, Clang is a compiler frontend for C-based languages, backed by LLVM – which stands for “Low Level Virtual Machine”. Both projects are heavily backed and staffed by Apple.

Clang has been increasingly supported by Xcode as a substitute for the gcc compiler toolchain. The details are quite esoteric, but one interesting capability is that C-based languages – C, Objective-C and C++ – are compiled to the LLVM bytecode, which is then translated into native machine language by a back-end. The last phase could even happen in a just-in-time fashion, allowing apps to be distributed in LLVM code (therefore running on all current and future Apple machines). Some groups are even working on chips that execute LLVM bytecode directly.

In other words, it’s no coincidence that Apple is now instructing developers to switch to Clang-supported languages and their Clang-wrapping IDE (Xcode). There may not be an architecture switch coming soon, but Apple will have much more freedom in doing their own CPUs for iPad/iPhone, and more ammunition in negotations with Intel and other top-end chip companies.

iPad time

No comments

No, I haven’t ordered one myself; they’ll take some months to appear hereabouts, and will be expensive. Maybe at WWDC I’ll buy one, though I may not be able to attend this year.

Of course most of the reviewers already have theirs, and the divide between the geek and non-geek users is being endlessly rehashed. David Pogue at the NYT went so far as to do a double review. One predictable vote for the geek side came from Cory Doctorow:

Why I won’t buy an iPad (and think you shouldn’t, either)

…Relying on incumbents to produce your revolutions is not a good strategy. They’re apt to take all the stuff that makes their products great and try to use technology to charge you extra for it, or prohibit it altogether.

…But with the iPad, it seems like Apple’s model customer is that same stupid stereotype of a technophobic, timid, scatterbrained mother as appears in a billion renditions of “that’s too complicated for my mom”…

…As an adult, I want to be able to choose whose stuff I buy and whom I trust to evaluate that stuff. I don’t want my universe of apps constrained to the stuff that the Cupertino Politburo decides to allow for its platform.

Now, Cory is one of my favorite writers, but I think he went a little overboard there. Once you accept that Apple’s model customer indeed is the “technophobic, timid, scatterbrained mother”, all his other arguments become much weaker, since they apply only to old-fashioned tinkerers who are concerned about absolute freedom for their “universe of apps”, or even want to just run Linux on the thing.

Both Joel Johnson and John Gruber agree with me that the iPad is essentially a consumer device, not a device for tinkerers and makers.

Now, I consider myself a serious tinkerer. I learned programming in the days when that meant plugboards and punch cards, and programming books started out with chapters of flip-flop and half-adder schematics. I’ve owned a 1961 VW of which I knew every single wire and screw, learned how to do radio and TV maintenance, designed hardware and OS for special-purpose computers, and so forth.

However, even as a tinkerer, I don’t really want to open up my computer and tinker with it just for the fun of it – or install Linux on it, or whatever – as long as it works like I want it to. Now, I bought my first Mac in 1984, and have owned at least two dozen different models since then; I’ve opened up (and in many cases, expanded or modified) nearly all of them. The exceptions are my current iMac and MacBook Air; they just work fine, and I won’t risk marring the finish. icon_wink.gif If I want to tinker, I’ll get an old junk PC somewhere. But, nowadays, I find writing applications is more satisfying.

But I digress. What I do disagree with is some of this “freedom to tinker” entitlement philosophy. Quoting Cory again:

Having gotten into business with the two industries that most believe that you shouldn’t be able to modify your hardware, load your own software on it, write software for it, override instructions given to it by the mothership (the entertainment industry and the phone companies), Apple has defined its business around these principles.

Exactly; that’s Apple’s privilege, and as an Apple stockholder I agree with their position. Cory (or anyone) should be perfectly free to modify an iPad, write their own software for it and so forth – with one caveat: they can’t force Apple to help them with that, and once they do it, it’s not an Apple device anymore for all practical purposes: no warranty, at the very least, no support, and so forth. I suppose that they want all of that, too; quite unrealistic.

Update: yes, there’s the AppStore. I dislike the current terms, at least from the developer’s side, and they’re one of the factors that keep me from developing for the iPhone/iPad right now. I do think (make that hope) that the terms will – very gradually – become less restrictive. All this “politburo” stuff is, regrettably, fueled by today’s insanely litigious society and Apple’s reaction to avoid liability at all costs.

(This was a good question asked of me at formspring.)

So far, I haven’t done anything for the iPhone, for three reasons.

First, I don’t own a cellphone, and I find it quite difficult to write an app that I won’t use myself. I do have an iPod Touch, and I carry it with me on trips, but it seems I use it strictly as an alarm clock and as a normal iPod – the only apps I have installed are PCalc Lite and the Flycast internet radio. I look at other apps now and then, without finding any that give me that “wow I need that” thrill. (For the record, I’ve also owned the first Newton, the first Palm Pilot, and the Sony Magic Cap – all with their development SDKs – and I couldn’t think of a single useful app for them either; I suppose it’s a mental deficiency.) Also, recall that where I live there’s very little public WiFi, and 3G charges are ruinous… any app I’d use would need to work offline 99% of the time, which narrows things down considerably.

Second, the current AppStore model is extremely different from what I’m comfortable with – ideally, I want to distribute and support it myself, and be able to post updates immediately, without waiting for approval from anybody else.

Third, my main interest is in writing utilities – applications that extend or change the way “the system” or other applications do things. There’s no space whatsoever for that on the iPhone, and it doesn’t look like there’ll be space for it on the iPad for now.

That said, I do plan to attend WWDC 2010 and it’s possible that until June I think of some mainstream application that I’d like use myself. The larger screen could make all the difference. Send in suggestions!

Re: Magic Whatever

No comments

OK, herewith my first impressions of the thing. (As if nobody else weren’t posting theirs, too… I suppose this will be mainly of historical interest to Future Me.)

The name: iPad, not Magic Whatever. It could have been worse, at least it’s short and easy to remember; on the downside, I gather there are some unfortunate connotations to the name in English, and it’s a little too close to “iPod” typographically and phonetically. One possible consequence is that the iPod touch may be phased out soon, or renamed to “iPad mini”… <insert more connotation jokes here>.

Form factor: looks reasonable to me. Pity it doesn’t fold in half, but you can’t have everything. In vertical (ebook) position, it’s as tall as a trade paperback, but wider and thinner. Not optimal, maybe, for books and watching HD video, but the 4:3 aspect size makes for a less expensive display and easy connection to a presentation projector. Speaking of which, porting Keynote was a good idea; we’ll see a lot of iPads at conferences in the future. I suppose an IR receiver/remote control pair for presenters who prefer to pace back and forth will be out soon from the usual third parties.

Display: 1024×768 at 132 dpi. Quite vanilla-basic, but it means Apple wanted to hold the price down instead of going with seriously new technology here. It also means there’s plenty of things to build into a second-generation device later in the year.

It’s not a cellphone, just as I thought. Avoids the hassles of dealing with subventions and plans, selling through cellphone companies, and all that. I suppose it signals a future for VoIP over 3G for all but the most basic cellphones. The microSIM form factor is quite new, and it will no doubt make for slow adoption in many countries; ideally Apple would have made the device accept both old and new SIM types.

What’s missing from the hardware? Camera(s): a front-facing camera would be great for chatting/video conferences, and no doubt will appear in a future version. A back-facing camera, as in the iPhone? Probably not; the iPad is too large to use as a regular camera, and remember, this is not a convergence device; it’s directed at a market gap. Also missing: GPS. Again, something to build into a second-generation iPad. The “assisted GPS” feature is less precise and, as far as I know, only works well in some cities (most of which are in the USA).

The Apple A4 chip: information is scarce on that, beyond the 1GHz clock speed. I suppose Apple published that because it’s a round number, and contrasts nicely with the 600MHz previously published for the latest iPhone. Beyond that, we can safely assume that it runs the ARM instruction set – I haven’t seen the SDK yet, but I hear gcc 4.2 is the default compiler; that it was designed by the former PA Semi people; and that its built-in GPU has been heavily optimized for the iPhone OS X. Future systems may not be bound to ARM, once Apple deems Clang/LLVM production-ready.

Software: I can follow the reasoning of using a modified iPhone OS X – all the pieces are in place, zillions of users already know the GUI, the developer SDK and the AppStore are out there. On the other hand, the iPad inherits all their problems, too. Granted that those problems are mostly on the developer’s side. For me, it means that the type of utility I like to write can’t be done; there’s no multitasking, the APIs are too closed, applications can’t communicate easily, and Apple allows no replacement or supplementation of the basic interface.

Will I buy one? Well, eventually. Just a few months ago I almost bought a 64GB iPod Touch – the 8GB one I have now is too cramped for my music library. I use it only for playing music, and in 2 years of carrying it around I haven’t thought of a single app I would like to write for myself; maybe that will change with the larger screen. An iPad would be great to have as a general book/web reading device, especially on shorter trips. Unless Apple ports Xcode to it, I wouldn’t take it on a longer trip instead of a laptop, and even so the screen is too small. The MacBook Air’s screen is already cramped for development, and in terms of volume, better to carry the Air instead of an iPad with the keyboard/dock. The Air also allows me to run Eudora to check my email; I’ve tried in the past and just couldn’t get used to it.

For general use, I’ve no doubt the iPad will sell well, and the vertical markets developers seem to be impressed. Let’s see what the future (and the next WWDC) will bring.

Magic Whatever

No comments

Tomorrow, Apple will present their new product. It’s all but certain that it will be a tablet-like device, but all else is speculation.

I’ve been rereading my August 5 post here, detailing what I at the time thought reasonable guesses. A follow-up post had some lovely mock-up images (courtesy of Mario Amaya), which I still consider some of the best so far – pity they got relatively little linkage from elsewhere. Here’s a sample:

where you can see that my hunch at the time was of a folding dual-screen device, each screen having about 7″ diagonal and 1280×720 at 200ppi, 1024×576 at 160 dpi, or even 800×450 at 120 ppi resolution – this depending on the technology used and the price point the device aims at.

I also thought that allowing the screens to fold back-to-back would give us a nice videogame mode, and using it vertically would allow it to be used as my favorite reading device – a mass market paperback. (It would also have the exact dimensions of one of those.)

My main ideas here still stand: the device would be aimed at the ebook, portable videogame, and portable film-viewing markets, with a secondary use of web browsing, email and the usual stuff done on a netbook.

Of the thousands of speculations published elsewhere – I regret not having had the time to bookmark more than a few – a quite well-reasoned one is one by Channeling Design. The conclusions are mostly quite different from my own, though; well worth a read.

In the months since I wrote about this, some interesting new screen technologies and devices have been talked about: AMOLEDs, Mirasol, Skiff, Pixel Qi, and so forth. For an ideal tablet, we should have 200 ppi, color- and video-capable, readable in direct sunlight but with low-power backlighting, touch sensitivity, video camera built in between the screen pixels, and a surface that is both hardened (like Gorilla Glass) and smudge-rejecting. Of course, it should also be extremely thin.

The puzzle is, essentially, which combinations of these properties have been deemed necessary and economical for a generation-1 device. I don’t doubt that Apple (meaning, Steve Jobs) has both the cash and the persuasion ability to buy the entire output of one of those manufacturers for a year or so; perhaps even to convince them to hide the fact that their display has progressed beyond the prototype stage.

Regarding the rest, I have mostly negative reasoning to offer. I don’t think the device will be an iSomething; there’s already too many of those, and none of the proffered names seemed convincing (except iBook, which has been used in the past). A Magic Something would, perhaps, pick up the trend of the Magic Mouse, and signal a departure from the iPod/iPhone/iBook era.

I also don’t think it will be a cellphone – meaning, a device sold and partially subsidized by cellphone companies – the iPhone already fills that niche quite well. It will have a few wireless connections of course, but not all of them, and that won’t be its primary function. I also expect Apple to pitch the device for functions that can be done by iPods, iPhones or MacBook laptops, but it will be at its best doing things that aren’t done well by any of those; reading ebooks is the obvious one here. (As an analogy, consider that when the iPod came out, you already could play music on Mac laptops and desktops with iTunes – it just wasn’t their primary function, nor was it convenient to do so in the context the iPod was aimed at.)

The device will run “OS X” in some new incarnation, but it won’t be the iPhone OS X nor the Mac OS X – though it may, perhaps, run apps for the iPhone in emulation mode.

That’s as far as I care to speculate before the announcement… after all, part of the thrill is actually seeing the magician pull the rabbit out of the hat. icon_wink.gif

Re: iThingamajig

No comments

My reasoning about the possibly forthcoming iProduct was adopted by the nice folks at Mac+ (in Portuguese). For that piece, my friend, master illustrator Mario Amaya, made a few mockups which came out quite well.

Here is the closed device. I do disagree about shiny black – I think the aluminum Unibody design is more likely – but it does look good:

Regarding the name, by the way, “iBook” might be a good name to re-use if Apple really has the intention of doing to the ebook reader market what they did to the smartphone market. (It would also have the advantage that Apple already has all the registrations and trademarks.)

Here’s the opened device in horizontal browser mode:

This shows the foreground application on the top screen, and the virtual keyboard on the bottom screen. Note the URL and some other controls on the bottom, too. If there were other apps or widgets running in the background, either icons (Dock-like) or very reduced windows (Exposé-like) for each could be shown in a row above the keyboard.

The same mode would also be used for movie watching:

and of course the movie player controls would substitute the keyboard. Notice how power consumption would be reduced by keeping most of the pixels on the bottom screen turned off – one advantage of OLED screens.

For gameplay the bottom screen would be folded completely behind the device:

The game would be controlled by the thumbs in front and by the other 8 fingers on the back screen (whose pixels would be completely turned off).

Finally, here’s one way of implementing the ebook mode:

While I would like this to be feasible, in a first-generation device it would mean that both screens have to be the same resolution; two HD-capable screens (1280×720 at 200ppi) will probably set the device’s price too high, or they’d have to go down to 1024×576 at 160 dpi, or even 800×450 at 120 ppi.

It’s more likely that the top screen will have full-HD resolution, and that the bottom screen would have just enough to show the virtual keyboard. 800 or 640 pixels wide might be enough. In this case, the ebook mode would look just like the game mode – second screen folded to the back – but in a vertical position.

The thickness of the device is, as I mentioned, about 20 mm in the closed position. For balance reasons, the battery has to be in the bottom part. If the ebook function uses a double screen, the two halves should have 10 mm each; otherwise, the top part could be very thin, maybe just 2 or 3 mm.

In fact, the battery will take up 1/2 to 2/3 of the device thickness – current battery energy densities are still far from optimal. No doubt in 10 or 15 years, we’ll have a very thin slate device, probably foldable in the middle, mostly made from graphene with an integrated supercapacitor. Such a device could be made as thin as 0.5 mm; no doubt they’ll then have to fluff it up with aerogel to a thickness of 5 mm or more, or else we won’t be allowed to take it on an airplane! icon_smile.gif

Also notice the iPhone-like Home button at the bottom, and the camera pinhole at the top. As I said, Apple has a patent for incorporating a camera into a screen, but this is unlikely to become reality anytime soon. For augmented reality a second camera in the bottom/back half would also be nice to have.

The mockups don’t show any external connector. It will either have a small folding door like in the MacBook Air, or an iPhone-like dock connector, I think.


No comments

Here’s some wild speculation about the supposedly-soon-to-be-announced Apple Tablet. Rumors are flying fast and furious but all agree that the device will be based on a 9.7″ (or 10″) screen.

A week ago I saw compelling arguments that the Rumored Apple Tablet Is a Train Wreck. The article is quite logical: if Apple builds a touch tablet based on a 10″ screen, it will probably fail. It would be too large to use like an iPhone, holding it in one hand and touching with the other, and too large to carry in a pocket. It would also have to be relatively thick (and therefore, heavy) to protect the screen. Lying flat on a desk, the screen would be at a disadvantageous angle. In other words, it would be a keyboardless netbook; not Apple’s style at all. See the Amtek for an example of this.

Note that the word “tablet” is already too connected, in people’s minds, with certain features. I’m not sure what this new Apple device should be called; in fact, I hope that Apple avoids this designation entirely. I do think that it will, at least for its first generation, be primarily an entertainment device. More built for travel or leisure than for work, in other words.

Let’s look first at the constraints that Apple probably sees in such a device. First of all, they will want to avoid overlapping features with the existing product lines (or, at least, with where they’ll be taking these lines in the near future). So, the new device won’t have any direct phone functionality. It will of course play from a music library, as all Apple products do, but it’ll be too large to work as an iPod does. On the other side, it can’t compete with the low end of Apple’s laptops; this rules out running Mac OS X and/or having an arbitrary number of applications running simultaneously.

I see four basic applications for the new device: ebook reading, game playing, single-foreground apps like web browsing, and, perhaps, data entry. Current AppStore applications can do all of that to some extent, but are limited by the iPhone/iPod Touch’s small screen and puny input resources. So the new device needs a larger screen with full touch capabilities; 1280×720 pixels is necessary for HD movies, would be excellent for games, and reasonable for other applications. The screen would have to be thin, fast, brightly colored, and low-power. OLEDs seem to be the only technology available today that fits these requirements.

A 10″ OLED screen would have a pixel density of about 145 ppi. For comparison, a MacBook Air’s screen is 100 ppi, while the iPhone’s screen is 160 ppi. However, a serious issue with such dense screens is fabrication yield – the percentage of built screens that pass factory testing without too many defective pixels. Another problem with a single 10″ screen would be that a sizable portion of it will be taken up by a virtual keyboard or some other input control. A physical keyboard would make the device a small laptop and therefore is out of the question. Finally, the applications I listed above demand differing orientations of the device: horizontal for movies and games, vertical for ebooks.

One way of solving these problems is to use a clamshell-like design, but with two screens – more like a Nintendo DS than a netbook (this is also suggested by the “train wreck” author). Won’t two screens make it more expensive? Not at all, because of the yield problem, two smaller screens will probably cost 50% to 70% of a large screen. Making a 1280×720 screen at 200 ppi should be possible, giving a screen size 6.4″ by 3.6″ – about 163x92mm (roughly 7″ diagonal). With the same dimensions at 160 ppi, the screen would be 1024×576 pixels, keeping the 16:9 aspect ratio but sacrificing full HD capability.

So what’s near these dimensions? Well… I have here the paperback edition of “Cyberbooks” by Ben Bova (Jan.1990). It’s a quite funny story, but sadly out of print; the cyberbook’s inventor struggles against resistance by the entrenched publishing industry (hah!). This book is 178mm high, 101mm wide, and 20mm thick; easy to carry and to read.

And by a coincidence, these measures are only a few mm larger than the screen size I calculated above. So, for now, let’s assume a paperback-size device. I guess I should say mass-market-paperback-sized, as now there are these pesky “trade paperbacks”, which are not too well standardized, more expensive, and make me build my bookshelves larger than I want to – but I digress.

OK, let’s postulate a small book-sized device that opens in the middle. Each half measures 178x101x10mm, and the hinge is constructed to lock at certain angles. By the way, these are rectangular slabs with black glass on the screen side and Apple’s aluminum unibody elsewhere; the edges have to be rounded, but not much. The 10mm thickness is constrained mostly by battery capacity. Assuming the unibody back-wall to be 1mm, and the touchscreen to use up 2mm, we’ll have 6 to 7mm inside for a battery in one of the halves (the other half will contain the electronics). Apple’s new Li-polymer technology should allow for a 20 Watt-hour battery with these dimensions, by my rough calculations.

OLED screens have very variable power consumption; almost zero for black, maximum for white. Let’s estimate an average of 2W for each panel, and 3W for the electronics. This gives us a battery life of 3 hours when using both screens. If you play a movie on only one screen, this would go up to 4 hours; not too bad for a first-generation device. How would our applications work on this form factor?

Ebook reading: there are two options here, holding the “book” vertically as usual. Either we open the device 180 degrees, showing two pages, or we fold the right-hand screen completely behind the device. The second option is more likely, as only one screen would be active (reducing power consumption). Only the book application would be in the foreground.

Game playing: hold the device horizontally in both hands, with the bottom screen folded behind the device. Gameplay would be controlled with all 10 fingers (note that Apple has a patent for a touchscreen in the back of such a device). The back screen would be turned off to conserve power. Only the game application would be in the foreground.

Movie watching: this too is horizontal. The lower screen could be folded behind, as in the previous scenarios, or with the hinge locked at 110° as in a laptop, for sitting on a table. This would be stable as the bottom screen would be the one with the battery, which would be 2/3 of the device’s weight. Only the movieplayer application would be in the foreground.

Web browsing, or similar apps: two options. Horizontally, locked at 110°, the upright screen would show that foreground application, while the bottom screen would show the virtual keyboard, controls, and some status indicators. Vertically, with the device locked at 180 degrees, and joining the two screens into one – basically turning it into a classic tablet/netbook.

The 180 degree netbook mode is the one that has serious drawbacks. The hinge should bring the two screen halves together with a very small seam; tricky to implement, and making the screen edges sharper and more fragile. It also means that both screens would work at full brightness, raising power consumption. If the two screens are always separate, the lower/right one would be used only for virtual input – some bright pixels but a mostly black background, and then it could also have lower resolution – perhaps only half that of the main screen, lowering both costs and power needs.

Also notice that in all cases, there’ll be a single foreground app using the entire screen, and perhaps small widgets or background app icons on the “keyboard” screens. This also means that the device will run a version of OS X – no Mac-style interface, since that is very much tied to a mouse-type input device.

Further hardware refinements are possible. Apple has a patent on interleaving a camera with screen pixels. Doing that on both screens might be too expensive, but doing it on the screen that folds to the back might be just the thing for “augmented reality” applications. Haptic feedback? I don’t think there’s anything like that on the market yet. Voice input and stylus/handwriting input should be easy to do. An iPhone-style connector would be the minimum external interface (plus the usual audio connectors). Accelerometers, compass, GPS etc. will be built-in; an SD slot probably too.

Other details. The device will have any or all of the usual wireless connections – WiFi, WiMax, Bluetooth, 3G – but no direct phone capability. 32GB SSD storage would be a minimum. This will probably be the cue to roll out a CPU based on a P. A. Semi design; should it run the ARM instruction set, we’ll probably see current AppStore apps running in a compatibility box. In any event, Apple’s new Clang compiler technology means that supporting a new CPU architecture should be a piece of cake.

With all that, my tip would be a price in the $899-$999 range; rumors hint at a September 15th introduction, with availability sometime around the end of November. Will we see all of this in the first-generation device? Time will tell.

Re: WWDC 2009

No comments

The conference will be over tomorrow and I’m quite satisfied with the outcome. Now for some comments about the announcements and (NDA permitting) about what I learned.

I had some vague idea of going to some iPhone sessions and letting presenters (or friends developing for the iPhone) convince me that I should start developing for it. No such thing happened; session overlap was so severe, and there were so many labs to go to, and people to talk to, that I skipped any non-Mac session or discussion. What little I heard in the corridors confirmed my notion that the current state of iPhone development and the AppStore deviates too far from my preferred position as a utility developer – a niche Apple still keeps closed on the iPhone. Maybe when the tablet comes out… icon_neutral.gif

Speaking of tablets, while everybody agrees that one is in the works, it seems to be a year or so away from announcement. (Ditto for the new CPUs I hinted at, in my last post.)

Snow Leopard is the small new thing. Small for the user in a sense; it’s just refinements and greater speed. For developers, though, it’s the BIG new thing. And, as variously described as early as a year ago (can’t find URLs right now), much of the new stuff is driven behind the scenes by open-source projects Apple is driving: the Clang compiler, the LLVM back end, and the technologies made possible by Grand Central Dispatch, blocks and OpenCL. So, most of the sessions either expanded on this directly or offhandedly mentioned “there’s an API for that now – and it’s fully XYZ-enabled” (insert one of the technologies above).

These things have become possible because CPU chips had run into a clock frequency “sound barrier”; 3GHz is about the maximum current silicon can do without extensive and expensive cooling or exotic technology. So multicore has become the solution du jour: all Apple computers now have at least 2 core, and the top machine has 8 (16 virtual). Expect that number to double every 2 years, at least.

But for years multi-processor machines were hard to program. About 14 years ago, at another WWDC I bought a Genesis MP 528: this Mac clone had 4 PowerPC 604 processors running at a blistering 132MHz. It didn’t have much caching on those chips, and only Photoshop and a few other specialized apps could see more than one CPU, and that only for image filters. In two years the first PowerPC G3 CPU card, with a single processor but caching, running at 300MHz, had about the same Photoshop performance – and that performance was then available to all apps. So why didn’t more apps take advantage of the 4 CPUs? The classic Mac System 7 (to 9) had no easy way to allow for this; there was a very primitive multiprocessing API but the system was pretty much locked out of it.

As said in the keynote, Snow Leopard will support only Intel Macs; PowerPC Macs are, therefore, stuck in the Leopard era, and only some few bug fixes will appear on 10.5, then it’s over. I couldn’t find hard figures comparing the installed base; I’ve seen percentages quoted of between 10 and 35% of Macs Macs still in use being PowerPCs. I personally didn’t think this would dip below 25% before 2011; then again, as a stockholder, I’m glad Apple sold so many new Macs recently… icon_wink.gif

Some people question why PowerPC users will be left out of the Snow Leopard advantages, and I think I know why. While the top 4-CPU PowerPC machines still can hold their own with more modern machines under certain circumstances, the vast majority of PowerPC Macs have only 1 CPU; only a few big desktops have 2, and even fewer have 4. Most advantages of Snow Leopard come into play when you have at least 2 CPU cores, and there’s serious testing and bug fixing to be done for supporting an entire architecture. Apple probably just weighed those factors (with better numbers than I have available) and decided it wouldn’t work out.

Positives of the new Clang/LLVM combo: better compiler speed, better code optimization – both still starting out but they’ve more power in reserve, while the current gcc compiler and backends are pretty much maxed out; way better error messages, the Clang static analyzer is just awesome (a word I usually hesitate to use, but this really is!); lots of goodies to come from tighter integration with Xcode. Negatives: may still generate wrong/inefficient code in some circumstances; no C++ support yet (I don’t care myself about this one).

A sleeper advantage is, also, that the intermediate (LLVM) bytecode generated by Clang could possibly be stored as such inside executables, and be just-in-time compiled for execution on any target CPU. In other words, the same executable could run on a new machine Apple puts out, even if it has a new CPU chip/architecture, as long as the JIT compiler is in place for that; application developers wouldn’t have know (or care).

Regarding blocks (or “closures”, as they’re known in other places), they’re a syntactic convenience for programmers to pass executable code as data. As such, they make programs more readable. What makes them inordinately powerful in Snow Leopard is that they’re also the basic executable units for all of the cool new multiprocessing stuff in Grand Central Dispatch. Therefore, with a little discipline, it becomes easy for developers to chop up tasks into little slices than can be executed in parallel by however many CPU cores (or, with OpenCL, GPU units) are available to do them; and for the first time anywhere I know of, this facility is available throughout the system, even at a quite low level.

So, am I running off to convert all of my code to the new technologies? Well, yes and no. Many things still have to be done in a serial manner, and the system will do others in parallel behind my back. Also, it seems that writing a generic application that runs on both 10.5 and 10.6 (using the new stuff) is tricky; I’m still investigating how to best do it. Stay tuned for developments…

Photos licensed by Creative Commons license. Unless otherwise noted, content © 2002-2022 by Rainer Brockerhoff. Iravan child theme by Rainer Brockerhoff, based on Arjuna-X, a WordPress Theme by SRS Solutions. jQuery UI based on Aristo.