r/adventofcode Dec 14 '25

Repo [2015-2025] 524 ⭐ in less than a second

Thumbnail gallery
Upvotes

2025 total time 2ms. Github repo.

The AoC about section states every problem has a solution that completes in at most 15 seconds on ten-year-old hardware. It's possible to go quite a bit faster, solving all years in less than 0.5 seconds on modern hardware and 3.5 seconds on older hardware. Interestingly 86% of the total time is spent on just 9 solutions.

Number of Problems Cumulative total time (ms)
100 1
150 3
200 10
250 52
262 468

Benchmarking details:

  • Apple M2 Max (2023) and Intel i7-2720QM (2011)
  • Rust 1.92 using built in cargo bench benchmarking tool
  • std library only, no use of 3rd party dependencies or unsafe code.

Regular readers will recall last year's post that showed 250 solutions running in 608ms. Since then, I optimized several problems reducing the runtime by 142ms (a 23% improvement).

Even after adding 2ms for the twelve new 2025 solutions, the total runtime is still faster than last year. Days 8, 9 and 10 still have room for improvement, so I plan to spend the holidays refining these some more.

r/adventofcode 22d ago

Repo [2015-2018 All Days][C++] 200 Tiny Stars (and counting...)

Upvotes

I've always enjoyed low level programming so this year I decided to scratch that itch by starting to do some hobby programming with microcontrollers. There's nothing more frustrating than trying to learn everything (new toolchains, new SDKs) all at once while trying to build something non-trivial, so the obvious answer was to take my existing, known-good 524 star repo and port that over to a microcontroller. It would also give me a chance to revisit some of my original solutions that were significantly sub-optimal.

I chose the Raspberry Pi Pico (RP2040) as the target microcontroller because it's geared towards learners, it has a thriving ecosystem and I really admire the work the Raspberry Pi Foundation do.

The repo is more or less in a fit state to be public after the first four years (2015-2018) have been squashed, the support libraries have been exercised and the workflow has had the major rough edges knocked off. There's still plenty more to do though, so I'm expecting it to be in a state of flux for the next 12 months or so.

Performance

The RP2040 is on average between ~100-200x slower than the laptop I'm using for development and I've set myself a soft target of 1s per solve on the microcontroller hardware (including IO transfer time), meaning that I need to target ~5ms or under on PC. What's really nice though is that by the time a solution has been squashed enough to fit in the memory restrictions, that's almost always a significantly faster solution than my original solution and often sub-ms without any further faffing.

The high level summary for puzzle solution times on the RP2040 so far:

Year Min (ms) Max (ms) Avg (ms) Median (ms)
2015 2.237 27,764.055 1,207.659 215.076
2016 0.755 450,195.662 17,832.642 134.623
2017 0.698 13,121.265 960.156 210.754
2018 4.52 9,074.706 687.048 318.475

There's a full breakdown of current timings here.

Note: I do my timings a little differently to a lot of the forum regulars who work on producing ultra-fast solutions. The timing starts on the host PC when I start transmitting the input over USB and stops when I get the final byte of the answer back. I time both parts separately and each part is an independent solve, I don't have any solutions that calculate both part 1 and part 2 answers at the same time.

There are some things that are absolute Kryptonite to the RP2040. MD5s are a particular weakness, hence the bad Max and Average times for 2015 and 2016, and anything that requires 64-bit maths is emulated in software.

IO can be an issue as well. 2016 day 7 has an input file ~170-180Kb in size, which takes ~1.5s just to transfer over USB-CDC. Many of the days are ~400-600x slower than PC purely because of the time it takes to send the input file.

Common changes

The most common changes I've made are to variable types and to data structures. 64-bit integers were always my default choice so that I didn't have to worry about figuring out which puzzles needed more than 32-bits and which didn't, but that's not practical with the 32-bit Pico. With an existing solution as a reference it's pretty quick to swap types and check that we still get the same result, and thankfully most of the days so far are perfectly solvable using 32-bit maths only. 2017 day 15 is probably the one that suffered the most from software emulated 64-bit integers; there is a way to implement the generators using only 32-bit arithmetic, which is what I use, but it's quite a few instructions and so it ends up being the slowest solution for all of 2017.

My default choice for data structures in my full-fat repo has always been std::set or std::map, even for data that would naturally go into an array. The main reason is programmer efficiency: you don't need to worry about getting a correct array size and insert returns a value to indicate if the element has been inserted or not, which is a very common test required in a lot of the algorithms. For the microcontroller, especially when trying to squeeze solutions into the memory limits, arrays/vectors are the default choice wherever possible, and I've written simple open-addressing (with linear probing) hash maps and sets templates. This is where a significant proportion of the speed-ups have come from compared to my original solutions.

Algorithm changes

Surprisingly, fewer than 20 have needed a complete overhaul on the algorithm used.

2015 day 13 is the first one which needed a change, swapping from a brute-force scoring of all possible permutations to a recursive DFS. Day 19 in the same year was the only other one which needed a completely different approach. That one was originally one which made my nemesis wall with a really horrible home-brew parser-adjacent algorithm, but after seeing in the megathread that it could be solved using a greedy algorithm it ended up significantly faster on the Pico than my original solution running on a fast PC by a few orders of magnitude.

2016 and 2017 also only needed a couple of days swapping over to a different algorithm. 2018 is the year so far that's required the most, with almost half of all days being revisited in terms of how they're solved.

Bit Packing

Of all the changes I was expecting to make, bit-packing values is the one I haven't needed anywhere near as often as I thought.

2016 day 18 didn't need bit packing to fit into memory, but I thought it would be fun to parallelise the logic into bitwise operations anyway. 2016 day 11, one from my wall of shame needed the search states packing in order to keep the queue size small. The others have largely been ones where we're dealing with large (for a Pico) 2D areas, like the infection states in 2017 day 22 and the cave terrain in 2018 day 22.

Windowing

Windowing, or working on only a small chunk of the full data range at any one time, has been a life-saver on a few occasions. 2018 day 17 has been the one I'm most pleased with, although the chunked seiving on 2015 day 20 was nice to work through, especially with the approximation function I iterated on to get a good lower bound starting point.

Maths

I tend to avoid closed-form solutions and have a personal preference for programmatic approaches, but there's really no beating the closed form solutions or using maths insights for speed and size. The Josephus problems are an immediate example of not having enough memory to process large rings of elves, or the Cosmological Decay approach to the Look-and-say sequence completely bypasses the need for large amounts of memory.

Recursion

By default when using the C/C++ toolchain each core on the Pico gets 2KiB of stack assigned. That's really not a huge amount by any stretch, so most recursive solutions are a no-go. Approximately ~9 solutions have needed swapping over to using an explicit stack, making it one of the most common changes I've had to make.

While it's true that all recursive algorithms can be implemented in terms of a stack based algorithm, the devil really is in the details and I never appreciated how many little decisions about state representation and return values would need making.

Take a normal recursive function:

int Func(int n)
{
    // ...
    int n1 = Func(n + 1);
    int n2 = Func(n + 2);
    return n1 + n2;
}

Stack frames and function calls give you 3 separate things:

  1. Local variables - these are what an explicit stack structure trivially gives you
  2. State - after the call to Func(n + 1) you need to encode somehow the fact that you've made that call and the next recursive call is the one to Func(n + 2)
  3. Return values - do you put the return value in the current stack top and let the parent take care of popping after reading, do you let a child pop its own stack and write the return into the parent stack frame, or something different. It was a real eye-opener to sit down and actually code up something like 2015 day 22 using an entirely stateful stack based approach.

Forum Help

I have a general rule that I won't look at anyone else's solution until I've got a solution of my own. Even if (and it commonly is) it's a rough and ready solution which take seconds or minutes to run and chews through half the memory in my machine. I'm pleased that for 523 of the 524 stars I've been able to get to a working answer with no hints, but there's absolutely no way I'd have been able to get the 200 on the microcontroller so far without the valuable suggestions, and the public repos of forum regulars. There have been over a dozen of these solutions that are either direct re-implementations of other people's solutions, like 2018 day 9 or 2018 day 14, or have used suggestions and explanations from information posted on the forum such as the equivalence pruning for 2016 day 11. u/musifter's review series has been a great focal point to discuss the problems with people who really know their stuff.

Thank you one and all!

Microcontrollers

The hardware you can buy now is utterly incredible for the price: I've been targetting the Raspberry Pi Pico as far as possible, but the Raspberry Pi Pico 2 W is a 150MHz 32-bit CPU with 520KiB RAM, Bluetooth and WiFi for under £10. As someone whose first computer was a Spectrum 48K, this is a ridiculous amount of computing power to have for very little money and in a tiny space. If I had kids who wanted to learn how to program, I would definitely think about sitting them down in front of Thonny and a microcontroller. It has exactly that same immediacy of feedback I remember from typing out Basic listings to see something cool happen on screen.

r/adventofcode Aug 20 '24

Repo [Go] 450 stars!

Post image
Upvotes

r/adventofcode Dec 12 '25

Repo Thanks!

Upvotes

In this post, I want to thank Eric, the Advent of Code team, and the entire community.

Last year (2024) was my first year participating, and it turned out to be incredibly inspiring for me. At the time, I had a problem: for some reason I couldn't dedicate enough time to self-learning and working on my pet projects, work felt like it was draining all of my energy. But after almost a month of solving problems every day, I decided that this practice should continue.

Over the course of the entire year, I learned something every single day, solved problems from different areas of computer science, and broadened my horizons. I worked on my pet projects without exceptions, even on weekends. Sometimes it was hard, sometimes easier, but after a year I feel a huge amount of progress, which gives me the motivation to keep going.

As for 2025, I really liked the 12-day format. During this period, you don't have time to get tired, and overall it feels like the contest flies by in one breath. This year had a lot of interesting and great problems.

My favorite was Day 4, I even tried to solve it on the GPU. In the end, the performance was about the same as on the CPU, but maybe I just need to improve my GPU programming skills🙂

The most controversial day for me was probably Day 10. After several hours of struggling with Part 2, I decided to check Reddit to see how others solved it, and I was surprised that many people used Z3. For me, it felt like the problem shifted from programming to math, though I might be wrong.

Once again, thanks to the Advent of Code team for the wonderful and inspiring problems, and for the great weeks I got to spend doing what I love. Thanks to the community for all the inspiring visualizations, solutions, and discussions. All of this pushes us to become better and grow.

Thank you all so much, happy holidays, and see you next year!

My C# AoC Repo - here

r/adventofcode Oct 24 '24

Repo Advent of SQL: 24 Days of PostgreSQL Challenges

Upvotes

I wanted to share a fun project I've been working on for this December. It's a SQL flavoured variation of advent of code - 24 SQL challenges using PostgreSQL, running from December 1st to 24th.

Here's the gist:

  • One PostgreSQL challenge per day
  • Starts December 1st, ends December 24th
  • Purely SQL-based problems (no other languages involved)
  • Designed to be fun and (hopefully) educational for various skill levels

I'm creating this because I love SQL and thought it'd be a cool way for the community to sharpen their skills or learn something new during the holiday season.

I'd also love to hear your thoughts or suggestions!

Here's the site, I hope you enjoy it!

adventofsql.com

If anyone is interested the site is built in Elixir with LiveView.

r/adventofcode Dec 01 '24

Repo [2024 Day: All] [Rockstar][Repo]

Upvotes

Fixed the title!

So Rockstar 2.0 is out!

I'm going to be doing this year's AoC in it. Let's see how it goes!

Solutions in Rockstar gathered here (and also on the megathreads); here so that I can have them all in one place.

r/adventofcode Dec 15 '25

Repo [2025 Day All] Comparing AI LLMs to a Human

Upvotes

I finished my code for AoC 2025, and compared what I did to what three AI LLMs (Gemini, ChatGPT, and Claude) could do. All the problems had good solutions, for both human and machine. The human saw two "tricks" in the input to make 9 and 12 easier, but the LLMs were overall faster at producing code (although their run times were longer).

https://github.com/norvig/pytudes/blob/main/ipynb/Advent-2025-AI.ipynb

https://github.com/norvig/pytudes/blob/main/ipynb/Advent-2025.ipynb

r/adventofcode Nov 16 '25

Repo Advent of Go - Github Template

Upvotes

Hey,

after some years of participating in Advent of Code and getting a bit tired of the boilerplate that I'm writing every year, I decided to write a little Github template for everyone who wants to solve the puzzles in Go with a little head start.

The template is minimal by design and isn't generated by some LLM.

Have fun!

https://github.com/Spissable/advent-of-go-template

r/adventofcode Dec 12 '25

Repo [2025 All days] [Elle] I managed to solve all of AOC 2025 in my own language!

Upvotes

It took a while, but I finally managed to complete all of AOC2025 with no dependencies (other than the C standard library) in my own compiled language. All solutions run in a cumulative time of under 0.5 seconds on my M1 mac:

Rosie 💝 aoc2025/ % hyperfine 'make all INPUT=input.txt' -N -i --warmup 3
Benchmark 1: make all INPUT=input.txt
  Time (mean ± σ):     478.3 ms ±   1.7 ms    [User: 404.4 ms, System: 49.6 ms]
  Range (min … max):   476.2 ms … 480.8 ms    10 runs

Overall, there are 802 lines of meaningful Elle code (not blanks).

The most difficult day by far was Day 10, as I needed to implement my own simplex algorithm and branch-and-bound for MILP by hand. I felt that calling an external executable (ie, Z3) was cheating to the highest degree.

I made many improvements to the language over the course of AOC and implemented features in the standard library as I required them, therefore I'm really glad I did AOC this year, it has been extremely beneficial to the language. I originally wasn't going to, but I seem to suffer from the rare condition called FOMO.

Thank you so much Eric for Advent of Code this year, all in all it was really fun (despite the horrors of Day 10..)! It was a really fun challenge to wake up to every morning.

My solutions for all of the days are hosted here: https://github.com/acquitelol/aoc2025/

Days 1 and 2 (part 1 only) are also done in the TypeScript Type System (which is why there is some TypeScript in the language overview split), but I didn't bother for days past that.

Merry Christmas everyone!

r/adventofcode Dec 01 '24

Repo First Advent of Code Challenge: 25 Days, 25 Languages

Upvotes

This is my first time doing Advent of Code, and I decided to approach it by solving each puzzle in a different programming language.

Repo: https://github.com/Gabswim/25Days25Langs

Here’s the list of languages I’m using by day:

To keep things simple, I’ve set up a structure that lets me run each challenge easily with Docker. My goal isn’t speed or perfect code—it’s to explore and learn something new every day.

I’d love to hear your thoughts or tips about the languages I’m using. Feel free to fork the repo!

r/adventofcode Jan 23 '26

Repo [2025][C++] All days in under 900 us

Thumbnail github.com
Upvotes

Since I couldn't find any 2025 posts related to solving the problems as fast as possible, so separate post it is.

Just like last year, my goal was to implement the solution for each day as fast as possible (runtime-wise). It took me a long time, but I finally managed to get it below 1 ms for all days combined (897 us, to be precise). Over 50% of the total runtime (629 out of 897 us) is taken up by just two days (day 8 and 10).

There's certainly more room for optimization, but I've spend way too much time on this as it is.

The "tricks" I used to get it this fast are:

  • Use a non-interpreted language (C++ in my case).
  • Optimize the algorithmic approach first.
  • The cache is your friend/enemy (i.e. working on an array of float instead of double is almost certainly going to give a big increase in performance).
  • perf is your friend, as is e.g. toplev.
  • Google's Highway library is great for SIMD stuff.
  • Finally, once you've squeezed runtime as much as possible, a few OpenMP #pragma's can help squeeze some more.

r/adventofcode Dec 27 '24

Repo AoC 2024 100% solved in my own programming language

Upvotes

Last year I created Liaison, an interpreted language that is halfway between Python and C/C++. This year, I managed to solve all the 25 days with this language (2023 was harder and the language wasn't complete enough, so I failed).

You can find all the solutions for this year here.

Feel free to comment or contribute in any way to the project.
Thanks

r/adventofcode Jan 13 '26

Repo [2025] I gave Claude Code a single instruction file and let it autonomously solve Advent of Code 2025. It succeeded on 20/22 challenges without me writing a single line of code.

Upvotes

I wanted to test the limits of autonomous AI coding, so I ran an experiment: Could Claude Code solve Advent of Code 2025 completely on its own?

Setup: - Created one INSTRUCTIONS.md file with a 12-step process - Ran: claude --chrome --dangerously-skip-permissions - Stepped back and watched

Results: 91% success rate (20/22 challenges)

The agent independently:

✓ Navigated to puzzle pages

✓ Read and understood problems

✓ Wrote solution strategies

✓ Coded in Python

✓ Tested and debugged

✓ Submitted answers to the website

Failed on 2 challenges that required complex algorithmic insights it couldn't generate.

This wasn't pair programming or copilot suggestions. This was full autonomous execution from problem reading to answer submission.

Detailed writeup: https://dineshgdk.substack.com/p/using-claude-code-to-solve-advent

Full repo with all auto-generated code: https://github.com/dinesh-GDK/claude-code-advent-of-code-2025

The question isn't "can AI code?" anymore. It's "what level of abstraction should we work at when AI handles implementation?"

Curious what others think about this direction.

r/adventofcode Dec 12 '25

Repo [Year 2025 All Parts] [C++] A retrospective on this year's puzzles

Upvotes

Repost to comply with title standards.

First of all, this has been my first time doing advent of code! I got 23/24 stars (more on that later) and overall my experience has been extremely positive. I used C++, but with the extra challenge of not using any standard or external libraries beyond basic IO (and one instance of streaming to convert ints to strings). That means that anything I want to use - linked list, graph, even basic string or math operations - I have to implement myself. Also means lots and lots of new and delete, and yes that did mean chasing down a lot of segfaults and memory errors. Here are my thoughts on each day's puzzles.

Here's all my code - note that it's possible for changes to utility headers to have broken earlier days, so it's recommended to look at the commit history as well.

Day 1: Funnily enough, I entered by far the most wrong answers for Day 1 part 2 due to off-by-one errors. Keeping all the ducks in a row with division and modulo got me the answer eventually, though.

Day 2: I saw a tutorial for an optimized way to solve this, but I did it with good old string manipulation since the input strings weren't too long. Part 2 was a generalization of part 1 where I split the input string into even segments and tested them against each other to see if they were all identical. This is also one where I massaged the input a bit to make it easier to parse.

Day 3: This one was fun. I used the fairly common algorithm of "find the largest remaining digit while still leaving enough space at the end". Day 2 was once again a generalization of day 1.

Day 4: Grid puzzles! This one wasn't too hard - for part 1 I just identified all of the occupied cells that had four or more unoccupied neighbours, and then for part 2 I iterated over the grid, removing accessible cells, until there was a pass with no changes.

Day 5: Part 1 was trivial - just build a bunch of ranges and check how many given numbers fall within at least one of them. For part 2, I did a somewhat-inefficient but still-functional algorithm in which I copied ranges from the main array into an auxiliary one, merging any overlaps, and repeated this until there were no merges left. It worked, and I'm not complaining.

Day 6: I made this one way, way more complicated than it needed to be. For part 1 I made linked lists of strings (separated by spaces) for each line and evaluated each equation; then, for part 2, I did this terrible implementation of grabbing strings of text for each equation (including spaces) and finding the vertical numbers that way. It... worked, but I'm not proud of it.

Day 7: Really fun one. Part 1 was a simple iteration through the array, and part 2 became super easy when I realized that you can essentially use Pascal's Triangle.

Day 8: This one was a doozy. I used an object-oriented method to solve it, creating classes for JunctionBox and Circuit, and then using an array with an addSorted method to keep track of the 1000 shortest connections. For part 2 I just kept iterating through the junction boxes and connecting the nearest ones until they were all part of the same circuit.

Day 9: Day 1 was trivial, just iterate through pairs of points and update the biggest area. For day 2, I had to think about what constitutes a rectangle being "out of bounds" - I found that with the input, checking whether a point is inside it or a line crosses it is enough. It'd fail for rectangles entirely outside the polygon, but there weren't any big ones of those so it's ok :)

Day 10: Unsurprisingly, 10-2 was the one I couldn't get. The worst part is that I took a course on linear optimization in university and this problem could have come right out of the lecture slides... but I clearly didn't pay enough attention in that class. I'll probably try to solve it soon using the bifurcation method that someone else posted here. 10-1 wasn't too bad, though - I still made it more complicated by using an array of bools instead of just an int for bit flags, but I did recognize that each button will be pressed at most once, so there's that.

Day 11: Graph theory! I actually really like graph puzzles. Plus it gave me an excuse to implement my own Graph class. Part 1 was straightforward DFS, even with my added complexity of avoiding loops; for part 2 I looked on this sub and saw that there are no loops, so I was able to do svr->fft * fft->dac * dac->out. But that still didn't run in reasonable time, so I also implemented memoization and dead-end pruning, and then it worked!

Day 12: I wasn't looking forward to implementing present tetris. But I love memes.

Favourite puzzle: 5-2, though 10-1, 11-2, and both parts of 7 are contenders.

Least favourite puzzle: Not counting 10-2, 6-2 but only because I chose the dumbest method of solving it.

r/adventofcode Nov 17 '25

Repo [Go] Advent of Go: A Go Advent of Code CLI

Upvotes

Calling all AoC Gophers!

I found myself this year getting so amped for Advent of Code that I had to channel the energy into something productive, and so I created a CLI tool to help automate the non-puzzle aspects of solving AoC problems in Go (Including but not limited to: scaffolding, pulling inputs and answers, submission, and testing).

You can find it here!

Here's the basic use case:

Say you wanted to solve 2025 Day 1: You could run something like go run . -g -y 2025 -d 1 to stub and register solutions for that day. You could also just run go run . -g -n if the day is actually Dec 1, 2025.

Then, you can implement the solutions anyway you like as long as the signature of the function is string -> (string, error)

After that, you can submit using go run . -s -y 2025 -d 1 -p 1 or again if it's actually Dec 1, 2025, you could run go run . -s -n -p 1

Assuming you got the right answer, you could then repeat with the second part.

Then, you can go run . -t to test your solutions.

Inputs and answers are pulled and cached as necessary to run the previous commands (printing, testing, submitting)

And that's pretty much it! More detailed instructions are in the README in the repo.

Please let me know if you have any questions, feedback (of all kinds) is greatly appreciated, and happy coding!

Edit: Tweaked usage to be more implicit. No reason to have to pull answers and inputs manually, after all.

Edit 2: Please update to the latest commit for day 6; I had to fix the tool for leading/trailing spaces in input generation.

r/adventofcode Dec 15 '25

Repo [2025 Day all][m4] summary of my journey to 524 stars in m4

Upvotes

Although I have an entry in Red(dit) One, as well as at least one comment on every day's megathread, I can go into more details on my journey in this post and any followups.

I have an m4 solution for all 524 stars, and in several cases some other solutions as well, all visible in my repo:

https://repo.or.cz/aoc_eblake.git/tree/main:/2025

Timing-wise, as of when this post is written, I can solve all 12 days sequentially in under 30 seconds on my laptop, when using GNU m4 1.4.19 on Fedora 42. Since m4 is an interpreted language, I am perfectly fine being a couple orders of magnitude slower than the native compiled versions. I was a bit surprised at how many days needed my math64.m4 arbitrary-width integer library (denoted with * on the day), since m4 only has native 32-bit math.

Day Runtime Notes
1 0.066 Also golfed to 228 196 bytes, as well as a HenceForth implementation
2* 0.09 Also a no-fifth-glyph variant, also golfed to 334 277 bytes
3 0.031 Also golfed to 281 bytes
4 0.492 Also golfed to 372 bytes; plus a tutorial on my algorithm
5* 0.264 Huge comment-to-code ratio; this was my ELI5 entry, and I did three separate implementations (brute force, AVL tree, min-heap)
6* 0.183 Also golfed part 1 to 686 both parts to 527 433 bytes
7* 0.075 Also with a HenceForth implementation, also golfed to 514 377 bytes
8* 6.407
9* 5.684 0.270 My first meme submission, also golfed part 1 to 469 379 bytes, or both parts to 692 bytes
10 16.573 Also with a non-digit no-fifth-glyph variant
11* 0.058 Also golfed to 376 350 bytes with six lines, or 386 352 bytes with five lines
12 0.016 Also golfed to 128 bytes, with no control flow; also a golfed sed variant
Total 29.939

Things I still want to do before December is over: further optimize days 8-10 (10 is probably the most gains to be had: I used the bifurcation method, but suspect that an ILP solver is feasible, even if more verbose, and hopefully faster); finish golfing day 6 part 2; implement some more days in HenceForth. In fact, if I can pull it off, I would love to write an IntCode engine in HenceForth, and then see how awful the timing overhead is for running an IntCode solution emulated by HenceForth on top of m4.

Day 10 was my first time ever trying to write m4 code without digits (it turns out that avoiding fifth-glyphs felt easy in comparison).

Thanks to u/topaz2078 for the puzzles and for creating the Bar Raising flair for me, and to u/daggerdragon for all the moderations of my shenanigans. I'm looking forward to next year's AoC!

r/adventofcode Feb 04 '26

Repo 2025: Advent of Glue Languages

Upvotes

I finally got a chance to write a blog post about my Advent of Glue Languages. I usually pick one language to learn for each year's AoC, but this year I decided to pick a "glue language" each day after reading the puzzle. This offered some advantages, like being able to work in a language that's purpose-built for a kind of problem. It also had some challenges, like limited debugging features and realizing I'd hit performance limits. It was definitely a worthwhile exercise, and I feel I better understand how to use them effectively in the future. [Code is on GitHub(https://github.com/flwyd/adventofcode/tree/main/2025).

My official theme was "glue languages you might already have on your system," to emphasize that this is about getting clever with the tools that are lying around. Although I did need to apt install most of them, they're small with minimal dependencies. "Is the whole language documented in the man page?" is also a good rule of thumb for identifying a "glue language," though it leaves out some glue-oriented general-purpose languages like Perl and Lua. For folks interested in expanding your AoC toolkit, I can heartily recommend awk, jq, and (in the right circumstance) jsonnet. Writing in dc was a fun mental challenge, and I encourage everyone to give it a shot. I was excited to be able to use spatial SQL functions for day 9, and if you've ever struggled thinking about geometry algorithms, Simple Feature is a handy tool to have. I tried solving day 9 with ImageMagick, which was fun but didn't scale to the full input. I was expecting to enjoy working with Lua, but with only the standard library it's pretty spartan and not especially smooth. gvpr, an AWK-like language for graph processing that comes with Graphviz is more awkward than I would like: it's worth knowing it's there, but think twice before using it. Wrapping various POSIX tools in a shell script is good practice, but be careful in a loop: day 4 part 1 launched six processes in an inner loop; it turns out launching 40,000 processes syscalls takes a long time, and I switched to a language that could do everything in one process for part 2.

Do you have a glue language you've deployed in clever ways for Advent of Code? Share your insights!

r/adventofcode Dec 02 '25

Repo [2015 Day 1] Who else is adding unit tests as they do these?

Upvotes

Every time I submit a wrong answer I feel like the page is judging me. I always end up doing something like this for almost all the days. How many fellow nerds are TDDing this challenge?

My shiny tests: https://github.com/CodeCuan/DummyConsoleApp/blob/master/DummyConsoleApp.Test/Aoc2025/Aoc2025Solution1Tests.cs

r/adventofcode Jan 01 '25

Repo [Go/Python] 500 stars!

Post image
Upvotes

r/adventofcode Dec 02 '25

Repo An Advent of Code runner in Gleam

Post image
Upvotes

I'm doing Advent of Code in Gleam this year and I wanted to build a little runner (after all that's half the fun of it 😁)
My main goal was to make it pretty, and I think the outcome looks really nice!
If anyone is interested in checking it out here's the repo github.com/giacomocavalieri/advent

r/adventofcode Jan 06 '25

Repo [2024] 25 days, 25 languages

Upvotes

https://github.com/RuyiLi/aoc2024

Finally found the time to finish up the remaining questions! This was a pretty fun (albeit painful) challenge, but I would definitely recommend it if you have the time and patience. It wasn't my initial intention, but I learned a surprising amount of stuff to have made it worthwhile.

Favorite language: Zig

Hardest languages: ASM, Pony

Final GitHub language breakdown

r/adventofcode Dec 16 '25

Repo [2025 Day 12 (Part 1)] [C] Christmas tree ascii art solution

Upvotes

Complete solution here

r/adventofcode Dec 11 '25

Repo [2025 Day 11] [Python] My solutions versus AI solutions

Upvotes

For all days, 1-11 so far, I've been keeping a Jupyter notebook of my solutions to AoC, and each day after I finish my solution, I ask an AI LLM to solve the problem. You can compare here:

https://github.com/norvig/pytudes/blob/main/ipynb/Advent-2025.ipynb
https://github.com/norvig/pytudes/blob/main/ipynb/Advent-2025-AI.ipynb

r/adventofcode Dec 05 '25

Repo [2025 Day 4] JavaScript Solving each day with a different weird theme

Upvotes

I had chatgpt decide on 12 days of weird themes for my js code. Then I follow that theme when solving the puzzle. Try some yourself if you'd like!

git repo here

r/adventofcode Jan 03 '25

Repo [Kotlin] 500 Stars!

Post image
Upvotes