https://futureofcoding.org/ logo
Title
n

Nils Berg

12/17/2022, 12:27 PM
Advent of Code Day 16:
Clerk evaluated '2022-16.clj' in 1.1024717767137E7ms.
I know there’s a smarter solution, and I came close, but at 4am in the morning, leaving my laptop running as I go to sleep was the reasonable thing to do 😅
Finally managed to go back and solve this sort of elegantly. One thing I haven’t figured out in Clojure / functional languages in general is how to indicate progress in recursive processes. In this case, I would have loved an indicator for the current depth down the tree that I’m breadth-first-searching through. I think atoms could help there - in C++, I’d reach for something like
std::atomic
, so that makes sense 🤔