cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | the secret reason for us trying to get PyPy users: to test the JIT well enough that we're somewhat confident about it
Kipras_ has quit [Read error: Connection reset by peer]
Kipras_ has joined #pypy
kandinsk1 has joined #pypy
kandinski has quit [Remote host closed the connection]
Kipras_ has quit [Read error: Connection reset by peer]
Punisha has joined #pypy
kandinsk1 is now known as kandinski
Punisha has left #pypy [#pypy]
antocuni has quit [Ping timeout: 268 seconds]
Khayman has joined #pypy
TheAdversary has quit [Disconnected by services]
Hasimir has quit [Ping timeout: 246 seconds]
Khayman is now known as Hasimir
TheAdversary has joined #pypy
igitoor has quit [Ping timeout: 252 seconds]
igitoor has joined #pypy
igitoor has quit [Changing host]
igitoor has joined #pypy
awkwardpenguin has quit [Ping timeout: 252 seconds]
awkwardpenguin has joined #pypy
jcea has quit [Quit: jcea]
awkwardpenguin has quit [Ping timeout: 252 seconds]
awkwardpenguin has joined #pypy
_whitelogger has joined #pypy
awkwardpenguin has quit [Ping timeout: 245 seconds]
awkwardpenguin has joined #pypy
awkwardpenguin has quit [Ping timeout: 250 seconds]
awkwardpenguin has joined #pypy
Punisha has joined #pypy
Punisha has left #pypy [#pypy]
awkwardpenguin has quit [Ping timeout: 246 seconds]
awkwardpenguin has joined #pypy
awkwardpenguin has quit [Ping timeout: 252 seconds]
awkwardpenguin has joined #pypy
awkwardpenguin has quit [Ping timeout: 268 seconds]
tayfun26 has joined #pypy
tayfun26 has quit [Client Quit]
Punisha has joined #pypy
awkwardpenguin has joined #pypy
awkwardpenguin has quit [Ping timeout: 252 seconds]
awkwardpenguin has joined #pypy
awkwardpenguin has quit [Remote host closed the connection]
witrandev has joined #pypy
arigato has joined #pypy
arigato has quit [Quit: Leaving]
realitix has joined #pypy
_whitelogger has joined #pypy
mitsuhiko_ has left #pypy [#pypy]
dddddd has joined #pypy
<kenaan>
arigo cffi/cffi f2522654c2b5 /cffi/cparser.py: #389 Warn when using string literals in the cdef() source
Punisha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jcea has joined #pypy
Zaab1t has joined #pypy
realitix has quit [Quit: realitix]
realitix has joined #pypy
realitix has quit [Client Quit]
realitix has joined #pypy
marky1991_2 has joined #pypy
marky1991_2 has quit [Read error: Connection reset by peer]
marky1991_2 has joined #pypy
marky1991_2 has quit [Remote host closed the connection]
marky1991_2 has joined #pypy
witrandev has quit [Ping timeout: 256 seconds]
marky1991_2 has quit [Quit: Saliendo]
marky1991 has joined #pypy
adamholmberg has joined #pypy
antocuni has joined #pypy
Rhy0lite has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
TheAdversary has quit [Ping timeout: 260 seconds]
Hasimir has quit [Ping timeout: 252 seconds]
Hasimir has joined #pypy
TheAdversary has joined #pypy
inad922 has joined #pypy
<_aegis_>
if I have a global like DEBUG = False will pypy optimize out branches that depend on it?
<_aegis_>
if not is there a good way to put debug statements in performance critical code without a bunch of branching?
<Alex_Gaynor>
it'll be 1 or 2 instructions, but broadly yes
<Alex_Gaynor>
it's a memory load and a well predicted branch; probably not meaningful impact on throughput
<antocuni>
Alex_Gaynor: don't module dicts emit out of line guards?
<cfbolz>
Yes, I think they do
<Alex_Gaynor>
Mmm, this code has changed a lot since I looked at it
<antocuni>
so an "if DEBUG:" should be optimized away entirely, I think
<cfbolz>
Unless you change the value at runtime
Zaab1t has quit [Ping timeout: 260 seconds]
lritter has joined #pypy
awkwardpenguin has joined #pypy
Sonderblade has joined #pypy
Punisha has joined #pypy
<Sonderblade>
how come some python code gives completely different results when run in python vs pypy?
<Sonderblade>
is it expected?
<Alex_Gaynor>
Not generally, no. There's a handful of compatibility differences, but for normal code, it's a bug https://pypy.org/compat.html
inad922 has quit [Ping timeout: 245 seconds]
<Sonderblade>
can there be some caching stuff so that python and pypy interfere with each other?
<Sonderblade>
it's pypy 3.5.3 vs python 3.7.0
inad922 has joined #pypy
<toaderas>
Hello everyone
lxnt has joined #pypy
<toaderas>
Are there any statistics of the performance improvement gains of pypy as further development takes place ?
<mattip>
Sonderblade: there should be no cross-caching. PyPy and CPython should be using unique lib and site-packages paths
<mattip>
toaderas: we have speed.pypy.org, but we haven;t updated it in a while
<lxnt>
Hello. Was anyone translating pypy3 under mingw/msys? After patching this and that to make all the platcheks run I get
<lxnt>
[translation:ERROR] OpErrFmtNoArgs: [<W_TypeObject 'OverflowError' at 0x4a46b30>
<lxnt>
unsigned int')])]
<lxnt>
: W_BaseExceptionUserWeakrefable([W_UnicodeObject(u'int too large to convert to
<lxnt>
what does that even mean?
<lxnt>
(that's pypy2-6.0.0 translating pypy3-6.0.0, gcc is 7.3.0)
<lxnt>
(all 32-bit of course)
realitix has quit [Quit: realitix]
<Sonderblade>
mattip: then i must indeed have run into a bug
<simpson>
Sonderblade: Do you have a reproducible test case that you can share?
<Sonderblade>
kind of.. but the problem disappears when you try to isolate it
<mattip>
lxnt: no, not really.
<mattip>
lxnt: that error should also indicate where the error occurred, it means we need to wrap a value with widen(value)
<lxnt>
mattip: there were also warnings from platcheck84 : https://pastebin.com/VYeCsz9w for various HKEY_whatever constants. Can this be related?
<mattip>
when you get the debugging prompt, you should be able to `up` to a trace with a `graph` in local varaibles, that is the function being translated
<Sonderblade>
without the assert, h gets set to 1, with the assert it gets set to 19
<ronan>
lxnt: what's self.locals_cells_stack_w?
* Sonderblade
waits for someone to say that the code triggers ub anyway :)
<mattip>
Sonderblade: what happens when you run with `--jit off` ?
<Sonderblade>
then it works
<lxnt>
(Pdb+) p self.locals_cell_stack_w
<lxnt>
locals_cell_stack_w'",)
<lxnt>
*** AttributeError: AttributeError("'StdObjSpaceFrame' object has no attribute '
<ronan>
lxnt: sorry, self.locals_cells_stack_w
<Sonderblade>
perhaps that is why my isolated test case didn't fail? then the code is only run once so it's never jitted
<lxnt>
(Pdb+) p self.locals_cells_stack_w
<lxnt>
e, None]
<lxnt>
[W_UnicodeObject(u'_collections'), <Function _gcd_import>, None, None, None, Non
forgottenone has joined #pypy
<lxnt>
mattip: with -O2 it's the same error
<ronan>
lxnt: so I guess it's failing while importing _collections_abc
<lxnt>
mattip or I don't understand what do you mean by --jit off
<lxnt>
ronan: well, what do I do about it? fix warnings/retry?
<ronan>
lxnt: the exception is probably raised from pypy.objspace.std.longobject.W_LongObject.tofloat()
<ronan>
lxnt: in pypy/objspace/std/longobject.py, try putting 'raise RuntimeError' at line 104, just after 'except OverflowError:'
<ronan>
and rerun
<toaderas>
I had a conversation relatively recently with a few of the main project volunteers about pypy and real time applications and the improvement allowance for that. Has anything changed in regards to that ?
antocuni has quit [Ping timeout: 252 seconds]
awkwardpenguin has quit []
nunatak has quit [Quit: Leaving]
adamholmberg has quit [Remote host closed the connection]
<Sonderblade>
perhaps pypy can transpile python to c?
adamholmberg has joined #pypy
<ronan>
toaderas: it's the same, I guess
<ronan>
antocuni is working on a branch to allow better control of the GC by the user, though
<lxnt>
ronan: no luck. I've put more try ... except: raise something -s into the methods and still nothing changed
<ronan>
lxnt: you get the exact same traceback?
<lxnt>
ronan: can't really be sure, let me diff them
<lxnt>
but the same exception
<mattip>
Sonderblade: can you post a complete reproducer, including a `__main__`?
<ronan>
lxnt: huh, I'm pretty sure that that place is the only one that can possibly raise this exception with this specific message
<Sonderblade>
mattip: maybe. if you can tell me how to force the jit to run
<lxnt>
ronan: exactly the same modulo exception object address
adamholmberg has quit [Ping timeout: 244 seconds]
<lxnt>
ronan: well, idk. if it can possibly depend on what platcheck84 builds then ... but does it?
<mattip>
Sonderblade: I mean can you pastebin the way you are calling evaluate(board, w = defaultWeights) ?
<lxnt>
ronan: wait a sec, maybe it's me after all
<Sonderblade>
mattip: to protect the guilty parties i can't :) it's not my code
adamholmberg has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
<lxnt>
ronan: no, definitely it's something else. I even put prints there and nothing in the output as if this W_LongObject methods aren't even called
<ronan>
lxnt: ah, I'm an idiot, it's in uint_w(), line 138
waldhar_ has joined #pypy
jcea has quit [Ping timeout: 276 seconds]
waldhar has quit [Ping timeout: 260 seconds]
jcea has joined #pypy
<lxnt>
ronan: yes, that did it
<simpson>
Sonderblade: The JIT will run on loops that are run several thousand times, in general.
<lxnt>
it got cut off on the top, is that critical?
<simpson>
Sonderblade: Not really; the JIT can only trace code that is actually running.
<ronan>
lxnt: no, I only care about the end
Sonderblade has quit [Read error: Connection reset by peer]
Sonderblade has joined #pypy
Punisha has left #pypy [#pypy]
<toaderas>
ronan: you were one of the conversation participants ? I don't remember
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
beerbaron23 has joined #pypy
<ronan>
toaderas: I don't think I was in the conversation, though I vaguely remember seeing it
<ronan>
lxnt: so it's something about HKEYs, I guess the warnings were actually meaningful
<mattip>
Sonderblade: does len(board) change during the execution of the function?
<lxnt>
ronan: okay, thanks much
<Sonderblade>
mattip: no. look at the paste
inad922 has quit [Ping timeout: 272 seconds]
<mattip>
Sonderblade: well, evalboard should be a copy of board, but maybe they share some internal structure
<mattip>
since you use copy.copy and not a deep copy
<mattip>
and then you do `del evalboard[h]` which for all I know could modify board somehow
<mattip>
but that *is* a bit farfetched, I admit
<mattip>
I don't think the JIT should be moving the evaluation of `height = len(board) -1` around
<Sonderblade>
i dont see how del evalboard[h] could change the size of some other list?
<mattip>
yeah, me either truthfully, just grasping at straws
asmeurer__ has joined #pypy
adamholmberg has quit [Remote host closed the connection]
marky1991 has quit [Ping timeout: 252 seconds]
adamholmberg has joined #pypy
<toaderas>
ronan: is there a participant around ? :P
inad922 has joined #pypy
asmeurer__ has quit [Quit: asmeurer__]
inad922 has quit [Ping timeout: 276 seconds]
marky1991 has joined #pypy
<cfbolz>
Sonderblade: I agree with mattip, I think we would need a more complete program that we can run ourselves to fix this. Looks like a (serious?) bug, fwiw
<Sonderblade>
cfbolz: if you tell me how to force the jit to run always, i could try and make a test case. otherwise it is hard to isolate the problem
<cfbolz>
Sonderblade: you can't, that's not how the jit works, sorry
<Sonderblade>
must be hard to make deterministic test cases for the jit if you can't force it to trigger
Sonderblade has quit [Read error: Connection reset by peer]
<cfbolz>
Amazing
<simpson>
Some people would rather have buggy code than work with others. CLV.
beerbaron23 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cfbolz>
found the code anyway
jamesaxl has joined #pypy
jamesaxl has quit [Quit: WeeChat 2.2]
beerbaron23 has joined #pypy
Rhy0lite has quit [Quit: Leaving]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 245 seconds]
asmeurer__ has joined #pypy
<mattip>
looking into using gholke wheels on pypy, he is shipping numpy-1.15.2+mkl-pp360-pp360-win32.whl
<mattip>
the pp comes from pypy, the 3 is from python3, and the 60 is sys.pypy_version_info.major, sys.pypy_version_info.minor
<mattip>
this means any release we do, or even nightlies, cannot work with this wheel since we increment our minor version
<mattip>
I think I would like to move to only incrementing micro for now, until we make a breaking API change
<lxnt>
mattip: fyi mingw32 builds are broken so much it isn't even funny. I finally got it to start the actual translation, but to get it into any commitable shape would require forking off a new plaform