All the graphics for these are made in Chalk which is a python port of Haskell's Diagrams library to https://github.com/chalk-diagrams/chalk . Honestly I mostly make the puzzles as an excuse to hack on the graphics library which I find pretty interesting.
The motivation was primarily teaching point-free, array programming. I don't think it is a great style, but it is fun as a brain teaser.
If you enjoy this type of thing, I made a bunch more. They're all kind of ML + PL in style.
- https://github.com/srush/gpu-puzzles
- https://github.com/srush/tensor-puzzles
- https://github.com/srush/autodiff-puzzles
- https://github.com/srush/transformer-puzzles
- https://github.com/srush/LLM-Training-Puzzles
- https://github.com/srush/triton-puzzles
All the graphics for these are made in Chalk which is a python port of Haskell's Diagrams library to https://github.com/chalk-diagrams/chalk . Honestly I mostly make the puzzles as an excuse to hack on the graphics library which I find pretty interesting.