cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "nothing compares to the timeshifter, my personal polar expedition in software" - pedronis
traverseda has quit [Ping timeout: 255 seconds]
traverseda has joined #pypy
traverseda has quit [Ping timeout: 255 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marr has quit [Ping timeout: 246 seconds]
traverseda has joined #pypy
lritter has joined #pypy
raynold has quit [Quit: Connection closed for inactivity]
drolando has quit [Remote host closed the connection]
drolando has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 258 seconds]
traverseda has quit [Ping timeout: 252 seconds]
ArneBab has joined #pypy
raynold has joined #pypy
ArneBab_ has quit [Ping timeout: 255 seconds]
traverseda has joined #pypy
dw has quit [Read error: Connection reset by peer]
dw has joined #pypy
_whitelogger has joined #pypy
lritter_ has joined #pypy
lritter has quit [Ping timeout: 255 seconds]
ulope has quit [Ping timeout: 240 seconds]
ulope has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 260 seconds]
jcea1 has joined #pypy
jcea has quit [Remote host closed the connection]
jcea1 is now known as jcea
forgottenone has joined #pypy
jcea has quit [Quit: jcea]
inhahe_ has quit [Ping timeout: 248 seconds]
inhahe_ has joined #pypy
inhahe_ has quit [Ping timeout: 248 seconds]
inhahe_ has joined #pypy
glyph has quit [Quit: End of line.]
glyph has joined #pypy
oberstet has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 252 seconds]
raynold has quit [Quit: Connection closed for inactivity]
forgottenone has quit [Quit: Konversation terminated!]
forgottenone has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
lritter_ has quit [Quit: Leaving]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 240 seconds]
realitix has joined #pypy
oberstet has quit [Ping timeout: 252 seconds]
antocuni has joined #pypy
arigato has quit [Quit: ZNC - http://znc.in]
arigo has joined #pypy
arigo is now known as arigato
<antocuni> arigato: hi
<cfbolz> morning all
adamholmberg has joined #pypy
Guest36286 has joined #pypy
adamholmberg has quit [Ping timeout: 264 seconds]
Guest36286 has quit [Read error: No route to host]
Guest36286 has joined #pypy
Guest36286 has quit [Ping timeout: 240 seconds]
<arigato> hi
<antocuni> arigato: I think we have two potential problems in our branch
<antocuni> the first is that a lot of the functions we have written in C might end up calling some PyErr_*(), which right now are implemented in RPython
<antocuni> so we could end up having the same problem we had for PyTuple_New calling _Py_NewReference
<arigato> yes, well... time to rewrite them in C
<antocuni> not so obvious, as they end up calling PyErr_SetObject, which is implemented as "state.set_exception(OperationError(w_type, w_value))"
<arigato> well
<arigato> it's a typical bogus implementation
<arigato> ah, maybe not
<antocuni> I think that the actual work is done by State.check_and_raise_exception
<antocuni> so maybe PyErr_SetObject could simply store the pyobjects on the state, with check_and_raise_exception doing the job of converting to OperationError
<arigato> it's a bit more work, but I would say that the state should be accessible from C
<arigato> well, it is
<arigato> with PyThreadState_Get()
<arigato> then we can add the CPython fields to the PyThreadState structure
<antocuni> where?
<arigato> to store the current exception
<arigato> pystate.py
<arigato> IOW, kill State.operror, and move it to PyThreadState fields like CPython does
<antocuni> but PyThreadState_Get is implemented in RPython as well
<antocuni> and we cannot reimplement it in C, because we don't have the access to the space in that case
<arigato> we can. just do the same as CPython does
<arigato> it's a bit of a "all or nothing" refactoring, at least around here
<antocuni> which I guess it is to store the state in a thread-local?
<arigato> yes
<antocuni> ok
<antocuni> so the plan is to move all/most of pystate.py to C, and the use it to refactor pyerrors.py as well
<arigato> the likely outcome is that we need to kill most of pystate.py and use the C version
<arigato> yes
<antocuni> and I also suppose that this is a blocker, we cannot merge the branch before fixing this
<arigato> yes, if you're talking about cpyext-refactor-methodobject
<antocuni> uhm, we have the same problem with int objects as well
<antocuni> so e.g. PyInt_FromLong call we have in make_ref is also problematic in this sense
<arigato> only because of PyErr_NoMemory()?
<antocuni> yes, I think so
<arigato> ok, I see
<antocuni> well, I suppose it's not too bad
<antocuni> we "simply" need to fix it
<arigato> and likely add CPython-like logic around the calls to state.C.PyXxx
<antocuni> what is "CPython-like logic"?
<arigato> like, "result = state.C.PyInt_FromLong(value); if not result: state.reraise_exc_from_cpython()"
<antocuni> right
<antocuni> see e.g. my XXX in 17fd1d984f1d
<antocuni> I also wondered whether to produce automatic wrappers around these C calls, but maybe explicit checks are simpler
<arigato> hum
<arigato> ah yes, now it's in tupleobject.py instead of methodobject.py
<arigato> "be ready for make_ref() to fail, and free the
<arigato> partially-contructed tuple (same logic as tuple_attach)"
<antocuni> right
<antocuni> well, probably we can even reuse the same code
<arigato> ok
<arigato> yes
<antocuni> cool
<arigato> and yes to "but maybe explicit checks are simpler"
<arigato> at this point, I think it would be cool if somebody that knows CPython well but PyPy's RPython code not too much, could still contribute fixes because the code base looks familiar anyway
<antocuni> I suppose we have a plan for it then. The only thing is that I probably won't be able to work on it very soon as I have to catch up with things at work, so if there is any volunteer... (hint, hint :))
<arigato> :-)
<antocuni> arigato: yes, definitely +1 on that. The less magic the better, I'd say
<arigato> PyPy: the Gradual Reduction of Magic (tm)
<antocuni> ouch, I cannot change the IRC topic, apparenly
<antocuni> *apparently
<antocuni> arigato: anyway, second potential issue: right now, each of the various W_PyCFunctionObject_* has its own typedef
<antocuni> which means that e.g. "type(simple.noargs) is not type(simple.onearg)"
<antocuni> I am not sure whether this is going to be problematic or not
antocuni changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "PyPy: the Gradual Reduction of Magic (tm)"
<antocuni> cfbolz: thanks :)
tormoz has quit [Quit: No Ping reply in 180 seconds.]
marr has joined #pypy
tormoz has joined #pypy
Guest36286 has joined #pypy
kolko_ has joined #pypy
kolko has quit [Ping timeout: 240 seconds]
ceridwen has quit [Ping timeout: 255 seconds]
cstratak has joined #pypy
Guest36286 has quit [Read error: Connection reset by peer]
cstratak has quit [Remote host closed the connection]
cstratak has joined #pypy
Guest36286 has joined #pypy
Guest36286 has quit [Ping timeout: 258 seconds]
ceridwen has joined #pypy
ceridwen has quit [Changing host]
ceridwen has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 248 seconds]
antocuni has quit [Ping timeout: 240 seconds]
raynold has joined #pypy
antocuni has joined #pypy
jamesaxl has quit [Ping timeout: 255 seconds]
abvi[m] has joined #pypy
altanozlu789 has quit [Quit: Connection closed for inactivity]
Guest82844 has quit [Remote host closed the connection]
marvin has joined #pypy
marvin is now known as Guest23817
adamholmberg has joined #pypy
Rhy0lite has joined #pypy
inhahe_ has quit [Ping timeout: 248 seconds]
inhahe_ has joined #pypy
jcea has joined #pypy
jamesaxl has joined #pypy
marky1991 has joined #pypy
<tos9> Does someone remember the magic incantation for checking PyPy version in an environment marker
yuyichao has quit [Ping timeout: 260 seconds]
antocuni has quit [Ping timeout: 240 seconds]
yuyichao has joined #pypy
<exarkun> memory believes before knowing remembers
<tos9> Hold on trying that
forgottenone has joined #pypy
marky1991 has quit [Ping timeout: 240 seconds]
<tos9> Hum. Maybe there isn't a way to do this... I could have sworn there was one that I'd used before?
<tos9> pypy2 should probably support sys.implementation :/
marky1991 has joined #pypy
<cfbolz> tos9: if you implement that we'll happily add it
<Cheery> did I understood it right? STM works but it sort of doesn't exactly fit on the usual uses of PyPy?
<tos9> cfbolz: I mean, it wouldn't help for my own use case :/ (because you'd only be able to differentiate pypy versions that actually implement it)
<cfbolz> right
<Cheery> so I could include it into Lever now, for example, if it fits that language.
<Cheery> interactive apps, games.. so it probably fits.
cstratak has quit [Quit: Leaving]
cstratak has joined #pypy
marky1991 has quit [Ping timeout: 252 seconds]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
marky1991 has quit [Changing host]
marky1991 has joined #pypy
cstratak has quit [Ping timeout: 252 seconds]
tnorth has joined #pypy
realitix has quit [Quit: Leaving]
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
demonimin has quit [Ping timeout: 240 seconds]
<pjenvey> tos9: sys.pypy_version_info
<tos9> pjenvey: Yeah I know about that, it's just not accessible from an env marker
<exarkun> what's an env marker?
<pjenvey> ah
<pjenvey> exarkun: you can use them inside of pip requirements files
<tos9> exarkun: pip install foo;python_implementation=='CPython'
<tos9> (which yeah you put in requirements files or in setup.pys)
demonimin has joined #pypy
demonimin has joined #pypy
<exarkun> ah, those.
tbodt has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
demonimin has quit [Ping timeout: 240 seconds]
inad922 has joined #pypy
demonimin has joined #pypy
<kenaan> rlamy py3.5 d4c89ad97c6d /lib-python/3/ctypes/test/test_frombuffer.py: Remove @xfail from passing test
Rhy0lite has quit [Quit: Leaving]
yuyichao has quit [Ping timeout: 240 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
lritter has joined #pypy
yuyichao has joined #pypy
yuyichao has quit [Ping timeout: 252 seconds]
yuyichao has joined #pypy
yuyichao has quit [Ping timeout: 252 seconds]
inad922 has quit [Quit: Leaving]
asmeurer_ has joined #pypy
yuyichao has joined #pypy
marky1991 has quit [Ping timeout: 248 seconds]
asmeurer_ has quit [Quit: asmeurer_]
demonimin has quit [Ping timeout: 255 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
demonimin has joined #pypy
demonimin has joined #pypy
jamesaxl has joined #pypy
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
raynold has quit [Quit: Connection closed for inactivity]
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
tnorth has quit [Ping timeout: 258 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
tbodt has joined #pypy
asmeurer_ has joined #pypy
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
yuyichao has quit [Ping timeout: 255 seconds]
forgottenone has quit [Quit: Konversation terminated!]
yuyichao has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
asmeurer_ has joined #pypy
antocuni has joined #pypy
asmeurer_ has quit [Client Quit]
asmeurer__ has joined #pypy
asmeurer__ has quit [Client Quit]
asmeurer has joined #pypy
asmeurer has quit [Quit: asmeurer]
asmeurer_ has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
asmeurer_ has joined #pypy
asmeurer_ has quit [Client Quit]
asmeurer has joined #pypy
asmeurer has quit [Client Quit]
asmeurer_ has joined #pypy
adamholmberg has quit [Remote host closed the connection]
alex_ has joined #pypy
traverseda has quit [Ping timeout: 252 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
drolando has quit [Remote host closed the connection]
drolando has joined #pypy
adamholmberg has joined #pypy
tbodt has quit [Ping timeout: 252 seconds]
adamholmberg has quit [Ping timeout: 240 seconds]