Blog

Spotify for Linux media keys with DBUS

Now that Spotify has discontinued the free account, and restricted me to an 'open' account with only 10 hours of music a month, I've ended up paying for an 'unlimited' account.

While I'm a little disappointed with this turn of events, it does mean I am now able to use the Linux client. It seems pretty decent so far, but I wanted to map some keys to do things like play/pause and next.

Read more: Spotify for Linux media keys with DBUS

Lock-Free IPC

I was doing some reading a while back into lock-free algorithms for multi-threaded communication using buffers. The general idea is to use a circular buffer in shared memory to allow one process (or thread) to write data into a buffer so that another process can read it. The algorithm relies on atomic compare-and-swap instructions, which are part of the x86 instruction set and also present in several other architectures which have features designed to assist with concurrency.

It turns out that one of my colleagues has already written about this on the Rapita blog - it's a useful approach, and used in many systems.

Read more: Lock-Free IPC

Shorter Bash Prompts

I use Java a lot, and the common practice of naming java packages with long URI-derived namespaces often leads to my bash prompt becoming extremely long. Here\'s a script to display an abbreviated path on the bash prompt.

Read more: Shorter Bash Prompts

Enabling IMAP SSL and TLS encryption for mail-notifier under Ubuntu

After struggling all morning to find or compile a mail notification applet that supports TLS encryption under Ubuntu, I finally read all the way to the end of the Launchpad bug for mail-notifier (all 119 comments) and foundĀ David Jurenka's time-saving PPA with SSL support enabled. Thanks David!

Distributed Computing Projects

I\'ve been participating in the ABC@Home (maths) project for a while now, and this week I\'ve also started contributing to Rosetta@Home (biology). Here are my stats! :)