As I mentioned in my December Adventure post, I am planning to solve last year’s Advent of Code, but I’m going to take my time about it.
I toyed with a couple of different ways of generating deadlines for the puzzles. I settled on the list of deadlines listed as “pow 1.5 (totals)” in the code I used to experiment with dates. As you might have noticed, I’ve already failed to meet the first deadline, which, to be fair, is starting how I mean to go on. I did actually finish day 1 this evening (only a day late) but the write up will have to wait until tomorrow or Monday.
Puzzle 1, finish by: 2025-01-03, days: 2
Puzzle 2, finish by: 2025-01-08, days: 4
Puzzle 3, finish by: 2025-01-14, days: 6
Puzzle 4, finish by: 2025-01-22, days: 7
Puzzle 5, finish by: 2025-01-30, days: 8
Puzzle 6, finish by: 2025-02-09, days: 9
Puzzle 7, finish by: 2025-02-19, days: 10
Puzzle 8, finish by: 2025-03-02, days: 10
Puzzle 9, finish by: 2025-03-13, days: 11
Puzzle 10, finish by: 2025-03-26, days: 12
Puzzle 11, finish by: 2025-04-08, days: 12
Puzzle 12, finish by: 2025-04-21, days: 13
Puzzle 13, finish by: 2025-05-05, days: 14
Puzzle 14, finish by: 2025-05-20, days: 14
Puzzle 15, finish by: 2025-06-04, days: 15
Puzzle 16, finish by: 2025-06-20, days: 15
Puzzle 17, finish by: 2025-07-06, days: 16
Puzzle 18, finish by: 2025-07-23, days: 16
Puzzle 19, finish by: 2025-08-09, days: 17
Puzzle 20, finish by: 2025-08-27, days: 17
Puzzle 21, finish by: 2025-09-14, days: 18
Puzzle 22, finish by: 2025-10-02, days: 18
Puzzle 23, finish by: 2025-10-21, days: 18
Puzzle 24, finish by: 2025-11-10, days: 19
Puzzle 25, finish by: 2025-11-30, days: 19
And, in time-honoured Advent of Code fashion,
my first task is to faff around with some tooling, rather than actually doing the problem.
I first had to set up the directory structure and modules in a halfway sensible fashion in order to have
a separate directory for each year, and a separate file for each day.
For, say, python, I just ran the file for each day,
but for this year, using rust, I am putting everything under one project.
This means I will need to configure some way to run the relevant day
in the main.rs file.
This means I can just do cargo run to print the puzzle answers.
At the moment, what I’m doing is doing use aoc_2024::aoc_2024_01 as today;
and then I can rely on my having defined the part_one and part_two functions in that day’s file,
and call them with e.g. today::part_one().
Tomorrow, I change what file I import, and that’s the only thing that needs adjusting in the main file.
The other thing I will need to do is work out downloading the data from the website. Currently, I’m using a python script to import the data, and then using rust just to read from the file that the python script writes. The plan is to replace this with a rust-only method for requesting the data. But that’s some yak-shaving for later in the week.