cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | the secret reason for us trying to get PyPy users: to test the JIT well enough that we're somewhat confident about it
Hornwitser has joined #pypy
<Hornwitser> Soooo... I wanted to try the sandbox feature of pypy.
<Hornwitser> And now I think I'm about to turn insane, as I think I've found several problems with the rpython codebase.
<Hornwitser> __hash__ is not defined for a bunch of types that define __eq__, resulting in them being sprung traps when used as for example dict keys.
<mattip> Hornwitser: you read http://www.pypy.org/download.html#other-versions before you decided to do this, right?
<Hornwitser> No.
<mattip> so how did you find out about it? We should update wherever you found out about it that we need help to make it more modern
<mattip> sorry about that, I will update the docs there too
<Hornwitser> I can't make sense of the annotation model. A more general type contains a less general (more specific type), but signature.annotation(rarithmetic.r_int32).contains(ml.SomeInteger()) == True.
<Hornwitser> Another thing is that SomeFloat contains SomeInteger, but floats are not superset of ints. This seems incredibly fishy.
<Hornwitser> That page doesn't even mention float.
stevenja_ has joined #pypy
<mattip> it describes the annotation pass and what it is useful for
<mattip> see the graph at the end of the page
stevenja_ has quit [Ping timeout: 256 seconds]
<Hornwitser> I'm not sure how that explain why SomeFloat is considered a more general variant of SomeInteger.
<Hornwitser> The sandbox protocol also seems to be fundamentally broken. It doesn't tell the controlling proccess what types it expects in return.
<Hornwitser> Same goes with the find_loader/find_dumper logic in rmarshal. For it to be possible to load a dumped value the types must be eqivalent, not just contained, so I don't see the point of doing that.
jamesaxl has quit [Quit: WeeChat 2.1]
wleslie has joined #pypy
mattip has quit [Ping timeout: 245 seconds]
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 264 seconds]
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 240 seconds]
mattip has joined #pypy
wleslie has quit [Quit: ~~~ Crash in JIT!]
Hornwitser has quit [Ping timeout: 260 seconds]
kingsley_ has joined #pypy
<kingsley_> What would you say, if, hypothetically speaking, a tall, dark, handsome stranger asked on #pypy, on a Wednesday, if there's a better way to speed up someone else's script than replacing the
<kingsley_> #!/usr/bin/python3
<kingsley_> in its first line with
<kingsley_> #!/usr/bin/pypy
<kingsley_> ?
<kingsley_> What would you say, under that theoretical scenario?
wleslie has joined #pypy
<kingsley_> Would it make a difference if he upgraded from version 5.9.0+dfsg-1 to 6.0.0+dfsg-1?
<kingsley_> For what it's worth, the test case is...
<kingsley_> # time echo -e "a\nb" | csvstat
<kingsley_> csvstat is written in python.
<kingsley_> It's documented at
<kingsley_> At least on my computer, the above test case takes almost 2 seconds.
<mattip> kingsley_: so you want to measure python's startup time? PyPy will not win that battle
<mattip> s/battle/contest/
<kingsley_> Maybe. Do you happen to know how to test if my delay is due to start up time? For example, is there a way to keep pypy or python resident in memory?
<kingsley_> mattip: ^
<kingsley_> pex?
speeder39 has joined #pypy
<njs> kingsley_: is "echo -e a\nb" actually the thing you're trying to speed up? if what you really care about is processing large files, then you should measure those instead
<kingsley_> njs: I'm trying to speed up csvstat.
maxxam has joined #pypy
<kingsley_> It's written in python.
<njs> kingsley_: yes, sorry, I meant "is csvstat as applied to 'echo -e "a\nb"' actually the thing you're trying to speed up"
<kingsley_> I just included a small, cut down, test case ("echo -e a\nb") to try to clearly illustrate my problem.
<njs> kingsley_: right
jcea has quit [Quit: jcea]
<njs> kingsley_: the problem is that if your problem is with performance, then a small cut down test case may act completely differently than a larger test case :-)
<kingsley_> njs: Yes, I agree, and, I'm happy to report that my small cut down case and my real deal are both slow.
<maxxam> cfbolz: the PyPy segfaults I was talking about a few days ago APPEAR to have vanished. What changed? I optimised the program (to the point where I could run it on CPython!). The only major external thing no longer being used is multiprocessing.Pipe … though it is also no longer creating new threading.Timer instances thousands of times per second (no, I didn’t write that, and was horrified to find it)
<kingsley_> ;-)
<njs> kingsley_: ah well, just checking
maxxam_ has joined #pypy
maxxam has quit [Ping timeout: 248 seconds]
maxxam_ is now known as maxxam
mattip has quit [Ping timeout: 265 seconds]
speeder39 has quit [Quit: Connection closed for inactivity]
<kingsley_> Is there a clever way to use bash (Linux shell) fifos (first in first out files) or coprocesses to avoid the repeated overhead of starting a python script?
<kingsley_> If so, how?
<LarstiQ> kingsley_: given a general python program? Nafaik, but multiple programs have gone down the route of having a background daemon for this usecase
tayfun26 has joined #pypy
bendlas has quit [Ping timeout: 260 seconds]
_blackstack has quit [Remote host closed the connection]
bendlas has joined #pypy
_blackstack has joined #pypy
_blackstack has quit [Remote host closed the connection]
_blackstack has joined #pypy
realitix has joined #pypy
redj_ has joined #pypy
redj has quit [Ping timeout: 260 seconds]
DIRT has quit [Ping timeout: 248 seconds]
jacob22__ has joined #pypy
dddddd has joined #pypy
wleslie has quit [Quit: ~~~ Crash in JIT!]
<cfbolz> maxxam: ah, multiprocessing
<cfbolz> Unfortunately that is known to not be as stable as we'd like on PyPy :-(
* arigato tries to make sure there are no prebuilt W_BaseExceptions in PyPy 3.5
<cfbolz> arigato: uh, why are there any?
<arigato> because generator.py contains this: http://paste.pound-python.org/show/KJMGcJFpypzEKCkad5yd/
<cfbolz> Ouch
<cfbolz> I see, just read the mail on PyPy-dev
<arigato> I'm adding a "def _cleanup_()" to W_BaseException, which should complain for any of them
<arigato> (it did complain for this one)
<cfbolz> arigato: what is cleanup again?
<arigato> you may remember "def _freeze_()"
<cfbolz> I only remember _freeze_
<cfbolz> Heh
<arigato> right, so _cleanup_ was added more recently, and now _freeze_ is only defined on classes that really become PBCs
<arigato> so that we can know that the class is for a PBC just by looking at the class
<cfbolz> arigato: nice!
<fijal> o/
<cfbolz> arigato: that is impressive bug finding by hubo, I must say
<arigato> yes
<cfbolz> I'll reply to say so
kenaan has joined #pypy
<kenaan> arigo py3.5 0017e9688738 /pypy/: A leak, caused by having a single prebuilt instance of GeneratorExit. This is a really bad idea in Python 3.x, becaus...
<arigato> ok, you can also mention this 0017e9688738 in the reply
<arigato> ah, too late :-) I'll write then
<cfbolz> arigato: sorry
<cfbolz> arigato: did you check whether translation still works?
<arigato> yes
<arigato> up to --rtype
<cfbolz> Good enough
wleslie has joined #pypy
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 264 seconds]
lritter has joined #pypy
oberstet has joined #pypy
hawkowl_ is now known as hawkowl
wleslie has quit [Quit: ~~~ Crash in JIT!]
Garen has quit [Read error: Connection reset by peer]
Garen has joined #pypy
phlebas has joined #pypy
jcea has joined #pypy
<trfl> mattip_: the biggest problem is that the build system does not install plat-linux2 at all, since the build system believes that I am compiling on a mac
realitix has quit [Quit: realitix]
<trfl> I believe the pypy2 binary would actually try to import plat-linux2 rather than plat-mac (which is what got installed rather than linux2) considering the binary gets the platform right
<trfl> thanks and sorry for the high latency :>
Rotonen has left #pypy [#pypy]
<trfl> mostly i want to know at which point rpython / targetpypystandalone determines the host/target platform and why it gets it wrong
<cfbolz> trfl: there are a number such places, I think
<cfbolz> trfl: the code that adds plat-* to the path is in pypy/module/sys/initpath.py
realitix has joined #pypy
<trfl> sweet, i'll take a look at that when i get the chance
<cfbolz> but that's the opposite place of what you need, I think
<trfl> is there by any chance something i could grep for to spot the different places where platform is inferred? or is it done differently depending on context
<cfbolz> I fear it's done differently :-(
<trfl> hehe, figured as much :p
<cfbolz> anyway, please tell me how you install stuff
<cfbolz> because in my installation *all* the plat-* directories are actually there
<cfbolz> trfl: ^^
<trfl> this should be all the relevant parts: https://pastebin.com/jBsdVjYy
<trfl> the distro is built on musl rather than glibc, which I imagine could cause some confusion
<cfbolz> trfl: what happens if you run the binary in place in the goal/ dir?
<trfl> ...okay so I just remade the package and this time all of the platform-specific modules got included
<trfl> maybe I was looking at an incomplete build or something :x sorry!
<trfl> that said though, does it make sense to include plat-mac on a linux machine? :p
<cfbolz> trfl: those files are tiny
marky1991 has joined #pypy
adamholmberg has joined #pypy
marmoute has quit [Ping timeout: 240 seconds]
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
mefistof1les has joined #pypy
kanaka has joined #pypy
kanaka has quit [Changing host]
kanaka has joined #pypy
Rhy0lite has joined #pypy
demonimin has quit [Remote host closed the connection]
demonimin has joined #pypy
demonimin has quit [Remote host closed the connection]
CountryNerd has joined #pypy
demonimin has joined #pypy
demonimin has quit [Remote host closed the connection]
demonimin has joined #pypy
demonimin has quit [Remote host closed the connection]
infernix has quit [Ping timeout: 260 seconds]
realitix has quit [Quit: realitix]
realitix has joined #pypy
realitix_ has joined #pypy
infernix has joined #pypy
realitix has quit [Ping timeout: 240 seconds]
realitix_ is now known as realitix
realitix_ has joined #pypy
realitix has quit [Ping timeout: 260 seconds]
realitix_ is now known as realitix
tayfun26 has quit [Remote host closed the connection]
redj_ is now known as redj
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
realitix has quit [Quit: realitix]
realitix has joined #pypy
realitix has quit [Client Quit]
realitix has joined #pypy
DIRT has joined #pypy
oberstet has quit [Quit: Leaving]
realitix has quit [Quit: realitix]
demonimin has joined #pypy
realitix has joined #pypy
realitix has quit [Client Quit]
realitix has joined #pypy
realitix has quit [Client Quit]
hotpot33 has joined #pypy
jdeuce has joined #pypy
jacob22__ has quit [Ping timeout: 264 seconds]
<jdeuce> so I'm interfacing with a bunch of old C code that uses globals using CFFI. If I was writing the extension manually I could refactor those globals into a struct stored with PyModule_GetState... but I can't seem to see how to use GetState with CFFI
<jdeuce> any tips for dealing with that type of code? It works as is now as long as I don't run multiple threads and use separate processes for everything, but that's a bit of a hamstring in terms of performance
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
mattip has joined #pypy
<mattip> hi
<mattip> is there a way to get a tgz of the build directory for a python36 build off bencher4?
<mattip> or maybe just try to randomly update the pypy5.6 there to some other pypy for translation?
<mattip> I am still wallowing in why the tarball I download fails to warn for codecs.unicode_escape_decode(b"\\A")
<mattip> (py3.6)
<mattip> maybe time to change gears and make progress with unicode_utf8, which might be enough to avoid the issue
<mattip> but it is troubling that our buildbot is creating something that proves hard to reproduce
marky1991 has quit [Ping timeout: 260 seconds]
Rhy0lite has quit [Quit: Leaving]
marky1991 has joined #pypy
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
jamesaxl has joined #pypy
marky1991 has quit [Read error: Connection reset by peer]
oberstet has joined #pypy
oberstet has quit [Client Quit]
maxxam has quit [Ping timeout: 265 seconds]
jacob22__ has joined #pypy
kingsley_ has quit [Read error: Connection reset by peer]
hotpot33 has quit [Read error: Connection reset by peer]
mattip has quit [Ping timeout: 260 seconds]
jacob22__ has quit [Ping timeout: 248 seconds]
lritter has quit [Ping timeout: 256 seconds]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 268 seconds]
adamholmberg has joined #pypy
<trfl> quick question - I have a prebuilt pypy3 installed on the system. When entering the pypy3 source directory and running "pypy3 pytest.py pypy" to run the entire test suite I immediately get "Failed on import of cStringIO"
<trfl> is that not how you are supposed to run the test suite to ensure your build is sane?
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholm_ has joined #pypy
adamholmberg has quit [Remote host closed the connection]
mefistof1les has quit [Ping timeout: 256 seconds]
oberstet has joined #pypy
adamholm_ has quit [Remote host closed the connection]
adamholmberg has joined #pypy
Kronuz has quit [Ping timeout: 248 seconds]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
Kronuz has joined #pypy
adamholmberg has quit [Ping timeout: 265 seconds]
kanaka has quit [Ping timeout: 265 seconds]
adamholmberg has joined #pypy
wleslie has joined #pypy
adamholmberg has quit [Ping timeout: 256 seconds]
oberstet has quit [Ping timeout: 240 seconds]
jamesaxl has quit [Quit: WeeChat 2.1]
wleslie has quit [Quit: ~~~ Crash in JIT!]
mattip has joined #pypy