Opinions on SPy?

Had anyone tried SPy, yet another python-like interpreter/compiler (motivations here) ?

What’s your thoughts about it ?

I think it is an interesting take on the language and hope it delivers only a fraction of what it claims. Nowadays I write a lot of Python simply because many dependencies are in that language and it is easier to prototype with it. But performance is a huge drawback. So if the projects succeeds on that, I’d be using it for many of my projects.

Yet another Mojo-like project?

Some people already made that question:

(By the way, I appreciate the transparency of the author about their using LLM for the creation of the content.)

Unsurprisingly, the LLM-generated comparison with Mojo uses obsolete information: let was gone in 2024, and the increasingly redundant fn was deprecated this year at the cost of making def require manual opt-in for raising exceptions (though the official release was a week after that comparison was generated). I can appreciate that SPy doesn’t bother to be a Python superset, which Mojo has pivoted away from, and I think SPy being a public-facing derivative of PyPy’s internal RPython is interesting. If a stronger yet intentionally incomplete overlap with Python is of interest, Codon is a fun read.

The only Pythonish “language” I’ve had to use in practice is Numba (in quotes because Numba compiles a Python subset with slightly yet importantly different semantics, in other words there is no diverging syntax), but I get the same takeaway from all of them: optimizing Python semantics is so intractable that people keep tweaking the language or semantics to varying degrees for new front-end compilers with improved Python integration, relative to using established languages like C.

SPy contributor here (not Antonio, our fearless leader; I mostly work on docs/testing/CLI). Just wanted to note one thing that I think differentiates SPy from other “Python Subset/Superset/close-cousin-but-its-compiled” variants is the interpreter.

SPy is built in such a way that you get identical semantics whether running in the interpreter (currently written in Python, pretty slow) or compiled code. But unlike, say, Numba, where debugging means attaching gdb, SPy can just use breakpoint(). It has a debugger (spdb) that’s similar to Python’s. We’re working on a proper REPL. It’s trying to give the developer experience of an interpreted language with the performance of a compiled one.

A lofty goal for sure! But I find it an exciting idea and it’s been a fun project to work on.

Thanks for posting! We’re excited to see where things go with SPy.