Have a cheat sheet for Jujutsu. --- I’ve been learning Jujutsu a.k.a. jj, a version control system that’s compatible with git repos. It’s clicked for me in a way that git hasn’t even after many years of use. The best way to learn something is to teach it, so I wrote a reference and cheat sheet for jj with the help of a friend: The reference describes the state space of a jj repository and how it changes when you fetch and push. The cheat sheet visually shows what all of the common edi...| justinpombrio.net
JJ Cheat Sheet| justinpombrio.net
Investigating the Typst programming language. Typst is a modern typesetting system, and a competitor to LaTeX. You can roughly divide it into two parts: it’s a programming language glued to a layout engine. The layout engine deals withThe programming language deals with - Margins- Data representation - Padding- Cyclic data - Subscripts- Aliasing - Floating Figures- Mutability - Numbered references- Garbage collection - Justified text- Control flow - Right-to-left languages- Functions - Hype...| justinpombrio.net
I present a more expressive variant of Wadler’s “Prettier Printer”. --- What’s a pretty printer? You’ve probably used a code formatter like gofmt or rustfmt or JS prettier. These tools work in two steps: (i) parse the source code in a file, and (ii) print it out nicely. Step (ii) is pretty printing. Pretty printing is the reverse of parsing. Parsing turns linear text into a tree (a parse tree, which after a bit of post-processing becomes an abstract syntax tree (AST)). Pretty printi...| justinpombrio.net
You know how you start a Factorio game with some friends, and play with the Space Exploration and Krastorio2 mods, and soon you’re 123 hours into the game and your factory spans several planetary bodies and you’re trying to figure out how to efficiently route arbitrary sets of resources between planets? No? Maybe that’s just a me problem. But please, consider staying for the algorithms. By trying to do logistics in space we’ll end up with something like min-flow but on a tree. The Pro...| justinpombrio.net
Pretty, isn’t it? But what is it? Start with a U then make four copies, glued in a U, shown in yellow and blue and repeat and repeat and repeat and repeat and repeat and repeat til the curve fills the plane. A bit hard to see. What if the curve wasn’t always black? What if it changed, from start to end? Start small then repeat and repeat and repeat and repeat and repeat and repeat til the curve fills the plane. Now you see some of the majesty of Hilbert’s curve. It is difficult, though,...| justinpombrio.net
A Twist on Wadler's Printer| justinpombrio.net
Pixel to Hex| justinpombrio.net