# Projects

## Pursuit

Pursuit is one of the contributions to PureScript which I’m most proud of. It hosts searchable API documentation for PureScript libraries, and it initially came to life in 2015 as my Google Summer of Code project. It’s also had a number of enhancements since then, from various contributors.

## Explorations in abstract algebra in PureScript

While studying maths at university, I often found it quite useful (and fun) to try implementing concepts from abstract algebra in PureScript. For example, most group theory courses will involve some work with permutations, and working with permutations by hand can be quite fiddly and error-prone, so being able to check your work is quite handy. I have implemented libraries for permutations, modular arithmetic, quaternions, and polynomials.

One quality of PureScript which makes it a great choice for this kind of exploration is that its numeric type class hierarchy is explicitly inspired by abstract algebra: there are type classes for semirings, rings, fields, and others. However, this hierarchy can be a bit difficult to understand, especially for people who don’t have previous experience of abstract algebra. In 2017-18, I wrote a guide to the PureScript numeric hierarchy to try to rectify this.

Another one of my projects in this vein was a Legendre symbol calculator. Sometimes when you’re doing number theory, it’s useful to know whether a number is a square modulo some odd prime *p* (for reasons I don’t completely remember). The Legendre symbol can tell you whether this is the case, and by making use of some of its properties we can quickly determine whether a number is a square without needing to calculate the squares of every number modulo *p*.

## Games

The idea of being able to create video games was mostly what got me into programming originally, because I am a walking stereotype. Here are a few of mine.

The multiplayer pacman and solitaire games are both written in PureScript. The multiplayer pacman has a server and a client component, both in PureScript, with node.js on the backend. King of the Network was my group’s entry in the 2013 University of Edinburgh GameDevSoc game jam, and it won! (Mostly by virtue of being one of the only entries which was actually complete enough to be playable.) Unfortunately the source code for that one is lost. The tank game is quite special to me because it was my first JavaScript project; it’s from 2012, back when I had just started programming.