Programming

Posts about programming and software development

Writing a CHIP-8 emulator in Swift - Part 2 25 Dec 2018

In part 1 I implemented a CHIP-8 in Swift. In this part I will describe the process of adding a debugger.

More

Writing a CHIP-8 emulator in Swift - Part 1 18 Nov 2018

Inspired by Tomek Rękawek’s post on writing a GameBoy emulator (https://blog.rekawek.eu/2017/02/09/coffee-gb/), I decided it sounded like a fun project. After some digging, I realised that as a precursor, it would be better to get my feet wet by writing a CHIP-8 emulator. I also decided this would be a good excuse to learn some Swift. Digging around, I found Cowgod’s technical reference, which describes how to implement it.

More

Writing a Regular Expression Engine in Scala - Part 2 13 Oct 2018

In part 1 we implemented an NFA class in Scala. In this part, we will implement compilation into a DFA, and the ability to use the DFA to match strings.

More

Writing a Regular Expression Engine in Scala - Part 1 12 Oct 2018

Having explained the theory behind Regular Expressions (see here), let’s implement a Regular Expression engine in Scala.

More

Code from a past life 22 Aug 2018

The other day I decided to dig out one of my old university assignments. In my second year we had an AI sub-module, in which the programming assignment was to solve a number of instances of the Travelling Salesman Problem.

More

Regular Expressions 19 Apr 2018

In a previous job I did a fair amount of mentoring. One piece I would use any excuse to bring out was a discussion of the theory behind regular expressions. It wasn’t just a digression - I found regular expressions much easier to read once I understood how they worked.

More