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.
Related Posts
I'm not a fan of the mastodon web UI behaviour where moving down with cursor keys 'snaps' to the next toot.
Is it possible to disable this, so my cursor keys always move the page by a consistent visual amount?
I've poked in the settings and didn't see anything obvious.
One interesting design choice in Emacs that I haven't seen in other editors: reserved shortcuts.
An Emacs extension shouldn't use F5 through F12, or Ctrl-c LETTER. This lets users configure their own shortcuts. https://www.gnu.org/software/emacs/manual/html_node/emacs/Key-Bindings.html
Does it exist elsewhere? I miss it in VS Code, where e.g. all the Fn keys are already assigned.
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.