Skip to content

Latest commit

 

History

History

2020

Advent of Code 2020

My solutions for the Advent of Code 2020

I use these types of challenges as an excuse to learn (or brush up on) programming languages I'm not particularly familiar with. But this year has been draining, so I'm going to extend from my work last year, and continue to use Haskell.

So don't expect this code to be particularly efficient, clean, or idiomatic.

But, it works.

For each puzzle, eg 01.hs is my code, and 01.txt is my version of the data file from AOC. 01.md is my diary of comments on the puzzle, and my solution for it. Some common code between the puzzles has been collected in ../Utils.hs.

The diary pages also include my leaderboard positions for the puzzles for which I was able to be around when the puzzle opened, to race for the charts. I'm not able to do this every day, as in my timezone they open during business hours and sometimes work just gets in the way. But I enjoy it when they do. When I'm racing for the chart, often I'll do my first attempt in Python, as it's a language I'm much more familiar with (and can code in quickly), and only after I've submitted my solution, I'll go back and re-solve the puzzle in Haskell. So the code you see committed here isn't the code I wrote during the race, that code is 100% of the time an absolute mess that isn't worth sharing (and anyway most of the time is less a script that can be shared, and more a bunch of ad-hoc stuff that was run in the REPL).