8000 GitHub - yndajas/advent-of-code: Advent of Code solutions · GitHub
[go: up one dir, main page]

Skip to content

About

Advent of Code solutions

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Advent of Code solutions

My solutions to Advent of Code puzzles

Stars by year and language

Parts solved in more than one language don't earn additional stars.

< 6F18 th align="right">TypeScript
year stars Ruby other
2026 6 / 24 6
2025 16 / 24 16
2024 40 / 50 40 C# (8), Go (4), Rust (4)
2023 10 / 50 10
2022 10 / 50 10
2021 0 / 50
2020 0 / 50
2019 0 / 50
2018 0 / 50
2017 6 / 50 6
2016 10 / 50 10
2015 12 / 50 12 4 Lua (4)
total 110 / 548 60 54 C# (8), Go (4), Lua (4), Rust (4)

Setup

The solutions rely on a separate assets repo for their input. It has a folder per year, each with input and prompts folders containing a file per day, named with the zero-padded day: DD.txt for the input, DD.html for the prompt, and optionally DD_example.txt for the puzzle's example input. Keep this repo private: Advent of Code asks that puzzle text and inputs aren't redistributed.

Copy .env.example to .env, then set ASSETS_REPO to the path of the assets repo and AOC_SESSION_COOKIE to the value of your Advent of Code session cookie.

Starting a puzzle

Prompts and inputs are available at https://adventofcode.com/THE_YEAR/day/THE_DAY_WITHOUT_ZERO_PADDING. These scripts fetch and display them locally:

  • script/download YEAR DAY downloads the prompt and input into the assets repo (relies on curl, htmlq, and perl)
  • script/browse YEAR DAY renders a downloaded prompt in the terminal (relies on pandoc and glow)
  • script/start YEAR DAY PART runs download, then splits the current tmux window into four panes for writing a Ruby solution to that part: browse for the prompt; Vim with the solution, real input, and example input files; the solution, rerunning on save; and an IRB console (relies on tmux, vim, and entr, plus the other two scripts' dependencies)

LLM usage

Puzzle solutions are always written by hand. An LLM has been used on parts of the tooling in script/, though most of that is handwritten too (with initial inspiration from @cgsdev0 for the download/browse/start scripts).

About

Advent of Code solutions

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0