Random Link ¯\_(ツ)_/¯ Apr 11, 2022 » AoC 2021 Parsing Arguments 2 min; updated Apr 11, 2022 Parsing the Command Line lists a couple of libraries. and are the most popular options. Going with as it’s slightly more popular. {-# OPTIONS_GHC -Wall #-} module AoC2021Args (Args(..), aocArgParser) where import Options.Applicative import Data.Semigroup ((<>)) data Args = Args { day :: Int } aocArgParser :: Parser Args aocArgParser = Args <\$> option auto ( long "day" <> help "The day to run code for. Use '0' to run all of the solutions.... Mar 16, 2022 » AoC 2021 Day 09: Smoke Basin 13 min; updated Mar 16, 2022 Multi-dimensional arrays using massiv; Fusion; Box vs. Unboxed; Connected Components; Data.Set; Monadic map Mar 7, 2022 » AoC 2021 Day 08: Seven Segment Search 15 min; updated Mar 7, 2022 Day 8 - Advent of Code 2021. adventofcode.com . Accessed Mar 7, 2022. Part I Description You barely reach the safety of the cave when the whale smashes into the cave mouth, collapsing it. Sensors indicate another exit to this cave at a much greater depth, so you have no choice but to press on. As your submarine slowly makes its way through the cave system, you notice that the four-digit seven-segment displays in your submarine are malfunctioning; they must have been damaged during the escape.... Feb 25, 2022 » AoC 2021 Day 04: Giant Squid 6 min; updated Feb 25, 2022 Day 4 - Advent of Code 2021. adventofcode.com . Accessed Feb 25, 2022. Part One You’re already almost 1.5km (almost a mile) below the surface of the ocean, already so deep that you can’t see any sunlight. What you can see, however, is a giant squid that has attached itself to the outside of your submarine. Maybe it wants to play bingo ?... Feb 23, 2022 » AoC 2021 Day 03: Binary Diagnostic 14 min; updated Feb 23, 2022 Day 3 - Advent of Code 2021. adventofcode.com . Accessed Feb 23, 2022. Problem Description Part One The submarine has been making some odd creaking noises, so you ask it to produce a diagnostic report just in case. The diagnostic report (your puzzle input) consists of a list of binary numbers which, when decoded properly, can tell you many useful things about the conditions of the submarine.... Feb 19, 2022 » Learning Haskell via AoC 2021 17 min; updated Feb 19, 2022 This page contains remarks on Haskell that I encountered when working with source files that span multiple AoC 2021 problems. and have Haskell solutions. It’ll be nice to compare how they solved the problems. I don’t want to end up perfecting the wrong approach! Setting Up Haskell Env for AoC To manage dependencies, Cabal and Stack are pretty popular. Stack incorporates the Cabal build system.... Feb 18, 2022 » AoC 2021 Day 01: Sonar Sweep 6 min; updated Feb 18, 2022 Day 1 - Advent of Code 2021: Sonar Sweep. adventofcode.com . Accessed Feb 18, 2022. Part One As the submarine drops below the surface of the ocean, it automatically performs a sonar sweep of the nearby sea floor. On a small screen, the sonar weep report (your puzzle input) appears: each line is a measurement of the sea floor depth as the sweep looks further and further away from the submarine....