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
bbot2 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
_whitelogger has joined #pypy
_whitelogger has joined #pypy
lritter has joined #pypy
jcea has quit [Quit: jcea]
lritter has quit [Ping timeout: 252 seconds]
lritter has joined #pypy
Garen has joined #pypy
forgottenone has joined #pypy
_whitelogger has joined #pypy
user24 has joined #pypy
user24 has quit [Remote host closed the connection]
_whitelogger has joined #pypy
vpelletier has joined #pypy
<vpelletier>
hi. out of curiosity, I diff'ed dis.dis output on one of my projects' module, one with cpython 2.7 and one with pypy 6.0.0
<vpelletier>
most of the (rather few) difference types are in favour of pypy
<vpelletier>
one does not seem so, though: jump to jump
<vpelletier>
for example, if both compilers produce the sequence "<i> JUMP_FORWARD <i+1>", pypy would jump to <i> while cpython would skip <i> and directly jump to <i+1>
<vpelletier>
oh, I think I found it, in astcompiler/assemble.py: _resolve_block_targets
<vpelletier>
if op == ops.JUMP_ABSOLUTE or op == ops.JUMP_FORWARD: [...] if target_op == ops.JUMP_ABSOLUTE: [...] elif target_op == ops.RETURN_VALUE:
<vpelletier>
I guess this should also cover jumps to JUMP_FORWARD
<vpelletier>
problem is, I do not know the difference between JUMP_ABSOLUTE and JUMP_FORWARD...
<vpelletier>
in assembly, they typically differ by the span the jump can skip
<vpelletier>
in my reading of bytecode addresses, both instructions take 3 bytes. Assuming a constant-size instruction prefix, it would mean the same span...
yaewa has joined #pypy
moei has quit [Ping timeout: 260 seconds]
<vpelletier>
woah, the mandelbrot got colors now
* vpelletier
did not build pypy for a long time
jamesaxl has quit [Quit: WeeChat 2.2]
<vpelletier>
translation failed, and test suites fail too
<vpelletier>
tests: "ImportError: cannot import name 'revdb_stop'"
<vpelletier>
translation: data_rpython_jit_metainterp.c:45905:2: error: ‘EVP_MD_CTX_destroy’ undeclared here (not in a function); did you mean ‘EVP_MD_CTX_reset’?
<vpelletier>
I think I understand why translation failed
<vpelletier>
I installed packages to run tests, which updated libssl
oberstet has joined #pypy
yaewa has quit [Quit: Leaving...]
Garen has quit [Remote host closed the connection]
lritter has quit [Ping timeout: 244 seconds]
_whitelogger has joined #pypy
<kenaan>
arigo cffi/cffi 603d417606ae /cffi/setuptools_ext.py: "python setup.py sdist" should not list the generated ABI module. See ``"python3 setup.py sdist" wrongly package...
<cfbolz>
vpelletier: note that the machine code the jit generates is independent of this bytecode optimization
<cfbolz>
So we might not care too much
<fijal>
cfbolz: cool about the json stuff!
<cfbolz>
fijal: it's using maps basically
<cfbolz>
and interning strings while parsing
infinite has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
infinite has joined #pypy
_whitelogger has joined #pypy
<vpelletier>
cfbolz: oh, I see
<cfbolz>
vpelletier: sorry, that sounded discouraging. if somebody wants to fix it we would be happy to accept the patch
<vpelletier>
cfbolz: I have a patch, which fixes for this case. the only diff with cpython is a jump_absolute vs. jump_forward. Also, pypy/interpreter/test/test_compiler.py is happy with it. But it's not a minimal patch...
<cfbolz>
vpelletier: you would have to add a test to the patch, to check the new behaviour
<vpelletier>
gah, and it contains my debug prints...
<vpelletier>
I also tried it against the same test code plus a "while True" so return cannot be reached, and I still get a jump-to-jump
<vpelletier>
which is when the patch started packing weight, to no success
<cfbolz>
yes, looks a little bit complicated indeed
<vpelletier>
it does 2 things compared to original code: follow more than one level of jump, and follow jumps for any kind of original instruction (as long as it jumps)
<cfbolz>
vpelletier: yes, just saying that those new features need new tests
<vpelletier>
sure
<vpelletier>
checking test_compiler.py right now, to see how I can integrate
<vpelletier>
I also looked for code which would have exercised the original code, but did not find... maybe I am not looking for the right thing
forgottenone has quit [Read error: No route to host]
forgottenone has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Read error: Connection reset by peer]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 252 seconds]
_whitelogger has joined #pypy
antocuni has joined #pypy
antocuni has quit [Ping timeout: 244 seconds]
<LarstiQ>
cfbolz: nice reading so far!
<LarstiQ>
cfbolz: I was a little confused at "2010: Implementing Python Objects with Maps" where you say "I am going to write about two exemplary ones here." and then there is only one paragraph before "2011: Container Storage Strategies", which probably is the second one
<LarstiQ>
very minor, but first potential for confusion in my reading
<cfbolz>
Thanks
<LarstiQ>
and none other such in the rest, thanks for writing :)
<cfbolz>
LarstiQ: cool, thanks
<cfbolz>
LarstiQ: I've rewritten it to: "I am going to write about two exemplary ones here, maps and storage strategies"
<simpson>
Maps and storage strategies are both things that I borrowed and implemented in Typhon, and I think that maps also made it into one of the Smalltalk or SOM experiments?
<cfbolz>
simpson: maps are from self
<simpson>
Definitely exemplary!
<cfbolz>
basically everybody has maps :-)
<cfbolz>
storage strategies are original from us, though the V8 people were working on something similar at the same time
<simpson>
Basically everybody except for CPython and MRI and oh hey now I'm sad.
<cfbolz>
cpython does the strange dictionary sharing
<cfbolz>
which is a similar idea
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 250 seconds]
forgottenone has quit [Quit: Konversation terminated!]