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"
<fijal>
njs: for what is worth, if we ever managed to move numpy, we'll be able to kill C API
<fijal>
since vast majority of others have some form of plan to use just cython
<njs>
fijal: you mean if the "cythonvm" plan works out?
<fijal>
yeah
<fijal>
if numpy, cffi and cython all are moved to a place where it's thinkable to do something else than C API
<fijal>
then it's feasible to move away from C API entirely
<fijal>
there is a long list of libraries that are the long tail, but all of them are movable
<fijal>
while numpy is not, not really right now
<njs>
fijal: I think we should probably not worry about that as a goal initially, since (a) treating the "cythonvm" bytecode as something that you use alongside the C API simplifies a bunch of things for the initial support, and (b) lots of existing cython code won't be compatible with this anyway
<fijal>
right, but maybe it would be a good point to start promoting that
<njs>
fijal: but I agree that if we pull that off then we're in a much better position to start thinking about how to move to "native" cythonvm support
<simpson>
After all, nobody *likes* C API, right?
<fijal>
njs: you are aware we have the shittiest runtime of all the languages you would actually consider using in 2017?
<fijal>
(assuming pypy and numba are still fringe and niche technologies)
<njs>
simpson: eh. maybe maybe not, but if you say that then all kinds of folks are going to get all defensive about the precious C API
<njs>
fijal: don't know that I'd consider numba really a python runtime either
<fijal>
njs: well, is cython an acceptable alternative for numeric folks
<fijal>
right
<fijal>
there was a missing "?"
<fijal>
at the end
<njs>
fijal: it's certainly popular
<njs>
also a lot of its popularity is because of cpython's limitations :-)
<fijal>
so if we told numeric folks "5 years from now there will be no C API, only cython", how many people would be defensive?
<njs>
there's a million long tail things to deal with. at some point f2py will need to be dealt with, that will be a fun one.
<njs>
that is probably more aggressive than I would phrase it :-). If only b/c if someone wants to argue about what will make sensein 5 years, that's just a boring argument that no-one can win because none of us have a crystal ball
<njs>
but if we emphasize that this plan makes a huge amount of sense right now incrementally, and then mention that hey in the long run it might also turn out to give us a way out of the C API trap... wouldn't that be neat?
<njs>
whereas if you say (or are perceived to say) "we're going to take away your C API haha" then people will get pissed off
<fijal>
right
<fijal>
we can't even say that
<fijal>
but if we tell cpython devs "this is how you get rid of cpython api" they might be happier
<fijal>
anyway, let's see how it goes
<fijal>
njs: so you say that "subset of cython" is a good thing?
<njs>
yeah, python-dev will absolutely scream about how wonderful the C API is to have gotten us this far (and ... they're kind of right), but even they want to have a way out going forward
<njs>
there was a whole discussion at the language summit and thread on the list a few weeks ago about if there's any way they can pull back how much surface area they expose there
<njs>
b/c it's also screwing up things like larry's GIL removal work etc etc
<fijal>
yeah
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
<fijal>
We just found out PyEval_EvalFrameEx is nearly 3000 LOC
<fijal>
wow
<njs>
well, yeah, the entire bytecode interpreter is one function so it can use goto :-)
<fijal>
lovely
<fijal>
goto error mostly
vkirilichev has joined #pypy
vkirilichev has quit [Ping timeout: 260 seconds]
vkirilichev has joined #pypy
<njs>
fijal: no, they use computed gotos to jump between opcode labels
<njs>
fijal: or alternatively a switch statement
<njs>
it's hidden behind macros
<njs>
but either way all the opcode implementations need to be in the same function
yuyichao_ has quit [Ping timeout: 276 seconds]
oberstet has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 255 seconds]
<kenaan>
tobweber stmgc[c8-overheads-instrumentation] 683f252182e3 /c8/stm/: Merge latest changes from master
<kenaan>
tobweber stmgc[c8-overheads-instrumentation] 364f9fb71d3e /c8/stm/: Fix some timings that could be lost when aborting by publishing and resetting timer ...
<kenaan>
tobweber stmgc[c8-overheads-instrumentation] 00fa92be3c0f /c8/stm/nursery.c: Instrument more of the major GC
<kenaan>
tobweber stmgc[c8-overheads-instrumentation] 59e0bec0fd9b /c8/stm/timing.h: Fix redefinition of payload data when using stop timer macro more than once in a fun...
vkirilichev has quit [Remote host closed the connection]
vkirilichev has joined #pypy
vkirilichev has quit [Ping timeout: 260 seconds]
palecsan has joined #pypy
lritter has joined #pypy
vkirilichev has joined #pypy
Rhy0lite has joined #pypy
marvin_ has quit [Ping timeout: 240 seconds]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 246 seconds]
marky1991 has joined #pypy
catalinf has joined #pypy
<palecsan>
hello, I have a question about space.appexec. I saw it in a commit in https://bitbucket.org/pypy/pypy/commits/6159e89116af. From the online docs I see that it is recommended to be used with app level testing, but here it's used in RPython. What does space.appexec actually do and where it is recommended to be used?
marvin_ has joined #pypy
<antocuni>
palecsan: it lets you to run some app-level code from interp-level (i.e., rpython) code
<palecsan>
so it allows you to mix Python and RPython code?
<antocuni>
it is ROUGHLY equivalent of CPython's PyRun_SimpleString
<antocuni>
which allows you to run python from C
<palecsan>
but how can RPython know that the code needed to run that small snippet of code has been translated?
<antocuni>
palecsan: yes, but only if you are hacking the pypy python interpreter itself (i.e., the code which lives under the pypy/ directory)
<LarstiQ>
and in both cases C/Rpython is more tedious to write/get the benefits of the rest of the interpreter?
<LarstiQ>
antocuni: and bytearray.extend is written in rpython because Cpython writes it in C, or?
<palecsan>
don't get me wrong, I have nothing with that commit, I'm just trying to understand it
<antocuni>
LarstiQ: I don't know exactly why bytearray.extend is written in rpython, but it has nothing to do with the fact that cpython writes it in C
<antocuni>
palecsan: what is your precise question? :)
<palecsan>
how it is possible to use Python features in RPython, which ends up in C code?
<palecsan>
it seems like a chicken and egg problem
<antocuni>
palecsan: space.appexec is not a general RPython feature
yuyichao_ has joined #pypy
<antocuni>
it exists only in the Python interpreter written in RPython
<palecsan>
aaaa
<palecsan>
ok
<palecsan>
you answered my next question, what about other languages written over rpython
<antocuni>
in particular, "space" must be an instance of pypy.objspace.std.objspace.StdObjSpace
<dash>
palecsan: yeah, this is a pypy feature not an rpython feature
<antocuni>
yes exactly, for other languages you cannot use space.appexec (although they might offer an equivalent for their own language)
rokujyouhitoma has quit [Ping timeout: 240 seconds]
yuyichao_ has joined #pypy
cataf has joined #pypy
<cataf>
hello, regardng the issue 2387/ctypes.c_longdouble is not usable- what's the reason to trigger an assert when the data type is float or double in push_arg_as_ffiptr function
yuyichao has joined #pypy
yuyichao_ has quit [Read error: Connection reset by peer]
yuyichao has quit [Remote host closed the connection]
yuyichao has joined #pypy
rokujyouhitoma has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
antocuni has quit [Ping timeout: 258 seconds]
cstratak has quit [Quit: Leaving]
dmalcolm has quit [Remote host closed the connection]
chelz has quit [Ping timeout: 240 seconds]
dmalcolm has joined #pypy
vkirilichev has quit [Remote host closed the connection]
Ryanar has quit [Quit: Ryanar]
ronan_ has joined #pypy
ronan_ has quit [Read error: Connection reset by peer]
ronan_ has joined #pypy
Ryanar has joined #pypy
realitix has quit [Ping timeout: 246 seconds]
chelz has joined #pypy
ronan_ has quit [Ping timeout: 246 seconds]
rokujyouhitoma has joined #pypy
ronan_ has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
raynold has joined #pypy
kornerr has joined #pypy
<kornerr>
hey
<kornerr>
is it possible to build pypy on android/ios/emscripten?
ronan_ is now known as ronan
ColdHeat has quit [Ping timeout: 240 seconds]
<ronan>
kornerr: yes for emscripten, that's how pypy.js is built
<ronan>
AFAIK nobody ever reported success for android or ios
<kornerr>
I'm searching for a scripting language/engine. so I was wondering if pypy can do the hard work for me
ColdHeat has joined #pypy
ronan has quit [Ping timeout: 246 seconds]
antocuni has joined #pypy
adamholm_ has joined #pypy
adamholmberg has quit [Ping timeout: 248 seconds]
ronan has joined #pypy
ronan has quit [Client Quit]
bendlas has quit [Ping timeout: 255 seconds]
ColdHeat has quit [Ping timeout: 260 seconds]
ColdHeat has joined #pypy
adamholm_ has quit [Remote host closed the connection]
adamholmberg has joined #pypy
bendlas has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 246 seconds]
adamholmberg has quit [Remote host closed the connection]
<mjacob>
ronny: how hard would it be to hook into the pytest assert rewrite logic and make it put "if not we_are_translated()" around each rewritten assert?