Skip to main content

10 years of PyPy

From a software engineering perspective, 10 years is indistinguishable from infinity, so I don't care what happens 10 years from now -- as long as you don't blame me. :-)

- Guido van Rossum, Python creator.

10 years is indeed a long time. PyPy was created approximately 10 years ago, with the exact date being lost in the annals of the version control system. We've come a long way during those 10 years, from a "minimal Python" that was supposed to serve mostly as an educational tool, through to a vehicle for academic research to a high performance VM for Python and beyond.

Some facts from the PyPy timeline:

  • In 2007, at the end of the EU funding period, we promised the JIT was just around the corner. It turned out we misjudged it pretty badly -- the first usable PyPy was released in 2010.
  • At some point we decided to have a JavaScript backend so one could compile RPython programs to JavaScript and run them in a browser. Turned out it was a horrible idea.
  • Another option we tried was using RPython to write CPython C extensions. Again, it turned out RPython is a bad language and instead we made a fast JIT, so you don't have to write C extensions.
  • We made N attempts to use LLVM. Seriously, N is 4 or 5. But we haven't fully given up yet :-) They all run into issues one way or another.
  • We were huge fans of ctypes at the beginning. Up to the point where we tried to make a restricted subset with static types, called rctypes for RPython. Turned out to be horrible. Twice.
  • We were very hopeful about creating a JIT generator from the beginning. But the first one failed miserably, generating too much assembler. The second failed too. The third first burned down and then failed. However, we managed to release a working JIT in 2010, against all odds.
  • Martijn Faassen used to ask us "how fast is PyPy" so we decided to name an option enabling all optimizations "--faassen". Then "--no-faassen" was naturally added too. Later we decided to grow up and renamed it to "-O2", and now "-Ojit".
  • The first time the Python interpreter successfully compiled to C, it segfaulted because the code generator used signed chars instead of unsigned chars...
  • To make it more likely to be accepted, the proposal for the EU project contained basically every feature under the sun a language could have. This proved to be annoying, because we had to actually implement all that stuff. Then we had to do a cleanup sprint where we deleted 30% of codebase and 70% of features.
  • At one sprint someone proposed a new software development methodology: 'Terminology-Driven Programming' means to pick a fancy name, then discuss what it could mean, then implement it. Examples: timeshifter, rainbow interpreter, meta-space bubble, hint annotations (all but one of these really existed).
  • There is a conspiracy theory that the reason why translation is so slow is because time is stored away during it, which is later retrieved when an actual program runs to make them appear faster

Overall, it was a really long road. However, 10 years later we are in good shape. A quick look on the immediate future: we are approaching PyPy 2.0 with stackless+JIT and cffi support, the support for Python 3 is taking shape, non-standard extensions like STM are slowly getting ready (more soon), and there are several non-Python interpreters around the corner (Hippy, Topaz and more).

fijal, arigo, hodgestar, cfbolz and the entire pypy team.


Anonymous wrote on 2013-02-28 22:43:

My best wishes to whole PyPy team! And thanks for all the hard work!

Anonymous wrote on 2013-02-28 23:01:

You guys rock!

Anonymous wrote on 2013-02-28 23:04:

Best blog posting - ever! Heres to another 10 pypy years and N llvm endeavours. -- rxe

Anonymous wrote on 2013-02-28 23:33:

You've made a great work so far, please continue with it!!

Vanessa wrote on 2013-03-01 00:37:

Only those who dare to fail greatly can ever achieve greatly. --RFK
Congrats, guys!

Anonymous wrote on 2013-03-01 01:45:

Congratulations and thank you for the great work, looking forward to the next 10 years!

dmatos wrote on 2013-03-01 02:16:

Great work!

Anonymous wrote on 2013-03-01 06:20:

How will PyPy impact Python future and it's adoption as preferred language?

Anonymous wrote on 2013-03-01 08:23:

indeed: congratulations and much respect for the perseverance and hard work you have put into this project over the years!

Gaëtan de Menten wrote on 2013-03-01 08:42:

First, congratulations for keeping at it for 10 years! PyPy is one of the most interesting project I know of.

This blog post is also very interesting but by reading it I can't help but think: are all those "failures" documented somewhere in one place? It could be a very interesting read.

Or more specifically:
* Why was the JavaScript backend a horrible idea?
* Why is RPython a bad language (for writing CPython extensions)?
* What went wrong in the different attempts at using LLVM?
* What were those "70% of features" that were dropped after the EU project?

glyph wrote on 2013-03-01 09:16:

Congratulations! Here's to another 10 years!

And the JavaScript backend was a great idea - bring it back! It's certainly better than the other Python-to-JS translators out there, at least in terms of actually parsing some Python. I want Python in my browser!

kayhayen wrote on 2013-03-01 11:29:

I was and always will be impressed by PyPy. And the self-critic of this post only furthers it. You are cool people, looking forward to meet you again.

Anonymous wrote on 2013-03-01 12:12:

I remember 10 years ago, when I decided to learn to program... I didn't know what language to choose, and someone suggested python. It was someone I approached through a mailing list, and he was passionate explaining why python is so special.

I remember reading about it being cool but with a "performance problem". However, there were some nerds out there talking about a minimal python, that would eventually become a fast python, so I said "cool, perhaps in a few months there will be a fast python...".

I spent ten years following silently this story, and I'm happy to say "Happy birthday Pypy!".

I've never met any of you, but I feel I know you.
You showed me the value of perseverance, that every failure is one step closer to success.

Congratulations and a big THANK YOU!
Luis Gonzalez, from Buenos Aires.

Paul Jaros wrote on 2013-03-01 14:12:

PyPy is my favorite open-source project. Best of wishes for the future development.
May you find all the funding you need, become the leading STM Implementation and become the defacto Python standard.

Stefane Fermigier wrote on 2013-03-01 14:34:

+1 on Gaëtan de Menten's comment.

Daniel wrote on 2013-03-01 22:06:

One more +1 on Gaëtan de Menten's comment. :)

Anonymous wrote on 2013-03-02 01:06:

You are incredible people and you do such cool stuff! Best of luck to you and keep up the great work!

Arne Babenhauserheide wrote on 2013-03-02 11:03:

Thank you for the great post - and thank you for sticking to it and finding ways to get time to make it work - including to add everything under the sun into that EU project to be able to go full-time!

You’re a great example how to really do stuff right - by actually doing it and keeping at it through every stumbling block on the way.

Happy birthday - and thank you for pypy!

Jan Brohl wrote on 2013-03-03 12:32:

+1 on Gaëtan de Menten's comment.

Anonymous wrote on 2013-03-04 14:11:

I'd also like to see the failures documented. Trying and failing is a great way to learn - but even better is to learn from other's failures.

Anonymous wrote on 2013-03-05 11:49:

Great work guys! Happy birthday PyPy!

Электроник wrote on 2013-03-10 01:34:

Thanks for making fast Python possible and creating a masterpiece in process!
About Terminology-Driven Programming: let me guess, the only nonexistent thing is a timeshifter? Three other names make a lot of sense in context of PyPy.

Armin Rigo wrote on 2013-03-23 16:42:

Электроник: no :-) Try again.