home.social

#adventofcode2025 — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #adventofcode2025, aggregated by home.social.

fetched live
  1. Finished up Day 11 of Advent of Code and it was definitely easier than Day 10. Nothing fancy and it's pretty fast. Did have to think about how to get part 2 solved, but it was more an implementation issue more than me just smashing keys and hoping a solution fell out.

    Solution: git.jamesthebard.net/jweatherl

    #adventofcode2025 #adventofcode #python #programming

  2. Finished up Day 11 of Advent of Code and it was definitely easier than Day 10. Nothing fancy and it's pretty fast. Did have to think about how to get part 2 solved, but it was more an implementation issue more than me just smashing keys and hoping a solution fell out.

    Solution: git.jamesthebard.net/jweatherl

    #adventofcode2025 #adventofcode #python #programming

  3. So, decided to keep on trucking on the Advent of Code problems. Day 10 was pain, but nothing a little bit of linear algebra couldn't fix after what can only be described as herculean searching on the web...thank you Scipy.

    Solution: git.jamesthebard.net/jweatherl

    #python #adventofcode #adventofcode2025

  4. So, decided to keep on trucking on the Advent of Code problems. Day 10 was pain, but nothing a little bit of linear algebra couldn't fix after what can only be described as herculean searching on the web...thank you Scipy.

    Solution: git.jamesthebard.net/jweatherl

    #python #adventofcode #adventofcode2025

  5. I finished day 6 part 2 of . While I initially tried parsing forward through the lines of input, I eventually moved to parsing right to left. And again used reduce() to get the results of the problems.

  6. I finished day 6 part 2 of #aoc2025. While I initially tried parsing forward through the lines of input, I eventually moved to parsing right to left. And again used reduce() to get the results of the problems.

    #AdventOfCode2025 #AdventofCode

  7. I had fun applying reduce() to lists to solve day 6 part 1 of . I learned about reduce() while porting machine learning code to Linux on IBM Power many years back, but I've seldom used it.

  8. I had fun applying reduce() to lists to solve day 6 part 1 of #aoc2025. I learned about reduce() while porting machine learning code to Linux on IBM Power many years back, but I've seldom used it.

    #AdventofCode #AdventOfCode2025

  9. I finished day 5 part 2 of . My first approach left me with overlapping ranges, so I had to revamp it. The working solution was much more elegant in addition to working!

  10. I finished day 5 part 2 of #aoc2025. My first approach left me with overlapping ranges, so I had to revamp it. The working solution was much more elegant in addition to working!

    #AdventofCode #AdventOfCode2025

  11. Throughout this year's #AdventOfCode event, I've been working on a single-line #Python program that solves *every* 2025 puzzle. The result is a >2,600 character beast I call "The Brahminy".

    github.com/WinslowJosiah/adven

    #programming #coding #AdventOfCode2025

  12. Throughout this year's #AdventOfCode event, I've been working on a single-line #Python program that solves *every* 2025 puzzle. The result is a >2,600 character beast I call "The Brahminy".

    github.com/WinslowJosiah/adven

    #programming #coding #AdventOfCode2025

  13. CW: Advent of Code 2025 Day 12

    For the last day of #AdventOfCode, I took a very simple and naive approach of: depth-first search.

    Basically try all combinations until one fits. The trick to avoid a VERY long runtime is to filter out all cases where we already know from the start that the pieces (gifts) won't fit in the region, because their summed area exceeds the area of the region. Went for recursion this time around, because why not.

    github.com/beeb/aoc-2025/blob/

    Overall, I really liked this year's puzzles. They weren't too hard which was refreshing compared to the last couple of years. I doubt many people really like those extremely hard to solve problems that take one day or more for anyone who isn't a genius (but I might be wrong). For me, it struck a nice balance and it felt rewarding enough to scratch my decembre puzzle itch! I also enjoyed the shorter run, I usually got quite burnt out by the end, especially with all the social functions towards the end of the month.

    #AoC #AoC205 #AdventOfCode2025 #RustLang #rust

  14. CW: Advent of Code 2025 Day 12

    For the last day of #AdventOfCode, I took a very simple and naive approach of: depth-first search.

    Basically try all combinations until one fits. The trick to avoid a VERY long runtime is to filter out all cases where we already know from the start that the pieces (gifts) won't fit in the region, because their summed area exceeds the area of the region. Went for recursion this time around, because why not.

    github.com/beeb/aoc-2025/blob/

    Overall, I really liked this year's puzzles. They weren't too hard which was refreshing compared to the last couple of years. I doubt many people really like those extremely hard to solve problems that take one day or more for anyone who isn't a genius (but I might be wrong). For me, it struck a nice balance and it felt rewarding enough to scratch my decembre puzzle itch! I also enjoyed the shorter run, I usually got quite burnt out by the end, especially with all the social functions towards the end of the month.

    #AoC #AoC205 #AdventOfCode2025 #RustLang #rust

  15. CW: Advent of Code Day 11

    Day 11 of #AdventOfCode is a classical graph problem like we're used to from previous years.

    Unlike previously, I immediately thought of checking what the graph looked like with a visualization tool. Luckily, `petgraph` allows to export a graphviz file which can be then used to visualize the nodes and edges.

    From that, it was clear that a few nodes were acting as "bridges" between largers subnets of nodes with no particular arrangement besides being directed towards the next "bridge" layer. Those bridge layers comprised 4 to 5 nodes in my input, and were the only ones with more than 6 incoming edges, so I used that as my filter criterion.

    To gather them, I sorted the graph in topological order and chunked them by their position offset compared to the previous node. When doing this, all the nodes from a bridge layer end up being at most 20 positions away from the previous node in the sorted list.

    Finally, I progressed through each subnet, collecting information about how many paths lead to each one of the end layer's nodes. By multiplying with all the paths leading to each start layer's node, we get the overall total number of paths.

    github.com/beeb/aoc-2025/blob/

    #AoC #AoC2025 #AdventOfCode2025 #RustLang #rust

  16. CW: Advent of Code Day 11

    Day 11 of #AdventOfCode is a classical graph problem like we're used to from previous years.

    Unlike previously, I immediately thought of checking what the graph looked like with a visualization tool. Luckily, `petgraph` allows to export a graphviz file which can be then used to visualize the nodes and edges.

    From that, it was clear that a few nodes were acting as "bridges" between largers subnets of nodes with no particular arrangement besides being directed towards the next "bridge" layer. Those bridge layers comprised 4 to 5 nodes in my input, and were the only ones with more than 6 incoming edges, so I used that as my filter criterion.

    To gather them, I sorted the graph in topological order and chunked them by their position offset compared to the previous node. When doing this, all the nodes from a bridge layer end up being at most 20 positions away from the previous node in the sorted list.

    Finally, I progressed through each subnet, collecting information about how many paths lead to each one of the end layer's nodes. By multiplying with all the paths leading to each start layer's node, we get the overall total number of paths.

    github.com/beeb/aoc-2025/blob/

    #AoC #AoC2025 #AdventOfCode2025 #RustLang #rust

  17. 📝 Advent of Code 2025 Day 12: Christmas Tree Farm

    josiah.win/a/2025/12

    Today, I was able to get by with only two very basic checks. Anticlimactic, but it was either that or some NP-complete solution.

    #python #AdventOfCode2025 #programming #coding

  18. 📝 Advent of Code 2025 Day 12: Christmas Tree Farm

    josiah.win/a/2025/12

    Today, I was able to get by with only two very basic checks. Anticlimactic, but it was either that or some NP-complete solution.

    #python #AdventOfCode2025 #programming #coding

  19. 📝 Advent of Code 2025 Day 11: Reactor

    josiah.win/a/2025/11

    What a nice change of pace after Day 10! This is a nice application of recursion+caching (aka "dynamic programming").

    #python #AdventOfCode2025 #programming #coding

  20. 📝 Advent of Code 2025 Day 11: Reactor

    josiah.win/a/2025/11

    What a nice change of pace after Day 10! This is a nice application of recursion+caching (aka "dynamic programming").

    #python #AdventOfCode2025 #programming #coding

  21. CW: Advent of Code 2025 day 12 solution

    Day 12 done.

    I really didn't like this one. Basically have to do some bounds checking "it obviously always works" or "it obviously will never work" on it to get it to work on the actual input, but it still NEVER FINISHES on the example. I'm slightly bothered that the problem is more or less unsolvable as written, but I'm really bothered by the actual solution for the input not working on the example. That's not a fun puzzle, that feels like I'm being tricked, like the puzzle was a prank on me. Leaves a real sour taste, especially being the last puzzle of this year's AoC.

    #AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day12 #Day12 #Rust #RustLang #Programming #CodingChallenges #AoC #AoC2025 #AoC2025Day12

  22. CW: Advent of Code 2025 day 12 solution

    Day 12 done.

    I really didn't like this one. Basically have to do some bounds checking "it obviously always works" or "it obviously will never work" on it to get it to work on the actual input, but it still NEVER FINISHES on the example. I'm slightly bothered that the problem is more or less unsolvable as written, but I'm really bothered by the actual solution for the input not working on the example. That's not a fun puzzle, that feels like I'm being tricked, like the puzzle was a prank on me. Leaves a real sour taste, especially being the last puzzle of this year's AoC.

    #AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day12 #Day12 #Rust #RustLang #Programming #CodingChallenges #AoC #AoC2025 #AoC2025Day12

  23. 📝 Advent of Code 2025 Day 10: Factory

    josiah.win/a/2025/10

    This puzzle convinced me for a while that I'd need some linear algebra solver to tackle it. But luckily, I got wind of another approach from a helpful Reddit post...

    #python #AdventOfCode2025 #programming #coding

  24. 📝 Advent of Code 2025 Day 10: Factory

    josiah.win/a/2025/10

    This puzzle convinced me for a while that I'd need some linear algebra solver to tackle it. But luckily, I got wind of another approach from a helpful Reddit post...

    #python #AdventOfCode2025 #programming #coding

  25. I finished day 5 part 1 of in . I wanted to use a big set of integers for the fresh ingredients and check for membership, but the range was too large for the interpreter to handle. I also explored expanding and coalescing ranges, but in the end didn't need to implement it.

  26. I finished day 5 part 1 of #aoc2025 in #Python. I wanted to use a big set of integers for the fresh ingredients and check for membership, but the range was too large for the #Python interpreter to handle. I also explored expanding and coalescing ranges, but in the end didn't need to implement it.

    #AdventofCode2025 #AdventOfCode

  27. I implemented day 4 part 2 of . I refactored the day 4 part 1 code to use directly in the part 2 solution. I learned how to replace characters within strings, i.e. create a new string with slices of the original and the character you want in the particular position.

  28. I implemented day 4 part 2 of #aoc2025. I refactored the day 4 part 1 code to use directly in the part 2 solution. I learned how to replace characters within #Python strings, i.e. create a new string with slices of the original and the character you want in the particular position.

    #AdventOfCode2025 #AdventOfCode

  29. #AdventOfCode2025 was not the best year for #AdventOfCode. The puzzles were mostly simple except for one part two that was incredibly hard, and (perhaps because of the shorter format) we missed some of our favorites: no interpreters, no Chinese Remainder Theorem... is it even Christmas if I haven't poorly implemented a half-remembered CRT-based solution to elven mis-engineering? And of course there were only 12 of them, though I completely understand that putting together the full 25 was a huge time investment, and I'm quite grateful that it continued for 10 years at that pace. It's no mean feat.

    My hope is that we'll see more and more of these sorts of puzzle sets appear. There already are some, and though I've not seen any of the quality of AoC's glory years, there are some interesting ones, and hopefully there will be more in the future across a wider variety of topics.

  30. #AdventOfCode2025 was not the best year for #AdventOfCode. The puzzles were mostly simple except for one part two that was incredibly hard, and (perhaps because of the shorter format) we missed some of our favorites: no interpreters, no Chinese Remainder Theorem... is it even Christmas if I haven't poorly implemented a half-remembered CRT-based solution to elven mis-engineering? And of course there were only 12 of them, though I completely understand that putting together the full 25 was a huge time investment, and I'm quite grateful that it continued for 10 years at that pace. It's no mean feat.

    My hope is that we'll see more and more of these sorts of puzzle sets appear. There already are some, and though I've not seen any of the quality of AoC's glory years, there are some interesting ones, and hopefully there will be more in the future across a wider variety of topics.

  31. CW: Advent of Code 2025 Day 12 Spoilers

    Today I spent a bunch of time preparing for a really hard problem that ended up being a very very simple problem.

    My first thought on seeing this was, if we're being honest, "shit I hate bin packing." But such is life, so my second thought was "I wonder how many of these are just impossible?" That is, how many have too many filled squares for the dimension of the grid, and so would be impossible to fit in any configuration. So I wrote that code, and it eliminated about half.

    Then I spent nearly an hour writing a recursive backtracking solver that was reasonably fast and I discovered that... all the puzzles that passed the first check passed. 😦

    So I deleted all the junk, and kept my first "sanity check" solution.

    codeberg.org/biesnecker/aoc-an

    #adventofcode #adventofcode2025 #python

  32. CW: Advent of Code 2025 Day 12 Spoilers

    Today I spent a bunch of time preparing for a really hard problem that ended up being a very very simple problem.

    My first thought on seeing this was, if we're being honest, "shit I hate bin packing." But such is life, so my second thought was "I wonder how many of these are just impossible?" That is, how many have too many filled squares for the dimension of the grid, and so would be impossible to fit in any configuration. So I wrote that code, and it eliminated about half.

    Then I spent nearly an hour writing a recursive backtracking solver that was reasonably fast and I discovered that... all the puzzles that passed the first check passed. 😦

    So I deleted all the junk, and kept my first "sanity check" solution.

    codeberg.org/biesnecker/aoc-an

    #adventofcode #adventofcode2025 #python

  33. CW: adventofcode (programming)

    adventofcode.com/2025 is as enjoyable as ever. But since it's limited to 12 days this year (and I'm so grateful to @ericwastl for not dropping it altogether!) the complexity rose steeply for me on the second part of day 10. I have a nice recursive algorithm that works perfectly on the example, but is far too slow on the real data :-(
    #adventofcode #adventofcode2025

  34. CW: adventofcode (programming)

    adventofcode.com/2025 is as enjoyable as ever. But since it's limited to 12 days this year (and I'm so grateful to @ericwastl for not dropping it altogether!) the complexity rose steeply for me on the second part of day 10. I have a nice recursive algorithm that works perfectly on the example, but is far too slow on the real data :-(
    #adventofcode #adventofcode2025

  35. I solved day 4 part 1 of . My algorithm to find neighbors was good, and my counting was good, but my result was too high. Eventually I figured it out

  36. I solved day 4 part 1 of #aoc2025. My algorithm to find neighbors was good, and my counting was good, but my result was too high. Eventually I figured it out

    #AdventOfCode2025

  37. I finished day 3 part 2 of . I came up with a nice recursive solution with a little optimization.

  38. I finished day 3 part 2 of #AdventOfCode2025. I came up with a nice recursive solution with a little optimization.

    #aoc2025

  39. CW: Advent of Code 2025 Day 11 Spoilers

    After the last few days of difficult puzzles, today was a breath of fresh air.

    Counting paths through a DAG is a classic memoizable recursive puzzle. Part 1 was just that.

    Part 2 adds two new variables to track, but you just add them to the memoized parameters (Python's `@cache` operator makes that easy) and keep do the same thing, with the addition of updating the flags if you're on either the `dac` or `fft` nodes.

    Easy peasy, runs almost instantly.

    codeberg.org/biesnecker/aoc-an

    #adventodcode #adventofcode2025 #python

  40. CW: Advent of Code 2025 Day 11 Spoilers

    After the last few days of difficult puzzles, today was a breath of fresh air.

    Counting paths through a DAG is a classic memoizable recursive puzzle. Part 1 was just that.

    Part 2 adds two new variables to track, but you just add them to the memoized parameters (Python's `@cache` operator makes that easy) and keep do the same thing, with the addition of updating the flags if you're on either the `dac` or `fft` nodes.

    Easy peasy, runs almost instantly.

    codeberg.org/biesnecker/aoc-an

    #adventodcode #adventofcode2025 #python

  41. CW: Advent of Code 2025 Day 11 solution

    Day 11 done.

    Memoization actually worked for this one. My first instinct was to just crawl the graph with a memo, and it fortunately did the right thing. It was effectively an exhaustive depth-first search. Really not much to discuss.

    My code is not nice or clean, but after yesterday's, I can't even be assed to clean it up or properly comment it. I barely gathered the gumption to pass errors up, and when I started writing it, I was just throwing unwrap() everywhere.

    #AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day11 #Day11 #Rust #RustLang #Programming #CodingChallenges

  42. CW: Advent of Code 2025 Day 11 solution

    Day 11 done.

    Memoization actually worked for this one. My first instinct was to just crawl the graph with a memo, and it fortunately did the right thing. It was effectively an exhaustive depth-first search. Really not much to discuss.

    My code is not nice or clean, but after yesterday's, I can't even be assed to clean it up or properly comment it. I barely gathered the gumption to pass errors up, and when I started writing it, I was just throwing unwrap() everywhere.

    #AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day11 #Day11 #Rust #RustLang #Programming #CodingChallenges