Solving a Wooden Puzzle Using Haskell
Posted4 months agoActive3 months ago
glocq.github.ioTechstory
calmpositive
Debate
20/100
HaskellPuzzle SolvingAlgorithm Design
Key topics
Haskell
Puzzle Solving
Algorithm Design
The post describes using Haskell to solve a 3D wooden puzzle, sparking a discussion on various approaches to solving similar puzzles and sharing related experiences.
Snapshot generated from the HN discussion
Discussion Activity
Active discussionFirst comment
3h
Peak period
17
84-96h
Avg / period
4.8
Comment distribution29 data points
Loading chart...
Based on 29 loaded comments
Key moments
- 01Story posted
Sep 17, 2025 at 1:22 AM EDT
4 months ago
Step 01 - 02First comment
Sep 17, 2025 at 4:44 AM EDT
3h after posting
Step 02 - 03Peak activity
17 comments in 84-96h
Hottest window of the conversation
Step 03 - 04Latest activity
Sep 22, 2025 at 4:50 PM EDT
3 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45272022Type: storyLast synced: 11/20/2025, 1:26:54 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
[1]: https://arxiv.org/abs/cs/0011047
I used a poor man's version to solve a puzzle where one arranges polymino pieces on a grid spelling out the date [1]. No pointers, just keeping track of deleted rows and columns in the recursion.
It is not at all obvious that all 366 days can be solved. To my dismay all of them can be solved in multiple ways - as a human I find some days quite tricky.
[1] https://metterklume.github.io/puzzle/2024/12/24/calendar-puz...
https://linsoluble-casse-tete.fr/products/25-y-constantin
I wonder if I can still find the source code. (Found it! Source code was in French and not very elegant but it works, glorified brute force aka Backtracking).
I'm eager to improve it to find ALL solutions, not just the first one.
https://ache.one/polycube.cpp
It seems you are fluent in Franglais - https://en.wikipedia.org/wiki/Franglais. I have only respect for someone who can flit between languages with that facility.
I wish it was code-switching but the true may be that my english wasn't very good.
I learn yesterday that a French spy DGSE (French NSA) was spotted by the Canadian after exactly this kind of english errors (and other hints like the use of "octet" instead of "byte" and compiled with french local).
I find it fascinating how you slam words together - who cares about "correct"? Is there really a correct way to program in C++, in both French and a nod to English? In the end if it compiles and works - who cares!
Viva la Franglais++
However, I am aware that for some people, it can be annoying when someone else (me in this case) is seemingly lazy or just plain wrong when deploying words.
I used to be somewhat unkind about grammatical errors but let's face it: grammar is what the majority of people say it is and not what is pinned down in a book half-read and quarter-remembered from years ago.
A bit is perhaps the smallest addressable unit of storage (says my light switch) A byte manages to convey 256 different states and I would need eight light switches to store them.
The definition of byte is not a matter of grammar, and here on a forum centered about computing technology and business the distinction that matters not to you matters to many - CHAR_BIT is still part of current standards in important languages and hardware w/out 8-bit bytes is still in current use.
It's "vive", not "viva", in French, and "français" and "anglais" are both masculine, so "franglais" is masculine as well (so it would use "le" as an article).
You'll probably be more likely to hear "viva los Frenchies" from Brits confusing Spanish with French. To us Germanics, you Romantics sound all the same ... or something 8)
The 10 paragraph blog post is the “hard” part: explaining to others who don’t have the same base knowledge.
If I read it correctly, they do even less human-powered work than your solution. It just looks hard because the machinery is unfamiliar.
IIRC it kept a list of board states, updated the list of board states by taking each one and applying possible moves, then removed congruencies or any state that did not have a valid next move.
The pattern seems similar to your approach that deals with rotations, though in 3D
Being able to solve starting from various constraints have turned out really useful for building an intuition for the puzzle.