rolling through the journey that is life

Archive for the ‘Code’ 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.

stevenf.com – shutup.css is a custom user stylesheet you can…

Wednesday, February 3rd, 2010

stevenf.com – shutup.css :

shutup.css is a custom user stylesheet you can install in your web browser which will automatically hide the comments section of many popular web sites. My gift of a quieter, saner web to you.

Brilliant.

A Successful Branching Model

Friday, January 15th, 2010

Vincent Driessen’s model is described with Git in mind, but can easily be converted to Mercurial or other similar version control systems.

Nice. I like the graphical representations and the detailed explanations.

/via Justin Williams

Programming Lessons

Wednesday, January 13th, 2010

Jonathan Danylko lists the programming lessons he’s learned in 20 years:

  1. You are not the best at programming. Live with it. – I always thought that I knew so much about programming, but there is always someone out there better than you. Always. Learn from them.
  2. Learn to learn more – With number five explained, I’ve always had a magazine or book in my hand about computers or programming (ask my friends, they’ll confirm). True, there is a lot of technology out there and keeping up with it is a fulltime job, but if you have a smart way of receiving your news, you’ll learn about new technology every single day.

A good list of things, with these two jumping out at me. When you reach a point at a company where you aren’t learning that’s a sign it’s probably time to move on. Personally I don’t enjoy sitting around resting on my laurels, even though it doesn’t always look like that.

/via Jason Kottke

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.

Cool Tool: Xcode Bracket Matcher

Sunday, April 5th, 2009

The Xcode Bracket Matcher plugin is really damn cool. That is all.


Performance Optimization WordPress Plugins by W3 EDGE