cfbolz changed the topic of #pypy to: #pypy PyPy, the flexible snake https://pypy.org | IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end and https://libera.irclog.whitequark.org/pypy | the pypy angle is to shrug and copy the implementation of CPython as closely as possible, and staying out of design decisions
jcea has quit [Ping timeout: 246 seconds]
jinsun has joined #pypy
Dejan has joined #pypy
jcea has joined #pypy
slav0nic has joined #pypy
slav0nic has quit [Remote host closed the connection]
slav0nic has joined #pypy
slav0nic has quit [Remote host closed the connection]
slav0nic has joined #pypy
<graingert> this was a bit of a head scratcher
<graingert> this terminates on pypy2.7 and pypy3.10 but loops forever on cpython3.10 https://www.irccloud.com/pastebin/11FrLMyJ/demo.py
<graingert> same if you use keyword arguments: other(a=A())
<cfbolz> graingert: in cpy main keeps the *args tuple alive?
<graingert> python3.11 introduced the "move" behaviour for some function cals
<graingert> calls*
<graingert> but pypy already has move for kwargs or *(expr, )
<graingert> also the behaviour is different when run with the built pypy and the rpython pypy
<cfbolz> graingert: yeah, that's a little bit to be expected. some slightly weird things are going on in the non-translated emulated mode
<cfbolz> graingert: you mean before translation?
<graingert> Yes
<cfbolz> yeah, that makes sense
<graingert> The clue was when I fixed the zpickle tests
<graingert> Clearly there's some branches where dropvalues doesn't need to be called it the function started being called
<cfbolz> graingert: I'm quite warming to this effort, fwiw. at first I thought that your changes wouldn't matter for the JIT too much. but I've now convinced myself that even if peak perf stays the same, warmup time should be slightly improved (might not be measurable, but still)
<graingert> I'm trying to work out what's up with this
jinsun has quit [Ping timeout: 260 seconds]
<graingert> I'm assuming it's something up with gateway but I don't know how rpython object lifetimes work
<cfbolz> graingert: the first send is to start the generator, right?
<graingert> Yes
<cfbolz> interesting. how does cpython do?
<graingert> I suspect whatever the fix is will fix the wired tuple in gc.get_referrers
<graingert> Weird*
<graingert> cpython3.11 12 and main hangs
<cfbolz> ok
<cfbolz> are you filing cpy bugs about some of these too, btw?
<graingert> Well maybe
<cfbolz> was mainly curious
<graingert> Needs everyone to agree what python is first
<graingert> But everyone got bogged down in garbage collector differences
<graingert> It's not about the GC it's about reachability
<graingert> And I think reachability should be the same on all python implementations
<LarstiQ> cfbolz: was that "warming to this effort" a warmup pun? :)
<cfbolz> graingert: I'm sure there is a strong argument for why all of this is implementation defined. but I also think it's very useful to not be too horrible about it
<cfbolz> LarstiQ: only accidentally
<graingert> One interesting problem is it's hard to implement a function and maintain lsp
<graingert> class A:
<graingert> One moment
<graingert> B().method keeps it's argument alive
<graingert> All a bit hairy really
<graingert> Is there a way to find out why an object is still alive when running a translated pypy-c?
Dejan has quit [Quit: Leaving]
<cfbolz> graingert: not easily. one problem is that the rpython object graph has a lot of intermediate objects that aren't really valid python objects. we have an api exposed to introspect those a bit from python anyway, but you don't get a lot of interesting information out of them
<cfbolz> that could be fixed, but it would be quite a bit of work I think
<cfbolz> graingert: ah
<cfbolz> how did you find it? unfortunately it's pretty hard to get rid of, I think
<graingert> Manually reading the code cfbolz
<cfbolz> right :-\
<graingert> I think it's a case of moving all the DescrMismatch processing into the behavior
<graingert> Bit of a pain, but it's the same behavior as cpython so maybe not so much of a problem
<cfbolz> that's a lot of changes at once. let's maybe finalize the call_valuestack change first
<graingert> Yeah I think so
<graingert> Why doesn't the finally: frame.dropvalues(args + 2) get run when using interp_pickle?
<graingert> Also can one run the zpickle tests without using cpython2.7? Eg what happens if you can't get cpython2.7 to run anymore?
slav0nic has quit [Ping timeout: 264 seconds]