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
Kipras_ has joined #pypy
themsay has joined #pypy
Arfrever has joined #pypy
[Arfrever] has quit [Quit: leaving]
speeder39_ has quit [Quit: Connection closed for inactivity]
lritter has quit [Ping timeout: 252 seconds]
lritter has joined #pypy
rradjabi has quit [Ping timeout: 256 seconds]
Kipras_ has quit [Read error: Connection reset by peer]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 240 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
jcea has quit [Quit: jcea]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
dddddd has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 245 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 246 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 272 seconds]
forgottenone has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 250 seconds]
lritter has quit [Remote host closed the connection]
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 240 seconds]
dmalcolm has quit [Ping timeout: 240 seconds]
dmalcolm has joined #pypy
<arigato> I wonder if it would make sense to take it in a small bit at a time
<arigato> for example I can review and accept the changes to translator/c/ and rpython/lltypesystem/
<arigato> (these parts are likely missing tests, too)
Arfrever has quit [Quit: 御出で]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 244 seconds]
<cfbolz> arigato: I did a fairly careful review and improvements to the rbigint and objspace part last year
<cfbolz> arigato: those parts have good test coverage now too
<cfbolz> arigato: so if you could look at the C and lltypesystem part, that would be great
<arigato> ok
<arigato> ah, getting some insight inside issue #2926
<arigato> it's a bridge which contains the following instructions
<arigato> setfield_gc(p69, f63, descr=<FieldF pypy.objspace.std.floatobject.W_FloatObject.inst_floatval 8 pure>)
<arigato> guard_subclass(p69, ConstClass(W_IntObject))
<arigato> and then it passes f63 because that's the first virtual field
<cfbolz> arigato: ugh wat?
<arigato> it's an always-failing test, but the following never-executed jump explodes the assembler
<cfbolz> ok, but how can such a trace even be generated?
<cfbolz> arigato: is this from a small preamble?
<arigato> note the guard_subclass: yes, from a short preamble
<cfbolz> ah, right
<cfbolz> shouldn't we get "invalid loop" then?
<arigato> the rules for guard_subclass are different...
<cfbolz> ok, but still. this is clearly not fitting the rule ;-)
<arigato> I think it's a jump to a loop which doesn't check that p69 is exactly a W_IntObject
<arigato> ah, it's really "caused" by --objspace-std-withprebuiltint
<arigato> in this code, we read "w_prebuilt = prebuilt_array[index]"
<arigato> and then set do "w_prebuilt.intval = index"
<arigato> without class checking
<arigato> so "w_prebuilt" is only supposed to be a W_IntObject-or-subclass
<cfbolz> eh
<cfbolz> right
* arigato tries to write a test
<cfbolz> arigato: it still sounds to me that we should put all of that stuff into "if not we_are_jitted()"
<arigato> yes, that's a different issue
<cfbolz> sure, sure
<cfbolz> it's still a jit bug
<arigato> yay, managed to write a test
<arigato> (I think?)
<arigato> yes
<cfbolz> arigato: cool
themsay has quit [Ping timeout: 246 seconds]
forgottenone has quit [Quit: Konversation terminated!]
RemoteFox is now known as Bystroushaak
<cfbolz> arigato: right that makes sense to me
<arigato> math-improvements: I reviewed the low-level parts, and fixed one or two mistakes
<cfbolz> arigato: thanks, I can give it another review and merge during the next days, makes sense?
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 268 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 245 seconds]
moei has joined #pypy
mattip has joined #pypy
<mattip> Reading through the long C-API thread on python-dev, it seems we should be participating
<mattip> it seems this post is not even the head of the thread https://mail.python.org/pipermail/python-dev/2018-November/155706.html
<mattip> I wonder if we could come up with a definition of a C-API that would be not too slow on PyPY
<mattip> any type of iterating through a tuple/list/dictionary will force a strategy change to PyObject from int/float/string, so that would be the first thing to avoid on my list
<mattip> Maybe defining use cases:
<mattip> - I have a pile of battle-tested c code, how do I call it quickly from python? Use CFFI
<mattip> - I have some slow python code, I want to make it fast? Use PyPy natively, or use cython
<mattip> Are there more use cases?
<mattip> ahh, there is the "numpy" one:
<mattip> - I have a data structure that is a bad fit for pure python, and PEP-3118 is not good enough, let's use NumPy as a data structure container
<mattip> i.e. opencv, tensorflow. But I think that is not a very well defined (or wrongly defined) use case
<LarstiQ> - I want to use Python as a scripting language inside my non-python based project
<mattip> LarstiQ: what do you want to pass back and forth?
<mattip> just embedding is "easy", the problems start when you want to get something into or out of the embedded interpreter
<LarstiQ> mattip: e.g. Blender, Civilization, Maya. Not so much about back and forth but control
<LarstiQ> and the Python C API is what people reach for
<mattip> civilization http://sthurlow.com/python/ "scripting code will be in python, and the game data in XML"
<mattip> so that seems doable via passing strings without needing deep PyObject creation
<mattip> and modification
<mattip> seems like not too much low-level messing around with python internals
jamesaxl has joined #pypy
<LarstiQ> there is a new api I think in blender 2.80, but probably hasn't changed in this respect
<mattip> link?
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 244 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
chelz has quit [Ping timeout: 268 seconds]
chelz has joined #pypy
<arigato> cfbolz: yes, it makes sense to push it forward
<cfbolz> Cool
<cfbolz> arigato: we should also brainstorm ideas for the list strategy issue at some point
<cfbolz> #2881
Zaab1t has joined #pypy
adamholmberg has joined #pypy
dddddd has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
<arigato> yes, but unsure what we can do
marky1991 has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 246 seconds]
Zaab1t has quit [Ping timeout: 250 seconds]
Zaab1t has joined #pypy
adamholmberg has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
marky1991 has quit [Remote host closed the connection]
adamholmberg has quit [Remote host closed the connection]
<cfbolz> arigato: there are mitigation ideas. eg using prebuiltints would solve the problem for not too large ints. or we could use a LRU cache for ints when not in the jit
marky1991 has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
Rhy0lite has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
solarjoe4 has joined #pypy
squeaky_pl has joined #pypy
adamholmberg has quit [Ping timeout: 240 seconds]
adamholmberg has joined #pypy
antocuni has joined #pypy
marky1991 has quit [Ping timeout: 246 seconds]
squeaky_pl has quit [Remote host closed the connection]
tos9_ has joined #pypy
tos9 has quit [Ping timeout: 264 seconds]
tos9_ is now known as tos9
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
kanaka has quit [Read error: Connection reset by peer]
kanaka has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 268 seconds]
Bystroushaak is now known as RemoteFox
themsay has joined #pypy
themsay has quit [Ping timeout: 244 seconds]
adamholmberg has joined #pypy
forgottenone has joined #pypy
solarjoe4 has quit [Quit: Leaving]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 244 seconds]
raynold_ has joined #pypy
<_aegis_> I embed python in my app as the primary scripting language and I found it MUCH nicer to write low level C APIs and do the python object wrangling in python instead of in C
<_aegis_> (pypy -> cffi -> my C API) instead of (python -> cpython api)
<_aegis_> this is after originally writing it against the cpython 2 api, porting it to cpython 3, then porting it to pypy
raynold_ has quit []
<_aegis_> (pypy for performance, as I have some code that runs very often forever)
<cfbolz> _aegis_: cool
antocuni has quit [Ping timeout: 268 seconds]
<cfbolz> _aegis_: if you ever feel like writing a blog post about your experience, we would love to have it for the PyPy blog
antocuni has joined #pypy
antocuni has quit [Ping timeout: 268 seconds]
themsay has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
themsay has quit [Ping timeout: 246 seconds]
Zaab1t has quit [Quit: bye bye friends]
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
marky1991 has quit [Ping timeout: 250 seconds]
Rhy0lite has quit [Quit: Leaving]
marky1991 has joined #pypy
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
jamesaxl has quit [Quit: WeeChat 2.2]
kanaka has quit [Changing host]
kanaka has joined #pypy
speeder39_ has joined #pypy
tazle has quit [Ping timeout: 246 seconds]
PileOfDirt has joined #pypy
Kipras_ has joined #pypy
_whitelogger has joined #pypy