Tootfinder

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

@jamesthebard@social.linux.pizza
2025-12-03 02:37:05
Content warning: Advent of Code - Day 1 (Nim)

Figured I'd give `nim` some love this #aoc along with Python. I'm rusty as hell, but I think the initial take looks pretty great. Easy enough to compile/run and fairly readable.
Solution for day 1:

@beeb@hachyderm.io
2025-12-05 15:42:57
Content warning: Advent of Code 2025 Day 5

Another easy challenge in today's #AdventOfCode puzzle.
Part 1 is straightforward, and for part 2, the trick was to sort the list of ID ranges first, which made the merging pretty easy.
#AoC #AoC2025 #AdventOfCode2025 #rust #RustLang

@beeb@hachyderm.io
2025-12-06 10:08:23
Content warning: Advent of Code 2025 Day 6

Today's #AdventOfCode problem was more about parsing than about complex logic, but it was fun!
I opted to keep the parsing with winnow simple and do most of it by hand from the raw characters, to exercise my #rust iterators a bit.
#AoC #AoC2025 #AdventOfCode2025 #RustLang

@beeb@hachyderm.io
2025-12-04 07:25:52
Content warning: Advent of Code 2025 Day 4

Didn't feel like thinking too much for today's problem of #AdventOfCode, so my solution is quite naive and runs in a few tens of milliseconds for part 2 (thanks, #RustLang!).
I went for a HashSet for the grid just because it made looking up neighbours simpler at the edges, probably also not the most performant solution, but gets better as the grid becomes sparser.
#AoC #AoC2025 #AdventOfCode2025 #rust

@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