| Random Link ¯\_(ツ)_/¯ | ||
| Apr 11, 2022 | » | AoC 2021 Parsing Arguments
2 min; updated Apr 11, 2022
Parsing the Command Linelists a couple of libraries. and are the most popular options. Going with as it’s slightly more popular. A type |
| Mar 16, 2022 | » | AoC 2021 Day 09: Smoke Basin
13 min; updated Mar 16, 2022
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.
Eric Wastl.
Part I DescriptionYou 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. You’ll be in a lot of trouble without them, so you’d better figure out what’s wrong. ... |
| Mar 1, 2022 | » | AoC 2021 Day 06: Lanternfish
12 min; updated Mar 1, 2022
Day 6 - Advent of Code 2021.
Eric Wastl.
Part I DescriptionThe sea floor is getting steeper. Maybe the sleigh keys got carried this way? A massive school of glowing lanternfish swims past. They must spawn quickly to reach such large numbers - maybe exponentially quickly? You should model their growth to be sure. ... |
| Feb 23, 2022 | » | AoC 2021 Day 03: Binary Diagnostic
14 min; updated Feb 23, 2022
Day 3 - Advent of Code 2021.
Eric Wastl.
Problem DescriptionPart OneThe 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. The first parameter to check is the power consumption. ... |
| Feb 19, 2022 | » | Learning Haskell via AoC 2021
14 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 AoCTo manage dependencies, Cabal and Stack are pretty popular. Stack incorporates the Cabal build system. ... |
| Feb 6, 2021 | » | 021. Amicable Numbers
8 min; updated Feb 6, 2021
Problem StatementLet \(d(n)\) be defined as the sum of proper divisors of \(n\) (numbers less than \(n\) which divide evenly into \(n\)). If \(d(a) = b\) and \(d(b) = a\), where \(a \neq b\), then \(a\) and \(b\) are an amicable pair and each of \(a\) and \(b\) are called amicable numbers. For example, the proper divisors of \(220\) are \(1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110\); therefore \(d(220) = 284\). The proper divisors of \(284\) are \(1, 2, 4, 71, 142\); so \(d(284) = 220\). ... |