[Charity] Advent of Ada/SPARK 2023 Submissions

[Paul-Farmer][14][Ada] GitHub - PaulFarmerM814/AdventOfCode2023
[Paul-Farmer][15][Ada] GitHub - PaulFarmerM814/AdventOfCode2023

[rocher][15][Ada] https://github.com/rocher/advent-of-code/tree/main/2023/15

[cantanima][20][Ada]https://github.com/johnperry-math/AoC2023/blob/7bc645f7d0e65f959932455c8b9c9104870d2e15/day20/src/day20.adb

[cantanima][18][Ada]https://github.com/johnperry-math/AoC2023/blob/7bc645f7d0e65f959932455c8b9c9104870d2e15/day18/src/day18.adb

[zertovitch][19][Ada](examples) Added Advent of Code 2023, Day 19 Ā· zertovitch/hac@5f54f09 Ā· GitHub

[Paul-Farmer][13][Ada] GitHub - PaulFarmerM814/AdventOfCode2023

[jrcarter][20][Ada] https://github.com/jrcarter/AoA_23/blob/78027a6e374fc2acee9ba184e3343cb672e18966/aoa_20_1.adb

[zertovitch][20][Ada](examples) Improved code of Advent of Code 2023, Day 20 Ā· zertovitch/hac@27418ef Ā· GitHub

[cantanima][21][Ada]https://github.com/johnperry-math/AoC2023/blob/10bf7585aa7410340bb7b834823fc099235091dc/day21/src/day21.adb

[zertovitch][21][Ada](examples) Added Advent of Code 2023, Day 21 Ā· zertovitch/hac@1558167 Ā· GitHub

[cunger][16][Ada] https://github.com/cunger/100hoursofada/tree/main/aoc2023/src/16

Still needs part 2 and some cleaning up, but will probably manage this only after Christmas.

[cantanima][22][Ada]https://github.com/johnperry-math/AoC2023/blob/8470f8808f81354987f2d71763750ac1a812af5d/day22/src/day22.adb

[zertovitch][22][Ada](examples) Added Advent of Code 2023, Day 22 Ā· zertovitch/hac@ea4185d Ā· GitHub

[jrcarter][23][Ada] https://github.com/jrcarter/AoA_23/blob/d881d0c014c9f45ef7766f9b06ed5b2068438a6c/aoa_23_1.adb

[zertovitch][23][Ada](examples) Added Advent of Code 2023, Day 23 Ā· zertovitch/hac@ca92bf8 Ā· GitHub

[cantanima][23][Ada]https://github.com/johnperry-math/AoC2023/blob/dbe90b5e5ad5d5c09a70b041a5329189c5d36efe/day23/src/day23.adb

[cantanima][24][Ada]https://github.com/johnperry-math/AoC2023/blob/af81e7fd688397cc205d86dd4e7bb65530dc72c4/day24/src/day24.adb

[jcmoyer][1][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day01.adb
[jcmoyer][2][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day02.adb
[jcmoyer][3][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day03.adb
[jcmoyer][4][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day04.adb
[jcmoyer][5][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day05.adb
[jcmoyer][6][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day06.adb
[jcmoyer][7][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day07.adb
[jcmoyer][8][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day08.adb
[jcmoyer][9][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day09.adb
[jcmoyer][10][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day10.adb
[jcmoyer][11][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day11.adb
[jcmoyer][12][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day12.adb
[jcmoyer][13][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day13.adb
[jcmoyer][14][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day14.adb
[jcmoyer][15][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day15.adb
[jcmoyer][16][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day16.adb
[jcmoyer][17][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day17.adb
[jcmoyer][18][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day18.adb
[jcmoyer][19][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day19.adb
[jcmoyer][20][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day20.adb
[jcmoyer][21][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day21.adb
[jcmoyer][22][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day22.adb
[jcmoyer][23][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day23.adb
[jcmoyer][24][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day24.adb
[jcmoyer][25][Ada] https://github.com/jcmoyer/puzzles/blob/f47cb18394123473f3d474782e07267237a828fa/AdventOfCode2023/src/day25.adb

Some gross code in here I’m sure since it’s my first time writing Ada. 25 was
solved with graphviz, but I’m going to try to implement a real min-cut
algorithm at some point.

5 Likes

Since this was your first time writing in Ada, care to share what compelled you to try it and how your experience learning and using it for AoC went? Thx

I mostly do low level gamedev and gamedev adjacent stuff (reverse engineering games and creating tools for existing games) so I’m always on the look out for potential C++ replacements. A couple AoCs ago I learned about z3 and that led to getting into SMT solvers and an interest in formal verification. SPARK comes up frequently in circles that discuss formal verification so that’s about the time I became aware of Ada too. Earlier this year I came across some of the resources AdaCore published about how nvidia adopted Ada/SPARK for some projects. Since nvidia has some overlap with the kind of stuff I’m interested in I decided to give it a try, and AoC is a good opportunity to learn how to do most useful stuff in a language.

As for learning Ada, the AdaCore resources were a good intro. Finding out about language/standard library/compiler features beyond that is a lot of digging through manuals and mailing lists with pretty poor discoverability. I think Ada needs a cppreference-like website that condenses all the key information from the RM with a concise overview of what’s available. Often times you don’t know what to search for especially since Ada vocabulary is different from other programming languages. I was willing to put up with that, but I don’t think a lot of people are.

For AoC, it was a decent language. It’s definitely not the best tool if your goal is quick solves. I don’t think Ada has any particularly strong advantages over other languages in this context. Maybe I spent a little bit less time debugging, but that’s hard to measure since a lot of the time spent in AoC is figuring out what exactly the puzzle author meant and prototyping a solution. I did enjoy being able to use pre/postconditions and range/mod types to model some of the specs though, and I can see how Ada’s features would be useful in a larger project.

5 Likes