Tag Archives: code

Cleaning up a set of tags with Awk

Introduction David R. MacIver has recently written this blog post about cleaning up a set of tags. This blog post, on the other hand, is about a nice old Unix tool called ‘awk’. Awk is one of those programs that is often overlooked. It is really a small domain-specific language for processing text. In some [...]

Refactoring in Haskell: Adding an Argument

Just a small tip on this: When you add an argument to a function that already exists you should check the existing usage of the function. Say you have this: f x y z = … … and you want: f x y z w = … First of all you should check the contexts [...]

Presenting Meteoroids

This post brought to you as part of fulfilling the requirements for Massey University’s 143.362. I thought I had posted this earlier, but it turns out I hadn’t. So, it’s here now Meteoroids Meteoroids is a simple game (the premise being an homage to the classic Asteroids-based titles), programmed in Processing. Audio is provided via [...]

Vacuuming Firefox’s sqlite3 databases

Firefox 3 was running very slow for me, so I desperately tried this, thinking that it wouldn’t make much difference. I was wrong; there was a noticeable speed improvement. From a bash shell: find ~/.mozilla -iname ‘*.sqlite’ -execdir sqlite3 {} ‘vacuum;’ \;