Elegant demo of SAT solvers: take a list of locks and which keys should unlock the (e.g. master keys unlock multiple), plus a set of manufacturing constraints.
Feed it to a solver and calculate how to cut all the keys! https://codingnest.com/modern-sat-solvers-fast-neat-and-underused-part-2-of-n/
A real industry usecase of SAT.
miniblog.
Related Posts
It feels like a mature software project is one where bugs require multiple commits to fix.
You've hammered out the basic issues, so the remaining issues are often weird interactions between components.
It took me way too long to realise that Arc<Mutex<T>> is basically a way to create multiple &mut T references (with runtime constraints).
This means that you can use plain &T and &mut T in the vast majority of your code. Most code doesn't need to care there's a mutex.
It is remarkably hard to escape command line arguments safely on Windows, and the standard libraries of multiple languages have needed patching:
