Skip to content
yuri4nPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

yurian's Advent of Code

My Advent of Code solutions in Rust, Go, Elixir, Scala, and Haskell, with a shared toolkit for creating, running, and checking both parts of a puzzle. Solution files stay focused on puzzle logic; each language uses its own idioms and native build tools.

Solutions · Getting started · Developer manual · Editors and IDEs

Solutions

Getting started

Install Nix and direnv, then enable your shell's direnv hook. From the repository root, review .envrc and run direnv allow once to approve it. At the next prompt, a base environment supplies the compiled aoc command, common utilities, and Neovim on PATH. Language commands select their toolchain as needed; entering a language directory also selects its environment after approving that directory's .envrc.

aoc doctor --lang rust
aoc list
aoc test 2022 1 --lang rust --part 2
aoc run 2022 1 --lang rust --part 2 --time
aoc new 2026 1 --lang rust
aoc edit 2026 1 --lang rust
# Implement a part and add its example before running the new day.
aoc watch 2026 1 --lang rust

Without direnv, enter the base environment with nix develop, a language environment with nix develop .#rust, or every toolchain with nix develop .#all. For an existing manual toolchain installation, the root ./aoc launcher remains available and builds the CLI with Cargo. New solutions contain unfinished stubs, never generated puzzle answers.

Run nix develop .#all --command bash ./scripts/check.sh to verify the toolkit and existing inline examples with all five toolchains. No personal puzzle input is needed.

Real puzzle inputs live in ignored data/yYY/dDD/input.txt files. Existing local inputs are retained during migration. Fetch your own input with aoc fetch YEAR DAY after setting AOC_SESSION securely in your environment. Example inputs and typed expected answers live inline in native source or tests. Run one with aoc run YEAR DAY --lang LANG --part 1 --example; stdin, clipboard, and explicit input files are also supported.

  • Developer manual: setup, commands, input sources, offline use, timing, benchmarks, and adding a language.
  • Writing a solution: shared stream-first processing, native parser libraries, typed examples, and IDE execution.
  • Editors and IDEs: project roots, language servers, formatting, run/test tasks, and debugging.
  • Design and migration: accepted decisions, data contract, existing solutions, and limitations.

The documentation is maintained as Markdown in this repository; there is no published documentation website yet. The language guides below describe each language's solution shape, example checks, and native commands.

Open advent.code-workspace for optional VS Code integration, or open the language project in your preferred editor. The build metadata is the source of truth; no editor is required.

Language Project Build tool Instructions
Rust rust/ Cargo; one crate per year Rust guide
Go go/ Go modules Go guide
Elixir elixir/ Mix tasks, NimbleParsec, and example macros Elixir guide
Scala scala/ Scala CLI and Kyo; optional parallelism and streaming Scala guide
Haskell haskell/ Cabal Haskell guide

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages