Solutions to Advent of Code in Gleam (36⭐):
Day | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 |
---|---|---|---|---|---|---|---|---|
1 | ⭐⭐ | ⭐⭐ | ⭐⭐ | ⭐⭐ | ⭐⭐ | ⭐⭐ | ⭐⭐ | ⭐⭐ |
2 | ⭐⭐ | ⭐⭐ | ⭐⭐ | |||||
3 | ⭐⭐ | ⭐⭐ | ||||||
4 | ⭐⭐ | |||||||
5 | ||||||||
6 | ⭐⭐ | |||||||
7 | ||||||||
8 | ||||||||
9 | ||||||||
10 | ||||||||
11 | ||||||||
12 | ||||||||
13 | ||||||||
14 | ||||||||
15 | ||||||||
16 | ||||||||
17 | ||||||||
18 | ||||||||
19 | ||||||||
20 | ||||||||
21 | ||||||||
22 | ||||||||
23 | ||||||||
24 | ||||||||
25 |
Day | 2015 | 2016 |
---|---|---|
1 | ⭐⭐ | ⭐⭐ |
2 | ⭐⭐ | |
3 | ||
4 | ||
5 | ||
6 | ||
7 | ||
8 | ||
9 | ||
10 | ||
11 | ||
12 | ||
13 | ||
14 | ||
15 | ||
16 | ||
17 | ||
18 | ||
19 | ||
20 | ||
21 | ||
22 | ||
23 | ||
24 | ||
25 |
We use the great gladvent
project to run the AoC Gleam solutions
$ gleam run run 1 --year=2015
You can also run on example input:
$ gleam run run 1 --year=2015 --example
Use gladvent
to invoke the Gleam template and set up files for a new solution:
$ gleam run new 1 --year=2015
Add input and example input files inside the relevant input
subdirectory
You can run tests with gleam test
:
$ gleam test
Additionally, gladvent
uses expectations registered in gleam.toml
to check
that each solution gives the correct answer.
Follow these steps after solving a puzzle:
-
Store the expected results in the
gleam.toml
project file. -
Add a snapshot test with title
"Puzzle 2015-01"
(with appropriate numbers), run it, and accept it:$ gleam test $ gleam run -m birdie
-
Update READMEs across all projects:
$ cd .. $ make