Advent of Code in Red
This is a small collection of solutions to Advent of Code problems, and a problem input downloader.
I mostly use Advent of Code to experiment with different ways of solving the problems, and tend to not get very far. I might have some weird solutions.
To use the input downloader, copy read-input.red to your workspace, and save your browser session cookie to session-cookie.txt
.
Then put something like this at the top of your script:
#include %read-input.red
year: 2021
day: 1
problem-input: load read-input year day
; or maybe
problem-input-lines: read-lines get-input year day
It plays nice with the site, and only downloads the input a single time. After that, it will load from the cached version in the local directory.