[pypy-dev] Motivation for re-implementing R (GNU S) in PyPy (perhaps?)

Maurice Ling mauriceling at gmail.com
Tue Apr 24 05:48:26 CEST 2007

>> Well, R is free and open sourced. It is based on S and Splus, which  the
>> developers decided to close-source after a while (after achieving
>> success). R is also known as GNU S for that matter.
>> IMHO, R itself is a simple language and a relatively simple  
>> platform. It
>> is a language that manipulates data but philosophically, it is not a
>> statistical or mathematical language. The R core team seems to  
>> adhere to
>> the view that R is a programming language where (by chance and  
>> intent) a
>> lot of statistical tools are built on. Hence, most of the statistical
>> libraries for R are written in R. I believe that the entire  
>> Bioconductor
>> is written in R.
>> Hence, the motivation for considering implementing or re- implementing R
>> in PyPy is "natively" to bring in the strength of R (huge amounts of
>> statistical libraries and data sets) into Python.
> So, if the language is open source, quite simple and the only  
> advantage would be to have huge amounts of libraries... Why not just  
> make a code conversion from R to Numpy + Python, a full featured  
> language, used in a lot more places. Then you can get the libraries  
> and also a bigger comunity.

This could be a nice idea - make R codes run on Numpy + Python. My line 
of thought is that since there is an implementation of Numpy (I do not 
know how complete it is) in PyPy already (pypy/rpython/numpy), 
implementing a means to get R codes to run in RPython will be just as 
equally good, since RPython are essentially complete Python programs. 
Kinda killing 2 birds with a stone, or so.

> Just remember that making an interpreter of R using pypy will not  
> bring anything to python, as they would be diferent interpreters that  
> just happen to be inplemented on the same platform. It would keep the  
> same distance as R as it is today (implemented in C I suppose) and  
> Python (also made in C if you consider CPython). So I would probably  
> say, do the Numpy work on pypy than make a translator R2Py so you can  
> run your favorite R library on top of your optimized Numpy  
> implementation.

I think this line of argument can be made against every language 
interpreter implemented in PyPy, essentially everything can be 
interfaced at C. IMHO, what PyPy offers is the 
language-optimization-platform modularization. This may be loafy goal 
but sure worth the effort.

I am not sure what making an interpreter of X (where X can be any 
language, such as javascript or prolog) using PyPy will really bring 
anything to Python than implementing X interpreter directly on Python 
itself (without using PyPy). Please enlighten me on this.


More information about the Pypy-dev mailing list