~reesmichael1/adventofcode

Solutions for the Advent of Code puzzles
Add solution for 2022 day 3
Add solution for 2022 day 2
Update downloader to include User-Agent

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~reesmichael1/adventofcode
read/write
git@git.sr.ht:~reesmichael1/adventofcode

You can also use your local clone with git send-email.

#Advent of Code Solutions

These solutions are written in Nim. There are solutions for 2019 and 2020. (Ok, most of 2019, and probably not all of 2020—I'm an organist in the real world, and Advent is a busy time!) I'm going through 2021 as well.

#Task Runner

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 2020
nimble build
./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.

#Helper Functions

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.