<cfbolz>
fangerer, phlebas: if I want to read the hpy implementation in graalpython where would I start?
<cfbolz>
Ah, just saw the link in the minutes
<Hodgestar>
fangerer: The minutes appear to have a missing bit. The sentence "So, the proper solution is to use HPy_GetItem and have a way t" just stops at the "t".
<Hodgestar>
fangerer: And thank you for the minutes -- they filled in the bits of the call that I missed.
<fangerer>
ah, yes. Sorry, I was in a hurry.
DuToit has quit [Read error: Connection reset by peer]
DuToit has joined #hpy
GianlucaRizzo has joined #hpy
DuToit has quit [Read error: Connection reset by peer]
DuToit has joined #hpy
GianlucaRizzo has quit [Remote host closed the connection]
GianlucaRizzo has joined #hpy
GianlucaRizzo has quit [Remote host closed the connection]
GianlucaRizzo has joined #hpy
GianlucaRizzo has quit [Remote host closed the connection]
GianlucaRizzo has joined #hpy
GianlucaRizzo has quit [Remote host closed the connection]
GianlucaRizzo has joined #hpy
GianlucaRizzo has quit [Remote host closed the connection]
DuToit has quit [Ping timeout: 260 seconds]
DuToit has joined #hpy
GianlucaRizzo has joined #hpy
Gianluca_ has joined #hpy
GianlucaRizzo has quit [Read error: Connection reset by peer]
Gianluca_ has quit [Remote host closed the connection]
DuToit has quit [Read error: Connection reset by peer]
DuToit has joined #hpy
GianlucaRizzo has joined #hpy
<antocuni>
fangerer, steve_s: I reviewed #313 and I'll try to review #314 tomorrow
<antocuni>
hopefully eventually I will catch up with all the open issues and PRs, but until then if there is some PR which you want me to review, the best strategy is to ping me here
<antocuni>
the hpy emails goes to their own folder and I don't always see them :)
<steve_s>
👍 thanks for the review
<fangerer>
antocuni: thanks; I think #313 and #314 are the most important ones right now
<antocuni>
👍
<fangerer>
Hodgestar: btw. I've fixed the imcomplete sentence
GianlucaRizzo has quit [Remote host closed the connection]
DuToit has quit [Ping timeout: 252 seconds]
<mattip>
all the static functions like DebugHandle_repr_trampoline, DebugHandle_repr_impl are being exported from universal.so
<mattip>
this is problematic for c++ since the symbols are mangled, and then the import fails
<antocuni>
maybe they should be declared as extern "C" ?
<steve_s>
they would have to be declared as such in the header file that the C++ code that call them uses
<steve_s>
but they are not in any header file?
<steve_s>
who calls them?
<mattip>
the import fails in "from hpy.universal import _debug"
<steve_s>
yeah, that's because it's compiled with C++, but as I commented on the issue I don't think we want that.
<antocuni>
I'm confused
<mattip>
me too
<antocuni>
those functions are compiled when you build hpy._universal, which is compiled with C
<antocuni>
so, what has C++ to do with it?
<mattip>
I am building with c++ as well
<antocuni>
I'm not sure it's a good idea
<steve_s>
yes and I don't think we need that
<steve_s>
C++ extensions are going to use only the header files that's what needs to be C++ compatible
<antocuni>
do we want to support extensions written in C++? Yes
<antocuni>
do we want hpy itself to be written in C++? Probably not
<mattip>
apparently building with c++ is indeed not a good idea. I will try to get CI to use c++ only when testing
<steve_s>
yes, that would be good, but I am afraid that even the tests will not (always) be in some C/C++ intersection. I've created https://github.com/hpyproject/hpy/issues/319 for this. I think we'll have to either manually mark tests as "also C++ compatible" or even "C++ only", or have a separate test suite for C++
<steve_s>
btw. CPython has this issue too and Victor is afaik adding a separate test suite for testing with C++
<antocuni>
yes, I tend to agree with steve_s, although I admit I don't have much knowledge of the problem
<steve_s>
another issue is that right now we compile some of the runtime C files with the extension, e.g., argparse.c, if the extension uses C++ compiler disguised as CC then those are probably going to be compiled by the C++ compiler. This will be solved if we distribute static archive with our runtime prebuilt by C, which will be statically linked with the extension.
<antocuni>
yes, this is what we discussed today during the call, isn't it?
<mattip>
IMO 99% of the code should just work with both c/c++ compilers, this is the expectation of many developers
<mattip>
only tests that probe internals should be c specific
<steve_s>
yes, not disputing that. Using HPy API from C++ should absolutely work, but I think that for that HPy itself doesn't have to be in C++
<steve_s>
(or be both C and C++ compatible)
<steve_s>
e.g. CPython cannot be built with C++ compiler I would believe
<mattip>
+1, I moved the build to gcc, and am only running "python -m pytest" with c++
<mattip>
let's see what fails once the CI is up and running properly
<steve_s>
I am curious if it works. I think that would be best path forward for testing C++ compatibility
GianlucaRizzo has joined #hpy
GianlucaRizzo has quit [Ping timeout: 256 seconds]
<antocuni>
does it look correct? In particular, the casts between gcref and signed and back
<antocuni>
a simple test which does HPyField_Store and then HPyField_Load works, so there is a non-zero chance that it's correct :)
<antocuni>
but I wanted to double check because it's delicate; I've seen that jit/backend/llsupport/llmodel.py does the same thing to cast between ints and gcrefs
<antocuni>
also, I haven't written the custom tracer yet, so if the GC kicks in and moves the objects, everything horribly crashes of course