Michael Bacarella
michael.bacarella.com
Michael Bacarella
@michael.bacarella.com
Founder GPShopper (successful exit)
ex-Jane Street (pre-SBF)
ex-Google (pre-Sundar)
occasional shitpoaster
cool meme but history isn’t a Marvel comic
January 5, 2026 at 1:53 AM
pfft, I'm proudest of being an American when we knock off a dictator
January 5, 2026 at 12:16 AM
Yeah, it's definitely a... choice... to require flips and rotations and a sophisticated ranking to choose the best placement to clear the 3 examples but then accept *any* heuristic for the full data.
December 13, 2025 at 5:10 AM
Most trolltacularly, this trivial fit test does *not* work on the example data but it does work on the full input!

I guess there were clues. Solving it the right way is NP-hard, but I thought a bin packing heuristic was worth trying -- which did work, just was a billion times slower.
December 12, 2025 at 10:27 PM
haha, an easter egg *without* a troll in it
December 12, 2025 at 10:13 PM
there's an easter egg alright but it's not that
December 12, 2025 at 9:29 PM
nice. I'm just happy a computational solution is possible and it's not like yesterday's where you *cannot* solve it without integer linear programming
December 12, 2025 at 1:41 AM
from r/adventofcode
December 11, 2025 at 4:36 PM
so many of us are here 🫂
December 10, 2025 at 9:38 PM
What I meant was, I first doubted using linear algebra libraries because I thought that was not what AOC wanted us to do. But then I changed my mind, because my dumb brute-force solution for part 1 took 5 minutes to run, and that probably also was not what AOC wants us to do 😅
December 10, 2025 at 9:38 PM
Very nice. I've heard of multiple people using linear equations libraries to solve this now. That was my unexplored instinct also.

My vibe of AOC is that it shouldn't take these big guns to solve the problems but hey maybe they shouldn't take 5 minutes of naive CPU brute forcing either :P
December 10, 2025 at 8:20 PM
okay I'm definitely throwing in the towel on this one. You win, AOC day 10 part 2
December 10, 2025 at 7:08 PM
well, yolo_combinations definitely doesn't work for part 2

tried switching to BFS for part 2 and that solved some problems but not all. some have way too huge a search space

this has the shape of a linear algebra problem but I can't quite make the conceptual leap 🤔
December 10, 2025 at 6:54 PM
nobody says you have to limit yourself to one CPU right?
December 10, 2025 at 5:35 PM
you know some cracked math genius will post a number theory solution for each that takes 50 micros
December 10, 2025 at 3:50 PM
ok I failed to stop thinking about this and came up with a dumb algorithm during an errand in the car

for each candidate rect from p1, walk the perimeter formed by the coordinates given in the input file. reject the rectangle if we step inside of it. it takes 54s of cpu (😱) but it works!
December 9, 2025 at 6:19 PM
the awkwardness of the separate add_circuit and join_circuits code was weighing heavily on me so I combined them. reduces runtime from 2s to 300ms!

99% of the time is now spent sorting 1000² pairs by distance and that seems fine
December 8, 2025 at 11:20 PM