What monads are

Fri 06 May 2016

It’s almost like a rite of passage for a developer to write a monad tutorial.

Well, this isn’t a monad tutorial. This is simply an effort to put an end to some of the nonsense that leads to monad tutorials being written in the first place and all …

How I use git

Tue 05 April 2016

My git workflow for anything non-trivial is pretty straightforward, but a little different from what I’ve seen others describe. I’m almost certainly not the only person out there who uses this workflow, so I’m certainly not claiming any originality.

There seem to be two camps, both based …

Quick hacks: Python netstring reader

Thu 15 May 2008

I’m writing a proof-of-concept server for a less jokey version of the SRGP. The protocol is more or less SRGP, but it doesn’t use MIME-style headers each request is made up of a series of netstrings. The header and body sections are terminated with empty netstrings, i …

A reasonable XML RPC envelope protocol, and asynchronous calls

Mon 12 May 2008

Note

This is juvenile, but it’s still better than XML-RPC. Here is the original post.

Sometimes something you do as a joke can yield interesting results.

About a year or so ago, I was feeling bored and decided to see how much of a diet I could put …

Messing with Standard ML and Moscow ML, part one: The core language

Tue 18 March 2008

Note

A cache of the original post is here.

I was playing with Moscow ML because I’ve wanted to give Standard ML a bash for a while now, but I could never get SML/NJ to play nice for me back when I tried it first on Windows. That …

Memoization in JavaScript

Thu 21 July 2005

About a fortnight ago, I was poking around the copy of Perl sitting on my laptop. I came across Memoize.pm. Having read the article that inspired it a few years back, I thought I’d take an attempt at implementing something to do the same in JavaScript.

Memoization is …

My C++ wrapper for the Expat XML parser

Tue 24 May 2005

Last year when I was writing Orpheus, I knocked out a C++ wrapper around Expat to make using it easier.

It consists of two classes. XMLParser is the Expat wrapper and sets up the event handlers and automates setup and teardown of the parser itself. XMLEvtHandler consists of a set …

Fixing JavaScript memory leaks for good

Tue 15 March 2005

Note

I’ve edited this down a little bit. A snapshot of the original post is here.

I’m a fan of unobtrusive JavaScript and I’ve strove to make my JavaScript code as unobtrusive as possible for years now.

However, I discovered something about IE a while ago when …

Detecting broken images with JavaScript

Tue 22 February 2005

Note

A cache of the original can be found here.

I hit an annoying problem with a project at work. It’s not my fault, there’s nothing wrong with the code, but sometimes things will happen: people will delete images out of the backend, not upload the image they …