[Charity] Advent of Ada/SPARK 2025 Submissions

[lhumphrey][5][Ada]https://github.com/lhumphrey/AoC-2025-In-Ada/tree/main/day05

[lhumphrey][6][Ada]https://github.com/lhumphrey/AoC-2025-In-Ada/tree/main/day06

[lhumphrey][7][Ada]https://github.com/lhumphrey/AoC-2025-In-Ada/tree/main/day07

Hello everyone, thanks for your contributions!
Here are the preliminary results. Let me know if you think there’s a mistake somewhere, we will adjust before publishing the results.

  • jcmoyer: 12
  • wutka: 12
  • Daniel-Larraz: 12
  • Max: 12
  • Heziode: 12
  • EthanLuisMcDonough: 12
  • zertovitch: 11
  • Paul-Farmer: 9
  • jrcarter: 8
  • AdaOrbit: 7
  • cunger: 7
  • Rodrigo-Garcia: 7
  • lhumphrey: 7
  • smionean: 6
  • JeremyGrosser: 2
  • Fabien-Chouteau: 2

Solved with Ada: 98
Solved with SPARK: 40
Completed: 6
Ada donation: $980
SPARK donation: $800
Completed donation: $600
Total Donation to Ada Academy: $2380

6 Likes

Sorry for the slow reply! For some broader context, I’m a research engineer with ~16 years experience. I don’t do ā€œproduction level code,ā€ but I do regularly work on relatively complex codebases across a few different languages (C++, Python, SPARK/Ada, and a little Java). I have some comments on SPARK/Ada vs. Python that are influenced by both Advent of Code (AoC) and my own work experience.

I enjoy using Python for small, self-contained coding projects. Python nowadays is super easy to install and get packages for. It’s also easy to start coding quickly, since you can just create a .py file and immediately run it without having to create any project files. I also find that being able to run Python commands interactively often makes it easier to build understanding about algorithms I’m developing. It’s also very flexible due to its dynamic typing, and lots of common operations can be done very concisely, like for string processing or processing data in standard containers. For AoC, I found that I could code up solutions more quickly in Python than SPARK/Ada. Similarly, I use Python in my work to write simple data processing scripts, and I often make use of Python plotting libraries for data visualization. I also use it for scripting other relatively simple automated tasks. It’s great for that type of thing since it can run cross-platform without needing to be compiled, so I frequently see people use Python scripts in place of e.g. shell scripts that are shared across a team.

I’ve seen some of the major downsides of Python in my work, though. We have some relatively complex Python code for running simulations and processing data, and it’s incredibly difficult to modify because it’s much less readable, mainly because of the dynamic typing. Since I work on research-grade software, the team does not always use things like type hints, and we don’t have much documentation. So I end up spending way too much time trying to figure out what data various functions are actually passing around in order to make even the most simple changes. It’s also really hard to debug when something goes wrong.

So for working on large coding projects, I definitely prefer SPARK/Ada. Having a strong type system makes the code so much easier to understand, navigate, modify, and extend. Even on small coding projects like AoC, I think SPARK/Ada ends up being more readable, at least for code I write, because the design of the language makes me naturally organize concepts better. It was a couple of weeks between the time I wrote my code in Python and started translating it to SPARK/Ada, and even in that short amount of time, I had a hard time remembering exactly what some of my Python code was doing. When I write in SPARK/Ada, I generally take more time to organize my code and define proper data types and functions, so it’s easier to understand if I come back to it after a while. The main downsides for me are that it takes more up-front coding to feel like I can get started on core algorithms (defining data types, instantiating packages, etc.), and I can’t ā€œtinkerā€ with algorithms I’m developing as easily since there’s no interactive interpreter. For AoC, I also found it a bit annoying to set up projects. Alire is generally helpful, but I have some complaints. I can see why it works the way it does, but it feels very heavy weight for simple coding projects. For example, I didn’t have time to investigate how to change default compiler flags, and I really didn’t want many of the defaults, so I ended up modifying them manually until I gave up and just lived with a lot of warnings. I also had to edit some of them manually to add the flag for Ada 2022 features, and I had to pull in the sparklib project file manually in order to use SPARK containers. I’m also not interested in publishing crates for AoC, so it was a bit annoying to enter a bunch of information for each project (even though I left most of it blank). Maybe there are some commands that I don’t know about, but I just wanted to get coding without learning a lot about Alire, so I didn’t investigate it too much.

Another random thought: a friend did AoC a couple of years ago using Ada for the first time. He tried using ChatGPT to quickly learn to do simple things (e.g. ā€œhow do I make a map in Adaā€, ā€œhow do I iterate over a vectorā€, ā€œhow do I create a subtypeā€), since it’s very good at answering those types of questions in C++ and Python. However, for Ada, it frequently produced code that looked okay at first glance but actually had syntax errors and wouldn’t compile. It also somewhat frequently explained concepts incorrectly using terminology from other languages. So he frequently had to come to me to get answers to questions. However, it looks like ChatGPT has improved on Ada quite a bit. It’s been a while since I’ve coded in Ada, so I asked it similar questions to get up to speed, and it didn’t make any mistakes this year. It was also able to answer basic questions about Alire commands, though it did mess up syntax sometimes (e.g. adding ā€œā€“ā€ to commands that didn’t need it).

So, those are some of my thoughts on Python vs. SPARK/Ada. Hopefully it was helpful!

3 Likes

Thank you for the detailed answer! Indeed some people have now started using AI for Ada and they have started getting pretty good results; things seem to be improving quite fast on that front.

Also, I know the pain of (large) Python codebases created by scientists… :sweat_smile:

I find interesting the mix of languages that you work on sounds aerospacy :slight_smile:

Best regards,
Fer

Claude Code got very good with Ada!

I forgot to post the results here: Advent of Ada/SPARK 2025 Results | AdaCore

Congrats everyone!

5 Likes