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"
rokujyouhitoma has quit [Ping timeout: 255 seconds]
rubdos has quit [Quit: WeeChat 1.9]
vkirilichev has joined #pypy
medwards has joined #pypy
<medwards>
So, I know its bad but I have some code that relies on CPython refcounting. Fortunately I am able to run collection as a workaround for now... but import gc; gc.collect() isn't calling the __del__ methods on the objects in question. Does gc.collect() not work like I think, or am I just missing something?
vkirilichev has quit [Ping timeout: 248 seconds]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
forgottenone has quit [Quit: Konversation terminated!]
<pdox>
medwards: are you defining the __del__ method on the object after the fact?
<pdox>
after object creation?
<pdox>
(do you have a short reproducer?)
cwillu has quit [Ping timeout: 246 seconds]
<medwards>
I just figured it out 5 minutes ago
<medwards>
somebody brilliantly has a dictionary in globals() where the keys are these objects with __del__
<medwards>
I hacked in a del globals()['x'] to test this and now the vast majority of objects are getting collected properly. There's a couple of outliers but my guess its the same thing, some poor use of globals or something
exarkun has quit [Ping timeout: 248 seconds]
jcea has joined #pypy
exarkun has joined #pypy
cwillu has joined #pypy
antocuni has quit [Ping timeout: 240 seconds]
ssbr has joined #pypy
cloudyplain has quit [Remote host closed the connection]
cwillu has quit [Ping timeout: 248 seconds]
vkirilichev has joined #pypy
cwillu has joined #pypy
rokujyouhitoma has joined #pypy
vkirilichev has quit [Ping timeout: 246 seconds]
rokujyouhitoma has quit [Ping timeout: 240 seconds]
cwillu has quit [Ping timeout: 248 seconds]
cwillu has joined #pypy
cwillu has quit [Ping timeout: 264 seconds]
cwillu has joined #pypy
<fijal>
medwards: it might need more than one gc.collect()
<medwards>
fijal: oh god that would be annoying but simple... lemme it give it a try but I have suspicions something weirder is happening
<fijal>
chances are :)
<fijal>
there gc.get_referrers which work on pypy
<fijal>
it's hiper-slow but good for debugging
<medwards>
fijal: so thats what I was experimenting with, after collection filter the result of gc.get_objects to just those that isinstance match what I want, then use get_referrers on the resulting list
<fijal>
cool
<medwards>
excepppppt the filtered get_objects list is empty
<medwards>
XD
<fijal>
it's a whack a mole operations
<fijal>
operation
<fijal>
medwards: for what is worth, we're contracted to add an API for doing it
<medwards>
well it was definitely not "enough" gc runs
<ronny>
Lightsword: i recall that one is not maintained by pypy core
cwillu has joined #pypy
rokujyouhitoma has joined #pypy
<kenaan>
cfbolz default e66be45f3914 /rpython/jit/metainterp/optimizeopt/: emit guard_nonnull_class in the short preamble, instead of two guards in case of remove_gctypeptr = True
cwillu has quit [Ping timeout: 248 seconds]
rokujyouhitoma has quit [Ping timeout: 240 seconds]
cwillu has joined #pypy
vkirilichev has joined #pypy
<mattip>
hi
<mattip>
Lightsword: pypy3 is still considered beta quality, so no official package yet
windy_ has joined #pypy
vkirilichev has quit [Ping timeout: 248 seconds]
<windy_>
hi folks, I ran two programs A and B on PyPy and I found that turn on PYPYLOG=jit:log would make A faster, but make B slower. Could anyone please shed some light on it?
<exarkun>
How much faster? With what confidence?
<ronan>
windy_: my guess is that PYPYLOG=jit:log does nothing and you're just seeing noise
<ronan>
arigato: is there a reason for cffi lib objects to appear in sys.modules on pypy?
<kenaan>
mattip default 4629665cda12 /pypy/module/cpyext/test/: allow running -A on pypy with no micronumpy
<Lightsword>
ronny, are there any ppa’s maintained by pypy core?
<windy_>
So my program is a loop with 1 million iterations. Without PYPYLOG it consistently runs at ~180K iterations per second. However, with PYPYLOG it consistently runs at ~220K iterations per second
<windy_>
I look at the generated log and found that the loop doesn't have any bridge I guess: TargetToken(139625152622768):998925
<Lightsword>
mattip, does it work well enough to be used in production? I just finished porting a fairly large tornado application from python 2 to python3 with asyncio, we’ve been mostly testing on cpython 3 though initially but were previously using it with pypy2 before we did the port.
<mattip>
Lightsword: the pypy core is loosely defined. AFAICT there is only the official ppa, what does google say?
<mattip>
Lightsword: As far as pypy3 in production, YMMV, it is beta quality software. If you do discover problems please let us know
<mattip>
the underlying RPython code is almost identical, although the code paths may be different
<mattip>
Lightsword: the admin of that group hangs out here as tumbleweed, I don't know really how the ppa launchpad.net/~pypy relates to the official debian packages which are available on Ubuntu as well
<tumbleweed>
mattip: how they relate is that I upload the same thing
<mattip>
so it's just a matter of available version upon doing apt-update, the "official" version in xenial is now 5.1.2, but 5.8.0 is available through the pypy ppa?
<tumbleweed>
it looks like the question was: Where is the pypy3 package. And that's in progress
rokujyouhitoma has joined #pypy
<tumbleweed>
yes, the ppa will have the most recent release. But the archive will have the pypy that was stable at the time that ubuntu release froze
<mattip>
+1, thanks
<Lightsword>
yeah, I’ve been using the ppa for pypy2 with 5.8.0 since xenial only had 5.1.2 by default
cwillu has quit [Ping timeout: 240 seconds]
<Lightsword>
but since I just ported an app to python 3 I can’t really use the ppa anymore until it gets pypy3
<LarstiQ>
you can still use the ppa, it just doesn't have a (newer) pypy3
<Lightsword>
hmm, I didn’t see pypy3 there at all
<tumbleweed>
it has *no* pypy3
<tumbleweed>
because that isn't quite working yet (but it's very close - I just haven't touched it in a couple of months)
<Lightsword>
tumbleweed, is it a packaging issue or something else?
rokujyouhitoma has quit [Ping timeout: 260 seconds]
<tumbleweed>
yes
<tumbleweed>
I haven't got the import path right yet
cwillu has joined #pypy
vkirilichev has joined #pypy
vkirilichev has quit [Ping timeout: 260 seconds]
cwillu has quit [Ping timeout: 240 seconds]
forgottenone has joined #pypy
cwillu has joined #pypy
cwillu has quit [Ping timeout: 240 seconds]
tbodt has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
<kenaan>
cfbolz regalloc-playground 96fe37156480 /rpython/jit/backend/x86/test/test_regalloc.py: test for later
<kenaan>
cfbolz regalloc-playground 494789502df8 /rpython/jit/backend/x86/: fix a bug with consta arguments
<kenaan>
cfbolz regalloc-playground 925ba08f5490 /rpython/jit/backend/x86/: fix bug for a call argument appearing twice
<kenaan>
cfbolz regalloc-playground a491c78e08f8 /rpython/jit/backend/x86/test/test_regalloc.py: convenience method in tests
<kenaan>
cfbolz regalloc-playground ec41cc35c5d8 /rpython/jit/backend/x86/: use LEA even for additions that involve the stack (that way we can move the stack argument to a regist...
<kenaan>
cfbolz regalloc-playground c5f253b5d0c1 /rpython/jit/backend/x86/: hints for call_malloc_nursery
<kenaan>
cfbolz regalloc-playground d2f37627db2e /rpython/jit/backend/x86/: extract a series of int ops from a real trace (and implement int_neg)
<kenaan>
cfbolz default ffbad4ff0842 /pypy/objspace/std/specialisedtupleobject.py: in the fast zip(intlist1, intlist2) implementation, don't wrap and unwrap all the ints
kipras is now known as kipras`away
exarkun has quit [Ping timeout: 240 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
exarkun has joined #pypy
tbodt has joined #pypy
tbodt has quit [Client Quit]
kipras`away is now known as kipras
forgottenone has joined #pypy
cwillu has quit [Ping timeout: 240 seconds]
cwillu has joined #pypy
tbodt has joined #pypy
cwillu has quit [Ping timeout: 260 seconds]
tbodt has quit [Ping timeout: 240 seconds]
tbodt has joined #pypy
tbodt has quit [Client Quit]
rokujyouhitoma has joined #pypy
tbodt has joined #pypy
cwillu has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
forgottenone has quit [Quit: Konversation terminated!]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
cwillu has quit [Ping timeout: 248 seconds]
cwillu has joined #pypy
cwillu has quit [Ping timeout: 248 seconds]
marky1991 has quit [Ping timeout: 240 seconds]
exarkun has quit [Ping timeout: 240 seconds]
exarkun has joined #pypy
marky1991 has joined #pypy
rokujyouhitoma has joined #pypy
cwillu has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
cwillu has quit [Ping timeout: 240 seconds]
yuyichao_ has joined #pypy
yuyichao has quit [Ping timeout: 248 seconds]
adamholmberg has quit [Remote host closed the connection]