Optimal Opus

Ramblings on Numerical Programming

Algabraic Data Types Are Not What you Think They Are

Read Short
Preview Image

Array Languages Still Have a Long Way to Go

Referentially transparent type systems that can describe multi-dimensional arrays are still somewhat illusive to even modern programming languages, but researchers are building proof-of-concept compilers that could change the story.

Read Essay
Preview Image

A multi-dimensional ADT from first principles

Multi-dimensional arrays are an abstract data type used in every single numerical program out there. They can be used to track tracers in 2D or 3D physics simulations, as matrices in linear algebra, as portfolios in financial modelling and in countless other scenarios. Let's dive into the foundations of a possible implementation in C.

Read Essay
Preview Image

Playing magic tricks with randomness

What do Video games, statistics and data bases all have in common? They all need to use random number generators. But how does a deterministic machine generate randomness? Obviously the answer is it doesn't, but we've gotten pretty damn good at faking it. Let's learn how.

Read Essay
Preview Image

Beware of Taking Float16s From the Cookie Jar

Read Short
Preview Image

A Gentle Introduction to Automatic Differentiation

Differentiation is hard enough when it's in abstract on a math test, but what about when it's living, breathing code? Let's learn how modern numerical computing frameworks like Julia, Pytorch, Tensorflow and JAX all take gradients without ever being told how to do it.

Read Essay
Preview Image

Unmasking Python's for loop

Today we're going to look at for loops. It's the proverbial peanut butter and jelly sandwich of programming and yet many programming languages don't even have for loops. Let's investigate some alternatives.

Read Essay

The 90's are back in style

Read Short

A Better Notation of Derivatives

Read Short

My Journey to Building a Website

Read Short

Hello World!

Read Short