Tech & Programming

Cyclic Structures and Immutability (8 September 2019)

A piece of folk knowledge that doesn’t really seem to be explicitly laid out on the Internet is that in a language that (a) has no mutable data types, (b) isn’t lazy, you can’t create cyclic structures.

Implementing Unlambda (7 September 2019)

I recently implemented Relambda, a bytecode compiling Unlambda interpreter. In this post, I review Unlambda, Bytecode compilation, and the tricks I used to make them work together.

SKI Calculus (1 September 2019)

I recently implemented Relambda, an esolang interpreter based on SKI combinator calculus. This post explores SKI and its relationship to lambda calculus. A basic understanding of lambda calculus is useful.

Content-Defined Chunking (5 February 2019)

While investigating Restic the other day for my personal backups, I came across the cool concept of content-defined chunking (aka sliding-block chunking, content-based slicing, and a bunch of other names). It’s a simple idea, but I thought it was pretty cool.

Wave Function Collapse in Python (18 November 2018)

If you’re into game design (or maybe someting more exotic, like computer-generated art), you may have needed to generate large random patterns. Maybe because you want infinite levels, or because you’re just making randomly-generated levels for your cool roguelike, or you’re lazy pressed for time and would like some computer help to generate textures.

Building finite types (4 November 2018)

This post is about interesting properties of types in programming languages. It assumes you know about basic functional strongly-typed programming. A bit of Haskell syntax can be helpful but isn’t required.

Displaying 3D images in Python (10 December 2017)

Ever tried to visualize 3D images using Python? It sounds like something that would come up frequently when using things like medical scanner data, but it’s not super well documented. One way to go about it is display 2D slides, possibly interactively. DataCamp has a good tutorial on how to do this, but what if you can’t use a dynamic image? For instance, for a printed publication, a static image is your only option.

Comparing the size of Wikipedia languages (21 October 2016)

While doing preliminary work for a project that uses Wikipedia as a dataset to classify languages, I noticed some oddities in the size of certain language editions of Wikipedia. I collect some of my observations here.