Re-implementing R in Maxima



Just some general reflections on semantics rather than implementation....

R really isn't really much like Scheme in particular (as opposed to Lisps
or dynamic languages in general), though the implementors of R were
inspired by the Scheme implementation.  You might be interested in the "R
and Scheme" thread at
http://tolstoy.newcastle.edu.au/R/e5/help/08/12/9464.html (erratum:
<goog_1106234730>a[1]
=> 999 should read a[1] => 1)

The semantics and implementation of Maxima are related to Maclisp, an
ancestor of Common Lisp.  The current implementation on top of Common Lisp
really doesn't use much Common Lisp functionality or conventions.

The general philosophies of the two languages are very different, too:
Scheme is all about simplicity, rigor, and consistency; R is all about
convenience and "do what the user would want", and doesn't care much about
consistency.  Cf. Gabriel's
reflections<http://dreamsongs.com/WorseIsBetter.html>; on
"Worse is Better" and Burns' "R
Inferno<http://www.burns-stat.com/pages/Tutor/R_inferno.pdf>";.
 Maxima is more R-like than Scheme-like in this way, with many pragmatic
compromises.  cf. Sussman's notation in SICM for contrast (though it is far
from a complete CAS).  R does lots of weird and wonderful -- and very
convenient -- things with explicit manipulation of environments and
unevaluated call-by-need arguments which make programs in general highly
referentially opaque -- the exact opposite of a Scheme approach.

            -s

On Thu, Oct 27, 2011 at 11:47, Christophe Pouzat <
christophe.pouzat at gmail.com> wrote:

> Hi all,
>
> As an heavy R (http://www.r-project.org, a very nice statistical package
> which is "a bit" to Scheme what Maxima is to Common Lisp) and an
> occasional Maxima user (for symbolic computations, etc) I recently came
> across a very interesting conference paper by Ross Ihaka (one of the two
> original R developers) and Duncan Temple Lang: "Back to the Future: Lisp
> as a Base for a Statistical Computing System."
> (http://www.stat.auckland.ac.nz/%7Eihaka/downloads/Compstat-2008.pdf). The
> paper goes through some of the present limitations of R (not compiled,
> arguments passed by values, etc) and argues in favor of a
> reimplementation of R as an "M-expression" layer on top of Common
> Lisp. This paper triggered my interest in Common Lisp (better late than
> never!) and made me realized that I missed a lot about the capabilities
> of Maxima. But I would like the opinion of the Maxima's experts here, at
> least the ones who have time to read Ihaka and Temple Lang's paper:
> aren't they proposing to re-implement Maxima (with a strong statistical
> flavor)? If yes, wouldn't it be more economical to adapt to Maxima some
> of the coolest features of R?
>
> Christophe
>
> --
>
> Most people are not natural-born statisticians. Left to our own
> devices we are not very good at picking out patterns from a sea of
> noisy data. To put it another way, we are all too good at picking out
> non-existent patterns that happen to suit our purposes.
> Bradley Efron & Robert Tibshirani (1993) An Introduction to the Bootstrap
>
> --
>
> Christophe Pouzat
> Laboratoire de physiologie c?r?brale
> CNRS UMR 8118
> UFR biom?dicale de l'Universit? Paris-Descartes
> 45, rue des Saints-P?res
> 75006 PARIS
> France
>
> tel: +33 (0)1 42 86 38 28
> fax: +33 (0)1 42 86 38 30
> mobile: +33 (0)6 62 94 10 34
> web: http://www.biomedicale.univ-paris5.fr/physcerv/C_Pouzat.html
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>