473,581 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Release of PyPy 0.7.0

pypy-0.7.0: first PyPy-generated Python Implementations
=============== =============== =============== =============== ==

What was once just an idea between a few people discussing
on some nested mailing list thread and in a pub became reality ...
the PyPy development team is happy to announce its first
public release of a fully translatable self contained Python
implementation. The 0.7 release showcases the results of our
efforts in the last few months since the 0.6 preview release
which have been partially funded by the European Union:

- whole program type inference on our Python Interpreter
implementation with full translation to two different
machine-level targets: C and LLVM

- a translation choice of using a refcounting or Boehm
garbage collectors

- the ability to translate with or without thread support

- very complete language-level compliancy with CPython 2.4.1
What is PyPy (about)?
------------------------------------------------

PyPy is a MIT-licensed research-oriented reimplementatio n of
Python written in Python itself, flexible and easy to
experiment with. It translates itself to lower level
languages. Our goals are to target a large variety of
platforms, small and large, by providing a compilation toolsuite
that can produce custom Python versions. Platform, Memory and
Threading models are to become aspects of the translation
process - as opposed to encoding low level details into a
language implementation itself. Eventually, dynamic
optimization techniques - implemented as another translation
aspect - should become robust against language changes.

Note that PyPy is mainly a research and development project
and does not by itself focus on getting a production-ready
Python implementation although we do hope and expect it to
become a viable contender in that area sometime next year.
Where to start?
-----------------------------

Getting started:
http://codespeak.net/pypy/dist/pypy/...g-started.html

PyPy Documentation: http://codespeak.net/pypy/dist/pypy/doc/

PyPy Homepage: http://codespeak.net/pypy/

The interpreter and object model implementations shipped with
the 0.7 version can run on their own and implement the core
language features of Python as of CPython 2.4. However, we still
do not recommend using PyPy for anything else than for education,
playing or research purposes.

Ongoing work and near term goals
---------------------------------

PyPy has been developed during approximately 15 coding sprints
across Europe and the US. It continues to be a very
dynamically and incrementally evolving project with many
one-week meetings to follow. You are invited to consider coming to
the next such meeting in Paris mid October 2005 where we intend to
plan and head for an even more intense phase of the project
involving building a JIT-Compiler and enabling unique
features not found in other Python language implementations .

PyPy has been a community effort from the start and it would
not have got that far without the coding and feedback support
from numerous people. Please feel free to give feedback and
raise questions.

contact points: http://codespeak.net/pypy/dist/pypy/doc/contact.html

contributor list:
http://codespeak.net/pypy/dist/pypy/...ntributor.html

have fun,

the pypy team, of which here is a partial snapshot
of mainly involved persons:

Armin Rigo, Samuele Pedroni,
Holger Krekel, Christian Tismer,
Carl Friedrich Bolz, Michael Hudson,
Eric van Riet Paap, Richard Emslie,
Anders Chrigstroem, Anders Lehmann,
Ludovic Aubry, Adrien Di Mascio,
Niklaus Haldimann, Jacob Hallen,
Bea During, Laura Creighton,
and many contributors ...

PyPy development and activities happen as an open source project
and with the support of a consortium partially funded by a two
year European Union IST research grant. Here is a list of
the full partners of that consortium:

Heinrich-Heine University (Germany), AB Strakt (Sweden)
merlinux GmbH (Germany), tismerysoft GmbH(Germany)
Logilab Paris (France), DFKI GmbH (Germany)
ChangeMaker (Sweden), Impara (Germany)
Aug 28 '05 #1
10 1793
That's great! Congratulations !

Aug 28 '05 #2
Carl Friedrich Bolz wrote:
[[... great news ...]]

Would it be useful for people to start trying out their modules/code to see
if they work with this release, and whether they can likewise be translated
using the C/LLVM backends, or would you say this is too early? (I'm more
thinking in terms of it providing real world usecases in the hope of
finding things that don't work - rather than anything else)

Either way, this looks like a great milestone - congratulations to the
entire team. (I remember PyPy being met with skepticism as to whether
it could even be done! :-)

Best Regards,
Michael

Aug 28 '05 #3
Michael Sparks <ms@cerenity.or g> wrote:
Would it be useful for people to start trying out their modules/code to see
if they work with this release, and whether they can likewise be translated
using the C/LLVM backends, or would you say this is too early? (I'm more
thinking in terms of it providing real world usecases in the hope of
finding things that don't work - rather than anything else)
This is not how it works. Pypy doesn't translate your code to C/LLVM.
Currently PyPy can only translate a pretty simple subset of python
called RPython which has a very C-like syntax (but without memory
management code). This is needed to allow type inference inside the
interpreter code.

The code in your application is application code and can be whatever you
want, you may try to translate it to C/LLVM but it won't be that good of
course because the annotator is not that intelligent.

Just In Time compilation a-la-psyco is planned before the 1.0 release of
pypy.
Right now also the compiler/parser run in application level which means
it is rather slow because it is not translated like the rest of pypy
(which accounts for quite a bit of the slowness of the translated pypy)
[this is of course only true if they didn't manage to rewrite the
parser/compiler in RPython, which I admit I'm not sure]

More information is available on codespeak.net website :).

What's really cool in PyPy is how easily you can implement a new object
space and change semantics of operations done in python.
Writing a Python interpreter that can share data structures across many
computers will be hard but possible.
There are already 4 different object spaces implemented, the standard
one, the thunk one (which is a lazy evaluation object space), the
flowgraph object space and the trace object space that traces each
operation done.
Either way, this looks like a great milestone - congratulations to the
entire team. (I remember PyPy being met with skepticism as to whether
it could even be done! :-)


Indeed.

--
Valentino Volonghi aka Dialtone
Now Running MacOSX 10.4
Blog: http://vvolonghi.blogspot.com
http://weever.berlios.de
Aug 28 '05 #4
Carl Friedrich Bolz wrote:
pypy-0.7.0: first PyPy-generated Python Implementations
=============== =============== =============== =============== ==

What was once just an idea between a few people discussing
on some nested mailing list thread and in a pub became reality ...
the PyPy development team is happy to announce its first
public release of a fully translatable self contained Python
implementation. The 0.7 release showcases the results of our
efforts in the last few months since the 0.6 preview release
which have been partially funded by the European Union:


Cool. I just tested EmPy's regression suite with PyPy 0.7.0, and it ran
fine (though obviously it was very slow). Nice job so far, guys!

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
It is fatal to enter any war without the will to win it.
-- Douglas MacArthur
Aug 28 '05 #5
Valentino Volonghi aka Dialtone wrote:
Michael Sparks <ms@cerenity.or g> wrote:
Would it be useful for people to start trying out their modules/code to
see if they work with this release, and whether they can likewise be
translated using the C/LLVM backends, or would you say this is too early?
(I'm more thinking in terms of it providing real world usecases in the
hope of finding things that don't work - rather than anything else)
This is not how it works.


I beg to differ - it is how it can work (just not the default or currently
recommended). Currently the biggest, most interesting example is this:
(from the getting started page, compiling pypy)

cd pypy/translator/goal
python translate_pypy. py

Which has just finished executing on my machine and took about 3 hours to
complete (partly because the cc1 process reached ~780MB in terms of memory
footprint and my machine has 512Mb). However it goes on to talk about
compiling other things:

"""You can also use the translate_pypy. py script to try out several smaller
programs, e.g. a slightly changed version of Pystone:
cd pypy/translator/goal
python translate_pypy. py targetrpystone
"""

Which is pretty cool of course. For those of interest running pystone with
the pypy compiled native binary has the following results for pystones on
my machine:

michaels@linux: ~/pypy-0.7.0/pypy/translator/goal> ./pypy-c
debug: entry point starting
debug: argv -> ./pypy-c
debug: importing code
debug: calling code.interact()
Python 2.4.1 (pypy 0.7.0 build) on linux2
Type "help", "copyright" , "credits" or "license" for more information.
(InteractiveCon sole)
from test import pystone
pystone.main(10 00) Pystone(1.1) time for 1000 passes = 13.97
This machine benchmarks at 71.582 pystones/second
The same results for CPython:
michaels@linux: ~/pypy-0.7.0/pypy/translator/goal> python
Python 2.4 (#1, Mar 22 2005, 21:42:42)
[GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright" , "credits" or "license" for more information. from test import pystone
pystone.main()

Pystone(1.1) time for 50000 passes = 1.58
This machine benchmarks at 31645.6 pystones/second

Obviously therefore anyone seeking to translate their existing code from
python to an executable directly using pypy would not be doing it for
performance reasons (again, something I'm aware of watching the
updates come out and having run svn checkouts at previous times).

(Factor of ~450 though is pretty d*^%n cool though :)

I'm also well aware of the difference between python and rpython :-)
Pypy doesn't translate your code to C/LLVM. Currently PyPy can only translate a pretty simple subset of python
called RPython which has a very C-like syntax (but without memory
management code). This is needed to allow type inference inside the
interpreter code.

The code in your application is application code and can be whatever you
want, you may try to translate it to C/LLVM but it won't be that good of
course because the annotator is not that intelligent.


*Shrug* Seemed pretty good at annotating and compiling a module longer than
many of mine at Europython, and then compiled using the LLVM backed. :)

Anyway, whether it's sensible or not I'm going to play with translating some
of my modules :)

Regards,
Michael.

Aug 28 '05 #6

"Michael Sparks" <ms@cerenity.or g> wrote in message
news:43******** *************** @ptn-nntp-reader03.plus.n et...
(Factor of ~450 though is pretty d*^%n cool though :)


I think the ratio was 10 or 100 times higher when first measureable. I
have long expected success but am still impressed.

TJR

Aug 29 '05 #7
Michael Sparks <ms@cerenity.or g> writes:
Valentino Volonghi aka Dialtone wrote:
Michael Sparks <ms@cerenity.or g> wrote:
Would it be useful for people to start trying out their modules/code to
see if they work with this release, and whether they can likewise be
translated using the C/LLVM backends, or would you say this is too early?
(I'm more thinking in terms of it providing real world usecases in the
hope of finding things that don't work - rather than anything else)
This is not how it works.


I beg to differ - it is how it can work (just not the default or currently
recommended).


The chance of any random module you have written being rpython is more
or less zero, so it's not _that_ interesting for you to try to compile
them with PyPy.
"""You can also use the translate_pypy. py script to try out several smaller
programs, e.g. a slightly changed version of Pystone:
cd pypy/translator/goal
python translate_pypy. py targetrpystone
"""

Which is pretty cool of course. For those of interest running pystone with
the pypy compiled native binary has the following results for pystones on
my machine:

michaels@linux: ~/pypy-0.7.0/pypy/translator/goal> ./pypy-c
debug: entry point starting
debug: argv -> ./pypy-c
debug: importing code
debug: calling code.interact()
Python 2.4.1 (pypy 0.7.0 build) on linux2
Type "help", "copyright" , "credits" or "license" for more information.
(InteractiveCon sole)
> from test import pystone
> pystone.main(10 00) Pystone(1.1) time for 1000 passes = 13.97
This machine benchmarks at 71.582 pystones/second>
The same results for CPython:
michaels@linux: ~/pypy-0.7.0/pypy/translator/goal> python
Python 2.4 (#1, Mar 22 2005, 21:42:42)
[GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright" , "credits" or "license" for more information. from test import pystone
pystone.main()
Pystone(1.1) time for 50000 passes = 1.58
This machine benchmarks at 31645.6 pystones/second

Obviously therefore anyone seeking to translate their existing code from
python to an executable directly using pypy would not be doing it for
performance reasons (again, something I'm aware of watching the
updates come out and having run svn checkouts at previous times).


No, you're still operating at the wrong level here (very easily done).
This is the _translated PyPy_ interpreting pystone. If you run a
_translated pystone_ you'll (hopefully) get a different, faster
answer.

In expected order of execution speed:

interpreted pypy interpreting pystone
translated pypy interpreting pystone
cpython interpreting pystone
translated pystone
Anyway, whether it's sensible or not I'm going to play with translating some
of my modules :)


Whatever floats your boat :)

Cheers,
mwh

--
Ability to type on a computer terminal is no guarantee of sanity,
intelligence, or common sense.
-- Gene Spafford's Axiom #2 of Usenet
Aug 30 '05 #8
Hi Valentino, Michael, all,

On Sun, Aug 28, 2005 at 20:46 +0200, Valentino Volonghi aka Dialtone wrote:
Michael Sparks <ms@cerenity.or g> wrote:
Would it be useful for people to start trying out their modules/code to see
if they work with this release, and whether they can likewise be translated
using the C/LLVM backends, or would you say this is too early? (I'm more
thinking in terms of it providing real world usecases in the hope of
finding things that don't work - rather than anything else)
This is not how it works. Pypy doesn't translate your code to C/LLVM.
Currently PyPy can only translate a pretty simple subset of python
called RPython which has a very C-like syntax (but without memory
management code). This is needed to allow type inference inside the
interpreter code.


This is mostly true but maybe a bit misleading. The subset of Python
that we can translate does not involve special syntax. For example
we can translate

http://codespeak.net/pypy/dist/pypy/...al/richards.py

and gain some speed up by a factor of 70 over interpretation with
CPython. The "RPython" limitation mainly refers to the way
how dynamically you use Python and how unambigously your values
flow across your functions and methods. Also you cannot, for example,
create classes dynamically while creating instances is, of course,
no problem. Also, we support all Python control flow statements.
For a more detailed list, look at:

http://codespeak.net/pypy/dist/pypy/...definition-not

The real culprit is that we don't currently intend to try
offering a tool that can automatically translate Python
modules to C because we are still experimenting with and
targeting our own Python interpreter and tackling the
challenges that arise out of translating this efficiently.
It's a matter of focus of the current dev group and not
one of technical feasibility.

If one or more people would want to care for producing,
testing and documenting such a tool on top of our current code
base then the next weeks might be good for that as we intend
to go for some cleanup refactorings anyway.
The code in your application is application code and can be whatever you
want, you may try to translate it to C/LLVM but it won't be that good of
course because the annotator is not that intelligent.
See above. You can try to translate python programs with a bit
of effort and determination to find your way :-)
Just In Time compilation a-la-psyco is planned before the 1.0 release of
pypy.


We don't have a fixed version roadmap but indeed, we plan to work
on JIT compilation and other niceties rather soon now.

cheers,

holger
Aug 30 '05 #9
Michael Hudson wrote:
....
The chance of any random module you have written being rpython is more
or less zero, so it's not _that_ interesting for you to try to compile
them with PyPy.
I know - the code I use contains LOTS of generators for example, which
obviously don't fit the requirements :) (It's not difficult to convert code
from being a generator though :-)
No, you're still operating at the wrong level here (very easily done).
This is the _translated PyPy_ interpreting pystone. If you run a
_translated pystone_ you'll (hopefully) get a different, faster
answer.
Actually what I was aiming to compare was speed of pystone running on top of
CPython vs speed of pystone on top of translated pypy. ie running pystone
on top of something native that can execute python code :-)
In expected order of execution speed:

interpreted pypy interpreting pystone
translated pypy interpreting pystone
cpython interpreting pystone
translated pystone


Damn, I'm now going to have to sit down and find out if that's true :-)

*shucks* :-)
Anyway, whether it's sensible or not I'm going to play with translating
some of my modules :)


Whatever floats your boat :)


Regards,
Michael.

Aug 30 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1454
by: Armin Rigo | last post by:
Post-EuroPython 2005 PyPy Sprint 1st - 7th July 2005 ====================================================== The next PyPy sprint is scheduled right after EuroPython 2005 in Gothenborg, Sweden. Its main focus is translation to lower level backends but there are also other possible topics. We'll give newcomer-friendly introductions. To...
14
4284
by: Mark Dufour | last post by:
After nine months of hard work, I am proud to introduce my baby to the world: an experimental Python-to-C++ compiler. It can convert many Python programs into optimized C++ code, without any user intervention such as adding type declarations. It uses rather advanced static type inference techniques to deduce type information by itself. In...
0
1490
by: Carl Friedrich Bolz | last post by:
pypy-0.8.0: Translatable compiler/parser and some more speed ============================================================== The PyPy development team has been busy working and we've now packaged our latest improvements, completed work and new experiments as version 0.8.0, our third public release. The highlights of this third release of...
0
1367
by: Michael Hudson | last post by:
Introduction ============ This is the second of what will hopefully be many summaries of what's been going on in the world of PyPy in the last week. I'd still like to remind people that when something worth summarizing happens to recommend if for "This Week in PyPy" as mentioned on: http://codespeak.net/pypy/dist/pypy/doc/weekly/
0
1510
by: Carl Friedrich Bolz | last post by:
Tokyo PyPy Sprint: 23rd - 29th April 2006 ============================================================ The next PyPy sprint is scheduled to take place 23rd- 29th April 2006 (Sunday-Saturday) in Akihabara, Tokyo, Japan. We will together with FSIJ (Free Software Initiative of Japan) aim to promote Python and PyPy. We therefor invite Japanese...
0
1306
by: Wanja Saatkamp | last post by:
The PyPy team is happy to announce that the first bunch of PyPy videos can now be downloaded from: http://codespeak.net/pypy/dist/pypy/doc/video-index.html The videos introduce involved people and contain different talks, tutorials and interviews such as: 1. Technical talk on the PyPy architecture, standard interpreter, translation...
0
1407
by: Michael Hudson | last post by:
The next PyPy sprint will happen in the nice city of Limerick in Ireland from 21st till 27th August. (Most people intend to arrive 20th August). The main focus of the sprint will be on JIT compiler works, various optimization works, porting extension modules, infrastructure works like a build tool for PyPy, or extended (distributed)...
0
1216
by: holger krekel | last post by:
========================================================================= PyPy Trillke "EU and beyond!" sprints (25-28th Feb, 1-5th March 2006) ========================================================================= ... image:: http://www.trillke.net/images/HausPanorama0304_113kb.jpg Some two years and some thousands of commits later,...
0
1631
by: Michael Hudson | last post by:
The PyPy team is sprinting at EuroPython again and we invite you to participate in our 3 day long sprint at the conference hotel - Reval Hotel Lietuva. If you plan to attend the sprint we recommend you to listen to the PyPy technical talks (`EuroPython schedule`_) during the conference since it will give you a good overview of the status of...
0
7800
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8178
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6558
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5679
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5365
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3806
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1405
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.