cfbolz changed the topic of #pypy to: #pypy PyPy, the flexible snake https://pypy.org | IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end and https://libera.irclog.whitequark.org/pypy | Matti: I made a bit of progress, the tests now only segfault towards the end
Atque has joined #pypy
Atque has quit [Ping timeout: 258 seconds]
Atque has joined #pypy
mattip_ has quit [Quit: Leaving]
Atque has quit [Ping timeout: 258 seconds]
Atque has joined #pypy
fotis has quit [Ping timeout: 244 seconds]
Atque_ has joined #pypy
Atque has quit [Ping timeout: 258 seconds]
epony has joined #pypy
jcea has quit [Ping timeout: 268 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 265 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 250 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 244 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 252 seconds]
fotis has joined #pypy
Atque_ has quit [Remote host closed the connection]
Atque has joined #pypy
<cfbolz> I found a bad performance bug in our biginteger implementation in the whole int(<str>) discussion :-(
Dejan has joined #pypy
Atque has quit [Remote host closed the connection]
Atque has joined #pypy
<cfbolz> basically it seems we use gradeschool O(n**2) multiplication if the sizes of the two ints are huge, but one is more than 2x larger than the other. this case was intentionally removed in 2007 with the comment "helps less than 1%", but that seems extremely untrue in my benchmarks, where I can basically get arbitrary slowdowns due to the different complexity
fotis has quit [Ping timeout: 264 seconds]
<antocuni> what is the commit which removed it, out of curiousity?
<cfbolz> antocuni: it's lost in some SVN merge mess
<cfbolz> I didn't track it down
<antocuni> ah right, in 2007 we were still on SVN
<cfbolz> maybe it was "only" removed in 2012
<nimaje> maybe the benchmark for that change didn't test with big enought numbers for it to help more
<cfbolz> yes, I think it's f71817a5bdc9
<cfbolz> look for _k_lopsided_mul
<antocuni> digging more, the commit which removed in the branch was this: 398e2b212e8b
<cfbolz> antocuni: ah, that branch contains the benchmark that stian used ;-)
<antocuni> git people, please note why we like so much our named branches :)
<cfbolz> yeah, looks like his numbers were indeed too small to show the complexity problem
<Dejan> antocuni, i always thought git branches are always "named"
<antocuni> AFAIK they aren't. The name of the branch is not part of the commit metadata
<Dejan> can you create "unnamed" branch?
<Dejan> i never tried...
<antocuni> git branches are equivalent to hg bookmarks
<antocuni> hg named branches are a different thing, for which git has no equivalent AFAIK
fotis has joined #pypy
fotis has quit [Ping timeout: 268 seconds]
Atque has quit [Read error: Connection reset by peer]
Atque has joined #pypy
fotis has joined #pypy
fotis has quit [Ping timeout: 244 seconds]
fotis has joined #pypy
lesshaste has joined #pypy
<lesshaste> hi
<lesshaste> I just did
<lesshaste> pypy3 -m venv mypypy
<lesshaste> source mypypy/bin/activate
<lesshaste> pip install numpy
<lesshaste> and it gives me https://bpa.st/ZJZQ
<lesshaste> the error is ModuleNotFoundError: No module named 'pip._vendor.six'
<lesshaste> did I do something wrong?
<lesshaste> hmmm
<lesshaste> it seems to work this time (deleted all and started again)
<lesshaste> apologies for the noise
<lesshaste> pip install matplotlib does fail however
<lesshaste> [PyPy 7.3.9 with GCC 11.2.0]
<lesshaste> is there any version of matplotlib that can be installed with Python 3.8.13 (7.3.9+dfsg-1, Apr 01 2022, 21:41:47)
<lesshaste> ?
<tumbleweed> lesshaste: OK, so that must be Ubuntu 22.04
* tumbleweed looks
<tumbleweed> lesshaste: worksforme
<tumbleweed> of course you'll need pypy3-dev and some other things installed (pypy3-dev + build-essentials is what I used)
<Dejan> (Fedora 36)
<phlebas> do you run the pypy benchmarks with a python2 as runner? because I'm getting errors in the runner parsing output:
<phlebas> ```
<phlebas> number = float(line.split(b" ")[0])
<phlebas> benchmarks.py", line 28, in parser
<phlebas> TypeError: must be str or None, not bytes
<phlebas> ```
<phlebas> since `line` is a `str` that comes from subprocess.Popen, this sounds to me like it would only work if the runner is python2?
<phlebas> i guess the question is, why is that even there? shouldn't `number = float(line.split()[0])` be the same in pretty much all cases that we care about (since it's passed to `float()` anyway)
<phlebas> i opened an issue, maybe someone thinks that change should happen :)
<lesshaste> tumbleweed, it is 22.04 indeed. Ah if I need pypy3-dev to install matplotlib that does cause a problem
<lesshaste> Dejan, yes I got that to work.It's matplotlib that is the problem
<tumbleweed> lesshaste: matplotlib doesn't have a whl for you, you have to built it from source
<tumbleweed> thus you need the headers for pypy
<tumbleweed> (and a compiler etc.)
<lesshaste> tumbleweed, can I get those from https://downloads.python.org/pypy/pypy3.8-v7.3.9-linux64.tar.bz2 ?
<lesshaste> I mean the headers
<Dejan> it is alredy there, yea
<Dejan> that is what i use
<Dejan> i actually use the latest nightly 3.8 build
<lesshaste> ok so what are the steps needed? I unpack that tar.bz2 and then what?
<lesshaste> sorry for being dim
<Dejan> no need to unpack
<Dejan> ah, sorry, yes, you need to unpack the pypy tarball
<Dejan> and use pypy3 from the newly created directory
<Dejan> make venv, and do the rest there...
<lesshaste> so doing the make venv will automatically put the headers somewhere useful?
<lesshaste> I'll try this is in a bit
<lesshaste> thanks
<lesshaste> trying it now...
<lesshaste> made a lot of progress! I tried plt.plot([1,2], [1,2])
<lesshaste> from ipython
<lesshaste> it fails with a long message that ends This probably means that Tcl wasn't installed properly.
<lesshaste> Dejan, does it work for you?
<lesshaste> I get the same error if I run it as a python script without using ipython
<lesshaste> _tkinter.TclError: Can't find a usable init.tcl
<lesshaste> it does work fine with cpython
fotis has quit [Ping timeout: 250 seconds]
fotis has joined #pypy
<Dejan> let me try...
<Dejan> lesshaste, yes, I have that too
<Dejan> that error makes sense
<Dejan> becase we both have newer TCL/TK on our workstations
<Dejan> PyPy was built to look for TCL 8.5 libs
<tumbleweed> you can rebuild the tcl module - it's cffi-based
<Dejan> tumbleweed, that would be handy
<Dejan> tumbleweed, i did not know that :)
<Dejan> one learns new thing(s) every day...
<Dejan> lesshaste, we should learn how to rebuild TCL module and that should solve your issue with matplotlib
<lesshaste> Dejan, that sounds good
Techcable has quit [Ping timeout: 244 seconds]
Techcable has joined #pypy
Dejan has quit [Quit: Leaving]
epony has quit [Ping timeout: 252 seconds]
Atque has quit [Quit: ...]