cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "the modern world where network packets and compiler optimizations are effectively hostile"
kipras is now known as kipras`away
yuyichao_ has joined #pypy
<blachance> simpson: not that I'm aware of, no.
<simpson> blachance: Then I'm not sure offhand what that abort could mean. Do you have a link to your repo? What's your basic evaluation strategy and how is your JIT hooked in?
<blachance> by evaluation strategy do you mean e.g. bytecode vs AST?
<simpson> Yeah. Like, do you have frames, continuations, etc.? "virtual" means a value that the JIT has determined doesn't exist outside of the current trace. The JIT tries to remove these when it can. I'm not sure how promotion interferes with this. I'm also still not sure that this is "virtuals" and not "virtualizables".
David2050 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<blachance> I guess they're a lot like frames; it's similar to Pycket's CEK-style interpreter, if you're familiar with that
rokujyouhitoma has joined #pypy
<simpson> Ah, sure. I figure that the JIT normally wouldn't have trouble with that.
<blachance> as for the repo link, still working on that---just started playing with adding a JIT
<kenaan> rlamy default 5adabc9b9848 /pypy/module/cpyext/: Fix calling PyErr_Fetch() + PyErr_NormalizeException() with no exception set
rokujyouhitoma has quit [Ping timeout: 260 seconds]
<kenaan> rlamy py3.5 920958a93997 /pypy/: hg merge default
asmeurer_ has joined #pypy
marky1991 has quit [Remote host closed the connection]
marr has quit [Ping timeout: 240 seconds]
David2050 has joined #pypy
David2050 has quit [Client Quit]
David2050 has joined #pypy
altendky has quit [Quit: Connection closed for inactivity]
rokujyouhitoma has joined #pypy
David2050 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
rokujyouhitoma has quit [Ping timeout: 268 seconds]
jiffe has quit [Quit: WeeChat 1.9]
jiffe has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
tbodt has quit [Client Quit]
tbodt has joined #pypy
tbodt has quit [Client Quit]
tbodt has joined #pypy
_whitelogger has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
tbodt has quit [Remote host closed the connection]
yuyichao_ has quit [Remote host closed the connection]
ArneBab_ has joined #pypy
ArneBab has quit [Ping timeout: 260 seconds]
tbodt has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
asmeurer_ has quit [Quit: asmeurer_]
altendky has joined #pypy
yuyichao_ has joined #pypy
asmeurer__ has joined #pypy
yuyichao_ has quit [Remote host closed the connection]
_whitelogger has joined #pypy
marky1991 has joined #pypy
yuyichao_ has joined #pypy
yuyichao_ has quit [Remote host closed the connection]
yuyichao_ has joined #pypy
rokujyouhitoma has joined #pypy
yuyichao_ has quit [Read error: Connection reset by peer]
pilne has quit [Quit: Quitting!]
rokujyouhitoma has quit [Ping timeout: 240 seconds]
yuyichao_ has joined #pypy
yuyichao_ has quit [Read error: Connection reset by peer]
yuyichao_ has joined #pypy
yuyichao_ has quit [Remote host closed the connection]
yuyichao_ has joined #pypy
lvella has joined #pypy
marky1991 has quit [Ping timeout: 248 seconds]
lvella has quit [Quit: Ex-Chat]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
altendky has quit [Quit: Connection closed for inactivity]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
arigato has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
yuyichao_ has quit [Remote host closed the connection]
yuyichao has joined #pypy
tormoz has quit [Remote host closed the connection]
lritter has joined #pypy
rokujyouhitoma has joined #pypy
marr has joined #pypy
rokujyouhitoma has quit [Ping timeout: 255 seconds]
arigato has quit [Read error: Connection reset by peer]
arigato has joined #pypy
<cfbolz> blachance: it's probably because you pass a newly allocated object into a green variable
rokujyouhitoma has joined #pypy
asmeurer__ has quit [Quit: asmeurer__]
rokujyouhitoma has quit [Ping timeout: 255 seconds]
antocuni has joined #pypy
Taggnostr has quit [Ping timeout: 276 seconds]
Taggnostr has joined #pypy
rokujyouhitoma has joined #pypy
Taggnostr2 has joined #pypy
Taggnostr has quit [Ping timeout: 248 seconds]
antocuni has quit [Ping timeout: 248 seconds]
rokujyouhitoma has quit [Ping timeout: 260 seconds]
oberstet has joined #pypy
nimaje1 has joined #pypy
nimaje1 is now known as nimaje
nimaje has quit [Killed (barjavel.freenode.net (Nickname regained by services))]
kipras`away is now known as kipras
arigato has quit [Quit: Leaving]
_whitelogger has joined #pypy
WGH has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
jamescampbell has joined #pypy
jamescampbell has quit [Remote host closed the connection]
jamescampbell has joined #pypy
jamescampbell has quit [Ping timeout: 240 seconds]
jamescampbell has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
marky1991 has joined #pypy
Fleche has joined #pypy
<marky1991> wheres te best place to find out what something like "getfield_gc_r" means in a trace?
<marky1991> in this particular case, I can tell it's getting some field, but no idea what r means
<marky1991> i'm not able to find anthing helpful by grepping around in rpython/*
<marky1991> more generally, if anyone knows of any resources or examples of people going through traces to improve perf, that would also be great
<marky1991> the only example I've been able to find is in the morepypyp imlement-an-interpreter tutorial
slacky has joined #pypy
jamescampbell has quit [Remote host closed the connection]
jamescampbell has joined #pypy
jamescampbell has quit [Ping timeout: 260 seconds]
rokujyouhitoma has joined #pypy
pilne has joined #pypy
rokujyouhitoma has quit [Ping timeout: 258 seconds]
jamescampbell has joined #pypy
yuyichao_ has joined #pypy
yuyichao has quit [Read error: Connection reset by peer]
antocuni has joined #pypy
arigato has joined #pypy
<LarstiQ> marky1991: might _r denote raw?
jamescampbell has quit [Remote host closed the connection]
<arigato> marky1991: no, getfield_gc_r means ``get a field inside a gc object, and the field type is a "r"eference``
<arigato> i.e. a pointer to another gc object
<arigato> in a trace, operations often end with "_r", "_i" or "_f" depending on the type of the value they return. "_i" is for any integer including a raw (non-gc) pointer, "_f" is for floats
<marky1991> that's kind of what i was thinking
<marky1991> thanks for confirming
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 268 seconds]
Fleche has quit [Ping timeout: 240 seconds]
<kenaan> arigo default 016c02447548 /pypy/: issue #2601 Fix for 'reversed(mapping object)'
<kenaan> arigo default 36058071b9d0 /pypy/module/__builtin__/test/test_functional.py: Backport passing test from py3.5
<kenaan> arigo default b86461902673 /pypy/module/__builtin__/functional.py: Match CPython's error message
<kenaan> arigo py3.5 94b78e58b886 /pypy/: hg merge default
antocuni has quit [Ping timeout: 276 seconds]
<kenaan> arigo default fe1c32761823 /pypy/: issue #2601 Fix for 'reversed(dictproxy)', mostly by backporting 78dee66
<kenaan> arigo py3.5 7888ede0c136 /pypy/: hg merge default
<kenaan> arigo py3.5 93580eb8c58e /pypy/module/thread/test/test_local.py: Fix test
oberstet has quit [Ping timeout: 268 seconds]
<blachance> cfbolz: hmm, that sounds like something I am doing? I'm initializing my only one line above the dispatch loop/first call to jit_merge_point
<blachance> * initializing my only green one line above
<cfbolz> blachance: pastebin it? I'll take a look
rokujyouhitoma has joined #pypy
<blachance> thank you! https://pastebin.com/fgLg9pCZ has the main loop
<cfbolz> blachance: doesn't quite help. I would need to see what the c classes look like
<cfbolz> What you showed so far looks reasonable
rokujyouhitoma has quit [Ping timeout: 240 seconds]
<blachance> apologies in advance: it's a bunch of (poorly) generated code
<blachance> https://pastebin.com/QE9Rk6cA has a class cl_e and the "c" classes are subclasses of it
<blachance> cl_var is probably the smallest class that does something interesting
<arigato> blachance: I see that interpret() sometimes returns a fresh instance for 'c'
<arigato> (depending on what exactly self.op is)
<arigato> that would be what the JIT complains about
tbodt has joined #pypy
<blachance> agh, I see... (and I guess those Prim classes are actually the smallest ones that do something interesting!)
<arigato> the JIT works by assuming that what is sent to the 'green' variables are constants, representing the program to interpret
<blachance> hm.. I think I'm having trouble understanding what things are and aren't constant---I've seen interpreters where e.g. a pc register is assigned to, yet pc is a green
<arigato> in a translated program, integers are not "objects"
<arigato> here the problem looks to be that 'c' is assigned a fresh object
<arigato> so, really, "constant" here means "the same value in the C-translated program": if it is an object reference, then it must be a reference to the exact same object
<arigato> this part of the JIT is a bit of an abstraction leak, because usually you don't have to worry about such low-level details
<arigato> but here, e.g. a tuple would be represented as a pointer, so even using a new tuple is not allowed (even if it's just a tuple of the same two integers)
jamescampbell has joined #pypy
<blachance> thanks for explaining that, I think that helps me see the issue I'm having
<blachance> the self.op calls are indeed producing new instances, which it looks like I need to avoid
<arigato> yes, you probably need to pre-build the complete tree of objects that represent everything that goes into the green variable
<arigato> it's easier to do that with an interpreter like PyPy, because there is a clear distinction between the immutable 'code' objects and the rest
<arigato> ...ok, seems that by hacking for one hour again on py3.5, I found the next CPython bug
<blachance> thanks all for the help, I'm starting to understand the translation process a little better now
<kenaan> arigo py3.5 4d0f184d43a2 /pypy/: Accept buffer objects as filenames. It often works like the corresponding bytes object. Of course, os.listdir() is ...
Tiberium has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 246 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
asmeurer_ has joined #pypy
tbodt has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
<pjenvey> arigato: I think we got that killed in cpython: https://bugs.python.org/issue26800
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arigato> ah, so bytearray or memoryview cannot be passed any more?
<arigato> cool, I'll assume there is a test for it and we'll see it when we upgrade pypy to the corresponding 3.x
<pjenvey> i think it's deprecated, maybe not killed
<arigato> ah, well, ok
<arigato> so I wrote an issue about a misbehaviour of a deprecated-but-not-killed feature
tbodt has joined #pypy
mattip has joined #pypy
<kenaan> arigo cffi/cffi 115ee1bd9bc7 /: Apply the patch of issue 321 if __NetBSD__ is defined.
rokujyouhitoma has joined #pypy
jamescampbell has quit [Quit: Leaving...]
rokujyouhitoma has quit [Ping timeout: 260 seconds]
lritter has quit [Remote host closed the connection]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Fleche has joined #pypy
pilne has quit [Quit: Quitting!]
tbodt has joined #pypy
rokujyouhitoma has joined #pypy
arigato has quit [Quit: Leaving]
<nbjoerg> arigato: right, that comment is reasonable. thanks for taking care of it
<nbjoerg> I'll try to get someone to handle the mess in libffi better ;)
rokujyouhitoma has quit [Ping timeout: 240 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
oberstet has joined #pypy
arigato has joined #pypy
<mattip> for some reason, False.__int__ is a function, but w_type.getdictvalue(space, '__int__') returns None for w_type = space.type(space.w_False)
<mattip> this came up in filling the nb_int slot of 'bool' type in slotdefs.py, build_slot_tp_function
<mattip> so cython fails to convert a bool to an int, causing numerous pandas failures
rokujyouhitoma has joined #pypy
<arigato> mattip: that's because '__int__' is defined in the base type of bool, which is int
<arigato> and getdictvalue() apparently doesn't look up the hierarchy
<mattip> hmm. So I guess that should be space.lookup() instead, I wonder what that will break :)
<arigato> either that, or else in the CPython case there is a bool.__int__
<arigato> no
<arigato> at least not at Python level
<mattip> this is not the first time there is a conflict between getdictvalue and lookup
<arigato> unrelated, took me a moment to remember what __rand__() is: http://paste.pound-python.org/show/xsiRriC4MOUflEG7fJSN/
rokujyouhitoma has quit [Ping timeout: 248 seconds]
<mattip> right-and
<arigato> and not "random"
<mattip> ahh, yes
<mattip> haha
* mattip trying lookup()
<mattip> indeed, lookup passes a test I wrote for bool.tp_as_number->tp_int
asmeurer_ has joined #pypy
arigato has quit [Quit: Leaving]
nbjoerg has left #pypy [#pypy]
yuyichao_ has quit [Read error: Connection reset by peer]
yuyichao has joined #pypy
Tiberium has quit [Remote host closed the connection]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
asmeurer_ has quit [Quit: asmeurer_]
mattip has left #pypy ["bye"]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 268 seconds]
oberstet has quit [Quit: Leaving]
vkirilichev has quit [Remote host closed the connection]
tbodt has quit [Read error: Connection reset by peer]
tbodt has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
marr has quit [Ping timeout: 240 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
slacky has quit [Ping timeout: 248 seconds]
asmeurer__ has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
antocuni has joined #pypy