Fun with the advent of code 2025. This is me just experimenting around in C. Next year Rust? I will try to use a exotic language every year. Thinking of either Matlab (what my studies try to force me into liking) or Bash Script (is that even realistic to finish in there?).
Binaries were compiled on M1 Max MacOS Tahoe 26.1.
This repo contains, as you can see, every day from Day 1 to Day 12 as a folder. In each folder is a decoder.c and a decoder-{*specific-task*}.c. The first part of the puzzle is always the decoder.c, the specified task is it's own program that can be run without any dependencies against decoder.c.
The solution always use system-level base dependencies. They will not be the fastest nor the cleanest solution.
Tip
Use your own input.txt-files to have correct solutions for your szenario.
- password: 989
- password pt. 2: 5941
- final sum: 38158151648
- final sum pt. 2: 45283684555
- final sum: 17427
- final sum pt. 2: 173161749617495
- final sum: 1553
- final sum pt.2 : 8442
- final sum: 661
- final sum pt.2: 359526404143208
- final sum: 5381996914800
- final sum pt.2: 9627174150897
- final sum: 1602
- final sum pt.2: 135656430050438
- final sum: 112230
- final sum pt.2: 2573952864
- final sum: 4745816424
- final sum pt.2: 1351617690
- final sum: 399
- final sum pt.2: 15631
- final sum: 539
- final sum pt.2: 413167078187872
- final sum: 521
Some of my AoC journey:
- Day 10 / Part 2 almost broke my spite, I was trying to brute-force the solution using a linear approximation. For some reason, the first 10 state machines were solving just fine, but the 11th machine was not bruteforceable or did not convolute in a static median. I let this bruteforcing algorithm run for three days (dec 23th-dec 25th) and could not find a solution for the 11th machine onewards. Then used a approch similar to what I would expect Z3 to do in this case and do a rational gaussian elimination approch.
- I would really like to write a small visulation of Day 7 (day-7-laboratories/decoder.c) to show a wavefront-like picture-by-picture solving. Maybe later :-)
As this was my first AoC, I want to write down some learnings for the future.
- Benchmarking can be done for all solutions with
hyperfine ./{EXECUTABLE} -N --warmup 50 --min-runs 100 - As C via the Arduino IDE was my first programming languge I really spend a lot of time with, programming in here was really nostalgic.
- I used in some puzzles external help (day 10 pt. 2 / day 11 pt. 2 / day 12), so this is not a repo that should count toward any highscores or official counting.
- Great Resources for AoC's.
