FFY00 has quit [Read error: Connection reset by peer]
FFY00 has joined #hpy
kyleingraham has quit [Ping timeout: 252 seconds]
krono has quit [Changing host]
_whitelogger has joined #hpy
<steve_s>
kyleingraham: have you figured it out? HPyInit__psycopg is a symbol that gets generated by the HPy_MODINIT macro (https://github.com/hpyproject/hpy/blob/master/docs/examples/simple-example/simple.c#L34), this is IIRC what the HPy runtime calls when it's loading your extension (in the universal mode), so that would explain the error message.
<steve_s>
Seems like more people are now in need for better docs, maybe good time to approve the PR with docs improvements ;-)
<antocuni>
steve_s: I went ahead and simply merged it
<steve_s>
Thanks 👍
<antocuni>
I didn't see that you answered my comments, sorry for that
<steve_s>
np :-)
<antocuni>
until I clean up the backlog of 87 unread conversations in my "hpy github" folder, it's hard for me to notice when I have something new to read
<antocuni>
so feel free to ping me here
<fangerer>
kyleingraham: It sounds like you've compiled your extension in CPython ABI mode but you try to load it as universal binary. I suggest that you check the symbols of the binary using `objdump` or `readelf` . Sorry, I don't remember the flags for doing so. Is it possible to publish the source code? Then we could have a look.
<fangerer>
steve_s: What do you think: Should we add a *Getting Started* section to the docs? I'm thinking of a very small guide for how to create a proof-of-concept HPy module from scratch.
<antocuni>
maybe we could provide two examples: one for starting a new module from scratch, and one for porting an existing module
<steve_s>
Btw. the new docs are deployed now. I think it's now bit easier to navigate to the simple example if that's what the user if looking for.
<steve_s>
> maybe we could provide two examples:
<steve_s>
yes that sounds good. I think that @Hodgestar started working on the porting example?
<arigato>
maybe we can have a complete source code of a simple HPy module, side-by-side with the same module as a CPython C extension, in a line-by-line comparison? I think such a thing would replace a lot of explanations and great to look at quickly
DuToit has quit [Ping timeout: 244 seconds]
DuToit has joined #hpy
DuToit has quit [Read error: Connection reset by peer]
DuToit has joined #hpy
DuToit has quit [Read error: Connection reset by peer]
DuToit has joined #hpy
<fangerer>
I think Armin is right, a side-by-side example sounds useful
<fangerer>
steve_s: since your PR is now merged, I think everything is merged we wanted to have in the 0.0.4 release, right? If so, then I'll finally publish it this week.
DuToit has quit [Ping timeout: 240 seconds]
DuToit has joined #hpy
DuToit has quit [Read error: Connection reset by peer]
DuToit has joined #hpy
DuToit has quit [Remote host closed the connection]
DuToit has joined #hpy
* Hodgestar
catches up.
<Hodgestar>
steve_s: I started working on https://github.com/hpyproject/hpy/pull/246 ages ago. You are welcome to take over the idea. What I wanted was a way to write and maintain the various stages of a porting example that wasn't super difficult to update each time the API changed.
<Hodgestar>
steve_s: And that allowed showing diffs in the documentation, so that readers could see what had changed without having to manually diff the two steps of the example themselves.
<Hodgestar>
steve_s: Perhaps unnecessarily involved. Not sure.
<Hodgestar>
steve_s: I think the idea is similar to what @arigato is suggesting, but with multiple steps so that it is clear how to do the port in stages.
<Hodgestar>
steve_s: And the other important part is to have unit tests, so that the example isn't being continually broken while we evolve things.
DuToit has quit [Ping timeout: 255 seconds]
DuToit has joined #hpy
DuToit has quit [Read error: Connection reset by peer]
DuToit has joined #hpy
DuToit has quit [Remote host closed the connection]
DuToit has joined #hpy
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
DuToit has quit [Read error: Connection reset by peer]
DuToit has joined #hpy
DuToit has quit [Read error: Connection reset by peer]
DuToit has joined #hpy
DuToit has quit [Ping timeout: 255 seconds]
DuToit has joined #hpy
kyleingraham has joined #hpy
<kyleingraham>
Thanks for the suggestion arigato. I realized that part of the initialization process that I hadn't gotten to yet was the reason for the error.
<kyleingraham>
Are there equivalents of Py_SET_TYPE and PyType_Ready in hpy? Apologies if I missed them in the API docs.
<arigato>
I seem to remember that PyType_Ready is only for types that are static globals, and in HPy they are never written like that
kyleingraham has quit [Ping timeout: 252 seconds]
<steve_s>
@kyleingraham HPy supports only heap types so you need to migrate to them, i.e., use HPyType_FromSpec, which is similar to PyType_FromSpec. You can then store a reference to the new type into HPyGlobal (HPyGlobal_Store/HPyGlobal_Load) so that you can use it somewhere else later on. There is currently no equivalent to Py_SET_TYPE in HPy.
GianlucaRizzo has quit [Remote host closed the connection]
GianlucaRizzo has joined #hpy
GianlucaRizzo has quit [Ping timeout: 246 seconds]
GianlucaRizzo has joined #hpy
GianlucaRizzo has quit [Ping timeout: 258 seconds]
GianlucaRizzo has joined #hpy
GianlucaRizzo has quit [Ping timeout: 246 seconds]
GianlucaRizzo has joined #hpy
GianlucaRizzo has quit [Ping timeout: 244 seconds]