Skip to content

merrywhether/aoc2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AoC 2024

Advent of Code 2024 using(/learning) Deno and Zed.

Setup

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. 🤷‍♀️

Daily Workflow

  1. Duplicate the src/00 directory and name the copy src/XX using the two-digit, one-indexed number of the day's challenge.
  2. Copy-pasta the sample data into sample.txt.
  3. Use the dev task to run the tests in watch mode against the sample data:
DAY=XX deno run dev
  1. Use the solve task to output a solution based on the input data:
DAY=XX deno run solve
  1. Add the solution and timing to the top of that day's main.ts for posterity.
  2. Duplicate test.ts and name the copy input.test.ts. Change the target to input and update the expected values.
  3. Commit with message day XX and push, triggering an update of the star/day progress tracking in this README.

Other Tasks

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

2024 Results

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

Useful references

About

Advent of Code 2024

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published