- Notifications
You must be signed in to change notification settings - Fork0
Haskell "framework" for Advent of Code
License
zouppen/aoc-2024
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is my "framework" for Advent of Code 2024. Written to makeparsing and output pretty-printing nice, also allowing easierbenchmarking among friends by making it easy to run old assingmentsinstead of just doing them ad hoc in REPL environment.
I'm pretty sure there isn't a single person who is interested aboutusing this, but in case you do, the license is GNU GPL 3.0 or (at youroption) later. You may (at your option) also send me a post card forChristmas.
See my notes of daily tasks on thelogbook page
sudo dnf install ghc-aeson-devel ghc-attoparsec-devel ghc-cmdargs-devel ghc-clock-devel ghc-fgl-develcabal install --overwrite-policy=always
sudo apt install libghc-aeson-dev libghc-attoparsec-dev libghc-cmdargs-dev libghc-clock-dev libghc-fgl-devcabal install --overwrite-policy=always
To run assignment for 2nd day, reading the input from default location, in this caseinputs/02
:
~/.cabal/bin/aoc-zouppen-2024 2
To run assignment for 1st day, reading the input from specified file:
~/.cabal/bin/aoc-zouppen-2024 -f input.txt 1
To make test run for parser for day 1, with JSON output:
~/.cabal/bin/aoc-zouppen-2024 -f input.txt -j -p input 1
For full info, run~/.cabal/bin/aoc-zouppen-2024 --help
.
I have made PDF generator for the daily puzzle which also automatesother things. Seetools.
During development, import moduleTonttu
which contains functionparseBinFile
which can be used for running the parser in REPLenvironment.
To add the assignment to the command-line utility, add the module tofilesaoc-zouppen.cabal
andsrc/Tontut.hs
.