ex-Jane Street (pre-SBF)
ex-Google (pre-Sundar)
occasional shitpoaster
**SPOILERS**
This ended up being a troll problem. You could get to work like a sap, do some best-fit bin packing heuristic and it'll take 1000 CPU minutes (✋)
Or you can ignore geometry entirely and pick trees whose area >= max-present-size * number-of-presents 🤦♂️
**SPOILERS**
This ended up being a troll problem. You could get to work like a sap, do some best-fit bin packing heuristic and it'll take 1000 CPU minutes (✋)
Or you can ignore geometry entirely and pick trees whose area >= max-present-size * number-of-presents 🤦♂️
A welcome reprieve from yesterday. Today's solution can be solved quickly with "merely" coding interview level DFS graph search with memoization.
A welcome reprieve from yesterday. Today's solution can be solved quickly with "merely" coding interview level DFS graph search with memoization.
You know it's getting grim when people are posting just their part 1 solutions. Took about 4 minutes of CPU to brute force.
I'm sure someone has a cute number theory solution on r/adventofcode that takes 1ms for the whole thing.
You know it's getting grim when people are posting just their part 1 solutions. Took about 4 minutes of CPU to brute force.
I'm sure someone has a cute number theory solution on r/adventofcode that takes 1ms for the whole thing.
These are starting to take too long to solve! 😅
Part 1 done (after a fun misstep trying to allocate a 100M element array...) Part 2 seems... non-trivial. Might have to throw in the towel so I can do, like, other stuff today.
These are starting to take too long to solve! 😅
Part 1 done (after a fun misstep trying to allocate a 100M element array...) Part 2 seems... non-trivial. Might have to throw in the towel so I can do, like, other stuff today.
By far the hardest yet. Both in terms of time to code but also it pegged my CPU for about 2 seconds to compute the answer 😱
By far the hardest yet. Both in terms of time to code but also it pegged my CPU for about 2 seconds to compute the answer 😱
This one threw me for a bit but once I drew the path finding out on paper and stared at it for ... uhm, 40 minutes I got it.
Even though this is mostly imperative, I contend you still have edge using OCaml when it comes to understanding state machine transitions.
This one threw me for a bit but once I drew the path finding out on paper and stared at it for ... uhm, 40 minutes I got it.
Even though this is mostly imperative, I contend you still have edge using OCaml when it comes to understanding state machine transitions.
This one was quite mind numbing. It reminds me of processing those nasty "grid oriented" EDI order/sales formats that were popular as late as the 1990s
I'm sure COBOL programmers would feel right at home with this one.
This one was quite mind numbing. It reminds me of processing those nasty "grid oriented" EDI order/sales formats that were popular as late as the 1990s
I'm sure COBOL programmers would feel right at home with this one.
Whew. Getting the details right on this one took forever. Happy that the naive brute force solution (just construct a set in memory of the ingredients) couldn't be done and it required a bit more thinking.
Whew. Getting the details right on this one took forever. Happy that the naive brute force solution (just construct a set in memory of the ingredients) couldn't be done and it required a bit more thinking.
wasted about 20 minutes trying to understand what "eight adjacent positions" meant, squinting at only the row instead of realizing it meant also the cells above and below of course
wasted about 20 minutes trying to understand what "eight adjacent positions" meant, squinting at only the row instead of realizing it meant also the cells above and below of course
Pleasantly, part 1 and part 2 have similar enough algorithms that you can get away with tweaking only one variable (digits_needed).
github.com/mbacarella/o...
Pleasantly, part 1 and part 2 have similar enough algorithms that you can get away with tweaking only one variable (digits_needed).
github.com/mbacarella/o...
Spent about an extra hour spinning my wheels because I skimmed the requirements and I kneejerk thought it wanted the part 2 style digits scheme. Which it does, but that doesn't get you past part 1!
All solutions here github.com/mbacarella/ocaml-aoc2025
Spent about an extra hour spinning my wheels because I skimmed the requirements and I kneejerk thought it wanted the part 2 style digits scheme. Which it does, but that doesn't get you past part 1!
All solutions here github.com/mbacarella/ocaml-aoc2025
let v = B (3, 4)
(* Shiva: dissolving form *)
match v with
| B (x, y) -> x + y
let v = B (3, 4)
(* Shiva: dissolving form *)
match v with
| B (x, y) -> x + y
any sufficiently complicated description of an implementation by a Turing-machinist will eventually lapse into a half-coherent rediscovery of lambda-calculus
any sufficiently complicated description of an implementation by a Turing-machinist will eventually lapse into a half-coherent rediscovery of lambda-calculus
1. pick favorite obscure programming language
2. build a really simple app, like a web photo album
3. find that the ecosystem libraries are missing tons of mundane features
4. submit PRs for all of these features
useful? kinda. looks impressive? sure
1. pick favorite obscure programming language
2. build a really simple app, like a web photo album
3. find that the ecosystem libraries are missing tons of mundane features
4. submit PRs for all of these features
useful? kinda. looks impressive? sure
if Bill Gates was still running Microsoft he would have invited Gabe Newell into a smoke filled room and given him the speech from Network
if Bill Gates was still running Microsoft he would have invited Gabe Newell into a smoke filled room and given him the speech from Network
you may as well be writing fortran
you may as well be writing fortran
Your own flesh and blood, wearing that shirt under your roof. This is what happens when you let the universities get to them.
Your own flesh and blood, wearing that shirt under your roof. This is what happens when you let the universities get to them.