/aoc-2023-haskell

Solutions to Advent of Code 2023

Primary LanguageHaskellMIT LicenseMIT

aoc-2023-haskell

A Cabal project for my solutions to Advent of Code 2023 puzzles using Haskell.

Usage

This is a cabal project with a library for each days solution and an app that runs all the solutions and prints the results.

There is a utility library which is added as a submodule.

Build and run from the root of the project using cabal

To build

cabal build all

While developing just use the repl and pipe data into it. To compile and run a solution for day <d>

cabal run aoc23 <d>

Installation

Clone the repository and the submodule.

Testing

I’m using cabal-docspec installed directly, without Hackage. (I had to enable a lower version of GHC).

cabal build all cabal-docspec

from the root of the project to run the tests.

Inputs

I’m not including my inputs.

The code requires each input to be of the form day<xx>.txt so add the requisite ones before trying to evaluate any solution.

I use aocd to fetch and cache the inputs for my registered user id.

To fetch all inputs run ./fetch_inputs.sh from the project root. If they have been cached, this shouldn’t take too long. For getting individual day’s inputs while participating, cd into the input directory for that year and run aocd > dayxx.txt or aocd yyyy dd |> dayxx.txt in the inputs directory

License

Licensed under the MIT License.

Progress

DayPart OneRankPart TwoRankTitle
155477175385443123788Trebuchet?!
22162226107251321691Cube Conundrum
352591111362246783598957Gear Ratios
42634624758846776238000Scratchcards
5650599855102932124003575410If You Give A Seed A Fertilizer
62344708374123012520235974Wait For It
72533132411324125336274313727Camel Cards
819667300011918526373811759049Haunted Wasteland
919012178871460390514054Mirage Maintenance
1069036030926544446Pipe Maze
1195431563220062524329268629772Cosmic Expansion
1273441827310880065190078078Hot Springs
133738112595282109562Point of Incidence
1419391193918606929054Parabolic Reflector Dish
155053792047226321132117Lens Library
16636129258670128428The Floor Will Be Lava
1786620932101019911Clumsy Crucible
184074512609901111135949278435Lavaduct Lagoon
19Aplenty
20Pulse Propagation
21Step Counter
22Sand Slabs
2323701211465468829A Long Walk
24
25