Writing

Where my thoughts end up if they stay inside my head for too long.

2024

A type system for RCL: Implementing a typechecker in Rust

I am adding a type system to RCL, my configuration language. In part 4, we look at how the typechecker is implemented in Rust, and at how it is able to generate good error messages. Read full post

A type system for RCL: Related work

I am adding a type system to RCL, my configuration language. The type system is based on ideas from other systems. In part 3, I highlight prior work, and I contrast RCL’s type system with that of other configuration languages. Read full post

A type system for RCL: The type system

I am adding a type system to RCL, my configuration language. In part 2, I explain how the type system works. It is based on lattices and features a generalized subtype check. Read full post

A type system for RCL: Introduction

I am adding a type system to RCL, my configuration language. In part 1, I explain what I want from the type system. Read full post

AI alignment starter pack

In this post I share resources for learning more about AI alignment, and why misalignment is a risk that I take seriously. Read full post

A reasonable configuration language

I was fed up with the poor opportunities for abstraction in configuration formats. The many configuration languages that exist already were not invented here, so I wrote my own, at first just for fun. But then it became useful. Read full post

2023

An algorithm for shuffling playlists

When shuffling a playlist, a true shuffle is rarely what we want, because it might play the same artist twice in a row. In this post I introduce an algorithm that avoids this when possible. Read full post

The yaml document from hell

As a data format, yaml is extremely complicated and it has many footguns. In this post I explain some of those pitfalls by means of an example, and I suggest a few simpler and safer yaml alternatives. Read full post

2022

Please put units in names

Using strong types, or putting units in names, is a small effort that can make a tremendous difference for code readability. Read full post

2021

A perspective shift on automated market makers through MEV

A swap at an automated market maker is not like a market order, it behaves more like a limit order. This is the change of perspective that MEV is forcing us to make. Read full post

2020

Model facts, not your problem domain

When requirements change, an append-only data model of immutable facts is more useful than a mutable data model that models the problem domain. Read full post

2018

Build system insights

I like to share a few insights about build systems, some deep and some superficial. In particular, immutability and purity are tremendously beneficial for a build system. Read full post

2017

An API for my Christmas tree

With a tiny server, and an Arduino to drive the lights, I connected my Christmas tree to the internet. Read full post

Building Elm with Stack

The Haskell tool Stack enables simple reproducible builds. I used it to build the Elm compiler from source. Read full post

On benchmarking

Measuring performance is hard. Presenting measurements may be even harder. Here is my advice on judging software performance data. Read full post

A language for designing slides

No existing tool allowed me to design slides in the way I would like. So I built my own. Read full post

2016

Zero-cost abstractions

Rust claims to enable abstraction without overhead. How does that claim hold up in practice? Read full post

Working on a virtualenv without magic

The standard way of activating a Python virtualenv has a number of issues. Here is a simpler, understandable method. Read full post

Git’s push url

Here’s a little-known feature of Git that allows you to fetch over https but push with SSH. Read full post

2015

Neither necessary nor sufficient

A garbage collector is neither necessary nor sufficient for quality software because it does not solve the problem of resource management. Read full post

Exceptional results: error handling with C# and Rust

Monadic error handling is an alternative to exception-based systems that can prevent many programming errors at compile time. Read full post

Global Game Jam 2015

This year’s Global Game Jam we built our most beautiful gam jam game yet. Read full post

Encryption by default

You should encrypt all of your internet traffic. I am helping by making my site available over https. Read full post

2014

Writing a path tracer in Rust, part 7: conclusion

After porting a reasonably-sized application to Rust, I still like the language a lot. C++ has a worthy opponent here. Read full post

Writing a path tracer in Rust, part 6: multithreading

Instead of doing proper algorithmic optimisation, I made my path tracer faster the lazy way. Read full post

Writing a path tracer in Rust, part 5: tonemapping

Rust’s advanced type system can express a rendering pipeline in a safer way than C++. Read full post

Writing a path tracer in Rust, part 4: tracing rays

Tracing rays is at the core of a path tracer. Implementing the algorithm in Rust is a great way to get a feel for the language. Read full post

Writing a path tracer in Rust, part 3: operators

Operator overloading can do wonders to make vector math readable. How does Rust compare to C++ here? Read full post

Writing a path tracer in Rust, part 2: first impressions

After setting my first baby steps in the Rust programming language, these are my initial impressions. Read full post

Writing a path tracer in Rust, part 1

As a learning exercise, I am going to port my spectral path tracer Luculentus from C++ to Rust. Read full post

One year with Colemak

After typing in Colemak for a year I am still convinced that it was worth the switch. Read full post

Fibonacci numbers in finite fields

With a bit of algebra, Fibonacci numbers can be computed efficiently using only integer arithmetic. Read full post

Global Game Jam 2014

During the Global Game Jam 2014 I used Unity to build a game in 48 hours. Read full post

2013

C# await is the Haskell do notation

When writing asynchronous code in C# with the await keyword, the emerging structure resembles the Haskell do notation. Read full post

Continuations revisited

Observables are a different take on asynchronous programming that can be more powerful than tasks for some scenarios. Read full post

Git music

I cross-referenced my Git commit history with my Last.fm scrobbles. Read full post

The task monad in C#

When you are composing asynchronous code, you are using monads. This posts reveals the form the task monad takes in C#. Read full post

The Small Bang Theory in San Francisco

A game that I worked on will be on display during the Game Developers Conference next week. Read full post

2012

Geomancer at Indigo

One of the games that I worked on will be presented at Indigo 2012. Read full post

Passphrase entropy

Using longer encryption keys does not improve security unless you increase the length of your password too. Read full post

Global Game Jam 2012

During the Global Game Jam 2012 I made an award-winning game about a particle accelerator. Read full post

2011

Yaose is now free software

I made my editor for Ogre script files available as free software. Read full post