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
Advent of OCaml, day 12 👹

**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 🤦‍♂️
December 12, 2025 at 10:25 PM
All hail the shape rotators!
December 12, 2025 at 3:53 PM
Advent of OCaml, day 11, solved! 😼

A welcome reprieve from yesterday. Today's solution can be solved quickly with "merely" coding interview level DFS graph search with memoization.
December 11, 2025 at 4:15 PM
Advent of OCaml, day 10, part 1 😩

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.
December 10, 2025 at 4:23 PM
Advent of OCaml, day 9

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.
December 9, 2025 at 3:53 PM
Advent of OCaml. day 8

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 😱
December 8, 2025 at 6:24 PM
Advent of OCaml, day 7, solved 🥵

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.
December 7, 2025 at 6:12 PM
Advent of OCaml, day 6, done (🙀)

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.
December 6, 2025 at 5:56 PM
Advent of OCaml, day 5 done

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.
December 5, 2025 at 4:47 PM
Advent of OCaml, day 4, solved

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
December 4, 2025 at 5:40 PM
Advent of OCaml day 3 solution: donezo

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...
December 3, 2025 at 4:32 PM
Advent of OCaml day 2 solution in the bank!

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
December 2, 2025 at 8:23 PM
(* Vishnu: creating form *)
let v = B (3, 4)

(* Shiva: dissolving form *)
match v with
| B (x, y) -> x + y
November 24, 2025 at 11:31 PM
(with apologies to Philip Greenspun)

any sufficiently complicated description of an implementation by a Turing-machinist will eventually lapse into a half-coherent rediscovery of lambda-calculus
November 14, 2025 at 5:23 PM
I had this stress dream last night where we were trying to catch a flight and when we got to the security line it turned out the tickets I printed out just had a big database connection error message printed on them. And attempting to install the app failed because I can't see my screen in dreams.
October 30, 2025 at 4:41 PM
how to power up your github contributor graph

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
October 11, 2025 at 6:26 PM
how did Valve get away with making games on Linux work reliably?

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
August 1, 2025 at 3:34 PM
July 1, 2025 at 1:48 AM
it's straight up elder abuse that Chrome force uninstalled uBlock Origin on laptops that their grandkids set up for them
June 27, 2025 at 3:13 PM
the brutality of 3d graphics programming is that you're mostly dealing with arrays full of floats all day and 30 years of software engineering discipline just passes you by because there's not that much that helps with that

you may as well be writing fortran
June 27, 2025 at 12:56 AM
yo what was hypercard? did it run on mainframes or something?
June 8, 2025 at 8:42 PM
Your kid comes back from his first semester of CS101. First it was Python, you let that slide. Then came Go. "At least it compiles" you told yourself. But now... C++?

Your own flesh and blood, wearing that shirt under your roof. This is what happens when you let the universities get to them.
June 6, 2025 at 5:13 PM
May 17, 2025 at 12:06 AM
if the net result of an earthquake destroying TSMC/Taiwan is that every LLM gets repurposed towards rewriting Java, C#, Python and Javascript into C++ or Rust ASAP, that'd be pretty cool
May 13, 2025 at 2:03 PM
I really thought the hardest part of small electronics fabrication would be understanding EE and soldering stuff but it really feels like it's 90% staring at enclosures wondering how you can fit everything together and/or if you should 3d print some stuff
May 11, 2025 at 6:12 PM