Rendered at 06:41:15 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
Panzerschrek 35 minutes ago [-]
This example looks interesting:
def first(items: list[Reading]) -> Reading:
return items[0] # a reference into the caller's list
How the compiler knows and checks if the returning reference is derived from one of arguments? What if a function returning a reference has more than one parameter? I my language I needed to implement a whole notation to allow describing relations between parameters and returned references, has TurboPython something similar?
fps-hero 3 hours ago [-]
What advantages does this provide beyond what can be achieved with Cython?
People are in love with the idea of a Pythonic language with the speed of an ahead of time compiled language. The issue is without 100% compatibility with existing CPython code, enabling you to use the existing interesting libraries of the Python ecosystem, you’ll get no interest.
There is a trivial subset of python which seems it could be made substantially faster, for example integer / floating point operations. Frustratingly people make attempts and get nowhere, encountering resistance and red tape. (See
https://discuss.python.org/t/using-tagged-pointers-to-suppor...).
> pon is a JIT & AoT native compiler and runtime for Python 3.14, written in Rust.
This is all anyone has ever wanted. It was basically dismissed, and hasn’t been worked on since it was posted. If a project like that can’t inspire interest, I don’t know what will.
fulafel 48 minutes ago [-]
> What advantages does this provide beyond what can be achieved with Cython?
Turing completeness aside, it seems to have a different purpouse entirely.
Cython is Python-compatible with its own syntax extensions, and is meant for writing Python modules.
TurboPython is its own incompatible language that has some resemblance to Python and is presumably meant to be used independently of Python.
Panzerschrek 40 minutes ago [-]
Nice approach for memory safety! I have my own memory-safe programming language (see my submissions), but it has syntax similar to C++. Doing so with Python-like syntax and other Python-like elements seems for me to be a little bit unusual.
It works as a pure Python runtime, but when comes with issues when integrating with existing libraries who have C/C++ extensions, which is a big one for modern use of Python (Numpy, pandas, you name it)
skavi 2 hours ago [-]
If you want an AoT compiled almost-Python, why not use Mojo?
Ohentis 10 hours ago [-]
It talks alot about how it's different from python and not at all how it's different from rust (the language that it is actually similar to). Syntax is ultimately very superficial and doesn't really matter all that much.
People are in love with the idea of a Pythonic language with the speed of an ahead of time compiled language. The issue is without 100% compatibility with existing CPython code, enabling you to use the existing interesting libraries of the Python ecosystem, you’ll get no interest.
There is a trivial subset of python which seems it could be made substantially faster, for example integer / floating point operations. Frustratingly people make attempts and get nowhere, encountering resistance and red tape. (See https://discuss.python.org/t/using-tagged-pointers-to-suppor...).
We even had this project, Pon, posted about 3 months ago (https://github.com/can1357/pon).
> pon is a JIT & AoT native compiler and runtime for Python 3.14, written in Rust.
This is all anyone has ever wanted. It was basically dismissed, and hasn’t been worked on since it was posted. If a project like that can’t inspire interest, I don’t know what will.
Turing completeness aside, it seems to have a different purpouse entirely.
Cython is Python-compatible with its own syntax extensions, and is meant for writing Python modules.
TurboPython is its own incompatible language that has some resemblance to Python and is presumably meant to be used independently of Python.
It works as a pure Python runtime, but when comes with issues when integrating with existing libraries who have C/C++ extensions, which is a big one for modern use of Python (Numpy, pandas, you name it)
https://tpy-lang.org/docs/guide/cpp-rust/
The page is triggering my AI alarm.