Wait, What?

  • Monaco and VIM

    I’ve used the Monaco Editor for a number of personal projects. It certainly beats using a <input type="text" /> or <textarea> if you want to edit code or similar. But, and for me it’s a big but, it doesn’t come with a VIM mode out of the box. This is how I fix that for my projects.

  • Voxel Ray Casting in Zig

    Ray casting refers to tracing rays from a point to find the closest object that the ray will intersect.

  • Generating a Star Sphere using Zig

    For reasons, I wanted a sky texture that had approximately correct stars — it's not uncommon for people to use random textures for stars.

  • Star Sphere Demo

  • A DFS Maze Generator in prolog

    A basic depth first maze generator algorithm is fairly simple, and I have recently been re-reading "Adventure in Prolog" by Dennis Merrit, which can be found online or, if you prefer hard-copy, on Amazon, so implementing a maze generator in prolog seemed like a good idea at the time. It might be interesting to develop a simple rogue-like in prolog.

  • Writing A Jekyll Converter for Literate Programming

    An important caveat here is that I am not a ruby developer. But I wanted to use Jekyll to generate this blog and I want to blog about code, which for me means literate programming. As I couldn't find an existing Jekyll converter that did all the things that I wanted, I figured "How hard can it be" and wrote my own...

  • Of the Just Shaping of Letters

    I stumbled across a print copy of Dürer's Of the Just Shaping of Letters in a second-hand bookshop years ago. This slim book — an English translation of part of book three of Dürer's Applied Geometry from 15351 — contains descriptions of how to draw uppercase Latin letters.2 Each letter is described as a series of geometric instructions and relationships within the containing square.

  • Joined-up Engineering

    There are many well known differences between American and British English, but it can be the less well known that make me stop and think.

  • Tiny Basic using PEG and F#

    Prompted by Mike Begley I just used the peg parser I showed in previous blog posts (1, 2, and 3) to make a simple implementation of Tiny Basic

  • Parsing Expression Grammar - part 3

    The PEG parser at the end of part2 will parse, and call out to code when a rule is parsed, but isn't particularly easy to use, most particularly because the grammar has to be expressed as F# objects. In this post I'll extend the parser to be able to parse PEG from a text file, and to generate F# code for a parser described by that PEG.

  • Parsing Expression Grammar - part 2

    At the end of part1 I had a parser that will parse a PEG, but isn't that useful because its output is simply a recursive data structure of the matched elements.

  • Parsing Expression Grammar - part 1

    I'm not a great language and grammar theoretician, so I'm not going to go into great detail about what a Parsing Expression Grammar (PEG) is, but here are a few observations.