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"
yuyichao has quit [Ping timeout: 276 seconds]
_whitelogger has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
tote has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yuyichao has joined #pypy
tav has quit [Quit: tav]
tav has joined #pypy
kipras is now known as kipras`away
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
tbodt has joined #pypy
pilne has quit [Quit: Quitting!]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
_whitelogger has joined #pypy
Fleche_ has quit [Quit: Fleche_]
marky1991 has quit [Ping timeout: 240 seconds]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
ArneBab_ has joined #pypy
ArneBab has quit [Ping timeout: 240 seconds]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
tbodt has quit [Client Quit]
_whitelogger_ has joined #pypy
tbodt has joined #pypy
_whitelogger has quit [Remote host closed the connection]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
tbodt has joined #pypy
Eyess has joined #pypy
runciter has quit [Read error: Connection reset by peer]
JStoker has quit [Killed (wolfe.freenode.net (Nickname regained by services))]
JStoker has joined #pypy
runciter has joined #pypy
krono_ has joined #pypy
pepesza has joined #pypy
sophiya_ has joined #pypy
carljm_ has joined #pypy
tarek__ has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SunDwarf has quit [Ping timeout: 240 seconds]
krono has quit [Ping timeout: 240 seconds]
sophiya has quit [Ping timeout: 240 seconds]
pepesza- has quit [Ping timeout: 240 seconds]
carljm has quit [Ping timeout: 240 seconds]
tarek has quit [Ping timeout: 240 seconds]
ronan has quit [Read error: Connection timed out]
krono_ is now known as krono
ronan has joined #pypy
john51 has quit [Read error: Connection reset by peer]
john51 has joined #pypy
sophiya_ is now known as sophiya
tbodt has joined #pypy
carljm_ has quit [Quit: leaving]
carljm has joined #pypy
rokujyouhitoma has joined #pypy
Eyess has quit [Ping timeout: 276 seconds]
mwhudson has quit [Remote host closed the connection]
rokujyouhitoma has quit [Ping timeout: 260 seconds]
mwhudson has joined #pypy
mwhudson has joined #pypy
mwhudson has quit [Changing host]
SunDwarf has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
oberstet has joined #pypy
tbodt has quit [Ping timeout: 248 seconds]
vkirilichev has quit [Remote host closed the connection]
runciter has quit [Ping timeout: 240 seconds]
runciter has joined #pypy
demonimin has quit [Ping timeout: 260 seconds]
demonimin has joined #pypy
demonimin has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 258 seconds]
yuyichao has quit [Quit: Konversation terminated!]
yuyichao has joined #pypy
rokujyouhitoma has joined #pypy
vkirilichev has joined #pypy
marr has joined #pypy
vkirilichev has quit [Remote host closed the connection]
vkirilichev has joined #pypy
rokujyouhitoma has quit [Ping timeout: 268 seconds]
realitix has joined #pypy
asmeurer__ has quit [Quit: asmeurer__]
Fleche_ has joined #pypy
cstratak has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
danieljabailey has joined #pypy
<danieljabailey> Hi, is this a suitable place for a beginner to ask an rpython question?
<cfbolz> yes
<danieljabailey> I have a trivial hello world program, but I can't get rpython to translate it
<danieljabailey> translation:ERROR] Exception: CompilationError(err="""
<danieljabailey> /tmp/usession-release-pypy2.7-v5.8.0-9/platcheck_0.c:79:19: fatal error: gc/gc.h: No such file or directory
<danieljabailey> compilation terminated.
<danieljabailey> """)
<danieljabailey> Ah, specifying --gc=minimark fixed that
<danieljabailey> Now I have another error
<danieljabailey> Hmm, can't figure out what I'm doing wrong. Here is a pastebin: https://pastebin.com/FQG8dpKm
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
<cfbolz> danieljabailey: OK, that's indeed quite strange
<cfbolz> Can you try 'incminimark' instead?
<danieljabailey> okay...
<cfbolz> And leave O2, maybe
<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]
Taggnostr has joined #pypy
Taggnostr2 has quit [Ping timeout: 255 seconds]
raynold has quit [Quit: Connection closed for inactivity]
lritter has quit [Remote host closed the connection]
raduc has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
lritter has joined #pypy
marky1991 has joined #pypy
adamholmberg has joined #pypy
yuyichao has quit [Read error: Connection reset by peer]
yuyichao_ has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 260 seconds]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
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]
panni_ has quit [Ping timeout: 248 seconds]
marky1991 has joined #pypy
panni_ has joined #pypy
mihneas has quit [K-Lined]
demonimin has quit [Remote host closed the connection]
demonimin has joined #pypy
lazybear has quit [Excess Flood]
lazybear has joined #pypy
demonimin has quit [Remote host closed the connection]
demonimin has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rokujyouhitoma has joined #pypy
tbodt has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
yuyichao has joined #pypy
marky1991 has quit [Ping timeout: 240 seconds]
kipras is now known as kipras`away
panni_ has quit [Ping timeout: 240 seconds]
rokujyouhitoma has joined #pypy