cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "the modern world where network packets and compiler optimizations are effectively hostile"
<simpson>
mjacob: I'd like to transform an incoming program to continuation-passing style and then take advantage of that to use continuations instead of exceptions for non-local control flow.
<mjacob>
simpson: out of interest, how is the non-local control flow represented in the source language?
<mjacob>
simpson: my "guess" is that it's possible with continulets, but the answer to your question depends on how it is implemented
<mjacob>
simpson: that's why i'm asking these stupid questions
<mjacob>
if you point me to the relevant discussion, i might be able to say more
[0__0] has joined #pypy
<simpson>
mjacob: No, it's fair. Basically the proposal is that we rebuild a non-trivial portion of our backend to do a CPS transformation, and then we execute by repeatedly building prompts and computing to their edges, like in shift/reset for Scheme. I'm mostly interested in knowing what my options are for continuations which work with the GC and JIT.
<mjacob>
btw, what is the reason why exceptions are bad for this?
<mjacob>
this = "for implementing single-shot delimited continuations"
<simpson>
They're slow. Right now it takes about 5x as long to traverse a chain of repeated escapes compared to a chain of repeated ifs.
<mjacob>
simpson: stacklets (the underlying primitive of PyPy's continulets) are 'the generic RPython-level building block for "one-shot continuations"' (quote from the documentation), so these are the obvious candidates to implement what you want
<mjacob>
simpson: it doesn't really answer your question, but i would recommend to try that route first
<LarstiQ>
njs: some of the problems there came from interacting with non-transactional code, which I think should be easier on pypy due to starting from the gil?
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
exarkun has quit [Ping timeout: 255 seconds]
exarkun has joined #pypy
<kenaan>
mattip default dcea72970920 /pypy/module/cpyext/: test, fix calling unbound object method with no args like np.int32.__array__()
dmalcolm has quit [Ping timeout: 255 seconds]
ronan has joined #pypy
dmalcolm has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
nimaje1 has joined #pypy
nimaje1 is now known as nimaje
nimaje has quit [Killed (wilhelm.freenode.net (Nickname regained by services))]
jcea has joined #pypy
oberstet has joined #pypy
<kenaan>
fijal default 1a9ef5428d4e /rpython/tool/version.py: warn only if mercurial explodes
<kenaan>
fijal default e3868e494742 /: merge
<kenaan>
fijal default 85d7ced5c2a8 /rpython/tool/version.py: more of the same
ronan has quit [Ping timeout: 240 seconds]
marky1991 has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
<Remi_M>
LarstiQ: Indeed, as long as we don't introduce atomic blocks and only use STM to replace the GIL, we don't have most of the problems mentioned in that article. But we did experiments with atomic blocks and there we did encounter some of the same issues.
<LarstiQ>
Remi_M: I still need to finish the article you linked to me too