Inklings: a tumblelog

Write code that is easy to delete, not easy to extend

Applied Crypto Hardening

SSH: Best practices

A bit old, but this is still mostly relevant. It could certainly do with some updating in places. For instance, these days, you’re better off using ProxyJump rather than ProxyCommand.

Suture: Supervisor Trees for Go

Supervisor trees are one of the core ingredients in Erlang’s reliability and let it crash philosophy. A well-structured Erlang program is broken into multiple independent pieces that communicate via messages, and when a piece crashes, the supervisor of that piece automatically restarts it.

This may not sound very impressive if you’ve never used it. But I have witnessed systems that I have written experience dozens of crashes per minute, but function correctly for 99% of the users. Even as I have been writing suture, I have on occasion been astonished to flip my screen over to the console of Go program I’ve written with suture, and been surprised to discover that it’s actually been merrily crashing away during my manual testing, but soldiering on so well I didn’t even know.

Building a simple VGA-adapter for 8-bit self made computer

Agda Tutorial

Learn You an Agda

Frequentism and Bayesianism: A Practical Introduction


And Frequentism and Bayesianism: A Python-driven Primer.

The Lava Layer Anti-Pattern

TL;DR: Successive, well intentioned, changes to architecture and technology throughout the lifetime of an application can lead to a fragmented and hard to maintain code base. Sometimes it is better to favour consistent legacy technology over fragmentation.

Landmark Computer Science Proof Cascades Through Physics and Math

I only understand a tiny fraction of this, and the paper is well beyond me. I’m only half way through the article, and it’s a very interesting read.

The True Size of...

Compare countries by dragging them around a map, removing the distortions of the usual Mercator projection.

10 Technical Papers Every Programmer Should Read (At Least Twice)

Inside the Intel 1405: die photos of a shift register memory from 1970

Finding bugs in SQLite, the easy way

Fuzzing SQLite with afl and seeing what falls out.

Thinking in Types

A colleague of mine was stuck attempting to do something in Haskell that seemed conceptually simple but resulted in a type error. While a particular form of polymorphism, common in object-oriented languages, translated very well to Haskell, a related technique was not permitted by the language’s type system.

In this post, I’d like to outline a simplified version of the task and how this limitation was overcome. Hopefully you’ll see that by working with the type system rather than against it, we find unexpected benefits in the resulting design.

Type systems and logic

An important result in computer science and type theory is that a type system corresponds to a particular logic system.

The Fourier Transform, explained in one sentence

Also good is this Fourier Transform visualisation.

The Tyranny of the Forced Smile

Mature Optimization

The trickiest part of speeding up a program is not doing it, but deciding whether it’s worth doing at all. There are few clear principles, only rules of thumb.

Why Go Is Not Good

Go has yet to fix any of these problems in any substantial way in the six years since this article was written. Make of that what you will, but they’re all real issues.

Irmin - A distributed database built on the same principles as Git

Irmin is a library to persist and synchronize distributed data structures both on-disk and in-memory. It enables a style of programming very similar to the Git workflow, where distributed nodes fork, fetch, merge and push data between each other. The general idea is that you want every active node to get a local (partial) copy of a global database and always be very explicit about how and when data is shared and migrated.

Why Dependently Typed Programming Will (One Day) Rock Your World

Plain Text Accounting, a Guide to Ledger and Friends

If I ever decide to use ledger or the like.

Also: The accounting quest: Ledger.

Conquering Folds

Programmer Competency Matrix

Mind, there’s a certain degree of bias here: depending on the area you work on, not all of those area may need to be as strong as if you were working in others.

Minimalist Living: When a Lot Less Is More

Notes on the M4 Macro Language

Practical Foundations for Programming Languages (Second Edition) by Robert Harper

An abbreviated version in PDF form is available for download from that page.

Learn Prolog Now!

Learn Prolog Now! is an introductory course to programming in Prolog.

Criticism and Ineffective Feedback

Wilson’s Algorithm: maze generation via random walk

Wilson’s algorithm uses loop-erased random walks to generate a uniform spanning tree — an unbiased sample of all possible spanning trees. Most other maze generation algorithms, such as Prim’s, random traversal and randomized depth-first traversal, do not have this beautiful property.

If you look at the colourised version, the patterns kind of remind me of a dragon curve.

On Explaining Monads

Coding Principles Every Engineer Should Know



Modulario is a distinctive geometric sans with a dignified, Roman-inspired uppercase designed for clarity. The influence of handwriting can be detected in a lowercase which includes a uniquely scripty ‘s’.

It’s free for personal use, and the commercial version is quite reasonably priced.

vmm - a virtual mail manager

vmm is the easy to use and configurable command line tool for administrators and postmasters, to manage domains, alias-domains, accounts and relocated mail users.

I have a hacky scripts that does something like this, but could do with something a little better. The original project is dead, but there’s a friendly fork that’s still maintained. I’d like an SQLite backend.

Why you should take notes by hand, not on a laptop

TL;DR: you have to think more about what your writing, which causes it to stick better.

When done with pen and paper, that act involves active listening, trying to figure out what information is most important, and putting it down. When done on a laptop, it generally involves robotically taking in spoken words and converting them into typed text.

Physicists Should Stop Saying Silly Things about Philosophy

Roughly speaking, physicists tend to have three different kinds of lazy critiques of philosophy: one that is totally dopey, one that is frustratingly annoying, and one that is deeply depressing.

Backpack: Retrofitting Haskell with Interfaces

This gives Haskell an ML-like module system.

99 Problems (solved) in OCaml

The original Lisp version, and some OCaml implementations in a git repo.

What ORMs have taught me: just learn SQL

I’ve come to the conclusion that, for me, ORMs are more detriment than benefit. In short, they can be used to nicely augment working with SQL in a program, but they should not replace it.