I made a little series of steps to illustrate the difeence between the two
ranks. Did I get rthe differences right?
NB. Random rank noun B
NB. and random rank verb b ox
A=:'ABCDEFFGHIJKLMNOPSSTUVXYZ'
]C=:<B=:(>:?3#5)$A
┌─┐
│A│
│B│
│C│
│D│
│E│
└─┘
<$B
┌─────┐
│1 5 1│
└─────┘
"NB.(?>:4)B
"
E=:<"(D=:?>:#B)B
NB.verb ra m]D=:3 4 5$AD
((<B);<E),:(<$B);<D
┌───────┬───┐
│┌─┐ │┌─┐│
││A│ ││A││
││B│ │├─┤│
││C│ ││B││
││D│ │├─┤│
││E│ ││C││
│└─┘ │├─┤│
│ ││D││
│ │├─┤│
│ ││E││
│ │└─┘│
├───────┼───┤
│┌─────┐│0 │
││1 5 1││ │
│└─────┘│ │
└───────┴───┘
NB. Repeat for a second example:
┌─────┐
│ABCDE│
│FFGHI│
│ │
│JKLMN│
│OPSST│
│ │
│UVXYZ│
│ABCDE│
└─────┘
<$B
┌─────┐
│3 2 5│
└─────┘
"NB.(?>:4)B
"
E=:<"(D=:?>:#B)B
NB.verb ra m]D=:3 4 5$AD
((<B);<E),:(<$B);<D
┌───────┬─────────────┐
│┌─────┐│┌─────┬─────┐│
││ABCDE│││ABCDE│FFGHI││
││FFGHI││├─────┼─────┤│
││ │││JKLMN│OPSST││
││JKLMN││├─────┼─────┤│
││OPSST│││UVXYZ│ABCDE││
││ ││└─────┴─────┘│
││UVXYZ││ │
││ABCDE││ │
│└─────┘│ │
├───────┼─────────────┤
│┌─────┐│1 │
││3 2 5││ │
│└─────┘│ │
└───────┴─────────────┘
Linda
-----Original Message-----
From: Programming <[email protected]> On Behalf Of Henry
Rich
Sent: Friday, September 14, 2018 1:27 PM
To: [email protected]
Subject: Re: [Jprogramming] Using rank to avoid looping - reference?
Bringing that chapter over to NuVoc has been on the NuVoc worklist for years.
I'd love to see that happen.Ian Clark may have made a start, amidst his other
projects.
One thing to emphasize is that noun rank and verb rank are totally different.
The use of the same word probably causes much confusion - or worse, causes a
false sense of understanding where there SHOULD be the confusion that precedes
understanding.
Henry Rich
On 9/14/2018 1:15 PM, Devon McCormick wrote:
> Hi Linda -
>
> I'll keep my eyes open for that book but I've gotten a good reference
> in the meantime -
> https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.j
> software.com%2Fhelp%2Fjforc%2Floopless_code_i_verbs_have_r.htm%23_Toc1
> 91734331&data=02%7C01%7C%7C3fde228f6df64225b2bb08d61a675a61%7C84df
> 9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636725428523393430&sdata=U8
> oIhTaXFo0G7NnVxsfBJk2VXeX8UTAk4VvYKyIRDKM%3D&reserved=0
> - that gives me something to anchor the basic premise of the Wikipedia
> article.
>
> Thanks,
>
> Devon
>
> On Fri, Sep 14, 2018 at 10:44 AM lindaalvord <[email protected]>
> wrote:
>
>> Oops this belongs here. . .
>> Hi Devon, Tama and I just flew up toNYC. I had time to take my eyes
>> off tacit and found this. There was a white book about education for
>> APL. I can,t remember the name. Ken and three or four teachers put it
>> together one
>> summer at IBM. It might have something.Linda
>>
>>
>> Sent from my Verizon, Samsung Galaxy smartphone
>> -------- Original message --------From: Devon McCormick <
>> [email protected]> Date: 9/5/18 4:04 PM (GMT-05:00) To:
>> J-programming forum <[email protected]> Subject: Re:
>> [Jprogramming] Using rank to avoid looping - reference?
>> Thanks for all the responses.
>>
>> Raul: you are right as array programming without rank also lets you
>> avoid loops; rank refines how one slices an array.
>>
>> What I'm looking for are works I can cite on the Wikipedia page. As
>> it stands, it's too free-form and and too original which is not what
>> the Wikipedia guidelines specify. I will resort to things like the J
>> site or a Mathematica help page but I'm concerned about the potential
>> drawbacks of citing a web-page that may change or disappear as
>> opposed to a published work. Also, now that I look at the
>> Mathematica page for "map", it does not seem to be a good fit as
>> their map looks very vectorish, not generally array-oriented, so it's
>> not clear that rank applies. I may have to remove these claims unless I
>> find a more apt source.
>>
>> Pascal: thanks for pointing out the problem with /. I'll fix that.
>>
>> Part of the problem is that most other languages' references to "array"
>> really mean "numeric vector", at least in my experience.
>>
>>
>>
>> On Wed, Sep 5, 2018 at 2:52 PM 'Pascal Jasmin' via Programming <
>> [email protected]> wrote:
>>
>>> the wikipage mislabels the / operator as map as well (it is in fact
>>> a reduce operator)
>>>
>>> The functional map function replaces a "for each" loop. Rank is
>>> very closely tied to this, with the addition of specifying the
>> size/slice/scope
>>> of the "each element" group
>>>
>>>
>>> On Wednesday, September 5, 2018, 1:56:33 p.m. EDT, Cliff Reiter <
>>> [email protected]> wrote:
>>>
>>>
>>>
>>>
>>>
>>> From Mathematica help:
>>>
>>> Map (Built-in Symbol)
>>> Map[f, expr] or f /@ expr applies f to each element on the first
>>> level in expr. Map[f, expr, levelspec] applies f to parts of expr
>>> specified by levelspec. Map[f] represents\[Ellipsis]
>>>
>>>
>>> On 9/5/2018 10:58 AM, devonmcc wrote:
>>>> I am trying to bring the Wikipedia page on "rank (J programming
>>> language)" into compliance with the guidelines by inserting more
>>> inline references but am stumped by that page's initial assertion
>>> that rank is a generalization of looping, as well as the subsequent
>>> claims about rank generalizing "map" and "maplist".
>>>> Searches for a word like "rank" bring up many irrelevant hits even
>>>> when
>>> included with programming-specific terms. Also, the best reference
>>> I
>> have
>>> found so far -
>>> https://nam03.safelinks.protection.outlook.com/?url=www.ccs.neu.edu%
>>> 2Fhome%2Fjrslepak%2Ftyped-j.pdf&data=02%7C01%7C%7C3fde228f6df642
>>> 25b2bb08d61a675a61%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C6367
>>> 25428523393430&sdata=82kUqodSWuOtsU7I%2BoJ6KxMYxSr5YfJtHmU7TxZLI
>>> r0%3D&reserved=0 - uses language like "...a form of rank...which
>>> renders much of a program's control structure implicit by lifting
>>> base operators to higher-dimensional array structures." I will have to
>>> include this in the references to use it but was hoping to find an older
>>> document, preferably one already in the references, but have been stymied
>>> by the lack of explicit reference to avoiding loops by using rank because
>>> it seems so obvious that it is only implied.
>>>> In any case, a reference to the assertions about "map" and such
>>>> would
>>> also be appreciated.
>>>> Thanks,
>>>> Devon
>>>> Sent from my Verizon, Samsung Galaxy smartphone
>>>> -------------------------------------------------------------------
>>>> --- For information about J forums see
>>>> https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fww
>>>> w.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C3fde228f6df64225
>>>> b2bb08d61a675a61%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63672
>>>> 5428523393430&sdata=679kDoFqUkaArm4sN1Cixh5vFSkeKyuMal8N7aZ388Q
>>>> %3D&reserved=0
>>>
>>> --------------------------------------------------------------------
>>> -- For information about J forums see
>>> https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
>>> .jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C3fde228f6df64225b2
>>> bb08d61a675a61%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63672542
>>> 8523393430&sdata=679kDoFqUkaArm4sN1Cixh5vFSkeKyuMal8N7aZ388Q%3D&
>>> amp;reserved=0
>>> --------------------------------------------------------------------
>>> -- For information about J forums see
>>> https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
>>> .jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C3fde228f6df64225b2
>>> bb08d61a675a61%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63672542
>>> 8523393430&sdata=679kDoFqUkaArm4sN1Cixh5vFSkeKyuMal8N7aZ388Q%3D&
>>> amp;reserved=0
>>
>>
>> --
>>
>> Devon McCormick, CFA
>>
>> Quantitative Consultant
>> ---------------------------------------------------------------------
>> - For information about J forums see
>> https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
>> jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C3fde228f6df64225b2bb
>> 08d61a675a61%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63672542852
>> 3393430&sdata=679kDoFqUkaArm4sN1Cixh5vFSkeKyuMal8N7aZ388Q%3D&
>> reserved=0
>> ---------------------------------------------------------------------
>> - For information about J forums see
>> https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
>> jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C3fde228f6df64225b2bb
>> 08d61a675a61%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63672542852
>> 3393430&sdata=679kDoFqUkaArm4sN1Cixh5vFSkeKyuMal8N7aZ388Q%3D&
>> reserved=0
>
>
---
This email has been checked for viruses by AVG.
https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avg.com&data=02%7C01%7C%7C3fde228f6df64225b2bb08d61a675a61%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636725428523393430&sdata=c55B9IIpmy1hrMPcIXduHf%2FP9LZigqt6YD1NM7hYqhs%3D&reserved=0
----------------------------------------------------------------------
For information about J forums see
https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C3fde228f6df64225b2bb08d61a675a61%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636725428523393430&sdata=679kDoFqUkaArm4sN1Cixh5vFSkeKyuMal8N7aZ388Q%3D&reserved=0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm