thunk object space : become() quirks
Hello, Looking for a way to use pypy in any manner, I came up with an idea for a deterministic sudoku solver that would use the 'become()' feature of the thunk object space. However, this doesn't work as I expected. The following shell trace illustrates my problem. Is this a bug or otherwise ? Can anybody explain ? BTW, I am using the pypy 1.0.0 build 41438 windows binary distribution. [subquestion : is pypy-dev appropriate for such a question ?] TIA, Boris Borcic
s = lambda *x : set(x) s1 = s(1) s2 = s(2) s3 = s(3) s4 = s(4) s1,s2,s3,s4 (set([1]), set([2]), set([3]), set([4])) s1.update(s2) become(s2,s1) s3.update(s4) become(s4,s3) s1,s2,s3,s4 (set([1, 2]), set([1, 2]), set([3, 4]), set([3, 4]))
s4.update(s2) s4 set([3, 4]) ------------------> expected set([1,2,3,4]) s2 set([1, 2]) s4 is s3 True s3.update(s2) s4 set([3, 4, 2]) ------------------> expected set([1,2,3,4]) s3 set([3, 4, 2]) s1 set([1, 2]) s1 is s2 True s3.update(s1) s4 set([3, 4, 2, 1])
Hi Boris, Boris Borcic wrote:
Looking for a way to use pypy in any manner, I came up with an idea for a deterministic sudoku solver that would use the 'become()' feature of the thunk object space. However, this doesn't work as I expected. The following shell trace illustrates my problem. Is this a bug or otherwise ? Can anybody explain ?
BTW, I am using the pypy 1.0.0 build 41438 windows binary distribution.
[subquestion : is pypy-dev appropriate for such a question ?]
It's a bug, I have a clue where it is and will try to fix it. Thanks for reporting! Yes, the list is completely appropriate. Cheers, Carl Friedrich
Hi Boris, Carl Friedrich Bolz wrote:
Boris Borcic wrote:
Looking for a way to use pypy in any manner, I came up with an idea for a deterministic sudoku solver that would use the 'become()' feature of the thunk object space. However, this doesn't work as I expected. The following shell trace illustrates my problem. Is this a bug or otherwise ? Can anybody explain ?
BTW, I am using the pypy 1.0.0 build 41438 windows binary distribution.
[subquestion : is pypy-dev appropriate for such a question ?]
It's a bug, I have a clue where it is and will try to fix it. Thanks for reporting! Yes, the list is completely appropriate.
Some updates on this thing: We discussed the problem extensively on the sprint and the think is that this shows a serious problem with the way the thunk object space is done. We have no concrete clue how to solve it yet. Thunks themselves are also affected by this bug, but only in more extreme situations. I created an issue in the bug tracker for this: https://codespeak.net/issue/pypy-dev/issue332 Thanks again for reporting this – it only shows again that we should actually implement real stuff with thunks to get the bugs out of it. Cheers, Carl Friedrich
Carl Friedrich Bolz wrote:
Hi Boris,
Carl Friedrich Bolz wrote:
Boris Borcic wrote:
Looking for a way to use pypy in any manner, I came up with an idea for a deterministic sudoku solver that would use the 'become()' feature of the thunk object space. However, this doesn't work as I expected. The following shell trace illustrates my problem. Is this a bug or otherwise ? Can anybody explain ?
BTW, I am using the pypy 1.0.0 build 41438 windows binary distribution.
[subquestion : is pypy-dev appropriate for such a question ?] It's a bug, I have a clue where it is and will try to fix it. Thanks for reporting! Yes, the list is completely appropriate.
Some updates on this thing: We discussed the problem extensively on the sprint and the think is that this shows a serious problem with the way the thunk object space is done. We have no concrete clue how to solve it yet. Thunks themselves are also affected by this bug, but only in more extreme situations.
I created an issue in the bug tracker for this:
Well, I wouldn't have recognized the issue if you hadn't told me it's the same :) Thanks for the followup, glad to be of some help, sorry for the seriousness of the problem. Mmmh... I was going to ask whether it made sense for me to try implementing my algorithm idea with unification from the logic object space instead, but the (doc for the) latter seems to have vanished (while a surprise Prolog interpreter popped up, to be sure; fun stuff). Best regards, Boris
Boris Borcic wrote:
Carl Friedrich Bolz wrote:
Hi Boris,
Carl Friedrich Bolz wrote:
Boris Borcic wrote:
Looking for a way to use pypy in any manner, I came up with an idea for a deterministic sudoku solver that would use the 'become()' feature of the thunk object space. However, this doesn't work as I expected. The following shell trace illustrates my problem. Is this a bug or otherwise ? Can anybody explain ?
BTW, I am using the pypy 1.0.0 build 41438 windows binary distribution.
[subquestion : is pypy-dev appropriate for such a question ?] It's a bug, I have a clue where it is and will try to fix it. Thanks for reporting! Yes, the list is completely appropriate.
Some updates on this thing: We discussed the problem extensively on the sprint and the think is that this shows a serious problem with the way the thunk object space is done. We have no concrete clue how to solve it yet. Thunks themselves are also affected by this bug, but only in more extreme situations.
I created an issue in the bug tracker for this:
Well, I wouldn't have recognized the issue if you hadn't told me it's the same :) Thanks for the followup, glad to be of some help, sorry for the seriousness of the problem. Mmmh... I was going to ask whether it made sense for me to try implementing my algorithm idea with unification from the logic object space instead, but the (doc for the) latter seems to have vanished (while a surprise Prolog interpreter popped up, to be sure; fun stuff).
The logic object space was removed during the cleanup sprint, we couldn't maintain it. Even if it were there, it would have had the same problems as the thunk object space :-). The Prolog interpreter is there for a while, I wrote it for my Bachelor thesis. It doesn't interact with the Python interpreter yet though (which would be quite an interesting project, but I don't really have time for it right now). Cheers, Carl Friedrich
participants (2)
-
Boris Borcic
-
Carl Friedrich Bolz