Heath
banner
heathhenley.dev
Heath
@heathhenley.dev
Señor Application Engineer at a 10 person sonar shop. Former ChE, now generalist dev. Puzzles, building random stuff, hiking, climbing, learning, bad jokes and good beer.

Writing about things here: https://heathhenley.dev
thanks! I was stuck for a while trying to do something similar but had to give up and try it a different way
December 6, 2025 at 11:43 PM
Joking aside - congrats!
December 6, 2025 at 6:43 PM
I've completed "Trash Compactor" - Day 6 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/6

I didn't see part 2 coming and thought it was a really creative one, I guess the extra spaces in the input should have been a clue...

The ocaml 🐫(not prettified): github.com/heathhenley/...
Day 6 - Advent of Code 2025
adventofcode.com
December 6, 2025 at 3:31 PM
Day 1 ocaml rewrite! lol
December 6, 2025 at 3:24 PM
I had a similar merge to you - I agree the stack is definitely easier to grok... I feel that way about a lot of the problems where a 'work queue' approach makes sense. Even the rolls one, I wanted to be able to enqueue any that became "accessible" when a cell was flipped, but I did passes instead
December 5, 2025 at 9:02 PM
This one was similar to one two years (?) ago so I had the idea right away but it was still fun!

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

github.com/heathhenley/...
December 5, 2025 at 2:18 PM
Also didn't know you could do that with the modules in () to call functions on the same module 🤯

eg
List.(init 12 (fun _ -> 1) |> fold_left (+) 0);;
December 4, 2025 at 1:53 PM
That is elegant, your solutions are great - first time I've seen ocamlex this too
December 4, 2025 at 1:46 PM
December 4, 2025 at 1:43 PM
Another one in ocaml - I'm sensing more grid problems in our future... surprised it took this long 😄

Here's my solution: github.com/heathhenley/...

I also refactored day2 to use math - but correctly this time, WAY faster of course. No way I would have come up with that solution though
December 4, 2025 at 1:43 PM
Originally used brute force for part (I had a "combinations" function from previous year) and then greedy for part 2 - switched both to greedy - it's not pretty

github.com/heathhenley/...
December 3, 2025 at 1:53 PM
Nice! I also rewrote day 2 to try the math approach after seeing it on Reddit. Using a regex for part was still faster for me for part 2, part 1 faster with math - but I didn’t try to optimize, doing a lot of casting 🤷‍♂️

github.com/heathhenley/...
December 3, 2025 at 7:12 AM
December 2, 2025 at 6:43 AM
Same I had a lot of bugs where it was working on the sample and not the big input - thankfully in mine at least the rotations were not crazy huge so it wasn’t too bad to debug with the main input.

I like your type set up! I was lazy about that this time 😂
December 1, 2025 at 12:25 PM
December 1, 2025 at 6:49 AM