cfbolz 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 | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
muke has joined #pypy
<muke> hi, is it alright to ask rpython specific questions here?
<simpson> Yeah, definitely.
<muke> great - I'm trying to use the foreign function interface to access an API which has functions which take and return struct arguments defined in the library, instead of just low level types. In order to use them with rpython's lltype interface, do I need to redefine each struct from it's primitive types manually?
<muke> so, as an example: https://pastebin.com/dXeCcaMK
<muke> the C code above and the external function from rpython I'm trying to define below
<muke> the function obviously returns type 'LLVMModuleRef' and I'm not sure what the best way to define that from rpython is
<muke> other than going into the llvm-c header files myself and recreating the structs
<simpson> Yeah, you do have to redefine each struct, but the good news is that you can choose to only define the members that you need; you don't have to define every member and do manual padding, because the C compiler figures that out for us.
ronan has quit [Read error: Connection reset by peer]
ronan has joined #pypy
<muke> oh that's good to know
<muke> but alright thanks, just wanted to make sure before diving into that
<simpson> For the specific case of LLVM, I bet that the more frequent contributors have more specific recommendations.
<muke> there's llvmlite but it's compatibility with python2 was removed a few months ago so looks like I have to implement this by hand
jcea has quit [Ping timeout: 258 seconds]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/5762 [Carl Friedrich Bolz-Tereick: force build]
<cfbolz> nulano: a, thanks a lot for the hint
<cfbolz> that means my change is probably unrelated
<cfbolz> muke: please ask these questions more during the day
<mattip> cfbolz: merging py3.7 into py3.8 proved tricky around ee052a16ada3, so I used the py3.8 version without any changes
<cfbolz> mattip: ok will take a look
<cfbolz> mattip: we should keep an eye on these segfaults
<cfbolz> they always seem to happen around cffi, it seems?
<mattip> yeah, there is also a strange failure in lib-python.3.test.test_functools on py3.7
<mattip> it was just flaky, now it is consistently failing with
<mattip> File "rpython_jit_metainterp.c", line 40350, in BlackholeInterpreter_handle_exception_in_frame
<cfbolz> right :-(
_whitelogger has joined #pypy
<cfbolz> mattip: that might be an armin bug, unfortunately
<mattip> arigato: ^^^
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/5762 [Carl Friedrich Bolz-Tereick: force build]
<cfbolz> mattip: fix the merge
<cfbolz> fixed
<mattip> cfbolz: thanks
muke has quit [Quit: Leaving]
forgottenone has joined #pypy
alexge50 has quit [Ping timeout: 260 seconds]
alexge50 has joined #pypy
<fijal> uh, numpy fails for me to build wheel on arm64
<fijal> on nightly pypy, I wonder what's the problem
<fijal> eh, I think I fucked up something
otisolsen70 has joined #pypy
<fijal> can w clean up build_dir on arm64?
<fijal> it occupies 50% of available disk space atm
oberstet has joined #pypy
muke has joined #pypy
<muke> cfbolz Hey, a thought came to mind about the llvm backend - is there any reason you can't take the existing machine code generated from a collection of traces and use an existing tool to parse this to llvm-ir? Besides maybe speed concerns.
<cfbolz> I don't think such a reverse engineering tool exists
<fijal> hm, does anyone know a good tool for generating more entropy?
<mattip> fijal: I don't get this. There is 27GB disk space on the arm machine, but I can account for only ~17GB
<fijal> magic?
jcea has joined #pypy
<mattip> I freed up about 3GB by cleaning out /tmp
<mattip> the machine has been up for more than a year. Is there some cruft that accumulates that we can flush somehow?
jcea has quit [Remote host closed the connection]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-32/builds/6221 [Carl Friedrich Bolz-Tereick: force build, intbound-improvements-3]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/7479 [Carl Friedrich Bolz-Tereick: force build, intbound-improvements-3]
<fijal> mattip: there is still build_dir which is 4G
forgottenone has quit [Ping timeout: 240 seconds]
<mattip> weird again. If I sum the files in build_dir/pypy-c-jit*/build/*, I get 400M. But du -s on that directory says 1322M
<mattip> sudo du -sBM build_dir/pypy-c-jit-linux-aarch64/build/* |cut -dM -f1 |paste -sd+ | bc
<mattip> gives 406
<mattip> sudo du -sBM build_dir/pypy-c-jit-linux-aarch64/build |cut -dM -f1 |paste -sd+ | bc
<cfbolz> mattip: that could be "bytes used" vs "size on disk"
<mattip> gives 1322
<mattip> same du parameters, just summing the subdirectories
<muke> cfbolz sorry just wanted to make sure, did you see the link i sent?
<cfbolz> muke: yes, sorry
<cfbolz> it might be possible
<cfbolz> but would definitely be a very different style of project
<muke> no worries, and yea i'm sure, but i'd be happy to go down whichever path would work best, or expect to anyway
<cfbolz> I have no idea how well these projects work, honestly
forgottenone has joined #pypy
<muke> well i wouldn't mind getting to grips with llvm-ir anyway so for now i'll stick to that, and maybe later on i can try and benchmark some rough prototypes of each to see if there's any significant differences, i thought i would see what you thought though
<bbot2> Success: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/7479 [Carl Friedrich Bolz-Tereick: force build, intbound-improvements-3]
<bbot2> Success: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-32/builds/6221 [Carl Friedrich Bolz-Tereick: force build, intbound-improvements-3]
<cfbolz> muke: cool
<bbot2> Started: http://buildbot.pypy.org/builders/jit-benchmark-linux-x86-64/builds/3171 [Carl Friedrich Bolz-Tereick: force build, intbound-improvements-3]
forgottenone has quit [Quit: Konversation terminated!]
<mattip> a reboot didn't help
<mattip> got it - the .hg repo is ~935MB and was slipping under the * wildcard
<mattip> fijal: the build_dir has 3 copies of the hg repo, one for each of the pypy-c-jit, own, and rpython builds
<bbot2> Success: http://buildbot.pypy.org/builders/jit-benchmark-linux-x86-64/builds/3171 [Carl Friedrich Bolz-Tereick: force build, intbound-improvements-3]
muke has quit [Quit: Leaving]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-32/builds/6222 [Carl Friedrich Bolz-Tereick: force build, intbound-improvements-3]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/7480 [Carl Friedrich Bolz-Tereick: force build, intbound-improvements-3]
Gustavo6046 has quit [Ping timeout: 258 seconds]
forgottenone has joined #pypy
<bbot2> Success: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/7480 [Carl Friedrich Bolz-Tereick: force build, intbound-improvements-3]
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-32/builds/6222 [Carl Friedrich Bolz-Tereick: force build, intbound-improvements-3]
Gustavo6046 has joined #pypy
otisolsen70 has quit [Quit: Leaving]
danchr_ is now known as danchr
atomizer_ is now known as atomizer
Gustavo6046 has quit [Ping timeout: 260 seconds]
Gustavo6046_ has joined #pypy
Gustavo6046_ is now known as Gustavo6046
asmeurer has joined #pypy
Gustavo6046_ has joined #pypy
Gustavo6046 has quit [Read error: Connection reset by peer]
Gustavo6046_ is now known as Gustavo6046
jacob22_ has joined #pypy
jacob22 has quit [Ping timeout: 256 seconds]
todda7 has joined #pypy
asmeurer has quit [Read error: Connection reset by peer]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/7481 [nulano: force build, win64-hpy]
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/8548 [nulano: force build, win64-hpy]
oberstet has quit [Quit: Leaving]
alexge50 has quit [Quit: ZNC 1.8.2 - https://znc.in]
alexge50 has joined #pypy