# R

## stevan apter — 2003-11-27 14:20:06

    an interim report on R

    http://www.apl-385.demon.co.uk/rcs/programs/r/net.htm

    appears in the current issue of Vector

    http://www.vector.org.uk/

    i've pointed richard at joy, and at our mail list.

## Stevan Apter — 2008-03-19 22:14:39

    R is a stack-based array language designed and implemented by richard smith:

    http://www.apl385.com/rcs/programs/r/

    richard published several papers on R in vector, e.g.

    http://www.vector.org.uk/archive/v202/rcs202.htm

## Robbert van Dalen — 2008-03-19 21:19:28

    hoi stevan,

    that's a great catch!

    thanks for sharing the link

     On Mar 19, 2008, at 11:14 PM, Stevan Apter wrote:

    > R is a stack-based array language designed and implemented by

    > richard smith:

    >

    > http://www.apl385.com/rcs/programs/r/

    >

    > richard published several papers on R in vector, e.g.

    >

    > http://www.vector.org.uk/archive/v202/rcs202.htm

    >

    >

    [Non-text portions of this message have been removed]

## Christopher Diggins — 2008-03-19 21:46:52

    Hi Stevan,

    What makes it an array language?

    - Christopher

     On Wed, Mar 19, 2008 at 6:14 PM, Stevan Apter <sa@...> wrote:

    >

    >

    >

    >

    > R is a stack-based array language designed and implemented by richard smith:

    >

    > http://www.apl385.com/rcs/programs/r/

    >

    > richard published several papers on R in vector, e.g.

    >

    > http://www.vector.org.uk/archive/v202/rcs202.htm

    >

## Daniel Ehrenberg — 2008-03-19 22:21:41

    Not another R! We already have this one: r-project.org (the first

    Google hit for R, in fact).

    Dan

     On Wed, Mar 19, 2008 at 6:14 PM, Stevan Apter <sa@...> wrote:

    > R is a stack-based array language designed and implemented by richard smith:

    >

    >  http://www.apl385.com/rcs/programs/r/

    >

    >  richard published several papers on R in vector, e.g.

    >

    >  http://www.vector.org.uk/archive/v202/rcs202.htm

## John Nowak — 2008-03-19 23:00:42

    On Mar 19, 2008, at 5:46 PM, Christopher Diggins wrote:

     > Hi Stevan,

    >

    > What makes it an array language?

     You can write this:

        (1 2 3) (4 5 6) +

    Instead of this:

        (1 2 3) (4 5 6) [+] zip-with

    And this:

        (1 2 3)\+

    Instead of this:

        (1 2 3) [+] reduce

    *shrug*

    - John

## Stevan Apter — 2008-03-20 00:54:18

    if that's intellectual curiosity, i am marie of roumania.

     ----- Original Message -----

    From: "John Nowak" <john@...>

    To: <concatenative@yahoogroups.com>

    Sent: Wednesday, March 19, 2008 6:00 PM

    Subject: Re: [stack] R

    >

    > On Mar 19, 2008, at 5:46 PM, Christopher Diggins wrote:

    >

    >> Hi Stevan,

    >>

    >> What makes it an array language?

    >

    > You can write this:

    >

    >    (1 2 3) (4 5 6) +

    >

    > Instead of this:

    >

    >    (1 2 3) (4 5 6) [+] zip-with

    >

    > And this:

    >

    >    (1 2 3)\+

    >

    > Instead of this:

    >

    >    (1 2 3) [+] reduce

    >

    > *shrug*

    >

    > - John

    >

    >

## John Nowak — 2008-03-20 00:02:38

    On Mar 19, 2008, at 8:54 PM, Stevan Apter wrote:

     > if that's intellectual curiosity, i am marie of roumania.

     I'll admit I'm running low on intellectual curiosity at the moment.

    Suffering from thesis paper exhaustion.

    What I was getting at is that it appears there's little you can't

    emulate easily via higher order functions in a language like Joy. If

    that's the case, then it seems the advantages are primarily syntactic

    in nature.

    It took a slight amount of beating (from Slava Pestov no less) to get

    me to see the light with respect to concatenative languages. If anyone

    has the patience to show me what's what with respect to array

    languages (or, alternatively, a good link), I'd appreciate it.

    - John

## Stevan Apter — 2008-03-20 12:02:27

    ----- Original Message -----

    From: "John Nowak" <john@...>

    To: <concatenative@yahoogroups.com>

    Sent: Wednesday, March 19, 2008 7:02 PM

    Subject: Re: [stack] R

    >

    > On Mar 19, 2008, at 8:54 PM, Stevan Apter wrote:

    >

    >> if that's intellectual curiosity, i am marie of roumania.

    >

    > I'll admit I'm running low on intellectual curiosity at the moment.

    > Suffering from thesis paper exhaustion.

    >

    > What I was getting at is that it appears there's little you can't

    > emulate easily via higher order functions in a language like Joy. If

    > that's the case, then it seems the advantages are primarily syntactic

    > in nature.

    >

    > It took a slight amount of beating (from Slava Pestov no less) to get

    > me to see the light with respect to concatenative languages. If anyone

    > has the patience to show me what's what with respect to array

    > languages (or, alternatively, a good link), I'd appreciate it.

    www.jdl.ac.cn/turing/pdf/p444-iverson.pdf

    still the best exposition of the central ideas of array programming.

    >

    > - John

    >

## John Nowak — 2008-03-20 17:21:46

    On Mar 20, 2008, at 8:02 AM, Stevan Apter wrote:

     > www.jdl.ac.cn/turing/pdf/p444-iverson.pdf

    >

    > still the best exposition of the central ideas of array programming.

     That link seems to be dead. The google HTML cached version is

    unreadable. Do you have a copy?

## John Nowak — 2008-03-20 17:23:27

    On Mar 20, 2008, at 1:21 PM, John Nowak wrote:

     >

    > On Mar 20, 2008, at 8:02 AM, Stevan Apter wrote:

    >

    >> www.jdl.ac.cn/turing/pdf/p444-iverson.pdf

    >>

    >> still the best exposition of the central ideas of array programming.

    >

    > That link seems to be dead. The google HTML cached version is

    > unreadable. Do you have a copy?

     Ah forgive me, it appears to be working again (albeit very slowly).

    - John

## Don Groves — 2008-03-20 19:27:48

    On Mar 20, 2008, at 19:23 , John Nowak wrote:

     >

    > On Mar 20, 2008, at 1:21 PM, John Nowak wrote:

    >

    >>

    >> On Mar 20, 2008, at 8:02 AM, Stevan Apter wrote:

    >>

    >>> www.jdl.ac.cn/turing/pdf/p444-iverson.pdf

    >>>

    >>> still the best exposition of the central ideas of array programming.

    >>

    >> That link seems to be dead. The google HTML cached version is

    >> unreadable. Do you have a copy?

    >

    > Ah forgive me, it appears to be working again (albeit very slowly).

     Probably due to all of us who are downloading the PDF at the moment ;-)

    --

    don

     >

    > - John

    >

    >

    > ------------------------------------

    >

    > Yahoo! Groups Links

    >

    >

    >

    >

## Christopher Diggins — 2008-03-20 19:41:25

    On Thu, Mar 20, 2008 at 8:02 AM, Stevan Apter <sa@...> wrote:

     > ----- Original Message -----

    > From: "John Nowak" <john@...>

    > >

    > > On Mar 19, 2008, at 8:54 PM, Stevan Apter wrote:

    > >

    > >> if that's intellectual curiosity, i am marie of roumania.

    > >

     My original post (sorry if sounded like I was trolling) was because

    the R language looked to me like PostScript with several overloaded

    operators for dealing specifically with arrays. I was wondering if

    that is all that it took for a language to be considered an array

    language.

     >

    > www.jdl.ac.cn/turing/pdf/p444-iverson.pdf

    >

    > still the best exposition of the central ideas of array programming.

     Thanks for the link. I should emphasize that I am not in any way

    trying to negate any of the benefits of array programming, but as a

    language designer I want to know what characteristics a langauge

    should have to be considered an array language.

    Thanks again,

    Christopher

## Stevan Apter — 2008-03-20 22:31:55

    that link is really REALLY slow.  if you're a member of ACM you can

    get it there -- a better instance than the PDF of the photocopy at

    the link i provided.  or you can purchase the collected turing award

    papers, in which it appears.  or you can probably find that paper

    and others by iverson at jsoftware.com.

    here's an illustration.

    given a vector v (list, array, whatever) of integers and a maximum

    value n, chop v into maximum subvectors s.  intuitively, you build s

    by taking as much as you can from v without exceeding n, then take

    some more, &c.  the remainder (if any) is the final subvector of s.

      v:3 2 2 0 1 4 0 4 3 2 3 4 3 4 1 1 2 2 2 4

      n:10

      bp[n;v]

    0 5 8 11 13 18  / breakpoints of v

    so:

      bp[n;v]_v     / chop v at those breakpoints

    3 2 2 0 1

    4 0 4

    3 2 3

    4 3

    4 1 1 2 2

    2 4

    i picked this one off the k mailing list -- a recent query by a k

    newbie.

    as it happens, bp is idiomatic.  it crops up in lots of contexts.

    for example, wordwrap:

      wordwrap:{" "sv'bp[x;count each w]_w:" "vs y}

      wordwrap[20;"split words on 20 column boundaries - produce a list of strings"]

    "split words on 20 column"

    "boundaries - produce a"

    "list of strings"

    that is,

        w:" "vs y              / split the string into words

        b:msv[x;count each w]  / find the breakpoints where count <= x

        s:b _w                 / chop the words into sublists at those points

        " "sv s                / fuse the words into a string

    array languages evolve in the direction of finding a better range of

    datatypes and a better set of primitives, with the result that a larger

    set of problems come in range of array solution.  programs get smaller,

    have less cruft, run faster, and take less space.

    here's bp:

        bp:{-2_(1+a bin a|x+-1_0,a:sums y)\[0]}

    enchilada is an array-oriented concatenative language, but very very

    different from APL or j or k.  i don't know why it slipped my mind

    when i raised the subject.

     ----- Original Message -----

    From: "Christopher Diggins" <cdiggins@...>

    To: <concatenative@yahoogroups.com>

    Sent: Thursday, March 20, 2008 2:41 PM

    Subject: Re: [stack] R

    > On Thu, Mar 20, 2008 at 8:02 AM, Stevan Apter <sa@...> wrote:

    >> ----- Original Message -----

    >> From: "John Nowak" <john@...>

    >> >

    >> > On Mar 19, 2008, at 8:54 PM, Stevan Apter wrote:

    >> >

    >> >> if that's intellectual curiosity, i am marie of roumania.

    >> >

    >

    > My original post (sorry if sounded like I was trolling) was because

    > the R language looked to me like PostScript with several overloaded

    > operators for dealing specifically with arrays. I was wondering if

    > that is all that it took for a language to be considered an array

    > language.

    >

    >>

    >> www.jdl.ac.cn/turing/pdf/p444-iverson.pdf

    >>

    >> still the best exposition of the central ideas of array programming.

    >

    > Thanks for the link. I should emphasize that I am not in any way

    > trying to negate any of the benefits of array programming, but as a

    > language designer I want to know what characteristics a langauge

    > should have to be considered an array language.

    >

    > Thanks again,

    > Christopher

    >

## William Tanksley, Jr — 2008-03-20 22:22:32

    Stevan Apter <sa@...> wrote:

     > that link is really REALLY slow.  if you're a member of ACM you can

    >  get it there -- a better instance than the PDF of the photocopy at

    >  the link i provided.  or you can purchase the collected turing award

    >  papers, in which it appears.  or you can probably find that paper

    >  and others by iverson at jsoftware.com.

     They link to http://elliscave.com/APL_J/tool.pdf.

    -Wm

## Stevan Apter — 2008-03-21 15:42:37

    gene mcdonnell's list of 1000 array "finger exercises":

    http://www.kx.com/technical/contribs/eugene/kidioms.html