Skip to content

captain-haddock17/Advent_of_Code_2022

Repository files navigation

Advent of Code 2022

Some Ada source-code proposals for the puzzles of the © Advent of Code, year 2022 contest prepared by Eric Wastl 😎

Follow links in this calendar

MON TUE WED THU FRI SAT SUN
- - - 01 02 03 04
05 06 07 08 09 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25

Note: There are still other GitHub repositories (20+) with Ada code proposals.


Goals

Aiming as a show-case of some best(?) Ada 2012/2022 coding practices.

  1. Readability
  2. Modular & Object Oriented software design
  3. Only using the libraries defined by the language, and shipped with any Ada compiler
  4. Use multi-tasking design when appropriate
  5. Execution time (performance) is not a first class goal (back to 1. & 2.)

Comments are welcome 😃

Other seasoned or just plain beginner developer have published their Ada code on github (or elsewhere...)


Ada 2022

I used the forthcoming Ada 2022 syntax and language-libraries, essentially:

  • @ as a shorthand syntax, as in Sum := @ + 1;

Tools used

These Ada source code have been written and built on macOS, and also rebuilt and deployed on FreeBSD (as in CI/CD).


How to Build & Run

Alire (alr) needs to be initialized through a first alr build command. This completes ~/.config/alire/config.toml file.

To select the working Ada 2022 (WIP) compiler:

  • alr toolchain --select

One may use plain gprbuild instead of alr build.

Typically:

git clone https://github.com/AdaForge/Advent_of_Code_2022.git
cd Advent_of_Code_2022/puzzle_08
alr build
bin/puzzle_08 data/input.txt

Some excellent Ada web info & Ada programming resources

Take a look at AdaForge.org


License & Disclaimers

Just plain open-source: CC0 Universal Public Domain dedication's Free Cultural Work

About

Advent of Code 2022 contest - 100% Ada programming

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published