Advent of Code 2024 using(/learning) Deno and Zed.
Create an .env
file with the following content:
AOC_SESSION=your_session_cookie
INPUT_KEY=encryption_key
Per AoC guidelines, the inputs should not be stored in your repo so that people cannot reverse their generation strategies.
In order to preserve replayability, the input data is encrypted using the INPUT_KEY
and stored that way instead.
After pulling a fresh copy of the repo, you can decrypt the input data by running the following command (assuming you have the correct key):
deno run decrypt
This was quite the rabbit hole to go down for this small payoff but whatever. 🤷♀️
- Duplicate the
src/00
directory and name the copysrc/XX
using the two-digit, one-indexed number of the day's challenge. - Copy-pasta the sample data into
sample.txt
. - Use the
dev
task to run the tests in watch mode against the sample data:
DAY=XX deno run dev
- Use the
solve
task to output a solution based on the input data:
DAY=XX deno run solve
- Add the solution and timing to the top of that day's
main.ts
for posterity. - Duplicate
test.ts
and name the copyinput.test.ts
. Change the target toinput
and update the expected values. - Commit with message
day XX
and push, triggering an update of the star/day progress tracking in this README.
Use the test
task to run all tests against the sample data (mostly for CI):
deno run test
Use the test:input
task to run all tests against the input data (mostly for validating changes to the repo structure):
deno run test:input
Day | Part 1 | Part 2 |
---|---|---|
Day 1 | ⭐ | ⭐ |
Day 2 | ⭐ | ⭐ |
Day 3 | ⭐ | ⭐ |
Day 4 | ⭐ | ⭐ |
Day 5 | ⭐ | ⭐ |
Day 6 | ⭐ | ⭐ |
Day 7 | ⭐ | ⭐ |
Day 8 | ⭐ | ⭐ |
Day 9 | ⭐ | ⭐ |
Day 10 | ⭐ | ⭐ |
Day 11 | ⭐ | ⭐ |
Day 13 | ⭐ | ⭐ |
Day 14 | ⭐ | ⭐ |
Day 15 | ⭐ | |
Day 17 | ⭐ | |
Day 19 | ⭐ | ⭐ |