[Jprogramming] Boxed verbs as alternate gerunds
Bill
bbill.lam at gmail.com
Tue Aug 8 00:20:31 UTC 2017
I would say neither gerundYN or isgerund is correct, they should report value error. Even J interpreter itself does not know if undefined name is a verb or not, J can only assume it is a verb but it can be wrong since unbound name is free to be assigned to any value. Your question should be -- should an undefined name assumed to be a gerund. But I think this is implementation dependent. BTW undefined name can also be regarded as noun or domain error in implementation and still be compatible with J dictionary, although it will be then become quite inconvenient to use.
Please don't get me wrong, I didn't mean Jx is incorrect. On the contrary, Jx is enlightening. only that it is not the old J that I am familiar with.
Sent from my iPhone
On 8 Aug, 2017, at 7:26 AM, Jose Mario Quintana <jose.mario.quintana at gmail.com> wrote:
> No joke was intended, undefined names are regarded as verbs in the context
> of adverbs and conjunctions. Why? Because it allows for writing verbs in a
> top-down fashion if one so desires. (Bill, I know you know most of this,
> if not all; but I am putting some context for the potential benefit members
> of the forum who might not.)
>
> An error thrown by @.0 does not necessarily mean that the argument is not
> a gerund or that it is a nonsensical gerund; I would assume we both agree
> that even if v is undefined v`'' is still a gerund. Either way, both
> Roger's and Pascal's tests agree on this,
>
> v
> |value error: v
>
> gerundYN=: 0 -. @ e. 3 : ('y (5!:0)';'1')"0 :: 0:
> isgerund =: 0:`(0 -. @ e. 3 : ('y (5!:0)';'1')"0)@.(0 < L.) :: 0:
>
> gerundYN v`''
> 1
> isgerund v`''
> 1
>
> Yet,
>
> v`'' @.0
> |value error: v
>
> However,
>
> v`'' @.0 /
> v/
>
> So, is the literal noun 'v' a gerund or not? A hint follows after
> several blank lines,
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> v
> |value error: v
>
> v123
> |value error: v123
>
>
> gerundYN 'v'
> 1
> gerundYN 'v123'
> 0
>
> isgerund 'v'
> 0
> isgerund 'v123'
> 0
>
> What is happening?
>
>
>
> On Sun, Aug 6, 2017 at 8:34 PM, Bill <bbill.lam at gmail.com> wrote:
>
>> I am not sure if I understand your question. If you asked something
>> undefined is a gerund or not. I checked by executing v at .0 '' and the J
>> interpreter said value error. Sounds like an empty array joke to me.
>>
>> Sent from my iPhone
>>
>> On 7 Aug, 2017, at 5:23 AM, Jose Mario Quintana <
>> jose.mario.quintana at gmail.com> wrote:
>>
>>> I am not hoping to change people's minds; nevertheless, I would like to
>>> explain, to some degree, my rationale regarding my current notion of
>> what a
>>> gerund is.
>>>
>>> The Dictionary is famous (or infamous according to some?) for its
>>> terseness. It is not really surprising to me that different people have
>>> different understandings even regarding the very important concept of
>>> gerund. Personally, I use Dictionary as the primary source but
>>> complemented by other official documents, forum information (particularly
>>> opinions and statements from certain people), third party sources, and
>>> first and foremost the "real thing", the interpreter(s) which it is,
>> after
>>> all, where programs and utilities for writing programs, some of which are
>>> very important to me, run.
>>>
>>> Let me start with the (current version of the) Dictionary, this is how I
>>> perceive it, given its terseness, the statement "Verbs act upon nouns to
>>> produce noun results..." is generally interpreted as "Verbs act upon
>> nouns
>>> [and only nouns] to produce noun [and only noun] results..." and other
>>> supporting evidence clearly confirm that is the intention.
>>>
>>> Therefore, assuming that the Dictionary is consistent, then the statement
>>> related to the to the entry Tie (Gerund),
>>> "
>>> 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 is au,n . See Bernecky and
>> Hui
>>> [12]. Gerunds may also be produced directly by boxing.
>>> "
>>> could be intrepreted as "... tie produces gerunds [and only gerunds]..."
>>> (I know that, actually , tie can produce also nouns which are not
>> gerunds;
>>> just as a verbs can produce words which are not a nouns.)
>>>
>>> Incidentally, I do not regard foreings as part of the core language
>> either
>>> but they are in the Dictionary, and they are used to illustrate points,
>>> even when discussing a primitive (see (5!:1) above).
>>>
>>> Furthermore, "Moreover, m`n is m,n and m`v is m,av and u`n is au,n"
>>> suggests that both, the left and right arguments do not have to be verbs.
>>> Indeed, the gerund (produced by) +`-`* is equivalent to (+`-)`* and
>> (+`-)
>>> is not a verb it is a gerund (i.e, a noun).
>>>
>>> The last sentence "Gerunds may also be produced directly by boxing" is
>>> quite important in the context of last part of that page,
>>> "
>>> The atomic representation of a noun (used so as to distinguish a noun
>> such
>>> as '+' from the verb +) is given by the following function:
>>> (ar=: [: < (,'0')"_ ; ]) '+'
>>> +-----+
>>> |+-+-+|
>>> ||0|+||
>>> |+-+-+|
>>> +-----+
>>>
>>> *`(ar '+')
>>> +-+-----+
>>> |*|+-+-+|
>>> | ||0|+||
>>> | |+-+-+|
>>> +-+-----+
>>> "
>>>
>>> There, clearly, the right argument (ar '+') of ` is the atomic
>>> representation of a noun ('+') not a verb. That is, *`(ar '+') is a
>> gerund
>>> and, for example, G=. (*:`ar 0 1 2) is a gerund well.
>>>
>>> Let me jump to the Dictionary's entry for Evoke Gerund (`:),
>>> "
>>> m `: 6 Train Result is the train of individual verbs.
>>> "
>>>
>>> Right, it is referring to a train of verbs but the entry is Evoke Gerund
>>> and G (defined above) is a gerund which makes sense (to me) as a train;
>> so
>>> I expect G`:6 to work, and it does,
>>>
>>> G`:6
>>> 0 1 4
>>>
>>> Let me jump to the Dictionary's entry for Agenda (@.),
>>>
>>> "
>>> m at .n is a verb defined by the gerund m with an agenda specified by n ;
>> that
>>> is, the verb represented by the train selected from m by the indices n .
>> If
>>> n is boxed, the train is parenthesized accordingly. The case m at .v uses
>> the
>>> result of the verb v to perform the selection.
>>> "
>>>
>>> Again, verbs are mentioned; yet again, I expect G at .0 1 to work, and it
>> does,
>>>
>>> G at .0 1
>>> 0 1 4
>>>
>>> Incidentally, if is not for producing code (and executing code), what is
>>> the purpose of "If n is boxed, the train is parenthesized accordingly.
>> The
>>> case m at .v uses the result of the verb v to perform the selection" (see
>>> above)?
>>>
>>> What did the original co-designer and implementor of the language write,
>> in
>>> the post I mentioned before, responding to the question, how to test for
>> a
>>> gerund?
>>>
>>> Here it is,
>>> "
>>> [Jprogramming] how to test for a gerund Roger Hui
>>> gerundYN=: 0 -. at e. 3 : ('y (5!:0)';'1')"0 :: 0:
>>>
>>> gerundYN +`*
>>> 1
>>> gerundYN <'0';i.5
>>> 1
>>> gerundYN <i.5
>>> 0
>>> gerundYN 5!:1 <'gerundYN'
>>> 1
>>>
>>> See also http://www.jsoftware.com/help/dictionary/dx005.htm#1
>>> "
>>>
>>> He used a foreign (5!:0) to write his testing verb, he "produced directly
>>> by boxing" a gerund and tested it ( gerundYN <'0';i.5 ), and he used a
>>> foreign to produce a gerund and tested it ( gerundYN 5!:1 <'gerundYN' ).
>>>
>>> I could keep going but all the above is enough for me to justify my
>> opinion
>>> that a gerund is not merely a list of atomic representations of verbs.
>>> Ultimately, it does not matter what name (gerund, gerundive, etc.), if
>> any,
>>> is given to these entities; different people at different times have
>> used these
>>> AND related entities in the context of `:6 , and @. . I, for one, would
>>> not be a happy camper if the official interpreter is changed in such a
>> way
>>> that my programs and utilities for writing programs break down, even if I
>>> have an alternative.
>>>
>>> Finally, I would like to pose a simple yet subtle question to those who
>> do
>>> not regard a gerund as merely a list of of atomic representations of
>> verbs,
>>>
>>> erase'v'
>>> 1
>>>
>>> gerundYN 'v' NB. Roger's test...
>>> 1
>>>
>>> isgerund =: 0:`(0 -. @ e. 3 : ('y (5!:0)';'1')"0)@.(0 < L.) :: 0:
>>>
>>> isgerund 'v' NB. Pascal's test
>>> 0
>>>
>>> Is 'v' a gerund or not?
>>>
>>>
>>> On Thu, Aug 3, 2017 at 7:31 PM, Bill <bbill.lam at gmail.com> wrote:
>>>
>>>> From my understanding, the reference shows the atomic representation of
>>>> gerund. It does not advocate this a way to construct a gerund. moreover
>> it
>>>> is "foreign" conjunction.
>>>>
>>>> numbers can be converted from strings using foreign conjunction but it
>>>> doesn't mean J encourages writing numbers using this method.
>>>>
>>>> IMO foreign conjunction is not a part of J core.
>>>>
>>>>
>>>> Sent from my iPhone
>>>>
>>>> On 4 Aug, 2017, at 5:33 AM, Jose Mario Quintana <
>>>> jose.mario.quintana at gmail.com> wrote:
>>>>
>>>>> "
>>>>> In J dictionary, only tie conjunction
>>>>> on verbs was mentioned to produce a gerund.
>>>>> "
>>>>>
>>>>> I am afraid you might not be the only one who has reached such
>>>> conclusion.
>>>>> Nevertheless, in my opinion, it is a misconception that a gerund can
>> only
>>>>> be a list (of atomic representations) of verbs. Why? See [0] in the
>>>>> context of [1].
>>>>>
>>>>> [0] Atomic
>>>>> http://www.jsoftware.com/help/dictionary/dx005.htm#1
>>>>>
>>>>> [1] [Jprogramming] how to test for a gerund Roger Hui
>>>>> http://www.jsoftware.com/pipermail/programming/2010-April/0
>> 19178.html
>>>>>
>>>>> Mind you gerundYN is not bulletproof.
>>>>>
>>>>>
>>>>> On Thu, Aug 3, 2017 at 5:46 AM, bill lam <bbill.lam at gmail.com> wrote:
>>>>>
>>>>>> I am thinking of the opposite. In J dictionary, only tie conjunction
>>>>>> on verbs was mentioned to produce a gerund. Boxed verbs had not been
>>>>>> mentioned. Atomic representation of boxed verbs looks like that of
>>>>>> gerund and therefore can work as gerund. IMO this is a backdoor
>>>>>> provided by J implementation.
>>>>>>
>>>>>> Metadata could be attached to "real" gerunds that have ancestors which
>>>>>> were results of verb`verb. All other nouns without this DNA would be
>>>>>> regarded as non-gerund.
>>>>>>
>>>>>> Just my 2 cents.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list