4 ms·
I find it awesome! I've never seen something like that. I would like to know more details about this kind of programming (does it have to do with loud programmi
by nudpiedo 11y ago
I find it awesome! I've never seen something like that.
I would like to know more details about this kind of programming (does it have to do with loud programming?) and to know whether is possible to use for real life problem solving without abusing it.
I will check out later the code
- pschanely 11y agoYou 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
- pmalynin 11y agoWell, this is sort of similar to how Prolog solves things, you can assert that, for example, the length of list is 6 and magically your input will be of length 6.