What I Remember

Posted on April 26, 2020 by Jack Kelly
Tags: coronavirus

(Note: Twitter links have screenshots next to them, as it’s notoriously difficult to predict what Twitter shows on the other end of a link.)

Update History:

What do I remember about the coronavirus pandemic?

I remember watching case numbers double and redouble throughout late February and early March, thinking “oh god, we’re only a few doublings behind Italy, and our leaders are going to drop the ball”.

Read more...

The Power of Tiny DSLs

Posted on April 3, 2020 by Jack Kelly
Tags: haskell, coding

I was playing around with codeworld-api recently, and found myself with a pair of interesting problems:

Placing the picture is easy — codeworld-api provides two functions that do exactly what I want:

Going the other way is more difficult. After noodling around on paper trying to compute the inverse transform, I remembered that these transformations could be represented as 3x3 matrices (Wikipedia has some examples), and that inverting a 3x3 matrix is easy (provided that the affine transformation it represents hasn’t collapsed the space).

This means I have to compute the transformation twice: once as codeworld-api calls, and once as matrices. Or do I?

Read more...
All Posts | RSS | Atom
Copyright © 2024 Jack Kelly
Site generated by Hakyll (source)