For some time, I've been working with Kevin Van Vechten on improving SystemStarter, a program I wrote for Mac OS X to bring up the system to the multi-user login prompt. It replaced /etc/startup from Rhapsody, and does what /etc/rc does in BSD systems. Part of its design is that startup tasks are encapsulated into "startup items," which are, in the simple case, a program and a configuration file. The program is an executable (usually a shell script) which takes a single argument like "start" or "stop" much like SysV /etc/init scripts. The configuration file (a property list) describes what the program does (displayed to the user), what services it provides, and what other services should be started before the program should be run. For example, Apache doesn't want to run until after the resolver is running.
One of the nice things about the design is that it is easily parallelizable given a dependency graph built from the information in the property list. Kevin has been doing some work to allow SystemStarter to bring up the system to a given point (eg. bring up the network) from single-user mode and to support a shutdown sequence as well. While I was integrating his code, I noticed that enabling parallelization became rather easy due to some cleanup we did in the process, so I spent a few hours implementing that, which is what I demonstrated at the open source session WWDC last week...
Apple's WorldWide Developers Conference was last week. There was the usual keynote by Steve Jobs and Avie Tevanian. Maybe I've been to a lot of these, but they are starting to feel pretty long. Steve had an attempt to scare developers into thinking that if they don't port their apps to run natively on OS X, that other product will get there first, and customers will switch. Now I think that's true for some programs, and I'll certainly use a native app over one that makes me launch classic, even if the native app is a little less cool, but the whole thing felt very contrived. Mentioning it was a good idea, but he and Avie both harped on it way too much, to the point where it felt really hollow by the end.
But there were some cool things about the keynote. One is that Apple has truly come about on the Unix front. There was a time when I had lunch with Jason Thorpe of NetBSD, and we were talking about Apple and NetBSD working together. Jason was very helpful, and NetBSD played a key role in getting the BSD subsystem in Rhapsody (which fed into Darwin/OS X) updated. (That work is by no means complete, but it got a lot better.) But I couldn't imagine Apple ever putting "powered by NetBSD" on any public material, and I told that to Jason. At that time, Unix was highly feared at Apple, as it threatened to make the system a lot scarier to users. But Apple has done a pretty good job (still a little more work to do there) of making Mac OS X take advantage of the Unix underpinnings without being a terror to users. And a lot of users think Unix is great and can interact directly with BSD if they choose to. The upshot is that Apple now sees BSD as a major asset, and no longer as a liability; this was obvious at the keynote, and it made me smile some.
One of the best things about WWDC is free Jamba Juice all week long! Woo hoo! Plus there is the free loot: I scored a free bag, Cocoa and Carbon books from O'Reilly, a decidedly spiffy Mac OS X leather jacket (courtesy of WWDR), and a most excellent Hexley shirt (courtesy of Brett Halle). All on a free pass. Party on.
I made it to the StepWise WWDC BoF which is always packed. This year was particularly crowded. Having gotten there late, I crawled over the people sitting on the floor and myself found a patch of carpet. Some cool things there...
My friends at NetStruxr have managed to release four of their toolkits for WebObjects developers under a BSD license. This is a big win for WebObjects developers looking to save time.
On a similar note, the MiscKit is getting its third reboot (once per operating system, NeXTStep, OpenStep, and now Mac OS). The MiscKit is a collection of Objective-C classes which are shared by the NeXT developer community. It is now starting again by updating the code base to the current Foundation and AppKit frameworks, and may switch to new licensing terms (I'm hoping, naturally, for a BSD license). The kit will switch from being a loose collection of submissions to a high-quality set of frameworks and an experimental set of frameworks where new code can be vetted. They are setting up CVS now. Bill Bumgarner has contributed his Python<->Objective-C bridge to the MiscKit, which is excellent. The bridge lets you call into Foundation and the AppKit from Python, which is way handy. Bill also wrote up an app which just exports Python as a Cocoa Service. This means that in *any* Cocoa application (and someday maybe Carbon apps; here's hoping), you can select some text and pull down a menu which causes that text to be evaluated as a Python expression. Shweet!
When I walked in, there was someone showing an Objective-C to Java bytecode compiler. I missed most of the demo, but this is truly psycho in the trademark Obj-C weenie style. Goes to show you can take Obj-C away from the program (WebObjects 5 in this case, which is now 100% Java), but you can't take Obj-C away from the programmer.
The Windows PC on my desk hasn't been turned on since my last diary entry. Whew. This week I need to learn how to build our stuff with it (I'll use Cygwin and fake it, I hope) and how to use Wise or some such to make packages. We'll see how that goes. What do you do with this other mouse button, anyway?