antocuni changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "PyPy: the Gradual Reduction of Magic (tm)"
<c01nwarr10r[HD]>
VOISE, the largest music exchange on the planet in the next few years, based on the latest ethereum smart contract technolgy, VOISE offers a free decentralized market for artists to promote and sell 100% of their work on their own terms
<c01nwarr10r[HD]>
going to be a huge market, has all the right ingredients to get there
<c01nwarr10r[HD]>
anyone and everyone can participate, even the transactions are processed by anyone and everyone as it's decentralized
<c01nwarr10r[HD]>
a free market
<c01nwarr10r[HD]>
it's not going to look like what it will look like in the next few years when it's the largest music exchange on the planet now early on
<c01nwarr10r[HD]>
it's going to look like what VOISE looks like now
<c01nwarr10r[HD]>
unkown
<c01nwarr10r[HD]>
just starting
<c01nwarr10r[HD]>
in it's early stages of development
<c01nwarr10r[HD]>
best to get some shares and show your support, you know the old saying you don't get something for nothing, helps support the project, and those shares allow you to get something back later on down the road, as you where part of making it get there
c01nwarr10r[HD] was kicked from #pypy by Alex_Gaynor [c01nwarr10r[HD]]
<antocuni>
are we aware that cProfile is horribly slow on pypy?
<antocuni>
like, running "richards.py 1000" goes from 3.71 secs to 17.37 secs on my machine
<fijal>
yeah
<fijal>
it's a bit hard to do better
<fijal>
cfbolz put some effort at some stage
<antocuni>
yes I know, but I didn't know we were so bad
<antocuni>
I propose to issue a warning when you try to use cProfile
drolando has quit [Remote host closed the connection]
drolando has joined #pypy
<cfbolz>
antocuni: the problem is not that the trace hook is slow. The 'problem' is that the jit makes Richards really fast
<antocuni>
yes sure
<antocuni>
but for example, I just found a real-world example in which they automatically turn cProfile on when the system is under load
<cfbolz>
antocuni: yes, the cprofile results are definitely not very relevant
<antocuni>
yes, but in this precise case it has also the effect of making the already-overloaded system much worse
<antocuni>
that's why I think a warning is a good idea
<fijal>
it also provides bad data
<antocuni>
something like "don't use cProfile, use vmprof; see http://... for details"
<cfbolz>
sounds good to me
<njs>
are there any cases where cProfile produces even somewhat useful data on pypy? if not then it might even make sense to *only* print the warning and not actually collect data at all
<mitsuhiko>
fijal: i fixed that one case and could not see it fail since
<mitsuhiko>
but
<mitsuhiko>
not convinced that is it :D
syntaxman has quit [Remote host closed the connection]
adamholmberg has joined #pypy
Rotonen has joined #pypy
<Rotonen>
pypy2.7-5.9.0 - importing a c exetension and getting a "AttributeError: 'module' object has no attribute 'CAPI2'" means one has to dive in and redo the c extension in a new form?
<Rotonen>
nothing spectacular, there is one line and also just one c file
<Rotonen>
there is a compat header for py3, the recent push-for-py3 made me curious as to what's the order of magnitude of also dragging the C extension bits to modern python
<Rotonen>
there's the c extension in question, but cannot figure out what and how the python file for it gets generated in build_ext or where that process is defined
<arigato>
I cannot find any mention of the name 'CAPI2' there...
<Rotonen>
considering the heritage there is probably some jim fulton patent cleverness under the hood there
<Rotonen>
you can assume everything defined in setup.py to be present
<arigato>
yes, I was asking which of these modules is likely to contain "CAPI2"
<Rotonen>
ExtensionClass would be the one
<Rotonen>
hmm this'd be nice if one would only have to figure out how to (conditionally) port that to something pypy compatible
<arigato>
zope is considered a big but largely deprecated project, I think
<Rotonen>
dunno, pyramid is pretty much built on top of that and i work on plone - works for me
<arigato>
if you want to port it to something modern I'd recommend cffi, but I don't know how large an effort that would be
<arigato>
most probably, far too much work
<Rotonen>
gotta have hobbies
<Rotonen>
we already managed the jump to py3 and this is pretty much the next frontier
<arigato>
anyway, this looks like a bug somewhere in cpyext, our CPython C API emulation
<Rotonen>
the ExtensionClass tests pass with pypy so that's a decent start
<Rotonen>
i'm currently eyeing PyCapsule_Import() and seeing about whether that is Zope or CPython
<arigato>
src/ExtensionClass/tests.py only tests for hasattr(_ExtensionClass, 'CAPI2') if C_EXTENSION is true
<arigato>
maybe ExtensionClass can be compiled without the C extension, in a pure Python mode? In this case it wouldn't have that name? and then AccessControl would fail, also on CPython
<Rotonen>
it raises if it's not available, though
<Rotonen>
hmm no, it asserts that it raises
<arigato>
just guessing here
adamholm_ has joined #pypy
<arigato>
maybe one module like ExtensionClass is compiled differently because of a test for "is it pypy?" inside setup.py
<arigato>
and then we have this kind of issue
<arigato>
("capsules" are a C-extension-modules-only hack which is not available to pure Python code)
adamholmberg has quit [Ping timeout: 240 seconds]
<Rotonen>
now that does explain the no CAPI thing
<Rotonen>
and ExtensionClass cannot currently be compiled against pypy, so there's the hill to climb
<arigato>
yes, and maybe AccessControl really requires the C version of ExtensionModule
<Rotonen>
correct
<Rotonen>
thank you
<arigato>
you might try to compile ExtensionClass anyway, it's possible that the reasons for why it wasn't compiled are no longer valid
<Rotonen>
does not compile for me, though
<arigato>
ok
<arigato>
how?
marky1991 has joined #pypy
<Rotonen>
nvm. i mistook some rpython errors as c compilation errors
<arigato>
the next question is whether it is a good idea to fix it, given that the pure Python version is likely faster
<arigato>
maybe someone should instead write a pure Python version of AccessControl
<arigato>
(or at least one that can interact with the pure Python version of ExtensionClass)
<Rotonen>
it'll most likely not be only AccessControl as i'm eventually trying to climb the uphill all the way to Plone and stuff having been built on top of Plone
<Rotonen>
from my point of view currently to get ~anything going is better than going solo on fixing the guts of a lot of the ecosystem
<Rotonen>
optimization can come later, ref. d. knuth
<arigato>
I see that ExtensionClass is defining a whole header
<arigato>
with #defines that peek into the guts
<arigato>
I have no idea if the pure python version of ExtensionClass is of any use at all
<Rotonen>
i suppose someone got lazy with extra requires and just hacked this together for something which does have a pure python implementation as well
<arigato>
yes, I guess so
<arigato>
additionally, the C version of ExtensionClass is likely harder than I suggested just above
drolando has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
realitix has quit [Ping timeout: 258 seconds]
drolando has joined #pypy
oberstet has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
raynold has joined #pypy
asmeurer__ has joined #pypy
drolando has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
asmeurer__ has quit [Quit: asmeurer__]
drolando has joined #pypy
antocuni has quit [Ping timeout: 260 seconds]
oberstet has quit [Ping timeout: 252 seconds]
tnorth has joined #pypy
forgottenone has quit [Ping timeout: 255 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
tbodt has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
marky1991 has quit [Ping timeout: 240 seconds]
asmeurer_ has joined #pypy
realitix has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
realitix has quit [Ping timeout: 240 seconds]
<arigato>
d420391a020a has a few problems
Rhy0lite has quit [Quit: Leaving]
<kenaan>
arigo default bd1d07287bb4 /: Backed out changeset d420391a020a A few problems: 'b // 0' fails an internal asserts now; and 'n / int(-n)' gives ...
tbodt has joined #pypy
tbodt has quit [Client Quit]
cstratak has quit [Quit: Leaving]
adamholmberg has joined #pypy
adamholm_ has quit [Ping timeout: 260 seconds]
tnorth has quit [Remote host closed the connection]
tbodt has joined #pypy
_stian has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
adamholm_ has joined #pypy
adamholmberg has quit [Ping timeout: 252 seconds]
asmeurer_ has joined #pypy
adamholm_ has quit [Remote host closed the connection]
<cfbolz>
arigato: and there wasn't a single test in rlib?
<arigato>
yes, that too
<cfbolz>
:-/
adamholmberg has joined #pypy
<arigato>
well, "tests are missing" was implicit in my backout message when I pointed out cases that fail
<arigato>
but indeed I could have been explicit
holdsworth_ has joined #pypy
holdsworth has quit [Ping timeout: 240 seconds]
<arigato>
do you know if "stian" is here on IRC? seems that his last commit was in 2015
lritter has joined #pypy
* arigato
wonders what "cd .." *really* does in bash
<arigato>
in the presence of symlinks in directories that have changed recently
<arigato>
the answer "bash just removes the last element off $PWD" is wrong, because in some situations it detects the changes to the symlinks
Gabriel_8 has left #pypy ["WeeChat 1.0.1"]
<kenaan>
stian math-improvements ec9abaebdc28 /: branch with some rbigint/longobject/intobject improvements
<kenaan>
stian math-improvements 06129c0b5e0e /: Test + fix for bugs found by Armin Rigo
<kenaan>
stian math-improvements b4e5817c17d8 /pypy/objspace/std/longobject.py: Missing from earlier
<kenaan>
stian math-improvements c1d74e03b736 /pypy/objspace/std/intobject.py: Use long with int when overflowing
<kenaan>
stian math-improvements 3a37e2483546 /rpython/rlib/test/test_rbigint.py: Add rlib test
<_stian>
@arigato, hello
<arigato>
hi!
<_stian>
tests and fixes. Also put it in a separate branch
<arigato>
thanks!
<arigato>
if it's done, then please open a pull request and we'll review; I think it's the best approach
<arigato>
these parts of pypy are pretty central to everything
<arigato>
we really don't want a bug to show up there
<_stian>
There are a few more things to improve before merge i think, like use of int_pow on int overflowing
<_stian>
still pretty alright improvement, pidigits went from 5.8s to 5.3s locally.
<arigato>
:-)
<_stian>
might compensate for the slowdown of shadowstack, looking at speed.pypy.org it went from 9.45 to 10.84 on that :(