cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | the secret reason for us trying to get PyPy users: to test the JIT well enough that we're somewhat confident about it
exarkun has quit [Ping timeout: 276 seconds]
exarkun has joined #pypy
adamholmberg has joined #pypy
mattip has quit [Ping timeout: 245 seconds]
hotpot33 has quit [Ping timeout: 248 seconds]
dddddd has quit [Remote host closed the connection]
hotpot33 has joined #pypy
hotpot33 has quit [Read error: Connection reset by peer]
mattip has joined #pypy
inhahe__ has quit [Ping timeout: 265 seconds]
speeder39 has joined #pypy
mattip has quit [Ping timeout: 264 seconds]
lritter_ has joined #pypy
lritter has quit [Ping timeout: 260 seconds]
exarkun has quit [Read error: Connection reset by peer]
exarkun has joined #pypy
mattip has joined #pypy
adamholmberg has quit [Ping timeout: 268 seconds]
jamesaxl has quit [Quit: WeeChat 2.1]
speeder39 has quit [Quit: Connection closed for inactivity]
lritter_ has quit [Ping timeout: 240 seconds]
<mattip> it seems randomly trying to fix unicode-utf8-py3 without a deeper understanding is rather useless
<mattip> space.unicode_w still exists on baseobjspace, should it go away?
<mattip> sometimes we can accept utf8 with surrogates, when and why?
<mattip> I thought the whole point of this branch was that we do not use unicode internally, only utf8, true or false?
<mattip> the places that do decode_utf8 on py3.5, do they now do str_decode_utf8 or something else?
<mattip> the main problem right now is that the branch is totally broken, I don't even know where to start to fix things
<mattip> </rant>
exarkun has quit [Ping timeout: 256 seconds]
exarkun has joined #pypy
altendky has quit [Quit: Connection closed for inactivity]
mattip has quit [Ping timeout: 276 seconds]
Frankablu has quit [Quit: ZNC - http://znc.in]
<fijal> mattip_: the 2 version completely removed Unicode internally
<fijal> I do not know why the 3 one didn't, maybe for reasons like "let's run it"
speeder39 has joined #pypy
hotpot33 has joined #pypy
exarkun has quit [Ping timeout: 260 seconds]
user24 has joined #pypy
exarkun has joined #pypy
dddddd has joined #pypy
marself has joined #pypy
twn has joined #pypy
<twn> Hi I have a question about using rffi. Say I have a C function prototype like this: void mock_print(long* data, unsigned long len);
<twn> How do I hook that up using rffi.llexternal?
<twn> I feel like it should be something roughly like this: mock_print = rffi.llexternal("mock_print", [lltype.Array(lltype.Signed), lltype.Unsigned], lltype.Void, compilation_info=info)
<twn> That isn't working (and may be deranged), but I'm not sure how to call this
<twn> As a secondary question, how would this then be called? I.e. I'd like to do something like this: mock_print([1, 2, 3], 3) but I'm not sure if that conversions are done automatically
<twn> Thanks a lot in advance for any help!
<cfbolz> mattip_: yes, imo unicode_w should go away, only bytes_w, text_w and utf8_w should be left
<fijal> twn: you definitely want lltype.Ptr
<fijal> but also lltype.Array is an RPython array, not c level something*
<fijal> so you want rffi.CArrayPtr(lltype.Signed)
<fijal> the conversions are not automatically, partly because of the lifetime considerations
<fijal> so you would need to create your own lltype.malloc(rffi.CArray(lltype.Signed), 3, flavor='raw')
<fijal> and then lltype.free it
<fijal> there might be some helpers though
exarkun has quit [Ping timeout: 240 seconds]
exarkun has joined #pypy
<twn> great thanks just tested it out and it works perfectly! thanks for clearing up the confusion!
<fijal> I'm sorry it's not that well documented
user24 has quit [Quit: Leaving]
antocuni has joined #pypy
mcyprian has joined #pypy
<twn> no worries! i'm having a little fun twisting my brain around into understanding how things hang together with pypy and rpython so a little struggle isn't totally unwelcome :)
<twn> besides maybe once i sort things out and have the confusion fresh in my mind i can make some improvements to documentation (no promises!)
speeder39 has quit [Quit: Connection closed for inactivity]
inhahe_ has quit []
inhahe has joined #pypy
<twn> Hi I have another question. Am I able to use descriptors in rpython? I have a custom __getitem__ defined, but it throws an error like "[translation:ERROR] AttributeError: 'FrozenDesc' object has no attribute 'getuniqueclassdef' "
exarkun has quit [Read error: Connection reset by peer]
<cfbolz> twn: most special methods don't work. getitem does but slice is not supported
antocuni has quit [Ping timeout: 256 seconds]
<twn> ah okay thanks
exarkun has joined #pypy
jcea has joined #pypy
rubdos_ is now known as rubdos
jamesaxl has joined #pypy
tayfun26 has joined #pypy
exarkun has quit [Ping timeout: 240 seconds]
exarkun has joined #pypy
antocuni has joined #pypy
adamholmberg has joined #pypy
Rhy0lite has joined #pypy
pavan00 has joined #pypy
adamholm_ has joined #pypy
adamholmberg has quit [Ping timeout: 264 seconds]
pavan00 has left #pypy ["WeeChat 2.0.1"]
antocuni has quit [Ping timeout: 264 seconds]
exarkun has quit [Ping timeout: 256 seconds]
exarkun has joined #pypy
adamholm_ has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Read error: No route to host]
adamholmberg has joined #pypy
<twn> Hello I was wondering if anyone wants to let me pick their brain a bit. I could also take this to the mailing list, but I figure I would ask here first. I started working on this issue last week: https://bitbucket.org/pypy/pypy/issues/1901 The point as I understand it is to change the code in rpython/rlib/rrandom.py to use compiled binary code to see if it speeds things up. I decided to try it out mainly to see if I could learn a bit more about
<twn> pypy and as a by-product maybe doing something useful. So what I've done so far is to first take the code in numpy and adapt it to using cffi as an installable module to pass the tests. Then I changed that to use rffi and compiled a small binary in rpython which is also passing the tests. Then I moved that code into the interpreter itself and got it to build. The problem at this point is that I realized that I am using llexternal to call code
<twn> that I feel should just be directly compiled into the interpreter instead of my current method which runs into issues. Anyway is this to sort of thing to bug people on irc about or the mailing list or the issue tracker or ... ? In any case, thanks a lot for any help and advice!
<twn> btw i haven
<twn> btw i haven't updated that issue i linked with the latest stuff i've done. i thought i'd ask here before continuing to write stuff there in case other areas are more trafficed
altendky has joined #pypy
<cfbolz> twn: asking here is the right approach
<cfbolz> I'll try to take a look at your code soon, maybe will manage tonight
<twn> oh great thanks a lot. in that case i think i will update that issue with a clearer explanation of what i've done so far and the final problems i've run into. at least so that my issue comments are up to date with my code
<cfbolz> Cool
<cfbolz> twn: llexternal is the right approach imo
<twn> oh okay cool. so the problem i run into is basically this. i can compile the interpreter, but when i actually try to call the methods themselves the c functions are not being found. this is why i thought it would be best philosophically the actually have the functions compiled in directly. it feels like llexternal is better suited to maybe an external c library. of course this could all just be confusion and i am presumably just using it wrong
<twn> anyway maybe don't worry now. i'll explain the issues i'm having more clearly so that it makes more sense in the issue itself
<twn> thanks for the help
lritter_ has joined #pypy
mattip has joined #pypy
<cfbolz> twn: so it's some kind of linking problem?
exarkun has quit [Read error: Connection reset by peer]
<twn> yeah seems like it. i assume it's just that i'm using it wrong though
exarkun has joined #pypy
mattip has quit [Ping timeout: 240 seconds]
tayfun26 has quit [Quit: tayfun26]
slacky has joined #pypy
antocuni has joined #pypy
mattip has joined #pypy
<cfbolz> twn: that stuff can be tricky to figure out
Guest87736 is now known as phlebas
dash has quit [Read error: Connection reset by peer]
yuvipanda has quit [Remote host closed the connection]
abvi[m] has quit [Remote host closed the connection]
bendlas has quit [Remote host closed the connection]
agates has quit [Remote host closed the connection]
marself has quit [Ping timeout: 260 seconds]
<twn> cfbolz: i updated the issue here: https://bitbucket.org/pypy/pypy/issues/1901 the final comment is up to date. i hopefully added in enough error messages and detail so you'll be able to see what my problem is without needing to recompile everything
<twn> and don't worry about a super fast response. there isn't any rush since i'll probably be away from the comp for the rest of the evening. thanks a lot again for taking a look at things.
antocuni has quit [Ping timeout: 260 seconds]
antocuni has joined #pypy
yuvipanda has joined #pypy
raynold has joined #pypy
Gonsor has joined #pypy
antocuni has quit [Ping timeout: 256 seconds]
antocuni has joined #pypy
antocuni has quit [Ping timeout: 256 seconds]
jamesaxl has quit [Ping timeout: 268 seconds]
jamesaxl has joined #pypy
dash has joined #pypy
bendlas has joined #pypy
agates has joined #pypy
abvi[m] has joined #pypy
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
lesshaste has joined #pypy
nunatak has joined #pypy
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
marself has joined #pypy
marself has quit [Ping timeout: 265 seconds]
commandoline has quit [Ping timeout: 240 seconds]
jacob22__ is now known as jacob22
raynold has quit []
commandoline has joined #pypy
hotpot33 has quit [Read error: Connection reset by peer]
commandoline has quit [Ping timeout: 245 seconds]
commandoline_ has joined #pypy
twn has quit [Read error: Connection reset by peer]
nunatak has quit [Quit: Leaving]
dash has quit [Remote host closed the connection]
abvi[m] has quit [Read error: Connection reset by peer]
yuvipanda has quit [Write error: Connection reset by peer]
bendlas has quit [Write error: Connection reset by peer]
agates has quit [Write error: Connection reset by peer]
sthalik has quit [Ping timeout: 240 seconds]
sthalik has joined #pypy
Rhy0lite has quit [Quit: Leaving]
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
mattip has quit [Ping timeout: 260 seconds]
yuvipanda has joined #pypy
mattip has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
Gonsor has quit [Read error: Connection reset by peer]
JStoker has quit [Remote host closed the connection]
JStoker has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
tbodt has joined #pypy
yuvipanda has quit [Read error: Connection reset by peer]
tbodt has quit [Ping timeout: 260 seconds]
adamholmberg has quit [Remote host closed the connection]
tbodt has joined #pypy
yuvipanda has joined #pypy