Here's the mentioned excerpt from KEI's Concrete Mathhematics Companion, Ch 0 "Notation":

"
.....
   a=: 0 1 2 3 4
The copula =: assigns a name to any entity
.....
We conclude these samples of notation with the tie conjunction (`) that applies to verbs to produce a gerund (a noun that carries the force of a verb), and the agenda (@.) that
selects for action one of the verbs that comprise a gerund:
   +`* / a
14
   0+1*2+3*4
14
Unparenthesized sentences are executed from right to left; there is no hierarchy among functions
   0+(1*(2+(3*4)))
14
.....
"

It's a bit hard to decide from this example what happens as there are two verbs in the gerund, which itself is repeated twice to fill the four gaps (as the vector has five elements).

Given the thoroughness Iverson was/is reknowned for it looks to me that, this being a "left join" of two patterns didn't occur to him as much of a problem (sort of natural, coming from a culture where most people write left-to-right).

Taking the example one step further in defining

   ] a=. 1 2 3 4 5 6
1 2 3 4 5 6

we get

   +`*/ a
95
   1+2*3+4*5+6
95

but

   1*2+3*4+5*6
104

which clearly indicates a pattern "left join".

Thanks
-M


At 2016-06-14 03:07, you wrote:
Perhaps easier to see with more formal/expressive verbs: in =. 1 :'[,'' '',u,'' '',]' NB. String to infix function ('f0'in)`('f1'in)`('f2'in)/ 'abcde' a f0 b f1 c f2 d f0 e The verbs in the gerund are arranged from left to right starting at the beginning of the array, while application (as in the non-gerund case) proceeds from right to left. I would avoid calling either of these things "unrolling" without further explanation as it's not clear which that would mean. Dan's example has typos, and his wording is vague enough that I can't tell whether it is correct. Marshall On Tue, Jun 14, 2016 at 02:21:37AM +0000, 'Pascal Jasmin' via Programming wrote: > +`-/ 1 2 3 > 0 > +`+`-/ 1 2 3 > 6 > > > I call this as being inserted between items on a right to left basis. > > 1 + 2 - 3 + 4 > > +`-/ 1 2 3 4 > _4 > +`-/ 1 2 > 3 > > > > ----- Original Message ----- > From: Dan Bron <[email protected]> > To: J Programming <[email protected]> > Sent: Monday, June 13, 2016 9:04 PM > Subject: Re: [Jprogramming] Am I understanding m/y ? > > Louis wrote: > > > There was some talk a while ago about the ambiguity of the dictionary about the direction of gerund insertion. Reading through the first pages of Iverson's Concrete Math Companion, I stumbled on a snippet of J that dates back to 2002 and was written by Iverson at the bottom of page 6: > > > > http://www.jsoftware.com/books/pdf/cmc.pdf <http://www.jsoftware.com/books/pdf/cmc.pdf> > > > > According to this source, gerunds do indeed "unroll" from left to right correctly in the current implementation. > > > I’m also on mobile, so forgive my terse answer and potential misunderstanding of your question, but yes: > > > v0`v1`v2`v3/ y > > is indeed: > > … (_8{y) v2 (_7{y) v3 (_6{y) v0 (_5{y) v1 (_4{y) v2 (_3{y) v1 (_2{y) v0 _1{y > > That is, the insertion of verbs starts at the rightmost (last) elements of y, but the leftmost (first) elements of the gerund G, where G/y . > > The rationale for this is left as an exercise for a less lazy respondent (though the right-to-left nature of insertion in y should be familiar to veteran J’ers). > > -Dan > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to