Today, Clang completed its first complete self-host! We built all of LLVM and Clang with Clang (over 550k lines of C++ code). The resulting binaries passed all of Clang and LLVM’s regression test suites, and the Clang-built Clang could then build all of LLVM and Clang again. The third-stage Clang was also fully-functional, completing the bootstrap.
Congratulations to all of the Clang developers on this amazing achievement!
Huzzah! I’m so buying LLVM/Clang devs a drink if I ever meet them.
Eugene Lin wanted to be rich. Steve Jobs promised it. App after app, the Apple gods got angry with him. Until finally, with nothing but an accelerometer, two dozen naked women, and the nation of Japan, Eugene had a story to tell.
Tomorrow, 20 January 2010, a lot of indie Mac and iPhone developers are getting together to sell their software. What makes the 20th so special? The sales for the entire day are being donated to Haitian relief charities. That’s over 135 companies selling their products and then giving the money to those in need. If you’re looking for some Mac or iPhone software check out Indie+Relief.
More can be learned at Carpeauqa where Justin Williams details more about it.
Bill Bumgarner is an engineer at Apple, Inc. He’s graciously provided a couple of primer documents for blocks, Apple’s new addition to the C-based languages (C, Objective-C, and C++). If you’re interested in blocks these are a great overview:
The simplistic explanation is that GCD is a combination of thread pooling and closures. The honest truth is that if thread pooling is a Motorola ROKR then GCD is an iPhone 3GS… while they are both phones and nominally do the same thing, no one would ever claim they are equal, or even i the same league. The guys at Apple who came up with it deserve a ton of credit.
Panther introduced Key-Value Observing, a Cocoa implementation of the observer pattern. It’s very useful, but the API kind of sucks.
To get observation notices, you have to override a lengthy selector (observeValueForKeyPath:ofObject:change:context:), provide a static context pointer, and essentially implement a big switch statement on the key path.
That’s unwieldy, but I think it also makes for unmaintainable code: the callbacks end up thrown in the same method, and they’re separated from the observer registration.
KVO+Blocks is an NSObject category I wrote which provides addObserverForKeyPath:task:, where the latter parameter is a block.
In Mac OS X 10.6, Apple introduced a syntax and runtime for using blocks (more commonly known as closures) in C and Objective-C. These were both later back-ported to Mac OS X 10.5 and the iPhone by Plausible Labs. However, there is very little documentation on blocks; even Apple’s documentation that come with 10.6 is very vague on what memory management rules apply. I hope that you can avoid all the trial-and-error that I went through with the help of this guide.
From Andrew Pouliot comes a great tip about using the Core Animation debug mode both on a touch device or in the simulator. This really helps get to the core of blending and where your app can stand to speed up.