4 ms·
Why hasn't PyPy been merged into the Python trunk?
- stefantalpalaru 14y agoPyPy doesn't support Python's C API. It's more of an exercise in tracing JIT compilation (and crowdfunding various experiments) rather than a CPython replacement.
- octopus 14y agoYou are right about the Pyhton's C API. However I've found that I can use any C (or C++ 2003) library through the cppyy branch.
- fox91 14y agoNot true. It supports CPython C modules since 2010 http://morepypy.blogspot.it/2010/04/using-cpython-extension-modules-with.html http://morepypy.blogspot.it/2010/04/using-cpython-extension-... The problem is CPyExt is not so fast and works only if PyPy implements the required functions used by the C module
- stefantalpalaru 14y agoIt's incomplete and there's no interest in finishing it.
- DasIch 14y agoA lot of C modules rely on CPython specifics, PyPy cannot support, performance of the PyPy C API is horrible which is a huge problem given that C extensions are mainly used to improve performance and embedding PyPy isn't possible either. CPyExt is more of a hack you use until you have ctypes/cffi bindings.
- axiak 14y agoTo me, what makes CPython special is that it's a language interpreter that's incredibly easy to get into and hack due to its simplicity. Pypy, while probably a good standard for server use, will never have that quality to it. IMHO it would be a shame if python loses this aspect of the ecosystem.
- omaranto 14y agoI haven't looked at the source for either but shouldn't PyPy's interpreter be easier to mess around with because it's written in Python (with some hints for the JIT)? Probably the thing that turns the interpreter into a JIT compiler is more sophisticated, but if you want to modify Python you wouldn't be looking at that part.
- dbaupp 14y agoBeing a little pedantic: PyPy is written[1] in RPython[2], which is a strict subset of Python, and is quite restricted in many ways (E.g. when I was experimenting with it a while ago, all file operations, including reading/writing, were done with file descriptors (NB. it was a while ago, so this might've changed)). So it's not as quite as easy to fiddle with as you might expect, but still significantly easier than CPython, I guess. [1]: http://doc.pypy.org/en/latest/architecture.html#pypy-the-python-interpreter http://doc.pypy.org/en/latest/architecture.html#pypy-the-pyt... [2]: http://doc.pypy.org/en/latest/faq.html#what-is-this-rpython-language http://doc.pypy.org/en/latest/faq.html#what-is-this-rpython-...
- axiak 14y agoWatch this for a great presentation discussing this: http://www.youtube.com/watch?v=l_HBRhcgeuQ http://www.youtube.com/watch?v=l_HBRhcgeuQ Not that they haven't gotten better. My point is that CPython has a different set of goals which makes it great for a reference implementation.
- winter_blue 14y agoI might be sounding a bit futuristic, but I think reference implementations should be auto-generated from a "spec" lang. I don't know if a language for doing something like that even exists. Does anyone know of something like this? EDIT: I should clarify: a spec should be _high-level_, i.e. abstract away all the unimportant details. Perhaps unit tests would be better in this case. Perl 6 follows this model. But it would be even better if one could some how "fill in the details" of the specs separately, from the spec, rather than mesh the whole thing into one giant C puddle.
- malkia 14y agoLast I've looked at it, it took quite a long time to compile compared to CPython (while say luajit is not taking that much longer to compile compared to reference lua).
- octopus 14y agoThe stable PyPy version is provided as a binary. In principle you will need to compile this from sources only if you have special needs. Have a look here (binaries for Mac, Linux and Windows): http://pypy.org/download.html#default-with-a-jit-compiler http://pypy.org/download.html#default-with-a-jit-compiler
- DasIch 14y agoYou don't have to compile PyPy to run the tests and in general you wouldn't compile PyPy or run the entire test suite, you just run the tests relevant for the part you worked on and let the buildbot take care of everything else.
- deleted 14y ago[deleted]