#adventofcode2024 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #adventofcode2024, aggregated by home.social.
-
It took me until the end of August 2025, but I finally got done with a massive #AdventOfCode project: a SINGLE LINE of #Python that solves EVERY DAY of #AdventOfCode2024!
I call it "The Drakaina", after the Python of Greek mythology. Look, if you dare...
https://github.com/WinslowJosiah/adventofcode/blob/main/aoc/2024/drakaina.py
-
今次 #Qwen3 不行了,換了 #Gemini25Flash 後瞬間秒殺 😂 因為這兩天一直在和伊芙玩所以進度慢了 😂
https://github.com/cosmoswafer/advent-of-code-2024/blob/main/src/bin/day9.rs
-
今次 #Qwen3 不行了,換了 #Gemini25Flash 後瞬間秒殺 😂 因為這兩天一直在和伊芙玩所以進度慢了 😂
https://github.com/cosmoswafer/advent-of-code-2024/blob/main/src/bin/day9.rs
-
需要用到一點點數學,問題是不難的,今次Qwen3沒有跳步了,可以正常地用它將文字描述的邏輯寫成代碼,但是 #Rust 在這裏變得不太好用了,例如那些usize的運算需要手動關注和修一修
https://github.com/cosmoswafer/advent-of-code-2024/blob/main/src/bin/day8.rs
-
Finally got to doing 25th day of #AdventOfCode today and thus collected all 50 stars of this year. 🎉
Now I just need to get back to day 24 and write a proper solution (as I only did it partly in code, partly eye-balling and manually composing the answer; I used not-so-AI, I guess).
My Rusty solutions: https://gitlab.com/silmeth/advent-of-code-2024
-
Wrapping up the 2024 Advent of Code with Juan Vazquez and Cameron Cunning
With video! Software engineers Juan Vazquez and Cameron Cunning rejoin the show to discuss the 2024 Advent of Code, an annual programming competition.
#elixir #prolog #go #golang #podcast #AdventOfCode #AdventOfCode2024
-
CW: Spoiler for AdventOfCode 2024 / 24
I had a little time today to revisit part 2, which I had previously only solved by hand by visually analyzing the graph of gates.
I can now solve this in code by classifying the gates into layers:
Layer 1: XOR and AND gates connected to the inputs
Layer 2: AND gates not in Layer 1
Layer 3: OR gates
Layer 4: XOR gates not in Layer 1Each gate in the layers must be followed by a defined set of gates:
Layer 1 XOR: needs to be followed by a Layer 2 AND and a Layer 4 XOR
Layer 1 AND: needs to be followed by a Layer 3 OR
Layer 2 AND: needs to be followed by a Layer 3 OR
Layer 3 OR: needs to be followed by a Layer 2 AND and a Layer 4 XOR
Layer 4 XOR: must output zConsidering edge cases in the first and last rows, if any of these rules are violated, the gate's output is incorrect.
I even went as far as trying to swap all the combinations of bad gates to fix the circuit completely (although this is not required for the solution, where we only need to identify the bad gate, not how to swap the outputs to fix the circuit).
https://github.com/nharrer/AdventOfCode/blob/main/rust/src/year2024/day24.rs
-
I'm late today because of some Christmas travel but it was super easy (save for a dumb parsing bug that sent me in circles for a while) so I was able to get it done before the end of the day. Between that and yesterday going back and doing the Part 2s I'd skipped, I’ve completed my #AdventOfCode2024 calendar.
This year had some really gnarly puzzles. :-D I’m looking forward to next year.
-
In honor of the last day of #AdventOfCode this year, I want to share something I've been working on since Day 12: The Drakaina!
It's a single line of #Python that solves the challenges of #AdventOfCode2024. I've gotten up to Day 11. Read at your own risk.
https://github.com/WinslowJosiah/adventofcode/blob/main/aoc/2024/drakaina.py
-
It's been amazing 10 years! #AdventOfCode2024 #aoc
-
I'll revisit this later to figure out how to solve part 2 with code, but not right now. Now, it's time to enjoy Christmas with the family.
-
I am enjoying the final #AdventOfCode ASCII animation. How beautiful! Have to check out the Easter eggs now...
-
#AdventOfCode Day 25: Code Chronicle
It’s finally done! I’m so happy!!!
This is the first year I’ve been able to finish all the stars without needing hints or extra help - and actually made it in time!
I’m still pretty slow, though. Some puzzles took me the entire day (or night, like yesterday and Day 17!). But it’s such a rewarding feeling to have made it all the way through.
A high five to all my fellow Mastodonians
@jeff @andrewhoyer
@movq @whereistanya @winslowjosiah
@oloturia
@papajohn
@sol_hsa
@kewliomzx
@jochie @mina and many more, who played (and sometimes suffered) along with me. You all made this so much more fun! ✨And, of course, an enormous thank you to @ericwastl and all the wonderful helpers who made this event possible. I can’t wait for next year! 🤩💫
#Rust code is here:
https://github.com/nharrer/AdventOfCode/blob/main/rust/src/year2024/day25.rs -
It's over. It's done! Aneb drobné nerdské radosti života. 😁
-
#AdventOfCode Day 24: Crossed Wires
Oh boy. I did part 2 by hand. Exported the graph as a GraphML file, and imported it into Cytoscape. Arranging the gates was quite some work. Then it was obvious which gate outputs needed to be switched. Still, it took me all night. It's 5:30 in the morning. Time to go to bed.
I could stay up. The last puzzle is already released in half an hour, but I am exhausted. Nah, I’ll get a couple of hours of sleep first. 😴
#Rust code is here:
https://github.com/nharrer/AdventOfCode/blob/main/rust/src/year2024/day24.rs -
Like many people, I solved #AdventOfCode 2024 Day 24 Part 2 not with code, but by hand. It'd actually be pretty difficult to write code for...but I'll eventually get it done.
In the meantime, here's my code for Part 1, before cleanup and comments.
-
CW: Advent of Code 2024 Day 24 Spoilers
Part 2 took me an embarrassingly long time to figure out. At first I thought I could randomly try a bunch of additions, see which wires outputs were wrong, get all of their inputs, and then take the intersection of all the wrong inputs and that would be the answer. But that didn't work.
Finally, I attacked it by figuring out what a binary adder should look like, as a circuit, and then finding where the circuit we had was malformed. It took a lot of trial and error before I got a reasonable looking solution, and the first time I did it was right, so I don't know if I am lucky or actually have a principled approach, but I'm sticking with it.
Total runtime for both about 40ms.
-
CW: Advent of Code 2024 Day 24 Spoilers
Ah, the last full day of #AdventOfCode2024, Day 24, wasn't too bad. The first part was very similar to 2015 Day 7, which is is one of my all-time favorite AoC puzzles, but the second part was ... not.
Part 1 can be solved recursively with memoization. Since ultimately each output ("z") value must depend on a known input value ("x" or “y”), you can recursively resolve the operands, using memoization to make sure you only calculate each operand once.
-
CW: Advent of Code 2024 Day 23 Spoilers
And I just realized that all of the duplicates in Part 1 were being caused by 3-node cliques that contain multiple nodes that start with “t”, so just filtering those out directly would save a lot of effort. The code (in the screenshot, and updated in Github) runs even faster now.
-
CW: Advent of Code 2024 Day 23 Spoilers
For Part 2, I knew enough about graphs to know that what we were looking for was called a clique, so it was a quick Google search to find the Bron-Kerbosch algorithm for finding cliques in a graph (https://en.wikipedia.org/wiki/Bron%E2%80%93Kerbosch_algorithm), and then it was just a matter of taking the largest and formatting it the way that the answer required it to be.
All-in-all a fun day, and I learned a new algorithm!
-
CW: Advent of Code 2024 Day 23 Spoilers
Phew! After a couple of rough days that I mostly skipped as I had a busy weekend, #AdventOfCode2024 Day 23 was pretty fun (though ymmv, but I like graph problems a lot).
Initially I was going to brute force Part 1, just using itertools.combinations to examine all three-node combinations to find interconnected ones that had at least one member that started with ’t’, but that ended up being too many, so instead I started with all of the ’t’ nodes, then searched through all the two-node combinations of its neighbors, storing every unique three-node combination I found, which was quite fast to complete.
https://github.com/biesnecker/aoc-anyhow/blob/main/202423.py
-
I just completed "Mull It Over" - Day 3 - Advent of Code 2024 #AdventOfCode
I'll try to do my best in order to complete all puzzles before next year... Wish me luck 🍀
See my :ruby: #Ruby solution at https://github.com/cdalvaro/advent-of-code-ruby
-
#AdventOfCode Day 23: LAN Party
I love LAN parties (do kids still do that nowadays?). I used the petgraph crate in Rust to build the data structure, but didn't use any of its algorithms. I got by using some sets.
#Rust code is here:
https://github.com/nharrer/AdventOfCode/blob/main/rust/src/year2024/day23.rs -
CW: Advent of code
I wonder whether anyone of my followers has solved the second star of day 14 of #AdventOfCode2024. It's formulated in such an indefinite way, it's not my cup of tea.
Anyways, I took this year's problems as an opportunity to improve my Kotlin skills (apart from async programming, and with a bonus linear algebra recap), and I'm glad I did, but now it's taking too much of my time (my ToDo list is just too long). Thanks #AdventOfCode, see you next year. -
Tag drei und vier sind auch vollständig gelöst, aber mit dem pünktlichen Fertigwerden bis zum 24.12 wird es wohl eher nichts 🤣.
-
A bit disappointed that people don't seem to widely recognise the xorshift prng nowadays...
#AdventOfCode2024 -
#AdventOfCode Day 22: Monkey Market
Today was one of those times when I had no idea at first how to approach part 2, so I just started coding. The solution gradually emerged along the way.
It was also one of those situations again where you initially think, 'That's impossible,' but when you're done, it feels like it couldn't be easier. 😉I’m not sure if I did the second part a bit too brute-forceish, but it finishes in 250ms in Rust, so that's fine for me.
BTW: none of the special cases in mix and prune ever happened. I wonder what that was all about.
#Rust code is here:
https://github.com/nharrer/AdventOfCode/blob/main/rust/src/year2024/day22.rs -
CW: Spoiler Day 21 / 2024
As with other puzzles we had already this year, we only need the length of shortest key sequence and not the sequence itself.
-
#AdventOfCode Day 21: Keypad Conundrum
I went to a Christkindlmarkt market with the family today, and later we enjoyed a movie night together.
So I didn’t get to AoC until late; it's already past 1 in the morning as I’m writing this.
It went well overall. Both parts finish in under 1ms. Memoization saved the day. There were a couple small details that slowed me down a bit. Used recursions a lot.
#Rust code is here:
https://github.com/nharrer/AdventOfCode/blob/main/rust/src/year2024/day21.rs -
CW: Advent of Code 2024 Day 21
I seem to have been the only person who just sat down, thought about what the easiest sequences must be (in terms of "left" being harder than "right" because it's further from the "A"), handwrote a lookup table and then got pt1 perfect, and pt2 off by just one logic error true/false conditions (ironically, in the bit of the lookup table I wrote some code to generate because I was bored of typing).
Sometimes you don't need to throw a DFS at everything!
#AdventOfCode2024 -
CW: AOC 2024 day 16
Managed to get my Dijsktra-like solution to run below 50 ms for part 2, and ~6 ms for part 1. Probably could shed some more ms, but I think that’s pretty good already! #RustLang delivers.
https://gitlab.com/silmeth/advent-of-code-2024/-/blob/main/day-16/src/lib.rs
-
#adventofcode #adventofcode2024 Day 5 in #CommonLisp #Lisp
#LispWorks on the new Mac mini
-
#adventofcode #adventofcode2024 Day 4 in #CommonLisp #Lisp
#LispWorks on the new Mac mini
-
Just completed day 4 of this year's Advent of Code:
https://gist.github.com/and-kal/da2371872ffc3ca76d998ddc7001a204Actually a pretty good way to get familiar with a new programming language.
Though that's probably some super inefficient #Lua code and loopy as hell. But I think there's something nice about its #naïveté.#AdventOfCode #AdventOfCode2024 #proceduralprogramming #ifthen
-
Just completed day 4 of this year's Advent of Code:
https://gist.github.com/and-kal/da2371872ffc3ca76d998ddc7001a204Actually a pretty good way to get familiar with a new programming language.
Though that's probably some super inefficient #Lua code and loopy as hell. But I think there's something nice about its #naïveté.#AdventOfCode #AdventOfCode2024 #proceduralprogramming #ifthen
-
Just completed day 4 of this year's Advent of Code:
https://gist.github.com/and-kal/da2371872ffc3ca76d998ddc7001a204Actually a pretty good way to get familiar with a new programming language.
Though that's probably some super inefficient #Lua code and loopy as hell. But I think there's something nice about its #naïveté.#AdventOfCode #AdventOfCode2024 #proceduralprogramming #ifthen
-
Just completed day 4 of this year's Advent of Code:
https://gist.github.com/and-kal/da2371872ffc3ca76d998ddc7001a204Actually a pretty good way to get familiar with a new programming language.
Though that's probably some super inefficient #Lua code and loopy as hell. But I think there's something nice about its #naïveté.#AdventOfCode #AdventOfCode2024 #proceduralprogramming #ifthen
-
a quick hack for #adventofcode2024 Day 2 using #CommonLisp in #LispWorks
-
#adventofcode #adventofcode2024 Day 1 #CommonLisp
#Symbolics #Genera, #SBCL and #LispWorks on the new Mac mini
-
I’m attempting #AdventOfCode this year! 🎄✨ To make things even more challenging (and fun?), I’m tackling it in a new language. Feels a bit like being back in school 🧑💻 #AdventOfCode2024 #LearningNewThings