rolling through the journey that is life

Archive for the ‘Mac’ Category

Clang Successfully Self-Hosts!

Thursday, February 4th, 2010

Clang Successfully Self-Hosts!:

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.

“All that I’m going to say on the matter”

Saturday, January 30th, 2010

While quite a lot has been said about the iPad, I feel this succinct list from my friend Daniel Pasco sums it up:

iPad: from the company and the man that brought you: The Apple ][ Macintosh iMac OS X iPod iPhone

/via Soft Arts/Daniel Pasco

libdispatch is open source!

Thursday, September 10th, 2009

Apple has just released one of the coolest new technologies in OS X 10.6 as open source: libdispatch.

With libdispatch and blocks out in the wild I hope to see some of this tech coming my way for the day job. Woo hoo!

@bbum’s Blocks primers

Tuesday, September 1st, 2009

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:

Enjoy.

/dev/why!?!: Grand Central Dispatch

Friday, August 28th, 2009

A good overview of Grand Central Dispatch and Blocks.

/dev/why!?!: Grand Central Dispatch

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.

Square Signals : KVO+Blocks: Block Callbacks for Cocoa Observers

Tuesday, August 25th, 2009

Square Signals : KVO+Blocks: Block Callbacks for Cocoa Observers: “Andy
Matuschak.

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.

Programming with C Blocks on Apple Devices

Tuesday, August 25th, 2009

Programming with C Blocks on Apple Devices by Joachim Bengtsson

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.

iPhone Sudoku Grab: How does it all work?

Thursday, August 20th, 2009

iPhone Sudoku Grab: How does it all work? A very cool, detailed but not over your head, overview of how the iPhone app Sudoku Grab can use a picture of a Sudoku board to generate a playable game.

iPhone Dev Tip: Core Animation debug mode

Monday, June 29th, 2009

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.

“My loving homage to every breathless unboxing…”

Wednesday, June 24th, 2009

(via stevenf.)


Performance Optimization WordPress Plugins by W3 EDGE