More specifically, early versions of J had hooks and forks which
produced adverbs, and hooks and forks which produced conjunctions, and
the naming reflects this.

Those hooks and forks were withdrawn from the language, but the naming
remains. To my knowledge, the only resulting naming change was
changing the parsing rule corresponding to forks from "trident" to
"fork". (The parsing rule for hooks is still "bident" at
https://www.jsoftware.com/help/dictionary/dicte.htm )

Also, a relatively recent change was that the left tine of a fork is
now allowed to be a noun (this was previously a syntax error) and the
noun is promoted to a verb using ("_).

(In theoretic terms, you could say that a noun is a constant function
(or "fixed point") which returns itself, and this is exposed to J's
syntax rules specifically at the left tines of forks.)

Thanks,

-- 
Raul

On Wed, Jan 15, 2020 at 9:55 AM 'robert therriault' via Programming
<[email protected]> wrote:
>
> Hi Sergey,
>
> A fork isn't so much a sequence of verbs as it is a pattern that forms a 
> verb. Forks can be monadic or dyadic and they handle their arguments this way.
>
> Monadic fork (g and h are verbs, f can be a noun or a verb)
>
> (f g h) y  <-> (f y) g (h y)   if f is a noun then the value of (f y) will 
> just be f
>
> Dyadic fork (g and h are verbs, f can be a noun or a verb)
>
> x (f g h) y  <-> (x f y) g (x h y)   if f is a noun then the value of (x f y) 
> will just be f
>
> In your example (100 > ]) is dyadic and the 100 replaces f as a noun and the 
> ] replaces h as a verb which selects the y argument. The result comes from > 
> which replaces g and tests if 100 is greater than y.
>
> Take a look at Roger Stokes' Chapter 3 of 'Learning J' 
> https://www.jsoftware.com/help/learning/03.htm
> or Henry Rich's Chapter 37 of 'J for C Programmers' 
> https://www.jsoftware.com/help/jforc/introduction_to_forks.htm#_Toc191734583 
> for a better and more thorough explanation.
>
> Cheers, bob
>
>
> > On Jan 15, 2020, at 06:34, 'Sergey Kamenev' via Programming 
> > <[email protected]> wrote:
> >
> > I thought the fork is an isolated sequence of verbs, like
> > (> ])
> >
> > Why sentense with noun 100
> > 100 > ] is fork?
> >
> > 15.01.2020 17:21, 'Pascal Jasmin' via Programming пишет:
> >>  (100 > ]) is a verb.  (it is a fork equivalent to (100&>)@:] )
> >>     On Wednesday, January 15, 2020, 09:15:05 a.m. EST, 'Sergey Kamenev' 
> >> via Programming <[email protected]> wrote:
> >>    Hi!
> >> Power verb has 3 variant of w:
> >> u^:w y
> >> noun, verb, gerund.
> >> In example on https://code.jsoftware.com/wiki/Vocabulary/hatco#DoWhile
> >> I see sentense:
> >> 3&*^:(100 > ])^:_ (5)
> >> 100 > ]
> >> is not noun, verb or gerund.
> >> (100&>)@] is verb
> >> Why she's (100 > ]) working in power verb?
> >> Nice day!
> >> Sergey
> >> ----------------------------------------------------------------------
> >> 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