[ Content | Sidebar ]

Archives for programming

Scheme on TV

Here’s a collection of interesting Scheme videos you can watch instead of the usual Christmas TV: http://programming-musings.org/2009/12/23/scheme-lectures-mostly The Guy Steele Designing by Accident talk on the history of Scheme is really good (download the slides first). Watch the Gerald Sussman one too (it’s short!). Also, who doesn’t want to know the value of ((call/cc call/cc) [...]

Using SLIME with Chicken Scheme

Common Lisp programmers are blessed with the awesome SLIME development environment for Emacs; but sadly Schemers have nothing comparable. There are a few SLIME backends for various Schemes around, in varying states of completeness, but as far as I can tell none for my Scheme implementation of choice: Chicken Scheme. Therefore I present swank-chicken: a [...]

Qemu resizing blurriness

Are you annoyed when Qemu randomly resizes its window causing all the text to be scaled and blurred? Maybe it’s just my window manager, but here is a trivial patch to disable that annoying feature: — sdl.c.old 2010-09-25 13:30:48.000000000 +0100 +++ sdl.c 2010-09-25 13:30:50.000000000 +0100 @@ -102,7 +102,7 @@ // printf(“resizing to %d %d\n”, w, [...]

Cowshell

Blodgett just reminded me of another useful tool we made a few years ago: cowshell! Cowshell provides a more user-friendly interface to the Linux shell by wrapping the output in multi-coloured cows. Here is an example session: Cowshell is a Perl script that you can acquire here. You will need cowsay and maybe some Perl [...]

My first WordPress plugin

I’ve written a WordPress plugin to generate a browser for all the NextGEN Gallery albums that you have. You can see it in action on my photos page. To install you must be using the NGG plugin (obviously) and then just place ngg-album-browse.php in your wp-content/plugins folder. Activate it, then you can use the following [...]

Giraffify

A few years ago blodgett and I developed a useful tool for visualising what would happen if you grafted someone’s face onto a giraffe. We implemented this ground-breaking tool in GIMP script-fu and promptly forgot about it. I only rediscovered it recently when clearing out my home directory. Here is the program’s best guess at [...]

Cute objcopy hack

I learned a useful trick today for embedding arbitrary data in an ELF executable. This is an easy way bundle RAM disks and other resources when you’re running on bare hardware. The first step is to turn our binary data into an ELF object file: echo yahyahyah > yah objcopy -I binary -O elf32-i386 -B [...]

Syncing SanDisk/GMPC cover art

Do you have a SanDisk MP3 player? Do you use GMPC? Do you read this blog? I suspect that set is very small but if you are in this demographic here is a treat for you: a Ruby script to copy the cover art downloaded by GMPC onto your SanDisk device. Here it is: sandisk-cover-sync.rb [...]

Some thoughts on trees

I’ve been wondering for a while now what is the best way to add trees to Train Game. Trees seem fairly important for a train game seeing as trains mostly travel through the countryside where there are trees. (Except for my daily commute to work through Slough where there are no green things.) Anyway my [...]

Valentine’s day

Today is Valentine’s day. Valentine’s day is all about love, and the internationally recognised symbol of love is the stylised heart. I love sed. This is probably why I spent this evening alone writing a filter to format text as ASCII hearts: nick@pickle:~$ sed –posix -n -f hearts.sed < poem Shall I comp are thee [...]