#krishnamurti
#meditation
#day8
#life
#phylosophy
Day 8 marks the 5th appearance of this whisky in an advent calendar for me: Glenfiddich's Gran Reserva 21 year old single malt at 40% ABV. Tastes just as I remember: fruitcake in a glass with an oaken finish.
Yet Another Busy Night (a wake, the FrizzLit Moby Dick Book Club, other projects), so this is just the dram framed up on top of last night's project, a map from Edgar Rice Burroughs I'm redrawing to use as endpapers for bookbinding.
#AdventOfCode #Day8 with #rust
I spent an inordinate amount of time on part1 because
* imo the problem definition is wrong
* it does matter if you put permutations or combinations in the list, even if you filter them out :(
Part 2 is basically the same and I already did it in ruby so I'm not doing it again, at least not today.
I wanted to do this with union-find but I have yet to get to the chapter about generics and it seems cheating to do it without it :)
https://gist.github.com/riffraff/267f1e326e447815ab0ac28f217bc01f
Now that's what I call Advent of Code! I'm happy with the algorithm for the most part. I'm sure it could be improved, but I paired up all boxes and pushed them into a BinaryHeap based on their squared distances, then popped the number based on the number of connections to consider (1000 for the real input). These I pushed into a set of "network" HashSets. This is the part I'm least happy with. I iterate the vector of networks to match each point to a network, and if they're both in a network, I extend the earlier one from the later and remove the later. I considered a lot of ways to improve this, but couldn't come up with one that wouldn't be either buggy or inefficient. I'll probably look at the Reddit solutions thread to see how other people tackled it.
Part 2 was really similar in execution to part 1, but continuing until all points were in a network and there was only one network, and keeping track of the last pair added.
Whew, this one was just the right amount of challenging and fun. Most of the days were pretty easy before today's. Now all we're missing is a nice A* problem.
#AdventOfCode #AdventOfCode2025 #AdventOfCode2025Day8 #AdventOfCode2025Day08 #Day8 #Day08 #Rust #RustLang #Programming #CodingChallenges
#30DayAlbumCoverChallenge
#Day8 Álbum que tenga un animal en él
#APerfectCircle #ThirteenStep #ElTerceroQueSeMeHaVenidoALaCabeza #MeDaAsqueteLaPortadaPeroEsUnBuenDisco