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
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
dustinm has quit [Ping timeout: 260 seconds]
adamholmberg has quit [Remote host closed the connection]
dustinm has joined #pypy
<marmoute>
mattip: silly question… where does all your buildbots run ?
<cfbolz>
marmoute: our own servers
<marmoute>
cfbolz: okay, so in theory it is "easy" to plug them to https://foss.heptapod.net/ if you want to (and can be restricted to pypy related projet if you prefer)
<cfbolz>
marmoute: in theory. I don't know about the practice
<marmoute>
From a technical point of view. It just need a functional docker (and the self contained gitlab-runner binary).
<cfbolz>
marmoute: ah not clear we even want to integrate with gitlab-runner at this point
<cfbolz>
Our own CI is still completely buildbot based
<marmoute>
Yep, I don't expect you to switch overnight if you ever switch.
<cfbolz>
The most important immediate thing is to get it to the current state again
<marmoute>
"to get it to the current state again" ?
<cfbolz>
marmoute: to get it to work at the level of how it works for bitbucket.org
<kenaan>
arigo cffi/cffi 459f86e1d944 /doc/source/ref.rst: The point of this example is that it doesn't work with a variable, only with a constant number. So don't use `n`.
<kenaan>
rlamy StringIO-perf b53569f5531d /pypy/module/_io/interp_stringio.py: Store UnicodeIO data as a list of unichars instead of GC strings
dddddd has quit [Remote host closed the connection]
<antocuni>
cfbolz, marmoute: one thing that I'd like to try eventually is to use azure pipelines to run pypy tests: their servers seem very powerful and fast, and we could probably aim to run tests at every push
alexge50_ has quit [Read error: Connection reset by peer]
<antocuni>
(on hpy, when I do "git push && py.test", the azure tests finish earlier than on my machine :))
alexge50 has joined #pypy
<mattip>
antocuni: we should have triggers for that: code changes in pypy/pypy would run own tests,
<mattip>
code changes in lib_pyyp, lib-python would download a nightly and run lib-python tests + extra_tests
<antocuni>
true, but I'd be happy to just run rpython and own tests to start with
<mattip>
we already have a mechanism to only run rpython tests on rpython code changes
<mattip>
sorry, inverse: to not run rpython tests unless there are rpython changes
<antocuni>
yes I know, not sure how easy it is to integrate into azure. The hardest part is probably to trigger a build when there is a push to heptapod and to tell azure to clone the repo from there
<mattip>
we could mirror heptapod/pypy/pypy at github.com/pypy/pypy and add the CI checks there
tsaka__ has joined #pypy
<mattip>
and set that repo with no issues or prs
<antocuni>
yes, that's a solution. Ideally I'd like it to be fully integrated as it is on github: e.g., if I open a PR I see the build status directly inside the PR page. Not sure how easy it is or if it is possible at all
andi- has quit [Ping timeout: 272 seconds]
andi- has joined #pypy
<cfbolz>
mattip: right, I see the difference
<cfbolz>
mattip: pypy3 has a cffi-based new implementation of _decimal in lib_pypy, pypy2 uses the pure python version
<cfbolz>
apparently the latter is faster
lesshaste has quit [Remote host closed the connection]
<cfbolz>
(maybe the former is more correct and we need it anyway)
<mattip>
cpython's c implementation is even faster :(
dddddd has joined #pypy
<cfbolz>
it's hard to beat C with python ;-)
<mattip>
I wonder if the cffi implementation is a faithful rewrite of the cpython3 C module, or if it based itself off the python2 pure-python version
<cfbolz>
the c implementation uses an existing library
<cfbolz>
as does cffi
<cfbolz>
telco is a great cffi benchmark now, on pypy3 ;-)
<cfbolz>
seems traces that call malloc are really terrible (surprise?)
<cfbolz>
arigato: eg any clue why _ll_2_gc_add_memory_pressure is a call_may_force?
<mattip>
one difference is the _CatchConversions class is a context manager used to wrap calls to the C library
<mattip>
The C implementation uses a "ret = callc(); if (ret == ERROR) ..." pattern instead
<cfbolz>
if it's not faster I wonder what we really win with the cffi implementation
<mattip>
heh
<mattip>
it's not a fair comparison if the transpiled code is different
<mattip>
for some definition of fair and different
<cfbolz>
mattip: sure, just saying we can get an immediate 10x speedup by throwing away the cffi code
<mattip>
and using cpyext?
<cfbolz>
no, just the pure python version
<cfbolz>
the stdlib has a conditional import of _decimal, when it doesn't exist it has a fully functional fallback
<mattip>
ah
<cfbolz>
that is what pypy2 uses
<mattip>
I think it is still slower than cpython3
<mattip>
can't check right now
<ronan>
cfbolz: the cffi version is faster in some cases
<cfbolz>
ronan: do we have a benchmark for that?
<ronan>
cfbolz: not sure, but at high enough precisions, using the lib beats the pure python impl, IIRC
<cfbolz>
right
<cfbolz>
yes, the python implementation is in many ways really ridiculous
<cfbolz>
anyway, not sure what to do. another pov is that it's a good excuse to make cffi faster
kenaan has quit [Read error: Connection reset by peer]
jvesely has quit [Quit: jvesely]
kenaan has joined #pypy
<kenaan>
cfbolz py3.7 cd4e6f012629 /lib-python/3/test/test_types.py: skip an implementation detail
<kenaan>
cfbolz py3.7 7a0cdcf24b94 /pypy/: gah! turning StopIteration to RuntimeError in generators broke the applevel implementation of iter with sentinel!
<arigato>
cfbolz: pdb.set_trace() in this latest checkin
<cfbolz>
oops
<cfbolz>
thanks
<cfbolz>
this 3.7 stuff never ends :-(
<arigato>
yes, not too surprising
<arigato>
remember that the 3.3 -> 3.5 transition was a ton of work for 4 people
<cfbolz>
yes
<cfbolz>
arigato: I remember that supporting 2.4 was a total pain too :P
marky1991 has quit [Read error: Connection reset by peer]
<kenaan>
cfbolz py3.7 89255ed57e9f /pypy/module/posix/interp_posix.py: make putenv complain about bad names (test already existed)