Raul wrote:

> And then it goes on with some examples.
>
> This suggests that any value that has an atomic representation could
> be a valid part of a gerund.

I agree with Raul.  Furthermore, I would argue that there is additional
information suggesting that a an array (not just a list) of atomic
representations is a gerund; but, before referring to this additional
information I would like to make clear the relationship between the nature
of a gerund and the ability to actually run non-standard code (where, for
instance, a verb can produce a verb, an adverb, or a conjunction).

An interpreter regarding an array (or at least a list) of atomic
representations, in particular, atomic representations of adverbs and
conjunctions, as a gerund is a necessary condition to be able to run
non-standard code; but, it is not a sufficient condition.  If, in addition,
the interpreter does not enforce the items of the gerund in the gerundial
form of the power conjunction (^:) to be representing only verbs then the
non-standard code can be run.

Regarding the nature of gerunds, one example in the dictionary, which Raul
alluded, is,

   (ar=: [: < (,'0')"_ ; ]) '+'
┌─────┐
│┌─┬─┐│
││0│+││
│└─┴─┘│
└─────┘

   *`(ar '+')
┌─┬─────┐
│*│┌─┬─┐│
│ ││0│+││
│ │└─┴─┘│
└─┴─────┘

and the context strongly suggests the noun above is a gerund and its last
item is the atomic representation of a noun ('+').  Furthermore, the DoJ
entry for 5!:1 y states "Atomic. The atomic representation of the entity
named y and is used in gerunds."  It does not state that, in gerunds, the
named entity y has to be a verb.

A typical gerund is a list of atomic representations of verbs but there are
contexts where atypical gerunds make sense; for example (changing * by < in
*`(ar '+')),

   (<`(ar '+'))`:6
┌─┐
│+│
└─┘

also,

   (<`(ar '+'))@.0 1
┌─┐
│+│
└─┘

On the one hand, the DoJ definition of m`:6 refers to a train of verbs.
However, the definition of m@.n refers to trains (and they are not
specified to be trains of verbs).  So, presumably, this is legal
(sanctioned by the DoJ),

   (;:'+/')@.0 1
+/

(Incidentally, someone could argue that the following sentence is not legal,

    (;:'@:<')@.0 1
@:<

because "m@.n is a verb.")

On the other hand, the DoJ is not complete.  (Incidentally, is

   ((<'+') , (<'%'))@.0 1
+ %

legal?)

If a gerund is restricted to be a typical gerund then, for example, all the
following sentences would be definitively illegal,

   (;:'+/@:*:')@.0 1 2 3 (1 2 3)
14
   ((;:'+/@:*:') , ar 1 2 3)@.0 1 2 3 4  NB. Technically, this gerund is
not a train, yet...
14
   (;:'+/@:*:')`:6 (1 2 3)               NB. This gerund is not a train of
verbs, yet...
14
   ((;:'+/@:*:') , ar 1 2 3)`:6          NB. This gerund is not a train
either, yet...
14

Not to mention a lot of standard code that others and I have written which
runs on several implementations of the interpreter.

Why do I regard an array, and not merely a list, of atomic representations
as a gerund?  Because I believe it is the spirit, if not necessarily the
letter, in the original co-designer and implementor's answer to the
question: How to test for a gerund?

http://www.jsoftware.com/pipermail/programming/2010-April/019178.html

(notice that the aforementioned entry for 5!:1 is given there as a
reference).

Thus,

   gerundYN=: 0 -. @ e. 3 : ('y (5!:0)';'1')"0 :: 0:

   gerundYN unassigned_name`(^&*)
1
   gerundYN ((;:'+/@:*:') , ar 1 2 3)
1
   gerundYN 2 2$ +`-`*`%
1
   gerundYN ((<'+') , (<'%'))
1

I am not arguing that my view is crystal clear the correct one but that the
typical view that a gerund is a just list of atomic representations of
verbs is debatable.  More importantly, that there is a legacy of standard
code, using atypical gerunds, which has run properly for many years.



On Tue, Sep 4, 2018 at 11:54 AM, Raul Miller <rauldmil...@gmail.com> wrote:

> Ok... (deep breath)...
>
> Here is something that the dictionary says:
>
> "In English, a gerund is a noun that carries the force of a verb, as
> does the noun cooking in the art of cooking. The tie applies to two
> verbs to produce a gerund. Gerunds are commonly used with Insert (/)
> and with Agenda (@.):
>
> "More generally, tie produces gerunds as follows: u`v is au,av , where
> au and av are the (boxed noun) atomic representations (5!:1) of u and
> v . Moreover, m`n is m,n and m`v is m,av and u`n isau,n . See Bernecky
> and Hui [12]. Gerunds may also be produced directly by boxing. ..."
>
> -- http://www.jsoftware.com/help/dictionary/d610.htm
>
> And then it goes on with some examples.
>
> This suggests that any value that has an atomic representation could
> be a valid part of a gerund.
>
> The syntax of the tie conjunction only accepts nouns and verbs, but
> gerunds are an array and we use gerunds to represent the components of
> gerunds (where they have structure). For example, the gerund for +&3
> includes the atomic representation of &
>
> You could introduce rules which eliminate some atomic representations,
> but that would create problems in the code which implements gerunds
> (because now you need to introduce some other mechanism to handle
> those cases).
>
> That said, the actual implementation is instead:
>
> "... tie produces gerunds as follows: u`v is au,av , where au and av
> are the (boxed noun) atomic representations (5!:1) of u and v where u
> and v are verbs. Tie does not use the atomic representation of u where
> u is a noun, as u would often be a gerund."
>
> (The current implementation also doesn't use the atomic representation
> of v, when v is a noun. But this could be considered an implementation
> flaw. So I left that detail out of my representation of the current
> implementation.)
>
> That said, it would be simple to change the implementation so that it
> is consistent with the current dictionary writeup: Have the parser
> track what the previous operation was. If the previous operation was
> tie, tie would not use the ar of u. If the previous operation was
> anything else, tie would use the ar of u. (Note that this works
> specifically because of J's syntax rules for conjunctions.)
>
> This would be a breaking change. For example, the result of 1`2`3
> would be different.
>
> This would also mean that (a`b)`c would produce a different result from
> a`b`c
>
> (This would also mean that if you want to build up a long gerund
> across multiple sentences, you'll need to to use append (,) instead of
> tie to join the component gerunds together.)
>
> This kind of change would also warrant a writeup describing the issue
> (perhaps in the release notes).
>
> Thanks,
>
> --
> Raul
>
> On Tue, Sep 4, 2018 at 11:24 AM Henry Rich <henryhr...@gmail.com> wrote:
> >
> > As I recall, Ye Dic says that gerunds are created by the tie
> > conjunction, and ipso facto are verbs or nouns.  Every mention of the
> > use of a gerund implicitly assumes that an evoked atom of a gerund is a
> > verb.
> >
> > m in m@.v and n in u^:n, if gerunds, are the same type as far as I am
> > concerned.  I don't understand your last sentence (specifically what you
> > mean by 'array type', which to me is
> > literal/boolean.../verb/adverb/conjunction; and what 'positions of a
> > parsed verb' are).
> >
> > Henry Rich
> >
> > On 9/4/2018 10:31 AM, Raul Miller wrote:
> > > Can you be more specific?
> > >
> > > I don’t remember the dictionary making this assertion.
> > >
> > > I am also wondering why you would want a different concept of gerund
> for @.
> > > and ^: (or, generally speaking, why you would want a different array
> type
> > > for different positions in a parsed verb).
> > >
> > > Thanks,
> > >
> > > —
> > > Raul
> > >
> > > On Tuesday, September 4, 2018, Henry Rich <henryhr...@gmail.com>
> wrote:
> > >
> > >> That's not Dictionary behavior, though.  It shouldn't.
> > >>
> > >> Henry Rich
> > >>
> > >> On 9/4/2018 9:42 AM, Raul Miller wrote:
> > >>
> > >>> @. also accepts the ARs of non-verbs.
> > >>>
> > >>> For example:
> > >>>
> > >>>      V=:p:i.9
> > >>>      (+/%#)`(<(,'0');V)@.0 V
> > >>> 11.1111
> > >>>
> > >>> Thanks,
> > >>>
> > >>>
> > >> ---
> > >> This email has been checked for viruses by AVG.
> > >> https://www.avg.com
> > >>
> > >> ------------------------------------------------------------
> ----------
> > >> For information about J forums see http://www.jsoftware.com/forum
> s.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