“There are different rules for reading,
for thinking, and for talking.
Writing blends all three of them.”
– Mason Cooley
A website about functional programming, computer sciencey side-projects, with a sprinkling of mathematics for added authority.
Below is a list of my various (documented) projects and some musings on programming.
Moessner's Sieve
Description
The formal-moessner project was the culmination of my Master’s thesis in Computer Science, A Formal Study of Moessner’s Sieve, completed at Aarhus University in 2014 under the supervision of Olivier Danvy. The thesis presents a new characterization of a mathematical procedure known as Moessner’s Process, or Moessner’s Sieve, for generating a stream of successive powers from the stream of natural numbers. As a result of the new characteristic, the thesis also introduced a range of new mathematical results surrounding the properties of Moessner’s Process.
The thesis was part of the four nominations for Best Master’s Thesis in Computer Science 2014 in Denmark, and it was later published as an eBook by Aarhus University Library.
Links
Below is a series of blog posts that condenses the thesis into the 10 major ideas and insights of the thesis while stripping away the proof-heavy parts of the thesis, making it approachable from a recreational math perspective.
Posts
- An introduction to Horner's method
- An introduction to Pascal's triangle and the binomial coefficient
- Rotating Pascal's triangle and the binomial coefficient
- An introduction to Moessner's theorem and Moessner's sieve
- A dual to Moessner's sieve
- A characteristic function of Moessner's sieve
- Obtaining Taylor Polynomials with Horner's method
- Deriving Moessner's sieve from Horner's method
- A grid of Moessner triangles
- Idealized versions of Moessner's theorem and Long's theorem
Musings
Description
A scratch pad where all the stray thoughts that aren’t yet – and may never be – part of a bigger project or blog series.
Posts
- A Primer on the Coq Proof Assistant
- An interpreter, a compiler, and a virtual machine
- Equivalence of interpretation and compilation followed by execution
- Enum types in Kotlin, Elixir, and Elm
- Product types in Kotlin, Elixir, and Elm
- Sum types in Kotlin, Elixir, and Elm
- Making builds reliable and reproducible
- Programming in Style: From Pattern Matching to Point Free
JSON Schema parser
Description
The json_schema project is an Elixir library for parsing, inspecting and manipulating JSON Schema documents, thus making it easier for third parties to create new tools based on JSON schema specifications, e.g. JSON schema validators or code generation tools.
The project was created as a result of my json-schema-to-elm project growing sufficiently large that it started to make sense to split it into two projects: the JSON schema parser and the Elm code generator.
Links
JSON Schema to Elm code generator
Description
The json-schema-to-elm project is a command line tool, written in Elixir, which takes as input a list of JSON schema files, describing some API, and outputs Elm type declarations, JSON decoders and encoders, and Fuzz tests for manipulating the types specified by the JSON schema files in Elm.
The project was created as I found the act of writing all these JSON decoders and encoders by hand rather tedious and error prone, so it made sense to investigate the alternative of generating them based on a specification. Furthermore, this had the added advantage of giving me some hands on experience writing both parser and code generation logic for a real world use case.
Links
i18n to Elm code generator
Description
The i18n-to-elm project is a command line tool, written in Elixir, which takes as input a list of i18n resource files, containing translations of string assets in different languages, and outputs type safe Elm code for handling these i18n resources.
The project was created after reading “Elm i18n and Type Safety” – and having already written a working first version of the json-schema-to-elm tool – as a way of solving yet another boilerplate-related issue when working with Elm. This also had the effect of allowing me to test some of the Elm code generating logic on a slightly different use case than the JSON schema files.
Links
CHIP-8 emulator
Description
The chip-8 project is a web application, written in Elm, which implements a CHIP-8 emulator in the browser.
The project was created for two reasons:
- Learning about emulators by implementing one, and
- writing an emulator in a functional programming language.
Links
Brainfuck interpreter
Description
The brainfuck project is a web application, written in Elm, which implements a Brainfuck interpreter in the browser.
The project was created for two reasons:
- Learning about interpreters implementing one, and
- writing an interpreter in a functional programming language.
Links
b.el
Description
The b.el project is an Emacs package, written in Emacs Lisp, which provides a range of standard functions for manipulating and parsing bytes centered around three distinct representations for bytes as decimal, hexadecimal and binary values, respectively.
The project was create to aid developers who either want to rapidly prototype a parser for a binary format, and would prefer to do this from the comforts of an Emacs buffer, or simply want become better acquainted with bytes as a fundamental building block for software development and how these can be manipulated and represented.
Links
ExRerun
Description
The ex_rerun project is an
Elixir library for monitoring your source code and
running a set of custom mix
tasks, like compile
or test
, whenever source
files change. The tool is made to be pluggable allowing developers to add their
own mix
tasks to be run by the tool, e.g. for compiling frontend code or
generating API documentation.
The project was created because I was developing a RESTful Elixir backend, in cowboy, which was bundled with a corresponding CRUD frontend in Elm, and wanted to compile the Elm code alongside the Elixir code whenever either of the code bases changed.
Links
Helm Bitbucket
Description
The helm-bitbucket project is an Emacs package, written in Emacs Lisp, which adds Helm support for searching Bitbucket repositories, of which you are a member, and opening the corresponding the Bitbucket web page in the browser.
The project was created to easily lookup a Bitbucket repository while developing, e.g. to compare some piece of code or check on a pull request.
Links
We regained our peace. People will be happy.
But, be careful more tests wait for you.
Bye! MONSTER LAND. So long."
-- Ending credits, Wonderboy in Monsterland (Amiga 1989)