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
<arigato>
cfbolz: what is the complexity change of str(bigint)? a web link or paper would be fine :-)
<cfbolz>
cr.yp.to/bib/1998/burnikel.ps
<cfbolz>
arigato: it depends on the multiplication, actually
<cfbolz>
ah wait
<cfbolz>
that's the answer to divmod ;-)
<cfbolz>
and str is recursive, but uses divmod to split up the input number
<cfbolz>
arigato: if we want to do better, we should improve our mul more
<arigato>
ah, it uses divmod(10**n) to divide the problem in two roughly equal parts?
<cfbolz>
arigato: exactly
<arigato>
OK
<cfbolz>
arigato: now our str is *even faster* than CPython
<cfbolz>
and they said they won't fix it, "just use gmpy"
<arigato>
cool
<cfbolz>
arigato: btw, I remember that you looked into using GMP a loooong time ago for pypy's longs, but failed due to not integrating with the GC?
jacob22 has quit [Remote host closed the connection]
<arigato>
no, the blocker is that when it fails (e.g. out of memory), it just aborts the process
<cfbolz>
oh, ouch
<cfbolz>
right
<arigato>
so yes, "just use gmpy and oh ouch"
<cfbolz>
anyway, I was told that racket uses a "heavily hacked GMP" for their bignums
<arigato>
ah
jacob22 has joined #pypy
<arigato>
interesting, maybe
<cfbolz>
yeah well, just found it interesting, I have no real plans to look into that
<arigato>
nobody wants to dive into the maintenance hell that we all see right in our face, OK OK
<cfbolz>
:-)
<cfbolz>
arigato: you mean the fact that maintaining rbigint is also a bit annoying? or the fact that GMP is messy? ;-)
<arigato>
in Unity, they gave up all maintenance-related logistics based on the idea that a game is developed, shipped, and done. So I mean that in this case, we'd have to synchronize the heavily hacked GMP with upstream changes (because pypy != game) and it's going to be a constant pain
<cfbolz>
yeah
<arigato>
(sorry, I spent a few hours this morning trying to upgrade the Unity version we use, and these hours where just to make a new working empty project in the new Unity version; I haven't started any real work)
<cfbolz>
argh
<cfbolz>
arigato: so they are changing the world?
<cfbolz>
from version to version?
<arigato>
yes
<arigato>
or not the whole world, but a few small parts of it, every version
<cfbolz>
pfff
bbot2 has joined #pypy
<arigato>
buildbot restarted
<cfbolz>
thanks
<arigato>
the logs don't contain any explanation for why the process disappeared
<cfbolz>
:-(
<arigato>
ah, dmesg says "Out of memory: Kill process 8036 (python)"
<cfbolz>
eh, right
<cfbolz>
arigato: I am wondering, should long % int return an int?
<arigato>
you mean, in pypy3.x?
<cfbolz>
yeah
<arigato>
I guess it can, yes
<cfbolz>
or is there a corner case with -sys.maxint-1?
<arigato>
thinking about that
<arigato>
no, I don't think so
<arigato>
x % (-n), with n > 0, returns an integer between -n-1 and 0 included
<arigato>
sorry
<arigato>
-(n-1) and 0
<cfbolz>
right
<cfbolz>
cool :-)
<arigato>
fijal: fwiw, you have 9 processes running ruby each taking 190MB, on baroquesoftware
<arigato>
and I've got one "pypy" process taking 557MB
<arigato>
and "hg" taking 400MB??
<fijal>
arigato: I think all of it can die?
<fijal>
I wonder what ruby is doing
<cfbolz>
arigato: btw, I used afl fuzzing to try find some bugs in the divmod implementation, and it really found a very strange corner case after 48 hours. thought that was quite impressive (not actually a bug in the algorithm, "only" in the overallocation of digits or rbigint)
<arigato>
fijal: it's running inside a containerd-shim
<arigato>
ah, discourse.rb
jcea has joined #pypy
<arigato>
is that forum.vrsketch.eu? but why under your name, I thought I ran it (don't remember if as myself or as root)?
<arigato>
cfbolz: :-)
<cfbolz>
arigato: can you see *when* the buildbot was killed?