Those of you tracking R development will have noticed that we are moving towards using R as a scripting engine. (It is often overlooked as such.) Thus far INSTALL, REMOVE, SHLIB and massage-examples have been moved to R. Reasons: - it is platform-independent and needs no other tools installed. No need to worry about strange 'sh' variants (as on AIX and in the past on Mac OS X) or to track Perl version changes and miniumun requirements. - it is fast. Shell scripts are notoriously slow[*] on Windows as launching a new process there is relatively much slower than on a Unix-alike, to the extent that we have had to use Perl scripts on Windows. The actual script of INSTALL in R runs twice as fast as the shell script on Unix or the Perl script on Windows. (In part this comes about because R scripts can be pre-parsed if put in a package: the 1150 lines of INSTALL was taking a couple of seconds to parse.) - it is much easier to maintain. We only need one version, and any R user should be able to folllow it (and any member of R-core to maintain it). And one version means only one set of the documentation and automatically keeping things in step. - R has lots of useful features, including automatic support of (for files) different line endings and encodings. Of course there is the one-time cost of doing the conversion, which has been triggered here by the need for new functionality. It also means that there are minor changes to merge the Unix and Windows versions. (Some of you will be hearing from Uwe Ligges about use of undocumented variables in Windows configure/Makevars.win, for example.) In due course we see phasing out the use of Perl, at least at run time (and that might even be for 2.9.0). [*] Running configure under Cygwin took over an hour on a fairly laoded Windows box earlier in the week. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On Sun, Jan 11, 2009 at 3:18 PM, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:> Those of you tracking R development will have noticed that we are moving > towards using R as a scripting engine. (It is often overlooked as such.)...> In due course we see phasing out the use of Perl, at least at run time (and > that might even be for 2.9.0).That's great news. I for one will not be sorry to see it and the shell scripts go.
On 11 January 2009 at 20:18, Prof Brian Ripley wrote: | Those of you tracking R development will have noticed that we are | moving towards using R as a scripting engine. [...] | Reasons: | | - it is platform-independent and needs no other tools installed. [...] | - it is fast. [...] Indeed. I really like working with r scripts. And littler by Horner and Eddelbuettel is faster than Rscript -- see eg the scripts tests/timing.sh and tests/timing2.sh in the SVN archive / littler tarballs (and the results below for illustration). We should still appreciate it you could finally acknowledge existence of littler it in the R / Rscript documentation. You are not doing users any service by pretending it doesn't exist. That said, we are not (yet ?) building r for Windows, and I appreciate that Rscript is available there. Maintenance and use of R will be easier with a consistent set of tools. This is a good move. Dirk edd at ron:~/svn/littler/tests> ./timing.sh --- GNU bc doing the addition 10 times real 0m0.028s user 0m0.004s sys 0m0.012s --- our r doing the addition 10 times real 0m0.400s user 0m0.308s sys 0m0.052s --- GNU R's Rscript doing the addition 10 times real 0m2.077s user 0m1.832s sys 0m0.204s --- GNU R doing the addition 10 times real 0m3.974s user 0m3.728s sys 0m0.228s edd at ron:~/svn/littler/tests> ./timing2.sh --- our r calling summary() 20 times real 0m3.261s user 0m2.976s sys 0m0.240s --- GNU R's Rscript calling summary() 20 times real 0m4.164s user 0m3.624s sys 0m0.548s --- GNU R calling summary() 20 times real 0m8.087s user 0m7.552s sys 0m0.492s edd at ron:~/svn/littler/tests> -- Three out of two people have difficulties with fractions.