arigato changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | mac OS and Fedora are not Windows
dddddd has quit [Remote host closed the connection]
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
Garen has quit [Read error: Connection reset by peer]
Garen has joined #pypy
forgottenone has joined #pypy
oberstet has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
Garen has quit [Read error: Connection reset by peer]
Garen has joined #pypy
_whitelogger has joined #pypy
njs has quit [Ping timeout: 245 seconds]
njs has joined #pypy
xcm has quit [Read error: Connection reset by peer]
dpn` has quit [Ping timeout: 252 seconds]
xcm has joined #pypy
dpn` has joined #pypy
<mattip> I was asked to defend why multiple calls to gc.collect() are required in PyPy
<mattip> is there a concise and convincing answer I can give?
<mattip> do we respect the 'generation' argument to gc.collect ?
<arigato> there's a very technical reason, do you want to hear it?
<arigato> it's because CPython makes strange guarantees about the order in which __del__ methods are called
<arigato> as a result, if we have an object with __del__ methods pointing to more objects with __del__ methods, we can only call the first one after a full GC, and we need to wait until the next GCs to call the other ones
<mattip> good enough, thanks
<arigato> when you write gc.collect(); gc.collect(); gc.collect() then you're actually letting __del__ methods run in the semicolons
<energizer> arigato: why three calls in particular?
<mattip> two may have been enough, I threw an extra in just to be sure
<kenaan> andrewjlawrence winmultiprocessing 86cabae0bdec /lib_pypy/: Started fixing multiprocessing tests.
<kenaan> andrewjlawrence winmultiprocessing 1e2f5638f110 /lib_pypy/: Work in progress.
darkman66 has joined #pypy
<cfbolz> We call CPython's decisions the 'there is no such thing as too much chocolate' approach to garbage collection
<cfbolz> I think at least nowadays dels are only called once per object?
<cfbolz> In CPython, I mean
<fijal> there was a proposal, I'm not sure it went through
<cfbolz> We should check and update our differences document accordingly
<fijal> to point out that "from py x.y this is different again"?
<arigato> cfbolz: I think "dels might be called only once, but not in all cases"
<cfbolz> fijal: yes
lazka has joined #pypy
<mattip> is it pep 442 https://www.python.org/dev/peps/pep-0442/ "Safe object finalization" ?
<arigato> yes
<mattip> no, not that one
<arigato> the last Note before "discussion"
<arigato> this note is worded in a way that says "everything is fine", but is actually saying "in some cases deallocators will still be called multiple times so well"
<mattip> yes, too many negative clauses cloud the problem
<cfbolz> Annoying
<arigato> and if somebody answers "but regular __del__ methods on user-defined classes will only be called once", I answer "yes, except in one case, because it is possible to make a class whose instances don't have the GC header internally"
<cfbolz> arigato: uh, how?
<arigato> class X(object): __slots__=[]
<cfbolz> Of course
<cfbolz> Way too much magic
<arigato> essential optimization!
darkman66 has quit [Quit: Leaving...]
<cfbolz> Slots are just such a sad story on all levels
lazka has quit [Remote host closed the connection]
Alex_Gaynor has quit [Ping timeout: 252 seconds]
Alex_Gaynor has joined #pypy
<mattip> EWDurbin: ping speed.pypy.org now gives codespeed.nyc1.psf.io, but https://speed.pypy.org is saying "connection refused"
<mattip> wrong channel
antocuni has joined #pypy
airwolf-irc has joined #pypy
<mattip> ok, wrote a docstring that I think captures it
<kenaan> antocuni pypy.org[extradoc] fe3ae5657a9b /source/download.txt: fix all the remaining references to 7.1 into 7.1.1
<kenaan> antocuni pypy.org[extradoc] 9a005af4146c /source/download.txt: move 3.6 before 3.5
<kenaan> antocuni pypy.org[extradoc] 5d538982b055 /download.html: regenerate
<antocuni> mattip: I noticed that the download page still referenced the old 7.1 release somewhere, I fixed it
<antocuni> I also moved the section about 3.6 before 3.5, because it was a bit confusing to see 2.7/7.1.1, 3.5/7.1.0, 3.6/7.1.1
airwolf-irc has quit [Quit: Konversation terminated!]
[Arfrever] has quit [Ping timeout: 240 seconds]
[Arfrever] has joined #pypy
<ctismer> cfbolz: yes, seemed once to be a great idea, but went too quickly into Python.
<kenaan> arigo default 628b9a8274a2 /pypy/doc/cpython_differences.rst: Document the newer CPython finalizer behaviour
<bbot2_> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4557 [Andy Lawrence: force build, winmultiprocessing]
<mattip> antocuni: thanks
<kenaan> fijal arm64 a6eddad931b2 /rpython/jit/backend/aarch64/: (fijal, arigo) ovf ops
<fijal> arigato: do you know why ARM overload after_call for VFPRegalloc
antocuni has quit [Ping timeout: 250 seconds]
mattip has quit [Quit: ZNC 1.6.6+deb1ubuntu0.1 - http://znc.in]
mattip has joined #pypy
nunatak has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
nunatak has quit [Quit: Leaving]
antocuni has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
<arigato> fijal: as far as I can tell, it would be equivalent to not override after_call but only override call_result_location
<fijal> which is what everyone does
<fijal> ok
<fijal> arigato: is there any reason why remap_frame_layout is a copy from x86 with presumably some modifications?
<arigato> remap_frame_layout is the kind of algo that needs a few changes somewhere subtle in the middle from backend to backend
dddddd has joined #pypy
Rhy0lite has joined #pypy
Ai9zO5AP has joined #pypy
alawrence has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
<antocuni> I am confused by pypy
<antocuni> consider this example: http://paste.openstack.org/show/749426/
<antocuni> if I call "foo", it tops at 198 bridges
<antocuni> if I call "bar", it tops at 498; I would expect the very same number
<antocuni> what's happening?
adamholmberg has joined #pypy
<antocuni> oh no, it's different; if I let it running for more, foo arrives at 495
<antocuni> but the question remain: why "bar" compiles bridges so quickly, while "foo" takes much more to warm up?
<fijal> arigato: ok, so I just redo that
* fijal fighting with calls
<antocuni> also, why ~500? I'd expect ~256
<antocuni> final question: if I put 16 lines "if myrandom.random(): ..." instead of 8, the total number of bridges tops out at 514, no matter how long I let it running. I'd expect it to genereate ~2**16 bridges
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
<alawrence> antocuni: Is there some magic contained within pypy?
<antocuni> alawrence: what do you mean?
<Alex_Gaynor> No magic, just sufficiently advanced technology
<alawrence> antocuni: The code has a layer of abstraction that hides a lot of complicated wizardry that goes on underneath to make it work.
<antocuni> so?
<alawrence> antocuni: I was just asking if that was the case with pypy.
<antocuni> well yes, pypy contains some complex technology which is abstracted away from the final user
<antocuni> unsure how/if it relates with my question about the number of bridges produced
<simpson> alawrence: Hm. That'd be like every compiler, though, right? We regularly (in, say, #proglangdesign) demystify compiler design, but without instruction, it can seem like parsers, optimizers, and code emitters are magic.
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
<alawrence> simpson: Yes I would expect that every compiler does this. I am not sure what a compiler would look like if it didn't employ some layer of abstraction.
<simpson> alawrence: I'm wondering what part of PyPy we can help you understand. https://rpython.readthedocs.io/en/latest/jit/overview.html might be a helpful starting point if you haven't seen it yet.
<alawrence> simpson: There was an element of tongue in cheek with my previous comments but I would be grateful to learn more about the internals of PyPy. I think it will take sometime before I understand what the jit compiler is doing exactly.
<fijal> arigato: do you feel like helping me understand the complicated logic in arm which arguments go on stack which go in registers?
<fijal> or should I ignore it and follow the aarch64 calling convention (8 regular args in registers and 8 floats)
<arigato> it's not clear to me what the two choices are
<arigato> in order to emit calls, then yes, you have to follow the existing calling convention
<fijal> yes ok
<fijal> but the current arm backend does something complicated I don't fully understand
<fijal> is there a point, or is arm (32bit) using some complicated calling convention I don't care about
<arigato> that's because the platform has a complicated convention
<arigato> it's probably easier on aarch64
<fijal> right, but aarch64 doesn't
<arigato> because on arm32 they need to care about machines without a FPU, so they need to put floats and doubles in the regular registers too
<fijal> so I should not try to read the current arm backend then?
<arigato> and there is the issue about passing longlong arguments, which don't exist on 64-bit too
<arigato> no, it's fine if you don't read that
<arigato> the calling conventions are very often made far more complicated than necessary, for no reason
alawrence has quit [Ping timeout: 256 seconds]
lritter has joined #pypy
<kenaan> rlamy optimizeopt-cleanup bfb1648a41f4 /rpython/jit/metainterp/pyjitpl.py: inline compile_loop_or_abort() and simplify
<antocuni> arigato, fijal: do you have a clue about the bridge question I posted above? I am wondering whether this is the expected behavior (but unexpected to me) or if there is possibly a bug somewhere
nopf has joined #pypy
_whitelogger_ has joined #pypy
_whitelogger has quit [Ping timeout: 240 seconds]
<mattip> fijal: could you redirect speed.pypy.org to CNAME lb.nyc1.psf.io and not what I previously said?
speeder39_ has joined #pypy
<fijal> mattip: should be done
marky1991_2 has joined #pypy
<bbot2_> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4557 [Andy Lawrence: force build, winmultiprocessing]
marky1991 has quit [Ping timeout: 246 seconds]
Ai9zO5AP has quit [Ping timeout: 246 seconds]
antocuni has quit [Ping timeout: 268 seconds]
marky1991_2 has quit [Quit: Saliendo]
marky1991 has joined #pypy
Ai9zO5AP has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
oberstet has quit [Remote host closed the connection]
antocuni has joined #pypy
moei has joined #pypy
<mattip> fijal: it works now, thanks! Next up - getting the hetzner machine to run and upload pypy benchmarks
antocuni has quit [Ping timeout: 255 seconds]
marky1991 has quit [Ping timeout: 246 seconds]
rtw_ has joined #pypy
marky1991 has joined #pypy
lritter has quit [Remote host closed the connection]
alawrence has joined #pypy
<alawrence> I am trying to debug some code that is executed in a thread an am receiving ValueError: signal only works in main thread or with __pypy__.thread.enable_signals()
<alawrence> how do I work around this or enable signals as it suggests?
<simpson> Presumably the workaround is to not call `signal` stuff from anywhere but the main thread.
<alawrence> simpson: Does that mean I cannot do - import pdb; pdb.set_trace() - inside a thread?
<simpson> alawrence: Aha! Yeah, likely not without first doing something like the enable_signals() call recommended.
rtw_ has quit [Quit: Mutter: www.mutterirc.com]
<simpson> alawrence: Oh, my mistake; it looks like that's a context manager: https://pypy.readthedocs.io/en/latest/__pypy__-module.html#extended-signal-handling
inhahe has quit [Read error: Connection reset by peer]
inhahe_ has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
speeder39_ has quit [Quit: Connection closed for inactivity]
alawrence has quit [Ping timeout: 256 seconds]
marky1991 has quit [Ping timeout: 245 seconds]
rtw_ has joined #pypy
rtw_ has quit [Client Quit]
rtw_ has joined #pypy
moei has quit [Quit: Leaving...]
adamholmberg has quit [Remote host closed the connection]
rtw_ has quit [Ping timeout: 246 seconds]
rtw_ has joined #pypy
antocuni has joined #pypy
antocuni has quit [Remote host closed the connection]
antocuni has joined #pypy
Ai9zO5AP has quit [Quit: WeeChat 2.4]
adamholmberg has joined #pypy
rtw_ has quit [Quit: Mutter: www.mutterirc.com]
Rhy0lite has quit [Quit: Leaving]
antocuni has quit [Ping timeout: 244 seconds]
adamholmberg has quit [Ping timeout: 244 seconds]