Ada solutions to Advent of Code 2021. I may not be able to publish solutions daily, but they will come sooner or later.
I'll try to use available Ada 202X constructs.
Here are referenced days that use Ada202X features, based on the following list: https://blog.adacore.com/ada-202x-support-in-gnat
More like guidelines I'll try to follow, but will break if it makes sense:
- code should be as much as possible self-contained (might abstract away input reading in some cases)
- use as much terminology from the puzzle wording as possible
- custom types, lots of them
- as little hard coding as possible
renames
overuse
use type
is good for making operators visibles
- names
part_1
andpart_2
should preferably be present in the code, as variables or methods
You can build the project using the command:
gnat make -Paoc2021.gpr
Executables are in the exec
folder. They always take 1 argument: the path to
the input puzzle.
If you want to run day 1, use the command:
path/to/advent_of_code_2021/exec/day01 /path/to/input.txt