-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Hpy #245
Comments
@Mythical-Forest-Collective maybe I'm wrong, but isn't Hpy aimed at making another API for writing native extensions for Python? Because that's only the half of what nimpy does - it also uses CPython API to allow you to call Python code from Nim. |
Looks interesting, but I'd wait for it to settle down a bit, official release is still TBD. |
I'm mainly talking about making extensions with HPy, as that'd allow Nimpy to work on different interpreters a lot easier and faster (PyPy implements HPy and extensions using HPy are a lot faster), and it is also possible (from what I've read in their docs), to compile HPy extensions for the C Python API. The project isn't completely done yet but slowly adding in support for HPy over CPython's ABI would be beneficial in the long term
Yeah fair enough, just thought i should bring it here for possible future reference |
Heya, it's approaching the end of 2022 and I'm wondering if you think this would beneficial for Nimpy with HPy's current state? GraalPython also supports HPy and looks like the folks at RustPython are interested in it, and are planning to implement it at some point since it's gaining attention in the Python community (and note that HPy can be implemented gradually, since it's made to allow for gradual code migration) |
Does CPython implement it yet? |
HPy is a third-party project (but not a part of stdlib). And certainly, HPy supports CPython. |
HPy can compile itself to CPython's ABI natively and has the benefit of working on other Python implementations with speeds much better than trying to reimplement CPython's API |
Maybe try intergrating Hpy instead of the CPython ABI? Or potentially add a way to choose which one you use? It'd be a good idea to intergrate this because while PyPy (and potentially other implementations) support the CPython ABI to some capacity, it's slow and inefficient, using something like https://github.com/hpyproject/hpy would be beneficial as it wouldn't have to translate the CPython ABI calls as much and would increase compatibility between Python implementations, making Nimpy more versatile
The text was updated successfully, but these errors were encountered: