Tootfinder

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

@thek3nger@mastodon.social
2025-12-09 18:27:33

I had a busy and fun weekend. So I am catching up. Nothing to add here.
I just completed "Laboratories" - Day 7 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/7

@matths@toot.community
2025-12-08 22:21:57

I just completed "Playground" - Day 8 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/8

@jswright61@ruby.social
2025-12-07 22:42:57

I just completed "Laboratories" - Day 7 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/7

@matths@toot.community
2025-12-09 21:22:22

I just completed "Movie Theater" - Day 9 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/9

@jamesthebard@social.linux.pizza
2025-12-08 20:10:44

After writing some questionable `rust` code for #adventofcode Day 8, I've managed to get the right answers in a reasonable amount of time which has taken far, far longer than I'd care to admit. I'll jump on the Python and Nim solves later because my brain is absolutely fried at the moment.
Solution:

A screenshot of hyperfine showing the solve taking about 77 ms which is a Christmas miracle...
@domm@social.linux.pizza
2025-12-09 20:17:08

Now I finished #AdventOfCode Day 8 (I needed to remove some of my tangled-up data structures to get a clear view again...). Still not in the mood for Day 9 part 2.

@domm@social.linux.pizza
2025-12-09 10:14:59

While I did not even finish part 1 of day 8 of #AdventOfCode (it was a holiday in .at and I had some weird bug which I did not want to spend any more time on), day 9 part 1 was very easy. Part 2 probably needs some smart math, which I'm currently not inclined to think about.

@matths@toot.community
2025-12-07 20:02:03

I just completed "Laboratories" - Day 7 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/7

@jswright61@ruby.social
2025-12-06 17:15:15

I just completed "Trash Compactor" - Day 6 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/6

@jamesthebard@social.linux.pizza
2025-12-08 02:24:07

Hrmm, worked on writing the #adventofcode 2025 Day 1 solve in Rust, wasn't too horrible. Pretty fast though I did have all of the tabs open trying to figure out how to do things.
#rust

@jswright61@ruby.social
2025-12-05 17:45:11

I just completed "Cafeteria" - Day 5 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/5
Lots to cleanup still, but this one is done!

@jamesthebard@social.linux.pizza
2025-12-08 04:02:00

A quick comparison using `hyperfine` for some benchmarking on the #adventofcode 2025 Day 1 solution. Not too shabby for any of the solutions, and its interesting to compare them.
#rust #nim

A screenshot of the README.md for the AoC repo showing benchmarks comparing the solutions in different languages.
@thek3nger@mastodon.social
2025-12-05 12:22:23

A classic. I've implemented the sweep-merge-interval algorithm in more languages than I can remember. #Gleam
I just completed "Cafeteria" - Day 5 - Advent of Code 2025 #AdventOfCode

@csessh@social.linux.pizza
2025-12-02 14:24:10

This meme says it all #AdventOfCode
reddit.com/r/adventofcode/comm

@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

@jswright61@ruby.social
2025-12-04 19:14:48

I just completed "Printing Department" - Day 4 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/4
And I'm caught up!
With being behind, I was in get it done mode…

@matths@toot.community
2025-12-05 23:01:04

I just completed "Cafeteria" - Day 5 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/5

@beeb@hachyderm.io
2025-12-10 17:37:59
Content warning: Advent of Code 2025 Day 10

Yes! Today's puzzle in #AdventOfCode was quite hard (especially part 2) but so rewarding and I learned a lot!
For part 1, I implemented A* from scratch, my favorite little pathfinding algo that I use pretty much every year for #AoC (sometimes I use a lib instead of implementing it but it's been a while so a refresher was in order).
For part 2, after trying A* again and noticing it was running for way too long, I went back to the drawing board and solved the first machine by hand. I noticed the constraints were a system of linear equations.
I then researched algorithms to solve such integer programming problems and didn't feel like learning AND implementing the algorithms in one day (ain't nobody got time fo that). But this lead me to discover the `good_lp` #rust crate which is really good and that I will keep in my back pocket from now on!
So I used the library to define a system of variables and constraints which could be solved magically for me.
#AoC2025 #AdventOfCode2025 #RustLang

@matths@toot.community
2025-12-06 18:03:54

I just completed "Trash Compactor" - Day 6 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/6

@psittacus@social.linux.pizza
2025-11-26 08:37:28

Weihnachtszeit (also #adventofcode

@thek3nger@mastodon.social
2025-12-02 15:31:58

I just completed "Gift Shop" - Day 2 - Advent of Code 2025
There is a really nice one line trick for part 2. :)
#AdventOfCode adventofcode.com/2025/day/2

@jswright61@ruby.social
2025-12-04 09:03:05

I just completed "Gift Shop" - Day 2 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/2
progress continues - goal today: complete Day 3 both parts and Day 4 part 1 🤞

@mapcar@mastodon.sdf.org
2025-11-30 17:05:26

Anybody out there thinking of doing #adventofcode in #cobol?

@domm@social.linux.pizza
2025-12-06 15:37:16

#AdventOfCode Day 6: Part 1 was easy, for part 2 it was obvious what to do (after I read the instructions a few times to figure out what is considered a cephalopod number), but it took me a while to properly rotate my arrays. At least I got to finally use `for my ($i, $val) (indexed @array) { .. }` (which I failed to use (properly) on day 3).

@thek3nger@mastodon.social
2025-12-06 13:18:56

In Part 2 I did a REAL MESS. But surprisingly, it works in 10 milliseconds. Time to make this more presentable, I guess.
(I don't particularly like parse-based challenges)
I just completed "Trash Compactor" - Day 6 - Advent of Code 2025 #AdventOfCode

  let numbers =
    lines
    |> list.map(string.to_graphemes)
    |> list.transpose
    |> list.chunk(last_is_operator)
    |> list.sized_chunk(2)
    |> list.map(list.flatten)
    |> list.map(fn(c) { list.map(c, fn(d) { list.take(d, lines_number) }) })
    |> list.map(fn(c) { list.map(c, string.concat) })
    |> list.map(fn(c) { list.map(c, fn(d) { string.trim(d) }) })
    |> list.map(fn(c) { list.map(c, fn(d) { int.parse(d) }) })
    &#…
@jswright61@ruby.social
2025-12-03 18:28:05

I just completed "Secret Entrance" - Day 1 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/1
Bad start to the week and month, but, famous last words, I'm gonna try to…

@beeb@hachyderm.io
2025-12-09 20:04:21
Content warning: Advent of Code 2025 Day 9

A nice bump in difficulty for today's #AdventOfCode problem!
Although the first part came to me very easily, I spent way too much time trying to implement a flooding algorithm for part 2, only to find out that it would take too much time and there should be a better way.
The worst part is that I had the intuition for my final solution super early on, but couldn't materialize it in a simple way until tonight.
I also must admit I realized quite late that the points were sorted in the input :D I should RTFM better sometimes.
My final #rust solution runs very quickly and is reasonably clean.
#AoC #AoC2025 #AdventOfCode2025 #RustLang

@matths@toot.community
2025-12-03 22:08:48

I just completed "Lobby" - Day 3 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/3

@csessh@social.linux.pizza
2025-12-05 05:52:51

"If only we hadn't switched to the new inventory management system right before Christmas!" another Elf exclaims.
The elves discovered Project Management, apparently.
Happy #adventOfCode !

@thek3nger@mastodon.social
2025-12-04 10:04:19

Grids are my bread and butter, but I am not confident in my handling of mutable grids on #Gleam. Luckily, I didn't need any.
I just completed "Printing Department" - Day 4 - Advent of Code 2025 #AdventOfCode

@matths@toot.community
2025-12-04 09:59:01

I just completed "Printing Department" - Day 4 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/4

@domm@social.linux.pizza
2025-12-05 10:38:14

#AdventOfCode Day 5: My stupid part 1 solution was too slow (because I checked each ingridient instead of compare the ranges). After fixing that it was fast and correct. I have a plan for part 2, but $job to do, so let's see when I get a round tuit (to quote an old #Perl saying).

@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

@matths@toot.community
2025-12-02 16:24:11

I just completed "Gift Shop" - Day 2 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/2

@domm@social.linux.pizza
2025-12-04 15:31:38

#AdventOfCode day 4 was quite easy (though my solution is not very performant (1sec))

@thek3nger@mastodon.social
2025-12-01 20:15:10

I've completed "Secret Entrance" - Day 1 - Advent of Code 2025 #AdventOfCode
I am not sharing the solution because this year I am using #Gleam and I am far from efficient in it. Yet. :D

@matths@toot.community
2025-12-01 15:58:05

I just completed "Secret Entrance" - Day 1 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/1

@jamesthebard@social.linux.pizza
2025-12-01 17:14:25
Content warning: Advent of Code - Day 1

Not a bad start, part 2 kinda kicked my ass because reading is really, really hard. I made the assumption that there wouldn't be any spins greater than 99 which was a horrible, horrible assumption to make.
However, not too difficult overall, happy enough with the solve.
#adventOfCode

The simple solve for Day 1, will probably do what I usually do and pick a second language to try and go with as the AoC continues.  The code is written in Python using VCS as the IDE.
@csessh@social.linux.pizza
2025-12-01 12:21:22

#AdventOfCode Day 1 visualization with #Lua and #Love2D

@domm@social.linux.pizza
2025-12-03 16:00:14

For day 3 of #AdventOfCode I outsmarted myself by using `each` on an array to get the index and the value, but forgot that #Perl does not reset the counter when you exit the loop early. (It worked for part 1, though..). After switching to a stupid c-style for loop it was easy (because I agai…

@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

@matths@toot.community
2025-12-02 16:24:11

I just completed "Gift Shop" - Day 2 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/2

@domm@social.linux.pizza
2025-12-02 14:01:16

For Day 2 of #AdventOfCode I did a stupid and slow solution for part 1 and an even slower and extremly stupid solution for part 2 (using autogenerated and some handcrafted(!) regex).

@csessh@social.linux.pizza
2025-12-01 14:02:45

I swear I read Day 1's specs as 0..99 range.
For some reasons, I kept on working on part 1 solution as if it was 1..99. I was scratching my head for an embarrassingly long time.
Off-by-one won. again.
#adventOfCode

@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-24 21:19:32

So, 11 out of 12 days completed for #AdventofCode and my thoughts for this year:
- `nim` is probably the language I've enjoyed coding the most in.
- `python`'s whole ecosystem of libraries just makes things so much easier. Day 10 and `scipy` just destroyed that solution (part 2 specifically)
- `rust` annoys me, but I 100% admit that it's a skill issue on my pa…

@csessh@social.linux.pizza
2025-11-28 09:50:08

December is just around the corner, 12 days of brilliantly fun #AdventOfCode puzzles
Have fun, folks 🥳
github.com/csessh/aoc.nvim

@beeb@hachyderm.io
2025-12-07 10:33:10
Content warning: Advent of Code 2025 Day 7

Today's puzzle in #AdventOfCode was another grid puzzle, where I again represented the entities as a sparse set.
Part 1 was relatively straightforward, a simplified BFS-like process allowed to construct the beams going through the system.
For part 2, additionally to gathering where a beam was present, I added metadata about how many paths were going through each position, adding them up and splitting them as required. Summing the paths for the last row gave the required result.
#AoC #AoC2025 #AdventOfCode2025 #RustLang #rust

@thek3nger@mastodon.social
2025-12-10 22:04:00

This was fun. But I can clearly optimize the algorithm once I learn #Gleam better.
I just completed "Playground" - Day 8 - Advent of Code 2025 #AdventOfCode

@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-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

@domm@social.linux.pizza
2025-12-12 07:36:39

Today, instead of the last day of #AdventOfCode, I will finish our MAB2-to-MARC21 converter (handling depended works), which in fact feels quite similar to working on Advent of Code puzzles.

@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-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

@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-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

@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