What a year! Between Covid-19, family matters, work matters, the new site and all, not much of that Advent of Code went smoothly. I did manage to solve all the puzzles in time.
This year’s personal challenge was to write about it. So I kept using Haskell—why change if it works so well—and upgraded the programs to full-fledged posts.
Literate Haskell is really nice to use. The language’s disregard for order of definitions makes TANGLE mostly redundant, which adds to the cohesiveness. With the notable hitch that imports still have to be on top, so there’s always that skippable heading block.
Not all puzzles were as post-worthy as the other. I tried to strike a balance across a broad spectrum of styles: some posts are straightforward commented implementations, other feel more like written live cuts, others go through more reflection of how puzzle and solution match…
This year was a rather easy one. On the math and computer science fronts, there wasn’t much left for me to discover. On the Haskell front, I took the opportunity to explore alleys I don’t take everyday. Most notably this year:
recursion-schemesin day 7
- the ST reference network in day 11
- the lens-like monstrosity that solves day 14
I’m slowly moving to Relude for personal projects and did so too for Advent of Code. It didn’t last half a day. AoC is really more of a “solve it once” mindset. I really can’t get myself to give a damn about handling user error properly when there’s only one input, error-free by definition.
I’m not including benchmarking of any kind. Same reasoning, most of this code is optimized for clarity of explanation, and that often means using the native default list structures. Unambiguously suboptimal, demonstratably adequate in face of the small input sizes. It’d all be dwarfed by the lens monstrosity anyway.
Here’s the full list of posts and summary keywords; the files are cloneable from github.
Bonus it’s not Haskell, but it’s literate: solving day 7 with a git commit graph.
And that pretty much wraps up the year.
Thanks again Eric Wastl for crafting puzzles of such quality year after year. I know the work that goes into making them so unnoticeably good, and doing so consistently by piles of 50 is superhuman.
I can’t wait ’til next year!