why I hate your freedom

Posted by Dick on January 21, 2008

Happy New Thing. 

 So anyway, Adam Leventhal found out AAPL hamstrung DTrace w.r.t. certain apps on Leopard (iTunes at least).  Cue inevitable Slashdottian outrage.

When source code gets released under a license everyone (so long as they follow those terms) gets to port, extend, or shout about how your license isn’t free at all really. They can even choose to ignore you, or to provide really shitty implementations. None of the above makes them ‘evil’.

Some of OS X is open source, some is  proprietary, and some is riddled with DRM. iTunes is in the last category. It’s Apples main cash cow; if it was reverse engineered they’d lose a competitive advantage, scare their movie/music business partners away, and the terrorists would win.

OSX ships with a full toolchain and part of that is Instruments - a GarageBand-like frontend to DTrace. It’ll probably be the first contact with DTrace a lot of coders get. I’ve only tinkered with it, but right away you can see why it’d make DRM fans twitchy. Running iPhoto under Instruments let me see down into the Cocoa API calls. I now know how atomic preference changes are implemented at the system call level.  Basically, it’s fucking great.

It was really nice of Apple to give it out for free, just like it was nice of Sun to give us DTrace, ZFS and NFS. Telling either company how they should release any of those products makes you a bit of a deRaadt in my book.

note to self : don’t interrupt FileVault

Posted by Dick on December 17, 2007

I enabled FileVault on my MBP and cancelled the conversion when I saw how long it was going to take. When I tried to re-enable it again today, I got an error saying

could not create filevault disk image

Google wasn’t very helpful, so I’m noting down the fix here, which is:

sudo rm -r /Users/Shared/username.sparsebundle

 Turns out FileVault doesn’t use encrypted .dmgs(because they’re fixed size) but instead has a directory called username.sparsebundle (.sparseimage, pre-Leopard) that does the same job.This is initially created as /Users/shared/username.sparsebundle ,populated and only moved into place once the old home directory is deleted.

(decent) firefox keywords on Safari

Posted by Dick on November 23, 2007

Firefox and me have been best friends for years, but lately it’s been messing me around.

Clint, what’s Russian for ‘just fire the fucking missile’?

I’m on a PowerPC OS X machine, and if I don’t shut it down overnight it’s leaked all free memory by the morning.
Plus it tends to sit and drool just when an auction is about to close, or a Wii turns up on game.co.uk, or I
want do some work.

Firefox 3 fills me with dread.
I’ve heard it will be ‘faster, stabler and with more features’ which is a ‘pick 2’ situation if ever I heard one.

going native

Another reason used to be cross platform muscle memory, but I’m due a new laptop soon, and it’ll be a Mac
(because it’s the best laptop OS, that’s why. You may disagree, but you are wrong, please don’t waste everyones time saying so out loud).

I’ve tried Safari a few times, but there are a few essential things I thought it couldn’t do.

  1. del.icio.us integration
  2. my homepage can be multiple tabs (so they all open ot once)
  3. keyword support (the real must have)

Today, Firefox forced my hand by breaking its own del.icio.us extension. The keyboard shortcuts no longer work, which for me means it might as well not exist.

exit strategy

I’ve fixed all the showstoppers above like this.

  1. use the standard del.icio.us bookmarklet
    • ‘Apple-N’ opens your Nth bookmark, so with the bookmarklet on the far left of my bookmark bar, I just  ’Apple-1′ to add to del.icio.us .
  2. make a ‘hometabs’ bookmark folder and enable ‘Auto-click’ (in Bookmarks -> Show all Bookmarks). This loads all the folder contents, one per tab, when I click the folder name 
    • (’Bookmarks → Bookmark all these N tabs’ does the same thing, but it’s easier to edit a folder)
    • I can have multiple, multi-tab homepages, which has been a godsend when you’re working on 5 things at once
  3. use Sogudi

Sogudi was the real saviour here. I’ve found several projects that claim to do the same thing, but they either
involve hacking the search box or (shudder )the binary. More importantly, they just hack the ‘Google’ search box., instead of the location bar.

Runs fine on Leopard, and converting all my Firefox keywords
just involved choosing ‘Safari → Sogudi’ and pasting them in.
Just remember to replace all the ’%s’ with ‘@’.

does whatever a spider can

Ceri also recommended Webkit . It’s a drop-in
nightly build of the new rendering engine, which is handy if you need to raise bugs etc.

It’s a lot less daunting than that sounds.
Shows up as a second Safari icon you can click to run Safari under it
(generally when the main icon is having trouble with a particular page). It runs stupidly fast.