arigato 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 | mac OS and Fedora are not Windows
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
zmt01 has quit [Quit: Leaving]
zmt00 has joined #pypy
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
jcea has quit [Quit: jcea]
fryguybob has quit [Remote host closed the connection]
Garen has quit [Read error: Connection reset by peer]
Garen has joined #pypy
dddddd has quit [Quit: Hasta otra..]
oberstet has joined #pypy
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
toad_poloest has joined #pypy
user24 has quit [Quit: Leaving]
toad_poloer has quit [Read error: Connection reset by peer]
<mattip> ronan: any idea why "with pytest.raises(Execption)" fails on py3.6?
<mattip> in -A tests
darkman66 has joined #pypy
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
altendky has quit [Quit: Connection closed for inactivity]
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
petronny has quit [Read error: Connection reset by peer]
kcr has quit [Read error: Connection reset by peer]
petronny has joined #pypy
kcr has joined #pypy
darkman66 has quit [Remote host closed the connection]
Ai9zO5AP has joined #pypy
jacob22_ has quit [Ping timeout: 245 seconds]
andi- has quit [Ping timeout: 258 seconds]
darkman66 has joined #pypy
andi- has joined #pypy
<kenaan> stevie_92 cpyext-gc-cycle 0b7ae798b964 /: Clear weakref callbacks in rawrefcounted garbage to avoid resurrection
andi- has quit [Excess Flood]
<arigato> Alex_Gaynor: hey, you here?
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
<fijal> I think it's 5:30 am for him
<arigato> just trying :-)
andi- has joined #pypy
danchr_ has joined #pypy
danchr_ has quit [Quit: ZNC - http://znc.sourceforge.net]
jacob22 has joined #pypy
danchr has quit [Quit: ZNC - http://znc.sourceforge.net]
danchr has joined #pypy
<danchr> listclients
<danchr> oops, sorry
ronan has quit [Ping timeout: 252 seconds]
ronan has joined #pypy
dddddd has joined #pypy
<RemoteFox> what are you using when you try to profile interpreter in rpython?
<RemoteFox> I have some success with callgrind and perf
<RemoteFox> but often I have to just blindly change and try a lot of things until I get some sense of what specific line is causing trouble
<RemoteFox> for example, to rewrite if something to if something is not None resulted in huge performance gains
<RemoteFox> is there any tool which would visualise how much costly is each line?
<bbot2_> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4541 [Andy Lawrence: force build, winoverlapped]
<cfbolz> RemoteFox: which language is that?
darkman66 has quit [Remote host closed the connection]
<RemoteFox> you mean my language?
altendky has joined #pypy
<cfbolz> RemoteFox: cool!
<cfbolz> What we usually do is to study the traces that the jit produces for small programs, and look at how efficient they are
darkman66 has joined #pypy
<cfbolz> RemoteFox: the process switching looks pretty hard for rpython
<cfbolz> RemoteFox: also, are loops primitives?
<cfbolz> Ah, not even, they are implemented with recursion, correct?
<cfbolz> If yes, does the language have tail recursion elimination?
<RemoteFox> yeah, I've added tail call elimination
<RemoteFox> they are not primitives, they are .. recursive messages between objects
<RemoteFox> I will probably do the process switching differently
<RemoteFox> I was trying to get into some at-least-partially-working version of proof of concept and then I've spent few months by speedups
<RemoteFox> it is now almost usably fast, so I will focus more on the architecture and stdlib
<RemoteFox> I have no complang theory, so it may all be inefficient and amateur-ish
<RemoteFox> right now I am at process of elimination of lists and dicts everywhere where it makes any sense
<RemoteFox> I've had frames and stacks implemented as lists and I've rewritten stack to linked list and saved like 1 bilion of instructions per 1M while cycles
<RemoteFox> so.. yeah, huge space for improvements
xcm has quit [Remote host closed the connection]
<cfbolz> RemoteFox: the reason why rpython's jit is not doing so great is that the model is quite different than python, where loops are really explicit in the bytecode
<cfbolz> I can try to look whether it's possible to teach the jit about loops in your model
<RemoteFox> wow, that would be great
xcm has joined #pypy
<cfbolz> RemoteFox: can you give the command I need to run to execute the while loop benchmark?
fryguybob has joined #pypy
<Alex_Gaynor> arigato: I am now
<RemoteFox> I am using "pypy src/target.py tests/scripts/while_true_benchmark.self", but it expects export PYTHONPATH="src/:$HOME/Plocha/src/testy/packages/pypy:$PYTHONPATH";
<cfbolz> right
<cfbolz> cool
<RemoteFox> compilation works by running ./compile.py with export RPYTHON_PATH="$HOME/Plocha/src/testy/packages/pypy/rpython/bin"
<RemoteFox> while_true_benchmark.self is really not greatly named, it is more unittest than benchmark, it just counts to 500
<RemoteFox> simple_while_benchmark.self is while count to 1 milion
<cfbolz> ok, will take a look
<RemoteFox> great
nunatak has joined #pypy
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
Rhy0lite has joined #pypy
<fijal> is bitbucket down?
<mattip> I can reach https://bitbucket.org, but it seems slow
<cfbolz> RemoteFox: ok, I got stuff running, will poke around for a bit
darkman66 has quit [Ping timeout: 252 seconds]
<fijal> can't push it seems
<fijal> anyway, got one more test to pass I guess
<cfbolz> RemoteFox: can you give me a hint where tail call optimization is implemented?
<fijal> pom pom pom
<marmoute> Talking about bitbucket, feel free to hit our mirror of your repo for pulling
darkman66 has joined #pypy
<RemoteFox> cfbolz: interpreter.py / method _tco_applied
<cfbolz> ah, nice
adamholmberg has joined #pypy
<RemoteFox> there is also some code in _create_intermediate_params_obj
antocuni has joined #pypy
<RemoteFox> but that shouldn't matter, it just handles loops in parameter object parent chains
<mattip> are there any blocker issues for 7.1.1 ?
<mattip> 2983 readline outputting \u0000
<mattip> 2996 about kwargs
<cfbolz> mattip: yes, I am a bit scared by 2983
<cfbolz> There was a similar problem and it turned out to be a serious bug in utf-8 stuff
<mattip> ok. Any idea how to diagnose?
<cfbolz> mattip: no :-(
<cfbolz> mattip: can you reproduce it? Eg try typing some Hebrew letters in the interactive interpreter?
<mattip> there is also 2985 os.replace(..., pathlike), but that seems like a new feature in 3.6 not yet supported
<fijal> yeah hg push does not work for me at all
nunatak has quit [Quit: Leaving]
<cfbolz> mattip: yes, that is missing support for __fspath__ for some os methods, I fear
<mattip> typing hebrew works fine, I can assign a non-latin string to a variable and print it
<mattip> with LANG=en_US.UTF-8
<antocuni> I can reproduce it
<mattip> ?
<antocuni> what I did was to type "a = 'à'"
<antocuni> and then press arrow up
<antocuni> with the latest nightly
<antocuni> note that it seems that \u0000 is only *displayed*, not really passed to the parser
<mattip> hmm. What routine does arrow-up go to?
<antocuni> even more interesting: the same bug appears also in pdb, so it's really an issue in readline
<cfbolz> Not necessarily
<cfbolz> Could be in pyrepl
<antocuni> well, our readline is the pyrepl's one :)
<mattip> I get max(n-1, 1) '\u000' chars depending on the length of a
<cfbolz> And last time we had a very similar effect, but it turned out to be a bug in str.join
<antocuni> it's not deterministic also
<cfbolz> antocuni: note that it's pure python. So it's likely a bug in unicode or something like that
<antocuni> if I press up and down multiple times, sometimes I get \u0000
<antocuni> sometimes I get nothing
<antocuni> and sometimes I get different values such as \u0001 or \u0008
<mattip> "n-1 or 1" would go along with the join idea
<antocuni> cfbolz: I fear so
<antocuni> also, pressing up and down sometimes "erases" the prompt
<antocuni> FWIW, pypy2 seems to behave correctly
marky1991 has joined #pypy
dmalcolm has quit [Quit: Leaving]
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
rtw_ has joined #pypy
rtw_ has quit [Client Quit]
<cfbolz> RemoteFox: there's a ton of work to do to make things efficient, I fear :-(
<antocuni> so, I discovered something
<antocuni> the correct place where to look at is pyrepl.reader:calc_screen()
<RemoteFox> cfbolz: yeah, I thought so
<RemoteFox> where would you start?
<antocuni> if you put some prints there, you can see that "lines" contains the correct data
<RemoteFox> get rid of process switching?
<antocuni> but the computed "screen" (which is the data to display I suppose) contains the \u0000
<antocuni> calc_screen: lines= ["a = 'à'"]
<antocuni> calc_screen: screen= [">>>> a = 'à'\\u0000"]
<antocuni> so probably the bug manifests itself inside some computation done by calc_screen
<cfbolz> RemoteFox: I can make a pull request to give you a complete hack of a file that lets you look at the trace without translating every time
<antocuni> I need to go now, feel free to continue from here, or I'll continue later
<cfbolz> RemoteFox: that improves the turnaround time of improving things
<RemoteFox> cfbolz: that would be nice
<cfbolz> RemoteFox: the process switching is not the worst problem
<RemoteFox> I know
<RemoteFox> I think I understand what you said
<RemoteFox> basically tco is not good for jit, as it can't see it in the bytecode, correct?
<cfbolz> no, tco is great!
<cfbolz> otherwise it wouldn't work at all ;-)
<RemoteFox> (it didn't :D)
<cfbolz> RemoteFox: given a code object, is there a way to get the name of the method or something?
<RemoteFox> you mean CodeContext, or Object with code?
<RemoteFox> CodeContext, which is the class that holds bytecodes at the moment doesn't know about method-object it is in
<RemoteFox> but it would be possible to add it
Zaab1t has joined #pypy
marky1991 has quit [Ping timeout: 240 seconds]
darkman66 has quit [Remote host closed the connection]
<cfbolz> RemoteFox: yes, that would be useful to understand the generated code more easily
<cfbolz> RemoteFox: the other thing that would be useful: it should be possible to compute the maximum stack depth of each method, right?
<cfbolz> that way, the value stack could be represented as a fixed sized list using an index as the stack pointer
<cfbolz> that would help the JIT *a ton*
<RemoteFox> yeah, that should be possible
<cfbolz> RemoteFox: opened a pull request: https://github.com/Bystroushaak/tinySelf/pull/95
<RemoteFox> thanks, merged
<cfbolz> cool
<cfbolz> RemoteFox: ok, the fixed-sized list as value stack should help
<RemoteFox> I will try that later today, when I get home
<RemoteFox> thanks for your help
<cfbolz> RemoteFox: ping me when you have the fixed-sized list, I can take another look then
darkman66 has joined #pypy
<cfbolz> RemoteFox: the other more general problem is that all your objects have a bit too many fields. BareObject has 5 fields, including 2 lists!
<cfbolz> eg ints should really just have a single value field somehow
<cfbolz> or is it allowed to add arbitrary methods to the number 5?
<RemoteFox> it is allowed, but not recommended :]
<cfbolz> then you can still make Ints smaller by giving them a value field, and one second field for all the extra stuff that is usually None
<cfbolz> or something like that
<RemoteFox> from what I can see, the code is much faster alredy, I mean jitted benchmark now runs 100% faster
<RemoteFox> thanks for that
<RemoteFox> cfbolz: yeah, I will look into it again
<cfbolz> RemoteFox: nice!
<cfbolz> but there is probably another 10x speedup possible, at least
<toad_poloest> Is there a way to specify the signature is METH_O?
<toad_poloest> Seems like it's just the function body with that import_extension function.
<cfbolz> RemoteFox: fwiw, I've written my own strange self dialect at some point, so I know some of the problems ;-)
darkman66 has quit [Remote host closed the connection]
<RemoteFox> <3 :)
<RemoteFox> I've accidentally triggered also https://github.com/JaroslavTulach/SelfGraal
<toad_poloest> Oh, found an example, the default argument is called "args"
<RemoteFox> as I visit publicly accessible classes where he is teaching graalvm to compsci students and he wanted a language to use as example, so I am curious where this will lead
<cfbolz> RemoteFox: cool
<RemoteFox> (accidentally, as I didn't suggest Self as a language, but I am writing a series of blogs about the language and he saw it on my twitter)
darkman66 has joined #pypy
<toad_poloest> I am actually having a bit of trouble with this, I moved the definition of the GMT1 class in test_datetime up to module scope, because I wanted to use it in test_constructors.py.
<toad_poloest> It still works in test_tzinfo, but test_constructors.py is throwing "(application-level) NameError: global name 'GMT1' is not defined"
<toad_poloest> Given that `datetime` is imported in test_constructors, I'm guessing somehow it's not able to look things up at module level scope. Should I just re-define the same tzinfo object within the test function?
<toad_poloest> Or is there a way to reveal that symbol?
<cfbolz> toad_poloest: yes, the scoping is wonky in applevel tests
<cfbolz> toad_poloest: you indeed cannot look up things in the module level scope from each test function
<cfbolz> toad_poloest: the global level is python2, each individual test runs on top of the pypy interpreter
<toad_poloest> Weird, OK, I'll just make a new tzinfo object.
marky1991 has joined #pypy
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
darkman66 has quit [Ping timeout: 255 seconds]
marky1991 has quit [Ping timeout: 240 seconds]
darkman66 has joined #pypy
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
darkman66 has quit [Ping timeout: 252 seconds]
marky1991 has joined #pypy
marky1991_2 has joined #pypy
marky1991 has quit [Ping timeout: 250 seconds]
<antocuni> it is likely caused by the utf8 branch, but I didn't investigate further
darkman66 has joined #pypy
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
antocuni has quit [Ping timeout: 264 seconds]
darkman66 has quit [Remote host closed the connection]
gsnedders has quit [Quit: leaving]
darkman66 has joined #pypy
gsnedders has joined #pypy
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
dustinm- has quit [Quit: Leaving]
dustinm has joined #pypy
jcea has joined #pypy
oberstet has quit [Quit: Leaving]
<bbot2_> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4541 [Andy Lawrence: force build, winoverlapped]
darkman6_ has joined #pypy
darkman66 has quit [Read error: Connection reset by peer]
darkman6_ has quit [Ping timeout: 252 seconds]
darkman66 has joined #pypy
darkman66 has quit [Read error: Connection reset by peer]
darkman66 has joined #pypy
fling has quit [Quit: ZNC 1.7.2+deb1~bpo9+1 - https://znc.in]
fling has joined #pypy
Zaab1t has quit [Quit: bye bye friends]
marky1991_2 has quit [Quit: Saliendo]
marky1991 has joined #pypy
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
Ai9zO5AP has quit [Quit: WeeChat 2.4]
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
Rhy0lite has quit [Quit: Leaving]
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
<toad_poloest> I have created two PRs, against the 2.7 and 3.6 branches, respectively.
<toad_poloest> https://bitbucket.org/pypy/pypy/pull-requests/643/ <- This is the 3.6 one, it links to the 2.7 one.
<toad_poloest> I don't see anything in the contributing guide about a changelog, please let me know if I need to do anything.
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
darkman66 has quit [Remote host closed the connection]
darkman66 has joined #pypy
darkman6_ has joined #pypy
TwoPilesOfDirt has joined #pypy
darkman66 has quit [Ping timeout: 255 seconds]
TwoPilesOfDirt has quit [Quit: Leaving]
TwoPilesOfDirt has joined #pypy
TwoPilesOfDirt has quit [Client Quit]
TwoPilesOfDirt has joined #pypy
TwoPilesOfDirt has quit [Quit: Leaving]
TwoPilesOfDirt has joined #pypy
PileOfDirt has joined #pypy
TwoPilesOfDirt has quit [Read error: Connection reset by peer]
speeder39_ has joined #pypy
darkman66 has joined #pypy
darkman6_ has quit [Ping timeout: 250 seconds]
darkman66 has quit [Remote host closed the connection]
moei has quit [Quit: Leaving...]
marky1991 has quit [Ping timeout: 252 seconds]
[Arfrever] has quit [Ping timeout: 250 seconds]
adamholmberg has quit [Remote host closed the connection]