February 16th, 2006

  • evan

powermate + haskell

I got a new toy: a "PowerMate USB Multimedia Controller & Input Device". It's basically a USB volume knob. (If you wanna buy one, I got it for $37 ($42 after shipping) using Froogle...)

I'm becoming less surprised when things Just Work in Linux; I just plugged it in and the proper modules loaded themselves.

My original goal is to control the volume for mpd, but when buying it I imagined I could use it to switch tracks, make other fun toys, etc. But what software do I use?

There's Gizmo, but I couldn't find any docs beyond how to install (too simple) and an API reference (too complicated). Then here are Ruby bindings, which are fun enough, but I found once I hooked it up to mpd that the rotate events come out faster than you can send volume-change events to the daemon.

So as an opportunity to learn some more Haskell, I wrote the glue code myself:

Collapse )
  • evan

new hard drive

My new hard drive, every five minutes or so, starts lightly humming and occasionally clicking. Like the sound reiserfs makes when it mounts a disk. Nothing in dmesg.

It's like Final Destination in computers: I managed to salvage the data before, and now the grim reaper of data loss is coming for what it tried to claim a year ago.