News for hackers. Stuff that matters.
Re:Show HN: Quantum suicide in Python by pschanely on Tuesday March 22, 2016 @04:18AM (#11335059)
You should certainly check out the code. It's very ... cute.
Re:Show HN: Quantum suicide in Python by nudpiedo on Tuesday March 22, 2016 @05:45AM (#11335381)
I 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.

Re:Show HN: Quantum suicide in Python by humbledrone on Thursday March 24, 2016 @03:08AM (#11351103)
If 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 [2] https://github.com/swannodette/logic-tutorial [3] https://gist.github.com/swannodette/3217582