Do any of you follow SPy (https://github.com/spylang/spy), the new statically compiled variant of Python created by Antonio Cuni?
I have been looking into it recently and became convinced it could have a significant impact on the Python ecosystem, including for numerical computing and libraries like NumPy. I wrote up my thoughts in a post entitled “SPy: a vision for its impact on the Python community”:
I’m maintaining several small packages and applications and I think SPy looks very promising.
I typically have a small section of the code where I use dynamic features of python, e.g. to set everything up properly. But I also have a huge chunk of code where I use a very restricted set of python. This code is normally fully annotated with type hints so I am already doing all the hard work. I might as well benefit from the compile time checks and the speed boost.
I guess the success will come down to the ergonomics.
How easy is it to call redshifted python code from “normal” python:
E.g. can I develop a library in SPy with an interface in normal python that I can distribute through pypi?
at the moment SPy offers only a limited and low-level way to integrate with CPython: you can compile a spy module using spy build –output-kind=py-cffi and you get a CFFI module which you can then compile and distribute as a CPython extension “as usual”.
The low-level inteface is good enough to pass simple arrays, numbers and structs, but e.g. there is no way to define a custom type.
Eventually, the plan is to write a full SPy/CPython integration layer which will allow to import CPython modules into spy and viceversa, but it’s not there yet.