torsdagen den 15 september 2005 22.19 skrev Michal Wallace: > Thanks for explaining this. So this is another > great benefit that ought to be part of the > marketing message. :)
It is mentioned in the architecture overview. We still don't have a "key benefits" marketing page, simply because it is still too hard to tell what the key benefits are. The ideas are there, but we may have to sacrifice some of them to attain some other goals. We think it is too early to make firm commitments at this point in time. Pypy is a reseach project and we still have 14 months to go before we need to show a useable product to the EU. Being an agile project, we have no Big Design Up Front. We are convinced that we can attain the goal of being as fast as CPython, but the path to get there has not been laid out in detail. We have hopes of becoming faster than CPython, at least for some specific problems and platforms, but again, we currently don't know the exact route of getting there, or even which problems we will be good at solving. Our faith in being able to solve the problems is built on the expertise and previous accomplishments of our project members. > > In my mind I've been picturing pypy as a compiler. > Python goes in, C or lisp code goes out. This is where quite a few people stumble. The end product of the Pypy project is essentially an executable, that is able to interpret Python, just like the regular Python interpreter, which is implemented in C. This executable is generated from source code which is written in Python, or to be more correct, a subset of Python which we call RPython. This subset forbids some of the very dynamic usages of Python, making the problem of compiling to efficient static code somewhat simpler. This means that a very large part of the work in Pypy is geared towards generating this single interpreter. All the work put into this may be reusable, if people are willing to code extension modules using RPython, which could then be translated into C/machine code/Lisp/whatever. However, this requires that we freeze the specification of RPython, document it, and build tools that help check that no illegal Python constructs are used. Currently, RPython is a convention, not a tightly specified programming language. Quite likely, it may remain a convention as it may be impossible to make exhaustive compile time checks of all constructs. > But what I think you're saying here is that since > pypy is written in python, it can compile itself > and produce a variety of custom virtual machines? No, because of its modular design, it can produce a variety of custom virtual machines. This would be possible in other environments as well, but the high level of abstraction in Python makes the task easier. > So, for example, jython and ironpython and pirate > could all eventually just be implemented as > backends for pypy? With a hand-wavy interpretation of what you are saying that would be true. With a relatively modest amount of work (compared to building things from scratch), it would be possible to implement the Java VM, the .NET and the Parrot VM as Pypy execution models. It is still too early to say to what extent the optimisations we are doing for the Python VM would be applicable to the other VMs. Probably quite a few, but certainly not all. > > And we could finally get a decent python > interpreter running on a palm pilot? Possibly. One part of the EU project is to test Pypy on an embedded device. However, this may require using the modular structure to strip out unneeded functionality. If you don't need floats, you can easily disable them and get a smaller interpreter. > Because if so, I can think of a whole list of > companies that might be interested in adding > funding to the mix: > > microsoft (ha?) > novell (they fund mono) > sun or ibm (for the jvm) > nokia (for their series 60 phone) > palm (for palm pilot) > sony or ibm (for the cell processor) > > Basically, these are all groups that want > a lot of developers to use their technology. We are still 200 times slower than CPython and we still use quite a lot of memory. Approaching the big players requires that we are further on the way, or that we have some isolated aspect that would make sense for them to invest in. (We are still too much of Py in the Sky ;-)) > Sony, for example is coming out with their > playstation 3 based on this new cell chip. > Video games take years to program. They're > usually written in C. If you can show sony > that by supporting pypy they can have a > fast-as-c language custom taylored to their > architecture, they might just go for it. > The've already announced plans for a PS3 with > linux installed, so they must have some > experience funding open source projects. > > Similarly, palm has devoted resources to > the eclipse project to create a standard > IDE for developing palm pilot applications. > > I don't even think you have to market a product > here. You can just market the potential > benefits of the research itself to the right > people, show them how it would benefit them, > and show them the care and professionalism > with which you're already running this > project (so they know you'll actually deliver). > > And of course when I say you, I mean > anybody on the list who was interested > in getting more funding for this project. :) Thanks for your comments Michal, they offered some ideas for how to proceed, when we have some more promising results. Jacob Hallén _______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev