# Applying Clean Code

I’ve recently been reading Uncle Bob’s Clean Code (my notes), and found myself applying some of the guidelines in the book to the Scheme compiler I’ve been hacking on (source code here). Specifically, I had this chunk of code that during register allocation translates a color to a memory location (I use Graph-coloring allocation): (define (var... Read more

# Zorn's Lemma, Choice, & Well-ordering

These three very powerful axioms in set theory turn out to be equivalent, and it is not easy to see why. To review what they say, Zorn’s Lemma : a partially ordered set with upper bounds for every totally ordered subset has at least one maximal element Axiom of Choice : if $F$ is a function on $I$ such that $F(i)\neq\phi, \forall i\in I$, ... Read more

# Chess : My journey to 1800

I recently hit 1802 on rapid, my highest so far. Here I reminisce on what I feel were the most productive efforts towards this. Taking a break : it might seem ironic that the first thing I write here is to stop playing, but it is quite important to know when to recuperate energy. For me, some signs of fatigue include making moves hoping to b... Read more

# How I learnt miniKanren

I’ve spent quite a bit of time in the last semester working with miniKanren in an attempt to implement at least a sizeable subset of it metacircularly. The result of these efforts is metaKanren, which is microKanren extended to support user-defined relations. This post goes over what I feel are the resources that helped me gain enough of an unde... Read more

# Sperner's lemma for the layman

I learnt this formulation from episode 27 of My Favorite Theorem and felt it illustrates Sperner’s lemma in a beautiful manner. Triangulate a spherical ball, i.e. divide the entire surface of the ball into triangles, such that the only way two triangles meet are by either Sharing a corner Sharing a side It is important to note that ther... Read more