dfm / adventofcode

Holiday hacking because I'm a nerd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My solutions for Advent of Code.

2023 in Rust. Previous years:

It's not pretty, but sometimes it works(?):

Tests

Project Layout

The solutions for each day live in aoc/src/y2023/dDD.rs where DD is the relevant day of the month. To implement a new solution, create a new file for the appropriate day, and it will be automatically discovered by MAGIC. This can be automated by running:

make new

or

cargo run -- new

You can specify the day to create using:

cargo run -- new --day 12

Usage Notes

Session key: To automatically download the inputs for a specific day, you'll need to have your AofC session key saved somewhere. To find it, log into the AoC website, and use the developer tools to look at the cookies to find your session key. Then save that key to a file called ~/.config/aoc/key. Then, the data files will be downloaded into ~/.cache/aoc/2023 as text files.

To run today's solution, use:

make

which expands into:

cargo run -- --today

To run all the checks and solutions, use:

make all

License

Copyright 2019-2023 Daniel Foreman-Mackey

Licensed under the Apache License.

About

Holiday hacking because I'm a nerd

License:Apache License 2.0


Languages

Language:Rust 99.5%Language:Makefile 0.5%