Add (slow) solutions for all of 2022
Add solution for 2022 day 23
Add solution for 2022 day 14
These solutions are written in Nim. There are solutions for several years now, although I tend to drop off in the last week or so. (I'm an organist in the real world, and Advent is a busy time!)
I had some fun with Nim metaprogramming and built a task runner that will automatically load any solution files in the src
directory at compile time. (After all, what's the fun in doing something simply and straightforwardly without overengineering?) To use it:
cd 2022
nimble build --gc:arc -d:danger
./bin/runner # The solutions do not handle relative paths
The runner will notify you if the files in the src
directory do not match those that have been compiled into it.
You can run nimble scaffold {year} {day}
to generate a template file for a given day.
The input
module has some helper functions to access the input data. Any input files should be put in an input
directory at the top of the year with the name dayN
. If there's test data to debug, you can store it as testDayN
and use the --test
flag when running the individual day's solution.