Skip to content

Comment on Lets Talk About Something Diabolical: A PyPy Intro (David Beazley PyCon keynote)

Comments

The RPython translation to C sounds a lot like what cython is already doing with a subset of Python. Are the PyPy guys reinventing the wheel here?

Cython is both differently defined and serves a different purpose. First of all, RPython is runnable, Cython is not. RPython has type inference, but more importantly, because it works from live objects, it has Python as a metaprogramming language. It's also much easier to extend than Cython.

Purpose wise cython is for optimizing pieces of code, rpython is for writing interpreters. RPython is quite faster than Cython, but it's also much more restricted, making it a bit unusable for the purpose of "just" speeding up pieces of code (you can't have PyObject equivalents).

I seriously doubt it, considering a) RPython is a strict subset of Python, operating on the in memory representation of Python objects and does aggressive type inference, whereas Cython adds additional features (and syntax) to the language and has it's own parser and no type inference (AFAIK), and b) RPython predates Cython, AFAIK.

Cython generates c based on the cpython api, you can only use it to build cpython extensions.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.