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"
<danieljabailey>
while that's running... is there a way to turn off the mandelbrot?
<cfbolz>
No idea, why?
<danieljabailey>
cfbolz: minimark and incminimark both work if I go for -O2, niether work on -O0
<cfbolz>
Annoying :-(
<danieljabailey>
I just wanted to speed up the build a little, turning off mandelbrot would seem like the obvious first step :-)
<cfbolz>
We don't really test O0
<danieljabailey>
fair enough, I'll stick to O2 for now
<cfbolz>
danieljabailey: nope Mandelbrot takes imperceptible amounts of time to compute
<danieljabailey>
hm, okay then
<danieljabailey>
is there any other way to speed up translation?
<cfbolz>
Unfortunately not :-(
<danieljabailey>
So how do pypy devs iterate quickly? pypy takes many minutes to compile for me
<fijal>
danieljabailey: we run tests without translating
<danieljabailey>
fijal: ah, okay
<danieljabailey>
Is that something I can do with my little test program
<danieljabailey>
So the --gc option specifies a gc that will be linked in with my translated program?
<cfbolz>
Yes
<danieljabailey>
and the GCs are written in rpython?
<danieljabailey>
And is there a way to get some performance numbers from the GC?
<cfbolz>
danieljabailey: yep, written in python
<danieljabailey>
Oh, I understand now, I sould test the program under a "normal" python interpreter and then translate with rpython when I know it does what I want. rpython is quite a clever idea. :-)
<cfbolz>
Yes, exactly
rokujyouhitoma has joined #pypy
nimaje1 has joined #pypy
nimaje1 is now known as nimaje
nimaje is now known as Guest9327
rokujyouhitoma has quit [Ping timeout: 260 seconds]
adamholmberg has quit [Read error: Connection reset by peer]
adamholm_ has joined #pypy
adamholm_ has quit [Ping timeout: 260 seconds]
yuyichao_ has quit [Ping timeout: 246 seconds]
rokujyouhitoma has joined #pypy
<michaelgreene>
I'm having some trouble that doesn't make sense to me. cffi 1.10.1, pypy 5.8. I get *** TypeError: initializer for ctype 'struct tf_orderbook' must be a list or tuple or dict or struct-cdata, not cdata 'struct tf_orderbook *'. This suggested to me that maybe I was passing the data from two different lookalike types from two CompiledFFIs.
<michaelgreene>
*However*, book1 = ffi.new('tf_orderbook *'); copied = ffi.new('tf_orderbook *', book1); gives the same error.
<michaelgreene>
Shouldn't I be able to initialize with ffi.new something given to me by the same ffi.new?
rokujyouhitoma has quit [Ping timeout: 260 seconds]
yuyichao_ has joined #pypy
fniephaus has quit [Quit: EliteBNC - http://elitebnc.org (Auto-Removal: idle account/not being used)]
vkirilichev has quit [Remote host closed the connection]
rokujyouhitoma has joined #pypy
<ronan>
michaelgreene: the initialiser needs to be a tf_orderbook, not a tf_orderbook*
rokujyouhitoma has quit [Ping timeout: 260 seconds]
<ronan>
so you need "copied = ffi.new('tf_orderbook *', book1[0])", which maps to C "tf_orderbook *copied = *book1;"
<michaelgreene>
ronan: that... seems to work at first attempt, and I don't know why I didn't think of it. But thank you very much, was really banging my head against the wall.
<ronan>
(actually, that C code is nonsense, the equivalent is something like "tf_orderbook * copied = malloc(sizeof(tf_orderbook)); *copied = *book1;")
marky1991_2 has joined #pypy
marky1991 has quit [Ping timeout: 240 seconds]
dmalcolm has quit [Ping timeout: 246 seconds]
kipras`away is now known as kipras
realitix has quit [Quit: Leaving]
dmalcolm has joined #pypy
raynold has joined #pypy
mattip has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
kipras is now known as kipras`away
tbodt has joined #pypy
asmeurer__ has joined #pypy
asmeurer__ has quit [Quit: asmeurer__]
kipras`away is now known as kipras
<kenaan>
rlamy py3.5 78dee6627756 /pypy/objspace/std/: Ensure that mappingproxy is recognised as a mapping, not a sequence
marky1991_2 is now known as marky1991
marky1991 has quit [Changing host]
marky1991 has joined #pypy
lritter has quit [Remote host closed the connection]
rokujyouhitoma has joined #pypy
<mattip>
ronan: do you know how I can get the c-function pointer out of a api_func?
<mattip>
on line 342, I am getting something, but it is not the pto.c_tp_hash, and line 348 is not giving me the same pointer as the value of PyObject_HashNotImplemented
<mattip>
in the test a few lines above
<mattip>
it's not just a problem of untranslated/translated, the test fails after translation too
rokujyouhitoma has quit [Ping timeout: 260 seconds]
<mattip>
if I copy what I did with offets, i.e. "cptr = rffi.cast(rffi.CCHARP, pto); ptr = rffi.cast(rffi.VOIDPP, rffi.ptradd(cptr, offset[0]))[0]"
<mattip>
then hex(rffi.cast(rffi.INT, ptr)) is the same as c-level PyObject_HashNotImplemented
vkirilichev has joined #pypy
mattip has left #pypy ["bye"]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pilne has joined #pypy
tbodt has joined #pypy
asmeurer__ has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
cstratak has quit [Ping timeout: 240 seconds]
Ryanar has joined #pypy
vkirilichev has quit [Remote host closed the connection]
yuyichao_ has quit [Remote host closed the connection]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
marky1991 has quit [Ping timeout: 276 seconds]
vkirilichev has joined #pypy
asmeurer__ has quit [Quit: asmeurer__]
asmeurer_ has joined #pypy
rokujyouhitoma has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
vkirilichev has quit [Remote host closed the connection]
rokujyouhitoma has quit [Ping timeout: 260 seconds]