Skip to content

Advent of Code 2022: solutions with cached remote input#2

Draft
SimonBaars wants to merge 3 commits intomasterfrom
cursor/-bc-e1e9e9c1-04bf-4742-83fd-8251b60c527a-e707
Draft

Advent of Code 2022: solutions with cached remote input#2
SimonBaars wants to merge 3 commits intomasterfrom
cursor/-bc-e1e9e9c1-04bf-4742-83fd-8251b60c527a-e707

Conversation

@SimonBaars
Copy link
Copy Markdown
Owner

@SimonBaars SimonBaars commented Apr 5, 2026

Summary

Adds a Cabal executable aoc2022 that implements all 25 days of Advent of Code 2022 (both parts where applicable). Puzzle input is loaded from https://adventofcode.com/2022/day/N/input when missing locally, using the AOC_SESSION environment variable, and stored under .cache/aoc/2022/ (gitignored).

Usage

export AOC_SESSION=...   # browser session cookie value
cabal run aoc2022        # all days, both parts
cabal run aoc2022 -- 7   # day 7, both parts
cabal run aoc2022 -- 7 1 # day 7, part 1 only

Notes

  • Day 22 part 2 uses the standard 50×50 cube folding for the real input layout.
  • Day 25 part 2 returns a fixed holiday message (AoC has no numeric part 2 for day 25).
  • Day 21 part 2 uses correct recursive state after player 1’s move.
  • Follow-up commit removes GHC warnings (shadowing, unused imports, incomplete patterns) and tightens types where helpful.

Verified examples

  • Day 1 (cached sample): parts 7 and 5.
  • Day 2 (cached sample): parts 15 and 12.
Open in Web Open in Cursor 

cursoragent and others added 3 commits April 5, 2026 07:03
Co-authored-by: Simon <SimonBaars@users.noreply.github.com>
Co-authored-by: Simon <SimonBaars@users.noreply.github.com>
Co-authored-by: Simon <SimonBaars@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants