Tootfinder

Opt-in global Mastodon full text search. Join the index!

@jamesthebard@social.linux.pizza
2025-12-09 00:06:34
Content warning: Advent of Code Solution - Day 8 (Python)

This took just a smidge longer than the Rust solve, but still not too horrible coming in at around 1.5 to 2 seconds. Getting all of the potential coordinate combinations along with their distances sorted made everything so much easier.
Solution: git.jamesthebard.net/jwe…

@beeb@hachyderm.io
2025-12-14 11:21:25
Content warning: 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.
#AoC #AoC205 #AdventOfCode2025 #RustLang #rust

@domm@social.linux.pizza
2025-12-01 09:06:26

Today I did day 1 of #AdventOfCode, and obviously missed the small trap hidden in the second part. Solved the first part with math and the second part with ... let's say a simulation (which sounds smarter than brute force clicking through all positions because I'm to dumb to figure out my Lattenzaunproblem...)

@jamesthebard@social.linux.pizza
2025-12-07 08:41:50
Content warning: Advent of Code Solution - Day 7 (Python)

Once I pulled my head out of my ass this wasn't horrible. Part 1 was straightforward, decided to do some set stuff and managed to get it right the first time. Part 2 made my brain hurt a bit because all of the ideas that came to me were very, very slow and memory intensive. Then decided to scrap it and just do what the directions told me to do: count the paths...so I replaced the dumb with a dictionary which was so much better as an idea.
Solution:

@thek3nger@mastodon.social
2025-12-03 14:13:37

I always love it when I make part 1 general enough that all I have to do for part 2 is change a parameter. #gleam
I just completed "Lobby" - Day 3 - Advent of Code 2025 #AdventOfCode

@pre@boing.world
2025-12-06 14:12:20
Content warning: VibeCoding Reflections

Why is it finally ready now after ten years of being a barely functional input-only android app?
A few weeks ago I saw #vibeCoding #shakespeare

@beeb@hachyderm.io
2025-12-13 19:51:54
Content warning: 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.
#AoC #AoC2025 #AdventOfCode2025 #RustLang #rust

@jamesthebard@social.linux.pizza
2025-12-06 18:07:51
Content warning: Advent of Code Solution - Day 6 (Nim)

This one took a smidge more thought as I can't abuse `zip` to rotate 2D sequences. However, just rewrote the rotation as a proc and used that. Instead of `reduce`, it was all `foldl`, and I fought with `char` vs `string` due to some of the processing operations between the normal and cephalopod problem processing.
Overall, definitely a fun solve.
Solution:

@seav@en.osm.town
2025-11-02 11:58:35

#30DayMapChallenge 🗺️ Day 2️⃣: Lines
This map shows all the airports with direct flights from #Singapore’s 🇸🇬 #ChangiAirport (

Light-grayscale map titled “Airports with direct flights from Singapore’s Changi Airport”. The map is circular using an azimuthal projection centered on Singapore, labeled with a red dot with the IATA code of SIN, and with distances marked in a roughly logarithmic scale in intervals of 1000 nautical miles. Lines connect Singapore with 162 other airports labeled with their IATA codes. Most lines and airports are dark gray but some like Jakarta (CGK), Denpasar (DPS), and Narita (NRT) are redder a…
@trogluur@social.linux.pizza
2025-12-04 20:12:00

I'm doing Advent of Code in Typst this year. I forgot to do it when AoC started so I had to do day 1-4 all today.
The scripting language in Typst has a Python / JavaScript -like feel to it, with iterators that work a lot like in Rust.
#adventofcode

@jamesthebard@social.linux.pizza
2025-12-03 15:38:46
Content warning: Advent of Code - Day 3 (Python)

Ooooo, I knew that my initial solution for Part 1 was going to get absolutely discarded for Part 2 (which inevitably came true). Lots of string sorting, grabbing an index, and a moving window to find the largest value.
Pretty proud of the solve, it's fast and it's all that janky.
Solution: <…

@beeb@hachyderm.io
2025-12-08 15:41:16
Content warning: Advent of Code 2025 Day 8

A cool graph problem today in #AdventOfCode
Nothing special here, I leveraged the `petgraph` #rust crate which I love! Calculating all pairs' distances (squared) and joining the pairs that are closest with an edge.
Only thing I wish I had more time to implement would be the graph traversal algo during sub-net aggregation, but swamped with work at the moment.
#AoC #AoC2025 #AdventOfCode2025 #RustLang

@beeb@hachyderm.io
2025-12-02 10:28:58
Content warning: Advent of Code 2025 Day 2

Today's #AdventOfCode problem was fun! I kept a different implementation for part 1 vs part 2 as they both run relatively fast.
For part 1, I iterated over all IDs (the ranges are quite small) and split them in half mathematically (no string representation) to compare both halves.
For part 2, I instead generated all interestings IDs (mathematically again) up to a length of 10 digits (the max in my input) and checked if any of the ranges contained them.
#AoC #AoC2025 #AdventOfCode2025 #RustLang #rust

@beeb@hachyderm.io
2025-12-03 06:53:11
Content warning: Advent of Code 2025 Day 3

Super happy with my solution for today's #AdventOfCode problem!
It initially took me a little bit of time to find a suitable strategy, but it all clicked when I noticed that the left-most selected digit had the most significance in the final value. Thus, I maximized the value of that left-most digit, leaving enough digits on the right side to be able to pick the required total number of batteries in the bank.
The solution is relatively short and sweet:
#AdventOfCode2025 #AoC #AoC2025 #RustLang #rust