Jose, I moved around a lot in elementary school. Adverbs and conjuncdtions were 
vague notions, and gerunds didn't even seem to exist.  I cann see already your 
notes are a big help and I'm looking forward to having more and more of these 
ideas make sense.

Thanks for all of it!  Linda

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Jose Mario 
Quintana
Sent: Sunday, October 4, 2015 1:32 PM
To: Programming forum
Subject: Re: [Jprogramming] problem using ,:`]@.

This is a similar question: Where is the + in (2+3)&* ?

(9!:3) 5 4 1  NB. Linear, tree and atomic representations

(2+3)&*

   (2+3)&*
5&*
      ┌─ 5
── & ─┴─ *
┌─────────────┐
│┌─┬─────────┐│
││&│┌─────┬─┐││
││ ││┌─┬─┐│*│││
││ │││0│5││ │││
││ ││└─┴─┘│ │││
││ │└─────┴─┘││
│└─┴─────────┘│
└─────────────┘

Plus does not appear because 2+3 is resolved as 5 which is apparent in the 
atomic representation.  Likewise, ,:`]  in the verb expression
,:`]@.(<:@#@$) is resolved as a gerund,

,:`]@.(<:@#@$)
,:`]@.(<:@#@$)
             ┌─ ,:
       ┌─────┴─ ]
       │           ┌─ <:
── @. ─┤     ┌─ @ ─┴─ #
       └─ @ ─┴─ $
┌────────────────────────────────────┐
│┌──┬───────────────────────────────┐│
││@.│┌──────────┬──────────────────┐││
││  ││┌─┬──────┐│┌─┬──────────────┐│││
││  │││0│┌──┬─┐│││@│┌──────────┬─┐││││
││  │││ ││,:│]││││ ││┌─┬──────┐│$│││││
││  │││ │└──┴─┘│││ │││@│┌──┬─┐││ │││││
││  ││└─┴──────┘││ │││ ││<:│#│││ │││││
││  ││          ││ │││ │└──┴─┘││ │││││
││  ││          ││ ││└─┴──────┘│ │││││
││  ││          ││ │└──────────┴─┘││││
││  ││          │└─┴──────────────┘│││
││  │└──────────┴──────────────────┘││
│└──┴───────────────────────────────┘│
└────────────────────────────────────┘

There are other conjunction expressions that are also resolved, for example, d. 
in

   (*: d. 1) @: %:
+:@:%:
       ┌─ +:
── @: ─┴─ %:
┌────────────┐
│┌──┬───────┐│
││@:│┌──┬──┐││
││  ││+:│%:│││
││  │└──┴──┘││
│└──┴───────┘│
└────────────┘

or, if you prefer, in

   [: (*: d. 1) %:
[: +: %:
  ┌─ [:
──┼─ +:
  └─ %:
┌──────────────┐
│┌─┬──────────┐│
││3│┌──┬──┬──┐││
││ ││[:│+:│%:│││
││ │└──┴──┴──┘││
│└─┴──────────┘│
└──────────────┘

However, d. does not appear in the above linear representations but ` does 
appear in the linear representation of ,:`]@.(<:@#@$).  How come?
Apparently the linear representation facility is smart in that sense,

   G=. ;:',: ]'

   G @.
,:`]@.
       ┌─ ,:
  ┌────┴─ ]
──┴─ @.
┌───────────────────┐
│┌─┬───────────────┐│
││4│┌──────────┬──┐││
││ ││┌─┬──────┐│@.│││
││ │││0│┌──┬─┐││  │││
││ │││ ││,:│]│││  │││
││ │││ │└──┴─┘││  │││
││ ││└─┴──────┘│  │││
││ │└──────────┴──┘││
│└─┴───────────────┘│
└───────────────────┘

What I have never been able to figure out, completely, is the criteria used for 
resolving some conjunctions (and adverbs) but not resolving other ones.


On Sun, Oct 4, 2015 at 12:16 AM, Linda A Alvord <[email protected]>
wrote:

> Two thoughts about this thread:
>
>   Where is the tie in the tree?
>   A little shorter mat.
>
>    bill=:,:`]@.(<:@#@$)
>    bill 'ab'
> ab
>    5!:5 <'bill'
> ,:`]@.(<:@#@$)
>    5!:4 <'bill'
>              ┌─ ,:
>        ┌─────┴─ ]
>        │           ┌─ <:
> ── @. ─┤     ┌─ @ ─┴─ #
>        └─ @ ─┴─ $
>
>    mat
> (_2 {. 1 1 , $) $ ]
>    mat2
> ] $~ _2 {. 1 1 , $
>
>
> Linda
> -----Original Message-----
> From: [email protected] [mailto:
> [email protected]] On Behalf Of 'Pascal Jasmin'
> via Programming
> Sent: Saturday, October 3, 2015 12:29 PM
> To: [email protected]
> Subject: Re: [Jprogramming] problem using ,:`]@.
>
>  g^:f  as if in J is one of the cooler patterns of the language.
> if. 1 = f(y) do. g(y) else. y end.
>       From: Nollaig MacKenzie <[email protected]>
>  To: [email protected]
>  Sent: Saturday, October 3, 2015 1:06 AM
>  Subject: Re: [Jprogramming] problem using ,:`]@.
>
> fie is my preference, I think - I wouldn't have thought of getting a 
> no-op by doing an op 0 times :-)
>
> fum looked perverse at first, but quickly became intriguing. It would 
> have other uses:
>
> fum (2 3$'abcdef'),:2 3$'UVWXYZ'
>
>
>
>
>
> On 2015.10.02 21:48:39, you,
>  the extraordinary Raul Miller, spake thus:
>
> > It sounds like you are asking for this:
> >
> >    fie=: ,:^:(2>#@$)
> >
> > but you might want to consider alternatives such as:
> >
> >    foe=: , $~ _2{.1,$
> >
> > or
> >
> >    fum=: ,.&.|:
> >
> > Good luck,
> >
> > --
> > Raul
>
> --
> Nollaig MacKenzie
> http://www.yorku.ca/nollaig
> ----------------------------------------------------------------------
> 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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to