Inklings: a tumblelog

Generating static and portable executables with OCaml

The process of generating a static executable is weirdly involved!

A Brief Introduction to OCI Containers on FreeBSD

This is one of the more compelling features of 14.2. The big thing that’s long been missing from containerised workloads (jails) on FreeBSD has been a sane way of bundling up the contents of the container into an artifact. This is some very useful cross-pollination from the Linux container world!

Insular Typewriter

Just stumbled across this when looking for something else. A really nice monospace font done in an Insular style.

A simple Priority Queue in OCaml

A clever way to implement a priority queue using the Set module that makes use of the min_elt/min_elt_opt functions and internal ordering on the priority.

I’m thinking of re-implementing the A* implementation I did for Advent of Code to lean on this. It’s already sets, so it shouldn’t affect the speed, but it’ll likely make it significantly less awkward, especially as far as finding the current element goes.

Here is where the example priority queue implementation mentioned can be found. More recent versions of the documentation don’t appear to have it anymore.

Crafting Interpreters

Crafting Interpreters contains everything you need to implement a full-featured, efficient scripting language. You’ll learn both high-level concepts around parsing and semantics and gritty details like bytecode representation and garbage collection. Your brain will light up with new ideas, and your hands will get dirty and calloused. It’s a blast.

Starting from main(), you build a language that features rich syntax, dynamic typing, garbage collection, lexical scope, first-class functions, closures, classes, and inheritance. All packed into a few thousand lines of clean, fast code that you thoroughly understand because you write each one yourself.

Kind of surprised I’ve never come across this before.

Using Cramer's Rule for solving a 2x2 system of linear equations

Needed this for Advent of Code. I’ve forgotten so much maths!