cfbolz 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 | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
<CrazyPython>
rindolf: Walter Bright, originator of Dlang
<simpson>
Does it matter? (Why this channel?)
<CrazyPython>
Sorry, wrong channel!
CrazyPython has left #pypy [#pypy]
<mattip>
rindolf: are you using the latest 7.3.2 release?
<rindolf>
mattip: i am using 7.3.1 - let me try with 7.3.2
<rindolf>
mattip: with 7.3.2 from https://www.pypy.org/download.html (which says 7.3.2-alpha0), the faster code is down to 2.8s while the slower code runs at ~9s
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
<tumbleweed>
arigato: thanks, testing
rubdos_ has joined #pypy
rubdos has quit [Ping timeout: 240 seconds]
rubdos_ has quit [Remote host closed the connection]
<mattip>
rindolf: the difference boils down to
<mattip>
sum(a*b for a,b in p)
<mattip>
vs
<mattip>
new = 0; for a,b in p: new += a*b
<mattip>
in the first version, the code creates the generator expresssion, then needs to sum over it
<mattip>
in the second, there is no intermediate expression
<mattip>
sum((a * b) for a, b in p)
<mattip>
I guess the JIT could somehow be taught to unroll the generator expression, maybe?
rubdos has joined #pypy
<mattip>
len(seq) < 10 in your code, I imagine the slowdown would be more significant if the sequences were longer
<rindolf>
mattip: ah
<arigato>
mattip: re your blog post comment: I think (not sure) that the web site updates instantly, after you regenerate it and commit the generated files
<arigato>
that's what I noticed when I changed the ppc links earlier
<mattip>
the salt job linked to in the pypy.org README runs every 15 minutes
<mattip>
I added another 15 minutes just to be sure
<mattip>
not sure where the actual crontab is generated in that salt repo, but I just checked the logs on the pypy.org server to make sure
<mattip>
arigato: thanks for readjusting the ppc64 downloads
<arigato>
OK
rindolf has quit [Quit: http://www.shlomifish.org/ ; Some people grow older and wiser. Not I. I grow older and more foolish.]
lritter has joined #pypy
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
YannickJadoul has joined #pypy
<YannickJadoul>
This wasn't a problem in pypy 2.7 rc1 or rc2, but it now seems like the actual release is failing to pass cibuildwheel's tests :-(
<YannickJadoul>
If I'm reading this correctly, this is where things fail: WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
<agronholm>
I just tried making a virtualenv with pypy3.7 7.3.2 on Windows but it fails due to "Error: [WinError 2]: Cannot find specified file"
<agronholm>
this works with the same pypy3.6 release, and pypy3.7 on Linux
<agronholm>
it ends up creating a defunct virtualenv
<tumbleweed>
YannickJadoul: have the CFFI modules been built?
<YannickJadoul>
The actual error seems to be: RuntimeWarning: The _hashlib module is not available, falling back to a much slower implementation (unable to load extension module '/tmp/pypy2.7-v7.3.2-osx64/lib_pypy/_pypy_openssl.pypy-73.so': dlopen(/tmp/pypy2.7-v7.3.2-osx64/lib_pypy/_pypy_openssl.pypy-73.so, 6): Symbol not found: ____chkstk_darwin
<YannickJadoul>
(If it doesn't work, for those 2 months of 10.13 support left, just updating the download page might actually be easier; and we'll just test with a later version)
<mattip>
it succeeds
<agronholm>
mattip: I tried with pypy3 -m venv venv
<agronholm>
not with virtualenv
<agronholm>
isn't the venv module the recommended way these days?
<mattip>
cool, that reproduces the failure, thanks
jcea has joined #pypy
<mattip>
agronholm: ok, I see the problem. venv is not copying pypy3.exe + libpypyc.dll to the new Scripts directory
<mattip>
dunnot why yet
<agronholm>
well, I trust this will be fixed in the next release
<mattip>
yup. It seems venv changed between 3.6 to 3.7, they explicitly list the python.exe they wish to find
<mattip>
and we didn't check that test_venv passes