Moving on

There has been some cat-escaping-bagness, which is mainly my fault, but now that it’s all official I’m going to ‘announce’ it myself: I’ve got a new job! From the end of July, I’ll be working at Sophos as Senior Software Engineer, Mac (the post is still up at the linky in the title, for the moment).

This looks like being an exciting time – I’ve been enjoying the ObjC hacking I do with Brainstorm and this will be an opportunity to do even more of that, and the move from services to user-installed apps will bring its own changes and new experiences.

Erm, that really is all for now. More info as it becomes available, and all that.

Posted in cocoa, personal | 3 Comments

A bit of backup script

Good news – there’s a handy tool in OS X called wait4path which can help when writing timed scripts to backup to removable media.

Bad news – it [at least in Tiger….] works slightly esoterically – if a path is already present, it will still wait for another mount kevent before exiting. It should therefore be used in a script like this:


#!/bin/sh

if [ ! -d /Volumes/Backups ]; then
echo "waiting for backup volume..."
/bin/wait4path /Volumes/Backups
fi

# do some backups

Note, however, that if you do this in a crontab job it could potentially wait for a very long time, so you should wrap all that with a /var/run style semaphore.

Posted in darwin, sysadmin | Leave a comment

Official Google Mac Blog: Measuring performance of distributed notifications

Official Google Mac Blog: Measuring performance of distributed notifications on the performance of Google Update: “Just how expensive is it? How many notifications can you broadcast per second? As with all Google client products, we want to be good citizens and not bog down the client machine.”

A noble sentiment, but dear Google, answer me this: just how many times per second is each app going to be checking for updates? When does this become an important factor, and not a question of premature optimisation? They decided to go for distributed notifications instead of distributed objects, which seems reasonable – not because of the overhead issues (in fact a DO is probably a lot cheaper, if written properly), but because of the kind of information they’re trying to get through this IPC.

Posted in whatevs | 3 Comments

Bye bye data, hello…the same data

Of course it happens to everyone, and yesterday evening it happened to me…my home directory became inaccessible. What seems to have happened is that the filevault image containing my ~ became corrupted upon unmounting (though notably, I didn’t do the ‘recover space’ thing the last time I logged out before the failure, so it should just have been a straightforward unmount). so the simplest recovery route was to delete the user, re-create it then recover my data from the backups. I don’t keep backups of the Library area so lost a few preference files, and of course have had to trawl around my email looking for licence keys and the like.

For the moment I’ve set up the replacement user without Filevault, and am using encrypted disk images for specific data I’d rather keep thus protected. This makes backups harder – I keep my backup drive unencrypted as it doesn’t come out with me, so I now need to come up with a script to backup my home dir except for the encrypted images, mount the images and back up the content, then unmount them. This means that the backup will need to be manually triggered so that passwords don’t have to be kept anywhere…or I write my own backup tool, which uses passwords stored in a keychain kept outside the target user account; and I need to make sure that keychain is also recoverable ;-).

A lot of my data was completely unaffected – work stuff is typically stored in subversion on their servers (as well as another local copy on my work laptop), my email is all on remote servers, my calendar is served by thaesofereode.info and so on. There are some improvements I could make – I could probably use an LDAP server and abxldap to remotify my contact list, and thaesofereode.info offers subversion hosting which I’m currently not making use of. But it happens that next Tuesday, I’ll be talking about data security at the Oxford Mac Users Group, so I will expand on this tale in full and gory detail ;-). St. Cross College, Tuesday 8th May, 7:30 pm.

Update 20070503T1653Z+0000: actually, things look a little more serious than simply a trashed sparseimage:

mabinogi:~/Desktop leeg$ hdiutil attach OmniDazzle-1.0.1.dmg
load_hdi: timed out waiting for driver to load
load_hdi: timed out waiting for driver to load
load_hdi: timed out waiting for driver to load
load_hdi: timed out waiting for driver to load
load_hdi: timed out waiting for driver to load
[…]
2007-05-03 15:41:35.535 diskimages-helper[718] ERROR: unable to load disk image driver – 0xE00002C0/-536870208 – Device not configured.

Good news is that when that gets fixed, my old homedir will start working again. Bad news is: um, it looks fairly messed up to me :-(

Posted in backup, filevault, oxmug | 1 Comment

All the more reason to like FOSDEM

So it seems that my half-attendance at FOSDEM paid off more than I could have hoped, as I won a year’s subscription to GNU/Linux magazine. The publication is francophonic, so this will be a good chance to improve my command of la langue des grenouilles ;-).

Posted in FOSDEM | 3 Comments

Summer of code

GNUstep has been approved for this year’s Google Summer of Code. The title link goes to the GNUstep wiki page outlining possible projects, but I’m sure that if a student had another idea you’d be welcome to talk about it on the gnustep-discuss mailing list, and probably get a mentor!

Posted in gnustep, Google, SoC | Leave a comment

Mail::Box++

When most perl developers (I believe there still are one or two in existence) talk of the "cool one-liner" that they wrote, what they actually mean is that they grabbed a crapload of packages from CPAN, invoked a few use directives and then, finally, could write one line of their own code which happens to invoke a few hundred lines of someone else’s code, which they have neither read nor tested.

Modulo testing, my short script (below) to convert mbox mailboxes to maildirs is exactly like that. While it has three lines of meat, these call upon the (from what I can tell, fantastic) Mail::Box module to do the heavy lifting. That package itself is less svelte, with 775 lines of perl. Which is the interface to a C bundle, which is (single-arch) 92k. But never mind, I still wrote a three-liner ;-)

#!/usr/bin/perl -w

use strict;

use Mail::Box::Manager;

@ARGV = ("~/mail", "~/Maildir") unless @ARGV;


# open the existing (mbox) folders
my $mgr = new Mail::Box::Manager;
my ($srcPath, $dstPath) = @ARGV;
# expand tildes and stuff
$srcPath = glob $srcPath;
$dstPath = glob $dstPath;

opendir MBOXDIR, $srcPath or die "couldn't open source path: $!";

foreach my $file (grep !/^./, readdir MBOXDIR)
{
my $mbox = $mgr->open(folder => "$srcPath/$file",
folderdir => "$srcPath");
# open a maildir to store the result
my $maildir = $mgr->open(folder => "$dstPath/$file",
type => "Mail::Box::Maildir",
access => 'rw',
folderdir => "$dstPath",
create => 1);

$mgr->copyMessage($maildir, $mbox->messages);
}
Posted in perl, sysadmin | Leave a comment

FOSDEM / GNUstep photos

Just came in on . Many photos of the GNUstep booth, dev room and of course the famous GNUstep dinner.

Posted in brussels, FOSDEM, gnustep, pictures | Leave a comment

Apres ca, le FOSDEM

It appears that I’m sat in Terminal B of L’Aeroporte Nationale de Bruxelles, waiting for my flight to board. While there are wirelesses around, the ones to which I can connect seem not to be offering much in the way of DHCP so this update will come in later than it was written (which was at 13:35), as I will probably post it while I’m on the bus between Heathrow and Oxford. [Update: actually not until I got home]

Irrelevancies such as that aside, I had a great FOSDEM! In fact, a great half-FOSDEM, as I did my tourism today. I met a load of people (of which more below), went to some inspiring talks and discussed many exciting and interesting projects (in multiple languages – I spoke to one person in English, Dutch and French sometimes in the same sentence). It was a good exercise to see who wasn’t present as much as who was – for instance RedHat didn’t have an official presence although the Fedora Project had a booth (next to the CentOS one ;-), similarly Novell (one of the big sponsors) was absent but the OpenSUSE project had Yet Another Small Table. Sun were conspicuously present in that the OpenSolaris and OpenJDK table was being manned seemingly by Sun’s salespeople rather than user group members…although maybe that’s just my interpretation.

The overriding feeling I got was that the conference was running on l’espirit d’anarchie and that the resulting adrenaline and enthusiasm drove the conference on. The keynote speeches were really the only regimented aspect of FOSDEM – a necessity given the size of the auditorium and that was packed to the rafters with FLOSSers. I didn’t go to the final keynote on open-sourcing Java as I was manning the GNUstep booth, but learned a lot on software patents and Free Software and Jim Gettys’ description of the technical challenges in creating OLPC was very insightful.

So, GNUstep. GNUstep, GNUstep, Etoile [I’ll add the accents in in a later update…this keyboard doesn’t have dead keys :-(]. For a start it was great to meet all the other GNUsteppers, and have some good discussions and debates (as well as some good moule frites and Kwak beer). For anyone who doubts that GNUstep is still alive, the dev room at FOSDEM is one place to allay such suspicions with many developers, designers, users and supporters presenting their ideas to each other, asking each other questions and generally contributing to the GNUstep camaraderie. Even an improptu troll by Miguel de Icaza at the GNUstep booth wasn’t enough to make us all throw Project Center away and buy a book on C# ;-). Presentations on GNUstep-make v2 (which I’ve described here before…), the Cairo graphics back-end (which I don’t think Fred Kiefer was expecting to present, but made a very fine job of it anyway) and third-party use of GNUstep were all very useful and well-received…I expect today’s presentations were too but I didn’t get to go to them :-(. [Instead, I was significantly underwhelmed by the sight of the Mannekin Pis.]

Posted in Etoile, FLOSS, FOSDEM, gnustep, linux | 1 Comment

Fairly cool update to GNUstep

GNUstep-make now supports arbitrary(-ish) filesystem layouts. While the default is still the /usr/GNUstep layout with the various domains, one of the bundled alternatives is to put everything in FHS-compliant locations. Once that hits a release (which I believe will be called gnustep-make 2.0), that should make newbie users and distributors much more comfortable with GNUstep. I also provided a NeXT-ish layout which doesn’t clone the NeXT directory hierarchy, but rather mimics it sensitively.

My work laptop just earned itself a reinstall (I’d been uncomfortable with CentOS for a while, but the facts that hotplug isn’t configured properly and every time I ‘yum update’ I have to fix a handful of drivers drove me over the edge), so when I re-create my GNUstep installation I’ll do it with the new-style make. I’m currently wavering on the side of installing Midnight BSD, but I might wimp out and dual-boot Ubuntu ;-)

Posted in gnustep, linux, midnightbsd | Leave a comment