Re: [R] R and Scheme

2008-12-11 Thread Wacek Kusnierczyk
Peter Dalgaard wrote: > Wacek Kusnierczyk wrote: >> Peter Dalgaard wrote: >>> Johannes Huesing wrote: Stavros Macrakis <[EMAIL PROTECTED]> [Wed, Dec 10, 2008 at 04:59:25AM CET]: > So I conclude that what is really meant by "R semantics are based on > Scheme > semantics" is "R

Re: [R] R and Scheme

2008-12-10 Thread Peter Dalgaard
Wacek Kusnierczyk wrote: Peter Dalgaard wrote: Johannes Huesing wrote: Stavros Macrakis <[EMAIL PROTECTED]> [Wed, Dec 10, 2008 at 04:59:25AM CET]: So I conclude that what is really meant by "R semantics are based on Scheme semantics" is "R has functions as first-class citizens and a correct im

Re: [R] R and Scheme

2008-12-10 Thread Wacek Kusnierczyk
Peter Dalgaard wrote: > Johannes Huesing wrote: >> Stavros Macrakis <[EMAIL PROTECTED]> [Wed, Dec 10, 2008 at >> 04:59:25AM CET]: >>> So I conclude that what is really meant by "R semantics are based on >>> Scheme >>> semantics" is "R has functions as first-class citizens and a correct >>> implemen

Re: [R] R and Scheme

2008-12-10 Thread Stavros Macrakis
On Wed, Dec 10, 2008 at 4:40 AM, Duncan Murdoch <[EMAIL PROTECTED]>wrote: > [deletions, including attribution, which I think were Stavros then Luke > then Peter:] >> >> In R, most data types (including numeric vectors) do not have a standard external representation which can be read back in w

Re: [R] R and Scheme

2008-12-10 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > Stavros Macrakis wrote: > > >> There is no equivalent to set-car!/rplaca (not even pairlists and >> expressions). For example, r<-pairlist(1,2); r[[1]]<-r does not create a >> circular list. And in general there doesn't seem to be substructure sharing >> at the semant

Re: [R] R and Scheme

2008-12-10 Thread Duncan Murdoch
[deletions, including attribution, which I think were Stavros then Luke then Peter:] In R, most data types (including numeric vectors) do not have a standard external representation which can be read back in without evaluation. The default print form is not readable in this sense but dput is a

Re: [R] R and Scheme

2008-12-09 Thread Peter Dalgaard
Johannes Huesing wrote: Stavros Macrakis <[EMAIL PROTECTED]> [Wed, Dec 10, 2008 at 04:59:25AM CET]: So I conclude that what is really meant by "R semantics are based on Scheme semantics" is "R has functions as first-class citizens and a correct implementation of lexical scope, including upwards

Re: [R] R and Scheme

2008-12-09 Thread Johannes Huesing
Stavros Macrakis <[EMAIL PROTECTED]> [Wed, Dec 10, 2008 at 04:59:25AM CET]: > So I conclude that what is really meant by "R semantics are based on Scheme > semantics" is "R has functions as first-class citizens and a correct > implementation of lexical scope, including upwards funarg". > One othe

Re: [R] R and Scheme

2008-12-09 Thread Stavros Macrakis
Thanks for the various thoughtful replies to my post "R and Scheme", where I wondered what exactly people meant when they said that R semantics were based on Scheme semantics. R clearly has Scheme-like semantics for its function objects, which are first-class objects and correctly implement static

Re: [R] R and Scheme

2008-12-09 Thread Wacek Kusnierczyk
Luke Tierney wrote: > On Tue, 9 Dec 2008, Wacek Kusnierczyk wrote: > >> Stavros Macrakis wrote: >>> >>> R does not have continuations or call-with-current-continuation or >>> other >>> mechanisms for implementing coroutines, general iterators, and the >>> like. >>> >> >> there is callCC, for exampl

Re: [R] R and Scheme

2008-12-09 Thread Luke Tierney
On Tue, 9 Dec 2008, Wacek Kusnierczyk wrote: Stavros Macrakis wrote: I've read in many places that R semantics are based on Scheme semantics. As a long-time Lisp user and implementor, I've tried to make this more precise, and this is what I've found so far. I've excluded trivial things that a

Re: [R] R and Scheme

2008-12-09 Thread Wacek Kusnierczyk
Stavros Macrakis wrote: > There is no equivalent to set-car!/rplaca (not even pairlists and > expressions). For example, r<-pairlist(1,2); r[[1]]<-r does not create a > circular list. And in general there doesn't seem to be substructure sharing > at the semantic level (though there may be in the i

Re: [R] R and Scheme

2008-12-09 Thread Wacek Kusnierczyk
Stavros Macrakis wrote: > I've read in many places that R semantics are based on Scheme semantics. As > a long-time Lisp user and implementor, I've tried to make this more precise, > and this is what I've found so far. I've excluded trivial things that > aren't basic semantic issues: support for

Re: [R] R and Scheme

2008-12-08 Thread Peter Dalgaard
Luke Tierney wrote: R does not have macros. Those are related -- because of lazy evaluation one does macros are not needed to achive semantic goals (see for example tryCatch). Being able to define friendlier syntax would sometimes be nice though (see tryCatch again). Also for some practical

Re: [R] R and Scheme

2008-12-08 Thread Gabor Grothendieck
A few comments interspersed. On Mon, Dec 8, 2008 at 5:59 PM, Stavros Macrakis <[EMAIL PROTECTED]> wrote: > I've read in many places that R semantics are based on Scheme semantics. As > a long-time Lisp user and implementor, I've tried to make this more precise, > and this is what I've found so fa

Re: [R] R and Scheme

2008-12-08 Thread Luke Tierney
On Mon, 8 Dec 2008, Stavros Macrakis wrote: I've read in many places that R semantics are based on Scheme semantics. As a long-time Lisp user and implementor, I've tried to make this more precise, and this is what I've found so far. I've excluded trivial things that aren't basic semantic issue

[R] R and Scheme

2008-12-08 Thread Stavros Macrakis
I've read in many places that R semantics are based on Scheme semantics. As a long-time Lisp user and implementor, I've tried to make this more precise, and this is what I've found so far. I've excluded trivial things that aren't basic semantic issues: support for arbitrary-precision integers; su