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
asmeurer_ has joined #pypy
asmeurer_ has quit [Client Quit]
asmeurer_ has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
wondiws has quit [Ping timeout: 256 seconds]
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 256 seconds]
dddddd has quit [Remote host closed the connection]
jcea has quit [Quit: jcea]
windy has joined #pypy
<windy> Hi folks, I tried to use RPly to do the parsing. The language is pretty verbose so there are hundreds of grammar rules. After using RPython to translate the parser alone, it took several seconds to process a 120k line program. Is it supposed to be this slow? I haven't attached any JIT to it. Also, are there any large project that uses RPly?
windy has quit [Quit: Page closed]
asmeurer__ has joined #pypy
asmeurer__ has quit [Client Quit]
asmeurer__ has joined #pypy
forgottenone has joined #pypy
alcarithemad has quit [Quit: WeeChat 1.4]
alcarithemad has joined #pypy
Wulf has joined #pypy
asmeurer__ has quit [Quit: asmeurer__]
<dstufft> Dunno if y'all care or not, but linehaul (the stats daemon that turns streaming syslog lines from PyPI's CDN into download events in the BigQuery table) got rewritten and deployed today. Started out using CPython 3.6, but was pegging the CPU on it, dug into it, parsing log lines was the bulk of time, turns out pyparsing is pretty slow :( Switched it to PyPy3.5 6.0.0 atm and it seems to be handling the load much better now :P
<simpson> Yay!
<dstufft> instead of 100% CPU it's floating around 20-30% CPU
<dstufft> I don't really have metrics on how much faster it is, because I don't have metrics in the rewrite :(
<dstufft> Unless this explodes in some crazy unfixable way, will probably keep it on PyPy, switching runtime is way easier than rewriting the parsing
<njs> "not fast enough" versus "fast enough" is a pretty significant metric
<dstufft> Heh yea
tayfun26 has joined #pypy
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 256 seconds]
<cfbolz> dstufft: awesome! Are you by chance up to writing a (one paragraph) blog post for the PyPy blog about this?
<dstufft> cfbolz: sure, though let me run it for longer than an hour or so first to make sure it doesn't explode at 6h or something :)
<njs> cfbolz: heh heh
<cfbolz> dstufft: sure!
<njs> cfbolz: I have already started drafting a case study myself :-)
<dstufft> holding rock steady at 205M RSS and 20-40% CPU
<dstufft> so far
<njs> (this is the version of the daemon that got rewritten to use trio, since the asyncio one was crashing constantly)
<cfbolz> Heh
<dstufft> (the old linehaul was asyncio based, and it was getting OOM killed constantly, and asyncio hurt my head enough that I found it easier to rewrite it in trio than remember how the asyncio bits worked)
<dstufft> then I deployed the new one in CPython, and it was pegging the CPU cuz pyparsing
<cfbolz> dstufft: if there's no c extension and you're closing files I wouldn't be that worried. But indeed I don't know about too many pypy3 deployments
<njs> It'll be nice to have like a week of data or so, then we can put in pictures showing the download stats before vs. after
<cfbolz> Yes, sounds great
<dstufft> pretty sure the only c ext is cryptography, which is cffi so doesn't really count
<cfbolz> Indeed
<njs> cfbolz: IIUC the biggest blocker to testing pypy3 was that he was using type annotations on variables (with the attrs package), and had to go through and remove those to make it 3.5-friendly
<njs> I know you all are working on 3.6 as fast as you can, but maybe it's useful to hear about these things :-)
<cfbolz> :-(
<dstufft> yea
<dstufft> it was a much smaller diff than rewriting to not use pyparsing :)
<cfbolz> Unfortunately 'as fast as we can' is not very fast at the moment
<dstufft> I'm not using mypy or anything, I was just using the auto attribs because it looks cleaner
<njs> I don't suppose you're close enough that it'd be worth thikning about a $10k-ish PSF grant to push it over the finish line?
<dstufft> huh
<dstufft> it crashed oh no (don't think cuz of PyPy though)
<njs> dstufft: uh oh
<njs> dstufft: lmk if you need help parsing out the traceback, trio's tracebacks can be a little too verbose right now
<dstufft> does PyPy mess up tracebacks?
<njs> not usually...
<dstufft> It's got like no information
<njs> pastebin?
<dstufft> https://bpaste.net/show/ba92bc762767 though maybe systemd is eating the rest of it
<njs> uhhh
<njs> that's what you'd get if 'cli()' returned normally without an error
<njs> seems weird
<dstufft> I feel like systemd ate some of the lines
<dstufft> maybe I need to add logging to a file
<cfbolz> njs: it's at least something we should keep in mind as a possibility, yes
<cfbolz> (opinions differ a bit, in my assessment we are getting pretty close, but Armin is more skeptical)
wondiws has joined #pypy
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 240 seconds]
inad922 has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
forgottenone has joined #pypy
forgottenone has quit [Client Quit]
dddddd has joined #pypy
forgottenone has joined #pypy
forgottenone has quit [Client Quit]
forgottenone has joined #pypy
arigato-c has joined #pypy
arigato-c has quit [Ping timeout: 260 seconds]
inad922 has quit [Ping timeout: 244 seconds]
inad922 has joined #pypy
forgottenone has quit [Ping timeout: 240 seconds]
t3chn0punk has joined #pypy
t3chn0pvnk has quit [Ping timeout: 260 seconds]
<atomizer> so in cffi on windows there is a feature that shows exceptions in embedded code in a messagebox
<atomizer> but it doesnt work right if stderr is not open
<atomizer> which is the case in most gui apps
<atomizer> highly confusing to see an empty error msgbox to be honest
ronan has joined #pypy
Gonsor has joined #pypy
jcea has joined #pypy
<bbot2_> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/6880 [ronan: force build, py3.6]
<bbot2_> Started: http://buildbot.pypy.org/builders/own-linux-x86-32/builds/5979 [ronan: force build, py3.6]
<bbot2_> Started: http://buildbot.pypy.org/builders/own-win-x86-32/builds/1824 [ronan: force build, py3.6]
demonimin has quit [Remote host closed the connection]
forgottenone has joined #pypy
<graingert> I can't seem to get -X track-resources to work
<graingert> I've got this code to test it:
<graingert> and I'd actually expect it to warn me that I didn't close the file properly
<graingert> to be clear I'm trying to debug a problem where I'm not closing a file properly on a Django project using FieldFile
<graingert> and I was expecting PyPy to show me where I'm mishandling GC
<graingert> as a side I'd expect __del__ to be called when sys.exit happens
<graingert> but I have to run gc.collect() to trigger that print
ronan has quit [Ping timeout: 244 seconds]
<graingert> also something that's odd is that commenting out the write shows the old content
<graingert> so that write is having some side effect
<graingert> but not the one I expect
demonimin has joined #pypy
<atomizer> umm im not a dev but 1) write is not guaranteed to hit the disk until you close the file, 2) __del__ is not guaranteed to be called on exit
<atomizer> both are explicit in the docs
inad922 has quit [Ping timeout: 260 seconds]
<graingert> atomizer: I know
<graingert> atomizer: I'm trying to find cases where that happens
<graingert> Using the track-resources
<graingert> The code I wrote I would have thought would report my failure to close the file
inad922 has joined #pypy
inad922 has quit [Ping timeout: 268 seconds]
<atomizer> ah right, brainfart... try with -W all
inad922 has joined #pypy
adamholmberg has joined #pypy
forgottenone has quit [Ping timeout: 244 seconds]
<graingert> atomizer: is that documented?
<graingert> Eg on the GC/differences docs?
<atomizer> thats a python flag, so python command line docs
lritter has joined #pypy
Rhy0lite has joined #pypy
<bbot2_> Failure: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/6880 [ronan: force build, py3.6]
forgottenone has joined #pypy
ronan has joined #pypy
ronan has quit [Ping timeout: 244 seconds]
inad922 has quit [Ping timeout: 256 seconds]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
inad922 has joined #pypy
<graingert> atomizer: ok so it only tells me about files
<graingert> not about other finalizers
<graingert> atomizer: ^
<atomizer> what it says on the tin
<atomizer> "Produce a ResourceWarning whenever a file or socket is closed by the garbage collector."
<bbot2_> Failure: http://buildbot.pypy.org/builders/own-linux-x86-32/builds/5979 [ronan: force build, py3.6]
ronan has joined #pypy
<graingert> atomizer: ah dang
<graingert> Is there one for any calls to __del__?
<graingert> By the GC
forgottenone has quit [Ping timeout: 256 seconds]
jamesaxl has joined #pypy
forgottenone has joined #pypy
<atomizer> sounds like you want a memory profiler
<atomizer> there are a lot
ronan has quit [Ping timeout: 244 seconds]
stevenja_ has joined #pypy
tayfun26 has quit [Quit: tayfun26]
stevenja_ has quit [Remote host closed the connection]
stevenja_ has joined #pypy
stevenja_ has quit [Remote host closed the connection]
stevenja_ has joined #pypy
ronan has joined #pypy
stevenja_ has quit [Ping timeout: 240 seconds]
ronan has quit [Ping timeout: 244 seconds]
<marky1991> stupid question
<marky1991> interpreters written that use rpython are still limited by the gil, right?
<marky1991> e.g. if i wanted every function call in my language to take place in its own thread, could I do that and have the threads all execute simultaneously?
<marky1991> hmm, i found a paper about this exact subject for pypy, I'll review that
Gonsor has quit [Read error: Connection reset by peer]
adamholm_ has joined #pypy
adamholmberg has quit [Ping timeout: 244 seconds]
<bbot2_> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4034 [ronan: force build, py3.6]
<marky1991> hmm, the paper basically says to use stm, which is dead for pypy
inad922 has quit [Ping timeout: 268 seconds]
forgottenone has quit [Quit: Konversation terminated!]
alcarithemad has quit [Quit: WeeChat 1.4]
alcarithemad has joined #pypy
Wulf has quit [Ping timeout: 256 seconds]
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
RemoteFox has quit [Remote host closed the connection]
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
stevenja_ has joined #pypy
stevenja_ has quit [Remote host closed the connection]
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
inhahe has quit []
inhahe has joined #pypy
adamholmberg has joined #pypy
asmeurer__ has joined #pypy
adamholm_ has quit [Ping timeout: 260 seconds]
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 256 seconds]
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 260 seconds]
marky1991 has quit [Ping timeout: 256 seconds]
Rhy0lite has quit [Quit: Leaving]
forgottenone has joined #pypy
marky1991 has joined #pypy
lritter has quit [Remote host closed the connection]
<cfbolz> marky1991: what kind of language are you thinking about?
<marky1991> just a made-up language I've been working on
<marky1991> personal fun project
stevenja_ has joined #pypy
<cfbolz> marky1991: then experimenting with the stm branch should definitely be possible
<marky1991> yeah, I thought about looking. I just didn't trust myself to understand its changes well enough
<marky1991> but I'll take a look
asmeurer__ has quit [Quit: asmeurer__]
stevenja_ has quit [Ping timeout: 240 seconds]
forgottenone has quit [Ping timeout: 244 seconds]
<kenaan> mattip unicode-utf8 e32ab94a29ee /: merge default into branch
<kenaan> mattip unicode-utf8-py3 d50076cea2ec /: merge py3.5 into branch
<kenaan> mattip unicode-utf8-py3 74c2ede43307 /pypy/: fix, skip tests
<kenaan> mattip unicode-utf8-py3 97cd2e230f8a /pypy/: remove consumed from decoding functions
<kenaan> mattip unicode-utf8-py3 fed03b2241ff /: fix tests, then fix implementations to pass more tests
marky1991 has quit [Read error: Connection reset by peer]
stevenja_ has joined #pypy
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
stevenja_ has quit [Ping timeout: 260 seconds]
asmeurer__ has joined #pypy
<bbot2_> Failure: http://buildbot.pypy.org/builders/own-win-x86-32/builds/1824 [ronan: force build, py3.6]
<wondiws> hi there
<wondiws> anyone of the 153 awake?
speeder39 has joined #pypy
<wondiws> hello?
<simpson> wondiws: Hi.
<wondiws> simpson, I'm using debian, and I can use concurrent.futures in python3, even though I have not that package installed as far as I know. I suppose concurrent.futures is available too in pypy, but how do I install this?
<wondiws> and what is ensurepip by the way?
adamholmberg has quit [Remote host closed the connection]
<njs> wondiws: if you use pypy3, that does have concurrent.futures in the standard library, just like cpython 3
<simpson> I don't have a PyPy for Python 3 available to me right now, so I can't confirm, but concurrent.futures should be in the stdlib.
adamholmberg has joined #pypy
<njs> wondiws: if you want to use concurrent.futures on python 2/pypy 2, then you can install https://pypi.org/project/futures/
<simpson> ensurepip is a stdlib module that ensures that pip is present, IIRC.
<wondiws> njs, ok, I guess I have to compile pypy3 myself then, debian ships with pypy(2) :S
<wondiws> njs, I still try to compile it myself first, that's what I always do, binaries don't quite appeal to me
<njs> ok. compiling pypy is not for the faint of heart, but if you're having fun then go for it :-)
<wondiws> njs, oh, is it that difficult?
<simpson> wondiws: But you're on Debian?~ If you happen to have Nix available with nixpkgs, you could build `pypy`.
<simpson> It's not hard, but it takes a beefy machine and a bit of time.
<wondiws> simpson, Nix? nixpkgs? I don't know what you're talking about :P
<simpson> No worries. Just trying to lay out options.
adamholmberg has quit [Ping timeout: 240 seconds]
<wondiws> simpson, yes, thank you very much
<njs> wondiws: it's certainly doable, people do it all the time. but it's not just './configure && make && make install' and 30 seconds later you're done.
Wulf has joined #pypy
adamholmberg has joined #pypy
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 240 seconds]
<wondiws> njs, still compiling, but 1 hour in, I suddenly get an error that I need gdm.h...
<wondiws> and now it starts all over again :(
<njs> wondiws: are you having fun yet :-)
<wondiws> njs, I was...
jamesaxl has quit [Quit: WeeChat 2.2]
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy