Skip to content

Some Ada source code proposals for the puzzles of the `Advent of Code` contest

License

Notifications You must be signed in to change notification settings

captain-haddock17/Advent_of_Code_2021

Repository files navigation

Advent of Code 2021

Some Ada source-code proposals for the puzzles of the © Advent of Code, year 2021 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.


Goal

Aiming as a show-case of some best(?) Ada 2012/202x 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 202X

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

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

Tools used


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
    • and select gnat_external=2021.0.0 [Detected at /opt/gnat-ce-2021/bin/gnat]

One may use plain gprbuild.

git clone https://github.com/AdaForge/Advent_of_Code_2021.git
cd Advent_of_Code_2021/puzzle_08
gprbuild
bin/puzzle_08 data/Puzzle_08.txt

License & Disclaimers

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

About

Some Ada source code proposals for the puzzles of the `Advent of Code` contest

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages