| Year | Stars | Complete? |
|---|---|---|
| 2022 | 26★ | |
| 2021 | 50★ | ✔ |
| 2020 | 50★ | ✔ |
| 2019 | 50★ | ✔ |
| 2018 | 28★ | |
| 2017 | 00★ | |
| 2016 | 00★ | |
| 2015 | 00★ |
stack install
stack run 2022 01 # Execute the given day.
stack run 2022 last # Execute the most recent day with a source file.
stack run 2022 all # Execute every day with a source file.
stack ghci src/Y2022/Day01.hs # REPL
stack --profile run 2022 last -- +RTS -p -RTS # Profile the day.
# Profile memory usage.
stack --profile run 2022 last -- +RTS -p -hy && stack exec -- hp2ps -e8in -c aoc.hpIn the greatest of hackathon traditions, these solutions follow the Easiest Thing That Works™ methodology.
This file should have a one or two digit filename, with no extension. The input file must exist, even if then puzzle doesn’t supply one.
The shell script, scripts/generate-sources.sh, will create a boilerplate Haskell source file for any input files which don’t yet have one. It also generates a top-level source file, src/GeneratedSolutions.hs, which exports a catalogue of every available solution.
You can execute this script in multiple ways:
./scripts/generate-sources.sh
# or...
nix run .#generate-sources
# If this is running, it will generate sources anytime inputs are added:
nix run .#aoc-wait 2015 lastmodule Y2015.Day01 (parts) where
parts = ( (part1, Nothing)
, (part2, Nothing)
, id
)
part1 :: a -> String
part1 input = ""
part2 :: a -> String
part2 input = ""