Blog posts

Here’s a list of all the articles that I’ve written.


U+: pretty Unicode code point literals for Rust

Stop worrying about whether char literal syntax uses '\u{1234}', "\u1234", \x1E\x88\xB4 or something else, and use the True Unicode Syntax of U+1234!

Don’t use the Unlicense: it’s an inferior license wrapped in an atrocious name

Not only is it poorly drafted with better alternatives available, but “Unlicensed” means the precise opposite of “unlicensed”.


make me a sandwich

xkcd 149. I was hungry.


Using make and git diff for a simple and powerful test harness

People regularly go for complex test harnesses; and when you’re in an ecosystem, they can be a good fit. But outside ecosystems, it’s actually quite easy to produce a fairly good test harness.



A fun little piece of Rust artwork.

My dark theme implementation

I decided to add a dark theme as part of my new website. It turns out that the implementation of such a thing is not quite trivial, so here’s some information about how I achieved it.

A new website

After five years with a hacked‐together Hyde site, I present my new differently‐hacked‐together Zola site.


Tween: a middleware library experiment

Web frameworks normally have the concept of middleware; we’ve tried developing fancy fully type-safe middleware in Rust before, but not very successfully. I finally got it to work. Tween is the experimental result.


Rust ownership, the hard way

In order to truly understand Rust, one needs to understand its crucial differentiating feature: ownership. Let’s go through it in detail the hard way.

Quick tip: the #[cfg_attr] attribute

The #[cfg_attr] attribute is a really handy way of reducing code duplication in some situations.


Why your first FizzBuzz implementation may not work

An exploration into some initially surprising but great parts of Rust (though you still may not like them).

Teepee design: the HTTP method

Now we come to the Method type. While there are a few improvements to be made, this is one of the things that probably can’t be significantly improved on over rust-http.

Teepee design: header representation

Header representation is a critical matter to Teepee’s design: it is uncompromisingly strongly typed, but there must be tradeoffs. After trying quite a few different schemes at length, I have settled upon quite a novel scheme which I believe to optimally balance all considerations.

Teepee design: Status-Line, take two

My first look at the Status-Line kept largely to what rust-http had done; some great discussion came up and a conceptual flaw in my models was revealed. Now I present some better options.

Teepee design: a careful look at the HTTP/1.1 Status-Line

rust-http has a nice Status enum which provides good, strong typing of statuses, but alas, it is not without its issues. Let’s take a look at the Status-Line as it is defined.

Blindly random (or: old stories + computers = ?)

Have you ever wondered what the storytellers of yore would have done if computers had been in common usage? All of a sudden, people might start choosing supposedly random things scientifically…

Introducing Teepee: the next step for rust-http

rust-http was but an experiment, an essay in the craft. Here, at last, is the real thing: the Teepee project, a properly engineered HTTP toolkit.

Say “no” to import side‐effects in Python

When you write Python code, please make sure that you don’t have side‐effects in your module imports. It breaks things and makes people sad.


The tech behind my Rust docs presentation

For the curious, I present the technology that went into the presentation slides, in all its glory: a tale of SVG, web fonts and PubNub integration, a moderately ugly but entirely sufficient hack.

A broad vision for the Rust docs stack

A presentation that I made to the San Fransisco Bay Area Rust meetup about the implementation side of Rust docs, and what I think should be used.

GitHub: a case study in link maintenance and 404 pages

GitHub is remarkably successful, but their link maintenance still leaves a lot to be desired; here’s a case study of how they could improve it, for you to learn from.

My first post, concerning the blog itself

There, I finally got round to finishing this blog off enough that I’m not too ashamed to publish it. (Only three years after deciding to do so, and only two after being practically done.) Now I can post things rather than wishing I could but not being happy with any existing ways of doing so.