00:42
jcea has quit [Remote host closed the connection]
00:54
fryguybob has quit [Ping timeout: 244 seconds]
01:04
fryguybob has joined #pypy
01:14
jcea has joined #pypy
01:24
dddddd has quit [Remote host closed the connection]
01:47
ronan has quit [Ping timeout: 258 seconds]
01:59
ronan has joined #pypy
02:10
ronan has quit [Remote host closed the connection]
02:26
jcea has quit [Quit: jcea]
02:29
ronan has joined #pypy
02:43
rubdos has quit [Ping timeout: 250 seconds]
02:52
rubdos has joined #pypy
02:55
zmt00 has joined #pypy
03:06
<
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 :-)
03:06
<
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
03:07
<
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
03:16
xcm has quit [Read error: Connection reset by peer]
03:18
xcm has joined #pypy
04:17
forgottenone has joined #pypy
04:18
forgottenone has quit [Client Quit]
05:23
forgottenone has joined #pypy
06:15
xcm has quit [Remote host closed the connection]
06:16
xcm has joined #pypy
06:20
zmt00 has quit [Quit: Leaving]
06:23
zmt00 has joined #pypy
07:29
danieljabailey has joined #pypy
07:38
<
arigato >
also, at some point in the past we looked at compiling Cython code down to pure-Python-using-ctypes
07:39
<
arigato >
nowadays it would be Python-using-cffi
07:40
<
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
07:40
<
arigato >
so the current idea is similar but produces some custom bytecode instead of mapping everything to Python's
07:45
dddddd has joined #pypy
08:05
Ganwell has quit [Ping timeout: 252 seconds]
08:12
danieljabailey has quit [Ping timeout: 255 seconds]
09:10
<
kenaan >
arigo cffi/cffi 6d435908617d /: Document issue 391
09:28
antocuni has joined #pypy
10:43
k1nd0f has joined #pypy
10:56
_whitelogger has joined #pypy
10:56
jacob22 has quit [Ping timeout: 250 seconds]
11:02
jacob22 has joined #pypy
11:05
antocuni has quit [Quit: Leaving]
11:16
lritter has joined #pypy
11:23
<
kenaan >
mattip buildbot 103d5aa76305 /README-CHROOT: document more required debian packages
11:41
k1nd0f has quit [Ping timeout: 255 seconds]
11:54
antocuni has joined #pypy
11:58
antocuni has quit [Ping timeout: 245 seconds]
11:58
<
kenaan >
mattip newmemoryview-app-level e7f2a1847440 /: fix failing tests, document branch and new app-level functionality
11:59
Ai9zO5AP has joined #pypy
12:00
xcm has quit [Remote host closed the connection]
12:05
xcm has joined #pypy
12:26
dustinm has quit [Quit: Leaving]
12:28
dustinm has joined #pypy
12:59
jcea has joined #pypy
13:04
jcea has quit [Remote host closed the connection]
13:14
jcea has joined #pypy
13:27
Rhy0lite has joined #pypy
13:53
antocuni has joined #pypy
14:47
forgottenone has quit [Quit: Konversation terminated!]
15:45
forgottenone has joined #pypy
16:15
danieljabailey has joined #pypy
17:39
Gremico has joined #pypy
17:42
<
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.
17:44
Zaab1t has joined #pypy
17:51
<
kenaan >
mattip newmemoryview-app-level e1de22f3f071 /pypy/doc/whatsnew-head.rst: finx branch name
17:51
<
kenaan >
mattip default c8c8b63926be /pypy/doc/__pypy__-module.rst: Expand documentation of
__pypy_ module. Corrections, additions, removals welcome
17:58
antocuni has quit [Ping timeout: 268 seconds]
18:14
jacob22 has quit [Remote host closed the connection]
18:15
jacob22 has joined #pypy
18:37
andi- has quit [Changing host]
18:37
andi- has joined #pypy
19:07
Zaab1t has quit [Ping timeout: 245 seconds]
19:08
Gremico has quit [Remote host closed the connection]
19:22
kipras has joined #pypy
19:26
<
kenaan >
mattip newmemoryview-app-level c3596fa33c20 /pypy/doc/__pypy__-module.rst: mrege default into branch
19:36
Rhy0lite has quit [Quit: Leaving]
19:39
<
mattip >
ronan: i think preventing any app-level code in create_ref is too severe
19:40
<
ronan >
well, as soon as you allow app-level code, it can usually do anything, including forcing a call to create_ref()
19:42
<
ronan >
also, if obj.__len__() lies, you get a segfault
19:45
<
mattip >
could you commit the new test on a branch?
19:53
<
kenaan >
rlamy issue2968 a0245fd17c4f /pypy/module/cpyext/test/: Add test for #2968
19:53
<
mattip >
if obj.__len__ lies we should be able to raise an exception somewhere
20:07
<
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
20:08
<
mattip >
for user-defined PyTypeObject
20:12
<
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
20:13
danieljabailey has quit [Ping timeout: 240 seconds]
20:17
<
mattip >
so the real problem is THPSize_as_mapping.mp_length = PyTuple_Type.tp_as_mapping->mp_length;
20:17
<
mattip >
which causes recursion?
20:18
<
mattip >
this sounds like what i dealt with in tp_init
20:20
<
ronan >
mattip: what was it?
20:21
<
mattip >
a few versions ago, I am trying to remember. There was a complicated path like this that recursed
20:25
speeder39_ has joined #pypy
20:28
<
mattip >
subtype_dealloc in (at least) release-pypy2.7-v5.4.0
20:28
<
mattip >
cpyext/typeobject.py
20:30
<
mattip >
with better comments in release-pypy2.7-v5.9.0
20:30
<
mattip >
and removed for v6.0.0 somewhere
20:31
nunatak has joined #pypy
20:34
nunatak has quit [Client Quit]
20:35
<
mattip >
commit 087ef45836c2 with the comment "move subtype_dealloc to C" fixed the recursive calls
20:36
<
mattip >
on the cpyext-avoid-roundtrip branch
20:37
<
mattip >
not sure how relevant all that was to the current case
20:38
<
ronan >
mattip: not that much, I guess. Inheritance doesn't really matter here
20:39
<
ronan >
the problem appears whenever you call create_ref on a C-defined type with tp_len
20:40
<
mattip >
it doesn't happen in numpy
20:41
<
ronan >
numpy always creates the PyObject first, I think
20:42
<
mattip >
numpy overrides tp_new
20:45
<
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
20:48
<
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
20:50
<
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
20:51
<
mattip >
this Size class seems to be just a tuple anyway, couldn't they get rid of it?
20:51
<
mattip >
or in the original code it does more
20:52
<
ronan >
it does a bit more, yes
21:00
<
mattip >
arigato: the cffi_backend needs updating, test_same_file is failing
21:01
<
mattip >
ronan: nice detective work, it must not have been easy to work out what was recursing
21:02
<
ronan >
well, it was fairly obvious that it was related to len()
21:03
<
ronan >
and being able to run the cpyext test under pdb made it easy to see what's happening
21:03
darkman66 has joined #pypy
21:06
<
mattip >
maybe a recursion barrier around create_ref would at least let us raise an exception
21:09
darkman66 has quit [Remote host closed the connection]
21:11
<
ronan >
well, we already try to raise an exception. pypy just somehow segfaults while doing it
21:12
<
ronan >
interestingly, with 'size = tuple.__new__(module.Size); len(size)' it does manage to raise the RecursionError
21:13
<
mattip >
on the len(size) call, correct?
21:16
<
mattip >
seems like something is wrong with the architecture of this
21:39
Ai9zO5AP has quit [Ping timeout: 245 seconds]
22:23
lritter has quit [Ping timeout: 245 seconds]
23:12
asmeurer__ has joined #pypy
23:24
asmeurer__ has quit [Quit: asmeurer__]
23:36
antocuni has joined #pypy
23:39
dddddd has quit [Read error: Connection reset by peer]