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
<wleslie>
after my recent post to the mailing list, I got a spam email directly sent, purportedly from "support-level1@contact4.westhost.com". I doubt there is much to be done, but if someone happens to be looking at the contents of that list and sees anything related, can you remove it please?
<vstinner>
i see that the function uses _PyParser_TokenNames lock, but in practice, two threads seem to call the function "at the same time" and so call Py_InitializeEx() and PyGILState_Ensure() in parrallel which causes a crash
<vstinner>
the bugzilla issue contains a testcase to reproduce easily the bug, but at the beginning, the bug is trigged just by running cffi test suite
<vstinner>
"The python-cffi package 1.11.2 has a test which spawns 20 threads at once, doing a bunch of adds. Nothing too serious. The problem seems to be that, when spawning 20 threads at once, Python itself crashes: (...)
<vstinner>
hum. i was testing cffi 1.11.2, it seems like the test no longer crash in tip
<the_rat>
cfbolz: oh, thanks a lot! That already helps. IIUC variable annotations are already in
antocuni has joined #pypy
<cfbolz>
yep
<cfbolz>
the_rat: most of the big features are
<the_rat>
That's perfect right now, probably means I can already do what I need (measure the JIT against some code that is mostly 3.5 + some 3.6 features)
<cfbolz>
LarstiQ: the whole machine learning in python community makes this assumption
Garen has quit [Read error: Connection reset by peer]
tbodt has quit [Ping timeout: 260 seconds]
Garen has joined #pypy
vstinner has left #pypy [#pypy]
<LarstiQ>
cfbolz: to be fair pypy hasn't been dealing with scientific python stack horribly well historically
<cfbolz>
LarstiQ: it's still not doing super well
<LarstiQ>
but it still irks me that people with performance issues don't first try pypy before jumping to another language
* LarstiQ
nods
<cfbolz>
We're slowly getting there though
<simpson>
I have zero nice words for this document. Nobody tell them that Haskellers are *right now* doing automatic differentiation on entire standard Haskell programs.
<LarstiQ>
aye, and I'd really like to try using pypy at work too, but upgrading to latest numpy/pandas is a mountain of work by itself
inhahe__ has joined #pypy
<catern>
is it possible to implement a Python object, in C, with cffi? is it possible in anyway to have a Python object in C that is usable from pypy?
antocuni has quit [Ping timeout: 240 seconds]
<simpson>
catern: It's a question of how much Python you want to write. I'm not sure whether you can avoid writing the class itself in Python.
<catern>
concretely, I *think* I want to implement the buffer protocol
<catern>
since I have some memory and I want to wrap that memory in a nice Python interface for reading that memory
<catern>
(and I expect probably making a C function that takes a pointer and reads n bytes at that pointer, is probably frowned upon :))
<simpson>
The CPython buffer interface? You can do it with cpyext, since that implements the CPython C API. I don't think it's portably possible with cffi.
inhahe__ has quit [Ping timeout: 260 seconds]
marky1991_3 has quit [Read error: Connection reset by peer]
marky1991_3 has joined #pypy
<catern>
well, here is the class I want to implement: http://ix.io/1dsz just not sure how to do that in a way compatible with Pypy
speeder39 has joined #pypy
marky1991_3 has quit [Remote host closed the connection]
marky1991_3 has joined #pypy
marky1991_3 has quit [Remote host closed the connection]