When you tag a function call with the defer keyword, its execution is deferred until the end of the current scope. This makes it easy to construct an ad-hoc use of the RAII pattern — handy for placing resource initialization and finalization next to each other, to make it less likely that you’ll forget to finalize a resource.

I was curious whether it was possible to do something similar in C. It turns out it’s pretty straightforward. [more...]

I’m in the middle of cleaning and packing to move house, and I came across a time capsule I made as part of a workshop at COSI (Columbus, Ohio’s science museum), 25 years ago today (1988.07.14). I was 5 years old at the time.

Included in the time capsule were two pieces of yarn identifying my height and circumference, and a personal-facts sheet, mentioning such things as my favorite musician (Herbie Hancock, of whom I’d recently become aware via his appearance on Sesame Street) and my favorite toy (the Yamaha PSS-470 synthesizer with its wonderful FM modulation control panel).

Last Saturday at DrupalCamp Ohio, I presented an introduction to the basic concepts behind the Open Atrium Drupal install profile, and a demonstration of how to create custom Open Atrium Features. [more...]

I recently filed an Apple Bug Report, which was marked as a duplicate. The actual bug isn’t terribly important, but the difference between the serial number of the bug I filed (10426480) and the serial number of its alleged duplicate (3323328) — about 7 million — surprised me. Just how old was this still-unfixed bug?

Shortly thereafter there’s a storm and the power goes out for several hours and drains your entire humongous UPS, and when the power finally comes back on, the system won’t boot — it stops at the grub prompt; issuing a standard boot command fails. [more...]

I set up a RAID media server a couple years ago, and decided to give JFS2 a try, since it’s touted as being fast and reliable across the spectrum of usecases. My setup is primarily write-once-read-many, for storing the terabytes of audio and video recordings I’ve made over the last decade for project ruori and the like.

Several weeks ago, the power went out for an extended period of time while I was away, and, while it was on UPS backup, it failed to shutdown cleanly and the power was suddenly cut when the UPS ran out.

When I brought the machine back up, the volume wouldn’t mount, so I ran jfs_fsck on it. jfs_fsck said that the journal was corrupt, and started block-scanning. It came up with a pretty big list of files and directories that were irrevocably corrupt. Parts of a few of them got linked into /lost+found, but the majority simply vanished.

Funny thing is, I hadn’t made any changes to these files in several years. I could understand if maybe some very recent FS updates were lost due to write-caching, but why did it lose track of these ancient files?

This reminds me of the rampant table corruption of MS-DOS’s FAT16 filesystem, which couldn’t keep track of a needle dancing on the point of a needle.

So, plus one for backups of backups, and minus one for JFS on Linux. I think I’ll be rebuilding the machine with ZFS-fuse. Or OpenSolaris, for that matter.

That’s it. What is the “Unique identifier of a sound output device”? What format is this “Unique identifier”? How do I get a list of the “Unique identifiers” of the available output devices on my system? [more...]