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_keyPer 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 decryptThis was quite the rabbit hole to go down for this small payoff but whatever. 🤷♀️
- Duplicate the
src/00directory and name the copysrc/XXusing the two-digit, one-indexed number of the day's challenge. - Copy-pasta the sample data into
sample.txt. - Use the
devtask to run the tests in watch mode against the sample data:
DAY=XX deno run dev- Use the
solvetask 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.tsfor posterity. - Duplicate
test.tsand name the copyinput.test.ts. Change the target toinputand update the expected values. - Commit with message
day XXand 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 testUse 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 | ⭐ | ⭐ |
| Day 24 | ⭐ | |
| Day 25 | ⭐ |