The Collatz conjecture, visualised in Clojure

Before I begin, watch the video that prompted me to do this in the first place. Okay, now you know what I’m talking about, the Collatz conjecture. It’s scarily simple, you take a number, if it’s even you halve it, if it’s odd you multiply it by three and add one. Repeat this and you […]

An introduction to ClojureScript

In this post I’m going to attempt to explain where ClojureScript comes from as well as what it is and what it can do for you. I’m coming at this from the perspective of someone who writes a lot of JavaScript already, probably with React and Redux. Lisp ClojureScript is a very slight sub-set of […]

Working with multiple of lists in JavaScript

If you’ve ever had to iterate over multiple lists at the same time or map a filtered map of a map, you’ll understand that nesting all of those blocks and callbacks isn’t very easy to work with or understand. Luckily, there’s some cool techniques that make turning several arrays (or infinite sequences created by generators, […]

Brainfuck VM in Clojure

This is my second implementation for my repository of brainfuck interpretors, this time in the wonderful language Clojure (the first was JavaScript). It largely follows the same format of my initial machine but takes a route that I want to eventually refactor my JavaScript implementation to use as well. It builds a list of token […]

A JavaScript / Clojure mashup

I’m going to create a nightmare inducing monster and you’re going to enjoy it. Hear me out: Data as code in plain JavaScript without a pre-compilation step or new language to learn (even if Clojure is beautiful and takes all of 10 minutes to memorise the syntax). Of course we don’t have the distinction of […]