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
jcea has quit [Remote host closed the connection]
fryguybob has quit [Ping timeout: 244 seconds]
fryguybob has joined #pypy
jcea has joined #pypy
dddddd has quit [Remote host closed the connection]
ronan has quit [Ping timeout: 258 seconds]
ronan has joined #pypy
ronan has quit [Remote host closed the connection]
jcea has quit [Quit: jcea]
ronan has joined #pypy
rubdos has quit [Ping timeout: 250 seconds]
rubdos has joined #pypy
zmt00 has joined #pypy
<njs> Hodgestar: by "less expressive" I just mean – if the annotations don't affect the semantics when running on regular python, then they obviously don't *add* new behaviors. and if you wanted exactly the same behaviors, you don't need annotations for that. So presumably the point of the annotations would be to rule out certain behaviors :-)
<njs> Hodgestar: e.g., if you had an annotation that says "x is an int", then that would mean you can't change x to be a float
<njs> which is helpful to a compiler! but you literally can't implement numpy using python; numpy does a lot of direct memory manipulation that python has no way to express
xcm has quit [Read error: Connection reset by peer]
xcm has joined #pypy
forgottenone has joined #pypy
forgottenone has quit [Client Quit]
forgottenone has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
zmt00 has quit [Quit: Leaving]
zmt00 has joined #pypy
danieljabailey has joined #pypy
<arigato> also, at some point in the past we looked at compiling Cython code down to pure-Python-using-ctypes
<arigato> nowadays it would be Python-using-cffi
<arigato> if cffi had C-like arithmetic on its integer types, it would be a start, but I'm not too sure what to do with all the rest like ctypedefs
<arigato> so the current idea is similar but produces some custom bytecode instead of mapping everything to Python's
dddddd has joined #pypy
Ganwell has quit [Ping timeout: 252 seconds]
danieljabailey has quit [Ping timeout: 255 seconds]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/6056 [mattip: force build, newmemoryview-app-level]
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/6056 [mattip: force build, newmemoryview-app-level]
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/7327 [mattip: force build, newmemoryview-app-level]
<kenaan> arigo cffi/cffi 6d435908617d /: Document issue 391
antocuni has joined #pypy
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/6057 [mattip: force build, newmemoryview-app-level]
<bbot2> Failure: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/7327 [mattip: force build, newmemoryview-app-level]
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/6057 [mattip: force build, newmemoryview-app-level]
k1nd0f has joined #pypy
_whitelogger has joined #pypy
jacob22 has quit [Ping timeout: 250 seconds]
jacob22 has joined #pypy
antocuni has quit [Quit: Leaving]
lritter has joined #pypy
<kenaan> mattip buildbot 103d5aa76305 /README-CHROOT: document more required debian packages
k1nd0f has quit [Ping timeout: 255 seconds]
antocuni has joined #pypy
antocuni has quit [Ping timeout: 245 seconds]
<kenaan> mattip newmemoryview-app-level e7f2a1847440 /: fix failing tests, document branch and new app-level functionality
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/6058 [mattip: force build, newmemoryview-app-level]
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/7328 [mattip: force build, newmemoryview-app-level]
Ai9zO5AP has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
dustinm has quit [Quit: Leaving]
dustinm has joined #pypy
jcea has joined #pypy
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/6058 [mattip: force build, newmemoryview-app-level]
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
<bbot2> Failure: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/7328 [mattip: force build, newmemoryview-app-level]
Rhy0lite has joined #pypy
antocuni has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
forgottenone has joined #pypy
danieljabailey has joined #pypy
Gremico has joined #pypy
<Gremico> Hello, i am having a odd problem i am trying to use ffi.compile(tmpdir="tests") to have it output files to a specific folder but it tends to generate a name.o in the folder i am executing it from.
Zaab1t has joined #pypy
<kenaan> mattip newmemoryview-app-level e1de22f3f071 /pypy/doc/whatsnew-head.rst: finx branch name
<kenaan> mattip default c8c8b63926be /pypy/doc/__pypy__-module.rst: Expand documentation of __pypy_ module. Corrections, additions, removals welcome
antocuni has quit [Ping timeout: 268 seconds]
jacob22 has quit [Remote host closed the connection]
jacob22 has joined #pypy
andi- has quit [Changing host]
andi- has joined #pypy
Zaab1t has quit [Ping timeout: 245 seconds]
Gremico has quit [Remote host closed the connection]
kipras has joined #pypy
<kenaan> mattip newmemoryview-app-level c3596fa33c20 /pypy/doc/__pypy__-module.rst: mrege default into branch
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/6059 [mattip: force build, newmemoryview-app-level]
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/7329 [mattip: force build, newmemoryview-app-level]
Rhy0lite has quit [Quit: Leaving]
<mattip> ronan: i think preventing any app-level code in create_ref is too severe
<ronan> well, as soon as you allow app-level code, it can usually do anything, including forcing a call to create_ref()
<ronan> also, if obj.__len__() lies, you get a segfault
<mattip> could you commit the new test on a branch?
<ronan> mattip: OK
<kenaan> rlamy issue2968 a0245fd17c4f /pypy/module/cpyext/test/: Add test for #2968
<mattip> if obj.__len__ lies we should be able to raise an exception somewhere
<mattip> in step 2, is there a way to have tp_new create the PyObject without creating the W_Object, and then call from_ref instead
<mattip> for user-defined PyTypeObject
<ronan> mattip: I guess it's possible, but you have the same issue with 'size = tuple.__new__(module.Size); len(size)' and that wouldn't be fixed
danieljabailey has quit [Ping timeout: 240 seconds]
<mattip> so the real problem is THPSize_as_mapping.mp_length = PyTuple_Type.tp_as_mapping->mp_length;
<mattip> which causes recursion?
<mattip> this sounds like what i dealt with in tp_init
<ronan> mattip: what was it?
<mattip> a few versions ago, I am trying to remember. There was a complicated path like this that recursed
speeder39_ has joined #pypy
<mattip> subtype_dealloc in (at least) release-pypy2.7-v5.4.0
<mattip> cpyext/typeobject.py
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/6059 [mattip: force build, newmemoryview-app-level]
<mattip> with better comments in release-pypy2.7-v5.9.0
<mattip> and removed for v6.0.0 somewhere
nunatak has joined #pypy
nunatak has quit [Client Quit]
<mattip> commit 087ef45836c2 with the comment "move subtype_dealloc to C" fixed the recursive calls
<mattip> on the cpyext-avoid-roundtrip branch
<mattip> not sure how relevant all that was to the current case
<ronan> mattip: not that much, I guess. Inheritance doesn't really matter here
<ronan> the problem appears whenever you call create_ref on a C-defined type with tp_len
<mattip> it doesn't happen in numpy
<ronan> numpy always creates the PyObject first, I think
<mattip> numpy overrides tp_new
<mattip> don't all subclasses of tp_base fill their slots from tp_base? So the mp_length assignment should be done in PyType_Ready anyway
<bbot2> Failure: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/7329 [mattip: force build, newmemoryview-app-level]
<ronan> mattip: in the original code, you mean? Yes, initialising mp_length to 0 should work exactly the same on CPython and fix the issue on PyPy
<ronan> I guess C++ makes using the wrong pattern more likely, because you can just write PyTuple_Type.tp_as_mapping->mp_length in the initialiser
<mattip> this Size class seems to be just a tuple anyway, couldn't they get rid of it?
<mattip> or in the original code it does more
<mattip> ?
<ronan> it does a bit more, yes
<mattip> arigato: the cffi_backend needs updating, test_same_file is failing
<mattip> ronan: nice detective work, it must not have been easy to work out what was recursing
<ronan> well, it was fairly obvious that it was related to len()
<ronan> and being able to run the cpyext test under pdb made it easy to see what's happening
darkman66 has joined #pypy
<mattip> maybe a recursion barrier around create_ref would at least let us raise an exception
darkman66 has quit [Remote host closed the connection]
<ronan> well, we already try to raise an exception. pypy just somehow segfaults while doing it
<ronan> interestingly, with 'size = tuple.__new__(module.Size); len(size)' it does manage to raise the RecursionError
<mattip> on the len(size) call, correct?
<ronan> yes
<mattip> seems like something is wrong with the architecture of this
* mattip zzz
Ai9zO5AP has quit [Ping timeout: 245 seconds]
lritter has quit [Ping timeout: 245 seconds]
asmeurer__ has joined #pypy
asmeurer__ has quit [Quit: asmeurer__]
antocuni has joined #pypy
dddddd has quit [Read error: Connection reset by peer]