Archive for the ‘Uncategorized’ Category

Election visualisation

Sunday, November 27th, 2011

I have hacked up a booth-by-booth visualisation of votes in Wellington Central. The visible (non-occluded) area of each circle is proportionate to the party vote received, and the circles proceed inwards from most votes. It only shows the top three five parties at each booth at the moment (from skimming over the data, further down than that they become negligibly small). It’s not really as interesting as I’d hoped, but I may try it on other electorates that might show something better later on.

Update: I’ve extended it to the top five, rather than three, parties, and it gets a little more interesting then. The fifth-place party varies quite a bit.

Update 2: More electorates:

Announcing retail – tail with regular expressions

Saturday, November 26th, 2011

I have broken down and implemented my own tail command. retail can output that part of a file (or pipe) following the last match of a regular expression, which can be useful for logfiles and various other kinds of data. It is also a fully compliant implementation of the POSIX.1-2008 tail command, so you can theoretically replace your system tail with it.

The driving use case of this for me is log files – I want to get all of the file after the current occurrence of some event. After establishing that I couldn’t do that with sed, and that although I probably could with awk it would be a bad idea, I set about writing this in C. It does exactly what I want, and I’ve also been over the POSIX tail spec to add everything from that as well, so it is a usable tail command.

The code is on GitHub (for the moment at least), accessible with `git clone git://github.com/mwh/retail.git`, or in an automatic tarball https://github.com/mwh/retail/tarball/master . Although it satisfies my original use-case there are a couple of additions I’d still like to make along with efficiency improvements, and, of course – patches welcome.

Some usage examples:

retail -r Beginning logfile.log

Output everything after the last occurrence of “Beginning” in the file.

retail -r Beginning -u 'succeeded|error' -f logfile.log

Same as the last one, and continue reading as any lines are appended until one matches /succeeded|error/ (i.e., it contains either of those words), and then terminate.

retail -n +10

Start printing at line 10, until the end of the file. Just like in regular tail. Negative numbers, bare [-+]N, and -c work too.

Once more, retail.

LaTeX symbol classifier

Saturday, May 29th, 2010

This is pretty neat: a tool that lets you draw symbols and tells you the LaTeX name for them. Much easier than searching through the symbol listing.

LCA days 2-4

Friday, January 22nd, 2010

Tuesday I didn’t have a talk, so I got to enjoy the conference itself instead of repeated practice. First up was Gabriella Coleman‘s keynote, which was just fantastic. She’s basically a geek anthropologist and it was one of the most interesting talks I’ve been to.

I spent the whole day at the Open in the Public Sector miniconf, where I have plenty of interest but no experience. There were a few great talks there. Pia Waugh’s especially was brilliant and had a good point about the need for transparency in how public enagement is run. She’s the ICT advisor to an Australian Senator and it seems like both she and her boss get it. I liked her advice to other politicians: “get yourself an open-source geek”. The panel discussion with Clare Curran and Pia again was interesting, though Clare went on a bit sometimes. Trevor Mallard was there but not speaking, but he was pretty impressive in informal chat in the breaks. After that was the Speakers Dinner at Te Papa, which was nice enough. I did get to sit at a table with Ted Ts’o and Keith Packard. I left a little early and was still pretty shattered afterwards and the next day.

Wednesday was the first day of the conference proper. The highlight for me was Matthew Garrett’s talk on social conduct in the community, and Sage Weil from Dreamhost talking about their Ceph distributed filesystem (and mentioning that if you want to try it, and don’t have a huge cluster, you can sign up to Dreamhost with code “ceph”). Nothing on that night, so I was able to get some sleep.

Thursday brought two talks from Leslie Hawthorn on community management, mentoring, and bringing in new contributors. The mentoring talk was the most valuable and had a lot of content I think we need to take note of. I have good notes on both of those that I’ll bring to the mailing list later. The Professional Delegates’ Networking Session was that night, which I was technically eligible for, but I went home to work on my slides and talk instead. Also to catch up on sleep.

Friday to come later on.

New GPG key

Tuesday, December 22nd, 2009

Since my key was getting old I have generated a new key that is stronger than the old one I was using, and has different cipher preferences. It’s also for use at the keysigning at LCA next month. There’s a transition notice signed by both the old and new keys here: http://mwh.geek.nz/files/key-transition-2009-12-22.txt

The key ID is FEC39745 and is on pgp.mit.edu and probably others.

Wave invites

Sunday, November 15th, 2009

I have some if anybody wants one.