February went by in a blink! I barely had any time for myself this month between work, a pregnant wife, and my 2-year-old being in the “I want papa only” phase. These days, the first thing I do in the morning is play Lego. It beats doomscrolling, but at 7 a.m. and before my coffee, it’s tough to be creative. Here’s an elephant I made this morning—the trunk moves.
I’ve also rewritten a big part of the backend of Prosettr.com. In a HackerNews thread about Donald Knuth (Donald Knuth’s 2024 Christmas Lecture: Strong and Weak Components), I learned there was an improvement to the algorithm that my app is based on, Dancing Links. I’m not going to go into much detail here (maybe in a future post), but I procured The Art of Computer Programming Volume 4B, and indeed, the improved version uses half the memory, with each option’s items having only up and down links, and no left and right links—those being replaced by a “spacer” node. Here’s my original implementation in Go I made while following the chapter: /backtrack_aocp/main.go. Then I replaced the previous implementation with this one, with some added optimizations (support for secondary columns, using channels instead of an input matrix, another channel to output the solutions, etc.).
...