24 ms·
You should certainly check out the code. It's very ... cute.
by pschanely 11y ago
You should certainly check out the code. It's very ... cute.
- nudpiedo 11y agoI couldn't resist to take a fast look online... and yes, it's very pragmatic. Even I would say funny/elegant, just expensive. HOWEVER simple and easy solutions often are better, so based on the same simple idea the same experiment could be reimplemented with green threads and separate/cloned python environments in order to ensure that there is no shared memory. In my opinion it is still a genius work, just missing compiler support for such construct.
- humbledrone 11y agoIf you find this kind of thing interesting, there is actually a branch of computer science called "logic programming" that is very similar, but actually useful for practical applications (as it's not a joke). A really simple example would be something like logpy [1]. You give it a set of variables, and a set of constraints, and it will try to efficiently solve for values that meet all the constraints. A more professional-grade logic solver might be Clojure's core.logic [2], which has been used in many real-world applications. Compare the core.logic Sudoku solver [3] with the quantum version. They are similar, in that they each set the constraints for a solved board, but core.logic is vastly, vastly more efficient. [1] https://github.com/logpy/logpy https://github.com/logpy/logpy [2] https://github.com/swannodette/logic-tutorial https://github.com/swannodette/logic-tutorial [3] https://gist.github.com/swannodette/3217582 https://gist.github.com/swannodette/3217582