Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-18 Thread Jose Mario Quintana
The hint I mentioned shows that Roger's test is inconsistent,


   erase'v v123'
1 1

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

   gerundYN 'v'
1
   gerundYN 'v123'
0

Whereas Pascal's test (loosly based on David Alis' atomicYN [0]) is
consistent,

   isgerund=. 0:`(0 -.@e. 3 : ('y (5!:0)';'1')"0) @.(0 < L.) :: 0:

   isgerund 'v'
0
   isgerund 'v123'
0

What tripped gerundYN?  Any guesses? ;)


Arrays of atomic representations of verbs, not surprisingly, pass the test,
for example, for undefined verbs v0, v1, v2, v3,

   assert v0`v1`v2`v3 -: <;._1 ' v0 v1 v2 v3'

   isgerund v0`v1`v2`v3
1
   isgerund 2 2$v0`v1`v2`v3
1

Gerund evoke (`:6) requires a list but the atomic representations can
include nouns, verbs, adverbs, and conjunctions, for example,

   ((;:'+/"') , (<(,'0');1))
┌─┬─┬─┬─┐
│+│/│"│┌─┬─┐│
│ │ │ ││0│1││
│ │ │ │└─┴─┘│
└─┴─┴─┴─┘

   ((;:'+/"') , (<(,'0');1))`:6
+/"1

Interestingly,  `:6  can also evoke nouns that are not gerunds and this is
a great feature, from my vantage point, because it facilitates writing
compliant and noncompliant tacit adverbs (and tacit conjunctions in Jx).

In summary, a gerund can be thought as an array of atomic representations
(see also, [1, 2]), and regardless of the name this notion that has served
me well for a long time.

References

[0] [Jprogramming] how to test for a gerund  David Alis
http://www.jsoftware.com/pipermail/programming/2010-April/019187.html

[1] sidebar: gerunds
http://code.jsoftware.com/wiki/User:Dan_Bron/backtick#sidebar:_gerunds

[2] Atomic Representation
http://code.jsoftware.com/wiki/IojRep#Atomic_Representation


On Wed, Aug 9, 2017 at 9:32 AM, Bill  wrote:

> Oh I was wrong, thank you for pointing it out.
>
> Sent from my iPhone
>
> On 9 Aug, 2017, at 6:28 AM, Jose Mario Quintana <
> jose.mario.quint...@gmail.com> wrote:
>
> > Inline comments follow...
> >
> >> 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.
> >
> > I am not sure about that; the Dictionary does not cover some
> implementation
> > details but apparently it covers this one: "The executions in the stack
> are
> > confined to the first four elements only, and eligibility for execution
> is
> > determined only by the class of each element (noun, verb, etc., an
> > unassigned name being treated as a verb), as prescribed in the following
> > parse table." [0]
> >
> > (I forgot to mention the odd word copula which in this context is , of
> > course, key for writing verbs in top-down fashion.)
> >
> >> 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.
> >
> > I did not get you wrong Bill; however, I really appreciate your entire
> > comment, thanks for making it.
> >
> >
> > [0] E. Parsing and Execution
> >http://www.jsoftware.com/help/dictionary/dicte.htm
> >
> >
> > On Mon, Aug 7, 2017 at 8:20 PM, Bill  wrote:
> >
> >> 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.quint...@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 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-09 Thread Jose Mario Quintana
I guess somehow we both miss this:

System/ReleaseNotes/J806

New features:
u@n (where n is a noun) is now allowed, and executes u on the value of n,
ignoring any arguments (equivalent to u@(n"_))
u :: n (where n is a noun) is now allowed, and gives the result n if u
fails (equivalent to u :: (n"_))

http://code.jsoftware.com/wiki/System/ReleaseNotes/J806#New_features:









On Wed, Aug 9, 2017 at 8:46 AM, 'Pascal Jasmin' via Programming <
programm...@jsoftware.com> wrote:

> :: noun
> is equivalent to :: (noun"_)?
>
>   From: Henry Rich <henryhr...@gmail.com>
>  To: Programming forum <programm...@jsoftware.com>
>  Sent: Wednesday, August 9, 2017 5:25 AM
>  Subject: Re: [Jprogramming] Boxed verbs as alternate gerunds
>
> :: 0
>
> Is a j8.06 feature.
>
> Henry Rich
>
> On Aug 8, 2017 23:42, "Jose Mario Quintana" <jose.mario.quint...@gmail.com
> >
> wrote:
>
> > "I still like the @.] test."
> >
> > What am I doing wrong?  I have tried several times and I keep getting,
> >
> >JVERSION
> > Engine: j805/j64/windows
> > Release: commercial/2016-12-11T08:02:16
> > Library: 8.05.11
> > Qt IDE: 1.5.3/5.7.0
> > Platform: Win 64
> > Installer: J805 install
> > InstallPath: c:/program files/j
> > Contact: www.jsoftware.com
> >
> >
> >IsGerund=: 3 : 0 :: 0
> >  y@.]
> >  1
> > )
> > |domain error
> > |  IsGerund=:3 :0::0
> > |[-4]
> >
> >
> > Anyway, I was able to write it in Win Jx and it should not make any
> > difference,
> >
> > IsGerund=: 3 : 0 :: 0
> >  y@.]
> >  1
> > )
> >
> > Assuming I got it right, this how does your test compare to Roger's and
> > Pascal's for testing  ;:'+/' ,
> >
> >test=. gerundYN ; isgerund ; IsGerund
> >
> >test ;:'+/'
> > ┌─┬─┬─┐
> > │1│1│0│
> > └─┴─┴─┘
> >
> > In my mind,  ;:'+/'  is both, a gerund and a valid train,
> >
> >(;:'+/')`:6
> > +/
> >(;:'+/')@.0 1
> > +/
> >
> >
> > On Mon, Aug 7, 2017 at 8:40 PM, Louis de Forcrand <ol...@bluewin.ch>
> > wrote:
> >
> > > @.] should be used, not @.0 :
> > >
> > >v
> > > |value error: v
> > >v123
> > > |value error: v123
> > >v`''@.]
> > > v@.]
> > >v123`''@.]
> > > v123@.]
> > >
> > > I still like the @.] test.
> > >
> > > Louis
> > >
> > > > On 07 Aug 2017, at 19:26, Jose Mario Quintana <
> > > jose.mario.quint...@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,
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
>

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-09 Thread Jose Mario Quintana
:D  It is so natural that I did not even notice it.  I guess I was already
ready for it; thank you.

On Wed, Aug 9, 2017 at 5:25 AM, Henry Rich  wrote:

> :: 0
>
> Is a j8.06 feature.
>
> Henry Rich
>
> On Aug 8, 2017 23:42, "Jose Mario Quintana"  >
> wrote:
>
> > "I still like the @.] test."
> >
> > What am I doing wrong?  I have tried several times and I keep getting,
> >
> >JVERSION
> > Engine: j805/j64/windows
> > Release: commercial/2016-12-11T08:02:16
> > Library: 8.05.11
> > Qt IDE: 1.5.3/5.7.0
> > Platform: Win 64
> > Installer: J805 install
> > InstallPath: c:/program files/j
> > Contact: www.jsoftware.com
> >
> >
> >IsGerund=: 3 : 0 :: 0
> >   y@.]
> >   1
> > )
> > |domain error
> > |   IsGerund=:3 :0 ::0
> > |[-4]
> >
> >
>
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-09 Thread Bill
Oh I was wrong, thank you for pointing it out.

Sent from my iPhone

On 9 Aug, 2017, at 6:28 AM, Jose Mario Quintana  
wrote:

> Inline comments follow...
> 
>> 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.
> 
> I am not sure about that; the Dictionary does not cover some implementation
> details but apparently it covers this one: "The executions in the stack are
> confined to the first four elements only, and eligibility for execution is
> determined only by the class of each element (noun, verb, etc., an
> unassigned name being treated as a verb), as prescribed in the following
> parse table." [0]
> 
> (I forgot to mention the odd word copula which in this context is , of
> course, key for writing verbs in top-down fashion.)
> 
>> 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.
> 
> I did not get you wrong Bill; however, I really appreciate your entire
> comment, thanks for making it.
> 
> 
> [0] E. Parsing and Execution
>http://www.jsoftware.com/help/dictionary/dicte.htm
> 
> 
> On Mon, Aug 7, 2017 at 8:20 PM, Bill  wrote:
> 
>> 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.quint...@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  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@.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.quint...@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 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-09 Thread 'Pascal Jasmin' via Programming
:: noun
is equivalent to :: (noun"_)?

  From: Henry Rich <henryhr...@gmail.com>
 To: Programming forum <programm...@jsoftware.com> 
 Sent: Wednesday, August 9, 2017 5:25 AM
 Subject: Re: [Jprogramming] Boxed verbs as alternate gerunds
   
:: 0

Is a j8.06 feature.

Henry Rich

On Aug 8, 2017 23:42, "Jose Mario Quintana" <jose.mario.quint...@gmail.com>
wrote:

> "I still like the @.] test."
>
> What am I doing wrong?  I have tried several times and I keep getting,
>
>    JVERSION
> Engine: j805/j64/windows
> Release: commercial/2016-12-11T08:02:16
> Library: 8.05.11
> Qt IDE: 1.5.3/5.7.0
> Platform: Win 64
> Installer: J805 install
> InstallPath: c:/program files/j
> Contact: www.jsoftware.com
>
>
>    IsGerund=: 3 : 0 :: 0
>  y@.]
>  1
> )
> |domain error
> |  IsGerund=:3 :0    ::0
> |[-4]
>
>
> Anyway, I was able to write it in Win Jx and it should not make any
> difference,
>
> IsGerund=: 3 : 0 :: 0
>  y@.]
>  1
> )
>
> Assuming I got it right, this how does your test compare to Roger's and
> Pascal's for testing  ;:'+/' ,
>
>    test=. gerundYN ; isgerund ; IsGerund
>
>    test ;:'+/'
> ┌─┬─┬─┐
> │1│1│0│
> └─┴─┴─┘
>
> In my mind,  ;:'+/'  is both, a gerund and a valid train,
>
>    (;:'+/')`:6
> +/
>    (;:'+/')@.0 1
> +/
>
>
> On Mon, Aug 7, 2017 at 8:40 PM, Louis de Forcrand <ol...@bluewin.ch>
> wrote:
>
> > @.] should be used, not @.0 :
> >
> >    v
> > |value error: v
> >    v123
> > |value error: v123
> >    v`''@.]
> > v@.]
> >    v123`''@.]
> > v123@.]
> >
> > I still like the @.] test.
> >
> > Louis
> >
> > > On 07 Aug 2017, at 19:26, Jose Mario Quintana <
> > jose.mario.quint...@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@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@.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.quint...@gmail.com> wrote:
> > >>
> > >>> I a

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-09 Thread Henry Rich
:: 0

Is a j8.06 feature.

Henry Rich

On Aug 8, 2017 23:42, "Jose Mario Quintana" 
wrote:

> "I still like the @.] test."
>
> What am I doing wrong?  I have tried several times and I keep getting,
>
>JVERSION
> Engine: j805/j64/windows
> Release: commercial/2016-12-11T08:02:16
> Library: 8.05.11
> Qt IDE: 1.5.3/5.7.0
> Platform: Win 64
> Installer: J805 install
> InstallPath: c:/program files/j
> Contact: www.jsoftware.com
>
>
>IsGerund=: 3 : 0 :: 0
>   y@.]
>   1
> )
> |domain error
> |   IsGerund=:3 :0 ::0
> |[-4]
>
>
> Anyway, I was able to write it in Win Jx and it should not make any
> difference,
>
> IsGerund=: 3 : 0 :: 0
>   y@.]
>   1
> )
>
> Assuming I got it right, this how does your test compare to Roger's and
> Pascal's for testing  ;:'+/' ,
>
>test=. gerundYN ; isgerund ; IsGerund
>
>test ;:'+/'
> ┌─┬─┬─┐
> │1│1│0│
> └─┴─┴─┘
>
> In my mind,  ;:'+/'  is both, a gerund and a valid train,
>
>(;:'+/')`:6
> +/
>(;:'+/')@.0 1
> +/
>
>
> On Mon, Aug 7, 2017 at 8:40 PM, Louis de Forcrand 
> wrote:
>
> > @.] should be used, not @.0 :
> >
> >v
> > |value error: v
> >v123
> > |value error: v123
> >v`''@.]
> > v@.]
> >v123`''@.]
> > v123@.]
> >
> > I still like the @.] test.
> >
> > Louis
> >
> > > On 07 Aug 2017, at 19:26, Jose Mario Quintana <
> > jose.mario.quint...@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  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@.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.quint...@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

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-08 Thread Jose Mario Quintana
Sorry, that one went away early,

Replace
"
Assuming I got it right, this how does your test compare to Roger's and
Pascal's for testing  ;:'+/' ,
"
by
"
Assuming I got it right, this is how your test compares to Roger's and
Pascal's for testing  ;:'+/' ,
"


On Tue, Aug 8, 2017 at 6:42 PM, Jose Mario Quintana <
jose.mario.quint...@gmail.com> wrote:

> "I still like the @.] test."
>
> What am I doing wrong?  I have tried several times and I keep getting,
>
>JVERSION
> Engine: j805/j64/windows
> Release: commercial/2016-12-11T08:02:16
> Library: 8.05.11
> Qt IDE: 1.5.3/5.7.0
> Platform: Win 64
> Installer: J805 install
> InstallPath: c:/program files/j
> Contact: www.jsoftware.com
>
>
>IsGerund=: 3 : 0 :: 0
>   y@.]
>   1
> )
> |domain error
> |   IsGerund=:3 :0 ::0
> |[-4]
>
>
> Anyway, I was able to write it in Win Jx and it should not make any
> difference,
>
> IsGerund=: 3 : 0 :: 0
>   y@.]
>   1
> )
>
> Assuming I got it right, this how does your test compare to Roger's and
> Pascal's for testing  ;:'+/' ,
>
>test=. gerundYN ; isgerund ; IsGerund
>
>test ;:'+/'
> ┌─┬─┬─┐
> │1│1│0│
> └─┴─┴─┘
>
> In my mind,  ;:'+/'  is both, a gerund and a valid train,
>
>(;:'+/')`:6
> +/
>(;:'+/')@.0 1
> +/
>
>
> On Mon, Aug 7, 2017 at 8:40 PM, Louis de Forcrand 
> wrote:
>
>> @.] should be used, not @.0 :
>>
>>v
>> |value error: v
>>v123
>> |value error: v123
>>v`''@.]
>> v@.]
>>v123`''@.]
>> v123@.]
>>
>> I still like the @.] test.
>>
>> Louis
>>
>> > On 07 Aug 2017, at 19:26, Jose Mario Quintana <
>> jose.mario.quint...@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  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@.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.quint...@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),
>> >>> "
>> 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-08 Thread Jose Mario Quintana
"I still like the @.] test."

What am I doing wrong?  I have tried several times and I keep getting,

   JVERSION
Engine: j805/j64/windows
Release: commercial/2016-12-11T08:02:16
Library: 8.05.11
Qt IDE: 1.5.3/5.7.0
Platform: Win 64
Installer: J805 install
InstallPath: c:/program files/j
Contact: www.jsoftware.com


   IsGerund=: 3 : 0 :: 0
  y@.]
  1
)
|domain error
|   IsGerund=:3 :0 ::0
|[-4]


Anyway, I was able to write it in Win Jx and it should not make any
difference,

IsGerund=: 3 : 0 :: 0
  y@.]
  1
)

Assuming I got it right, this how does your test compare to Roger's and
Pascal's for testing  ;:'+/' ,

   test=. gerundYN ; isgerund ; IsGerund

   test ;:'+/'
┌─┬─┬─┐
│1│1│0│
└─┴─┴─┘

In my mind,  ;:'+/'  is both, a gerund and a valid train,

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


On Mon, Aug 7, 2017 at 8:40 PM, Louis de Forcrand  wrote:

> @.] should be used, not @.0 :
>
>v
> |value error: v
>v123
> |value error: v123
>v`''@.]
> v@.]
>v123`''@.]
> v123@.]
>
> I still like the @.] test.
>
> Louis
>
> > On 07 Aug 2017, at 19:26, Jose Mario Quintana <
> jose.mario.quint...@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  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@.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.quint...@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 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-08 Thread Jose Mario Quintana
Inline comments follow...

>  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.
>

I am not sure about that; the Dictionary does not cover some implementation
details but apparently it covers this one: "The executions in the stack are
confined to the first four elements only, and eligibility for execution is
determined only by the class of each element (noun, verb, etc., an
unassigned name being treated as a verb), as prescribed in the following
parse table." [0]

(I forgot to mention the odd word copula which in this context is , of
course, key for writing verbs in top-down fashion.)

>  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.

I did not get you wrong Bill; however, I really appreciate your entire
comment, thanks for making it.


[0] E. Parsing and Execution
http://www.jsoftware.com/help/dictionary/dicte.htm


On Mon, Aug 7, 2017 at 8:20 PM, Bill  wrote:

> 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.quint...@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  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@.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.quint...@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 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-07 Thread Louis de Forcrand
@.] should be used, not @.0 :

   v
|value error: v
   v123
|value error: v123
   v`''@.]
v@.]
   v123`''@.]
v123@.]

I still like the @.] test.

Louis

> On 07 Aug 2017, at 19:26, Jose Mario Quintana  
> 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  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@.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.quint...@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.
>>> 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-07 Thread Bill
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  
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  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@.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.quint...@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 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-07 Thread 'Pascal Jasmin' via Programming
some practical issues for this,

I have not measured the performance benefit.

sure foreigns to convert to/from gerund-boxed entity.

but from jx, `. could be used to make "boxed entities"

I used boxed entities instead of boxed verbs because of modifiers.

Note the issues/differences between ar and aar below

ar  =: 1 : '5!:1 <''u'''
eval  =: 1 : 'if. 2 ~: 3!:0 m do. m else. a: 1 :  m end.'
isNoun =: (0 = 4!:0 ::0:)@:<
aar =: 1 : 'if. isNoun ''u'' do. q =. m eval else. q =. u end. 5!:1 < ''q'' '


'/' ar NB. ar of an ordinary string
┌─┐ 
│┌─┬─┐│ 
││0│/││ 
│└─┴─┘│ 
└─┘ 
'/' aar NB. actual ar of an adverb
┌─┐ 
│/│ 
└─┘ 
a =. / 
'a' ar NB. noun not name
┌─┐ 
│┌─┬─┐│ 
││0│a││ 
│└─┴─┘│ 
└─┘ 

'a' aar NB. named ar
┌─┐ 
│a│ 
└─┘

'azxczxc' aar NB. ar of name that doesn't/may not exist [1]
┌───┐ 
│azxczxc│ 
└───┘

b =. 3 
'b' aar NB. or b aar (names that are nouns get "early bound") [2]
┌─┐ 
│┌─┬─┐│ 
││0│3││ 
│└─┴─┘│ 
└─┘
b ar 
┌─┐ 
│┌─┬─┐│ 
││0│3││ 
│└─┴─┘│ 
└─┘


[1] and [2] are sensible behaviour, but [2] is the least sensible of these.  
aar would be simpler and more consistent if it always treated strings as either 
raw modifiers or "late bound" names. (a change I will make in my definition 
soon).  An early bound noun or verb can be captured by not quoting it.

My version of Jx's `. is a conjunction named tie.  I also use a conjunction 
named tieA to get aar behaviour instead of ar behaviour.  There may be need for 
tieAF which would fix a definition of a term (so early bind it)


One advantage of boxed entities that is not performance related is that they 
are shorter and more readable. (look like lrs)

To distinguish  between nouns and modifiers/names, string nouns would be 
"double" quoted.

suggested primitives

`. - ar based.
`.. - aar based.
`... - fixed aar



From: Jose Mario Quintana <jose.mario.quint...@gmail.com>
To: Programming forum <programm...@jsoftware.com> 
Sent: Sunday, August 6, 2017 5:23 PM
Subject: Re: [Jprogramming] Boxed verbs as alternate gerunds



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 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-07 Thread Erling Hellenäs

Hi all !

Maybe we need a nounification operation? An operation that creates a 
noun from a verb? We could then create arrays of these nounified verbs? 
To execute them we would then need a verbification operation? Nounify 
and verbify? Possibly, in Jx, there could be a need to in equivalent 
ways nounify adverbs and conjunctions? We would then need adverbify and 
conjunctionalize operations? Possibly verbify, adverbify and 
conjunctionalize could be the same primitive? It could then be called 
functionalize?


The nounified functions could be stored in memory in their compiled 
form? As single verbs, adverbs and conjunctions?


This would allow J to handle functions as data?

In a functional language like F#, functions are data until you execute 
them. You could have arrays of functions with the same signature. There 
are box and unbox operations to access all contents in arrays. Sometimes 
these are implicit, they are for example built into the indexing 
operation. If you wanted to have arrays of functions with different 
signatures, you would have to use something called discriminated unions. 
Type information stored with the data. Different handling for different 
types.


In JWithATwist I could include additional types in the nouns, monadic 
verbs and dyadic verbs for example. I could then handle these in 
compiled form, with implicit pointers to the compiled .NET functions. I 
could not easily mix monadic and dyadic verbs in the same array because 
the type information is stored with the array, not in each cell. To 
create arrays of both monadic and dyadic verbs I would probably use 
boxed arrays.


Cheers,

Erling Hellenäs

On 2017-08-07 02:34, Bill 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@.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  
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 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-06 Thread Bill
I am not sure if I understand your question. If you asked something undefined 
is a gerund or not. I checked by executing v@.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  
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@.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@.v uses the
> result of the verb v to perform the selection.
> "
> 
> Again, verbs are mentioned; yet again, I expect G@.0 1 to work, and it does,
> 
>   G@.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@.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  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 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-06 Thread Raul Miller
There is no need for a new fill element, since the type could not be
seen naked. Thus, the only fill which is needed to represent the
proposed uses of this type is ace.

It does, however, need a display representation, since you can format
the containing box.

Note also that the 5!: series of adverbs also currently support boxed
nouns, and we should expect that to continue. This would be an issue,
I imagine, in the context of 5!:5 (for example) when the contained
verb is explicit. But we'd also need an  AR representation (or
example).

We would also need support for the 3!: series, when boxes contain this type.

I don't think the proposal should be considered complete without
addressing these issues.

[I imagine the motivation here is that the current implementation
supports something similar, but in a broken fashion. But, in making it
official, we should want to fix where things currently break.]

Thanks,

-- 
Raul








On Sun, Aug 6, 2017 at 5:22 PM, Henry Rich  wrote:
> Coming late because of no internet.
>
> The proposal is for a new noun type that contains a verb but not an AR, as
> the current gerund does, right?
> You can't unbox it, because that would produce an illegal result.
>
> This is mainly a performance improvement, right?  The AR is not an internal
> representation, and has to be reparsed to internal form.  The new form
> would be faster, especially in low-rank explicit verbs.
>
> I think it would be best if it is a new atomic type, which would address
> the problem of how to test the type.
>
> Basically, the new type would be to verbs as symbols are to literal lists.
> It would be allowed as input to the structural verbs such as # $, and to ':
> and = .  A new fill type would have to be defined.  The new type would be
> created by a new adverb (perhaps foreign) that converts verbs/gerunds to
> boxedverbs.
>
> In the original proposal there was no way to see the contents of a boxed
> verb.  I think this would be a crippling deficiency for practical use, but
> as modified here the new type can be displayed.
>
> I like this idea, which fits in with some other ideas I have about
> preparsing explicit definitions.
>
> But, I see it as almost entirely a performance improvement.  I am loath to
> implement performance improvements unless I know the effort is worthwhile.
> I will repeat here my request for performance-critical benchmarks that I
> can analyze.  I have thought that converting ARs to verbs would be an
> issue, but I have never seen it show up in any traces I have looked at.
>
> In the absence of others' benchmarks, I use my own, and they show that the
> performance of boxed nouns, especially usecount twiddling, is still
> dominant.  I think usecounts and inplace operations on boxed nouns is what
> needs working on next.
>
> Henry Rich
>
>
>
>
> On Thu, Aug 3, 2017 at 8:57 AM, Marshall Lochbaum 
> wrote:
>
>> Can I just point out that it's not too late to add some (documented) way
>> to box verbs/adverbs/conjunctions? These could be treated as gerunds by
>> everything that currently uses gerunds, and the interpreter can just
>> throw an error if anything attempts to actually unbox them. They are
>> much harder to confuse than the current gerunds, and will have far
>> better performance.
>>
>> This sounds like a radical divergence from the way J works now, but I
>> don't think it is in practice. Programmers would use some new
>> conjunction to replace (`), and provided they don't inspect the
>> structure of gerunds nothing else changes. I suppose there would need to
>> be a way to check what class of object a box contains, because unboxing
>> to check the type is not allowed. Gerunds would remain useful for
>> programmers who want to inspect functions or build them from scratch,
>> but would otherwise become obselete.
>>
>> Marshall
>>
>> On Thu, Aug 03, 2017 at 09:01:37AM +0800, Bill wrote:
>> > J interpreter must know when a noun is a gerund, so is it possible to
>> add a new primitive to test for gerund? Or is there already J script to
>> test for gerund?
>> >
>> > Sent from my iPhone
>> >
>> > On 3 Aug, 2017, at 3:36 AM, Henry Rich  wrote:
>> >
>> > > I expect to make some more improvements to dyad u"n, and eventually to
>> > > rewrite the monad to match the dyad.  My availability to work on this
>> will
>> > > be intermittent for a while.  The 8.06 code as is works, and fixes a
>> > > long-standing bug reported by Martin Neitzel.
>> > >
>> > > I have suggested using m"n, where n is not _, to implement a cyclic
>> gerund
>> > > m.  If m doesn't look like a gerund, it would be treated as a simple
>> noun.
>> > > While this is not strictly compatible, I think it very unlikely that it
>> > > would break any existing code.  I think m"n was wrongly defined and
>> that
>> > > this is the correct definition.  My opinion is not universally shared
>> so I
>> > > haven't acted on it.
>> > >
>> > > Henry Rich
>> > >
>> > > 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-06 Thread Jose Mario Quintana
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@.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@.v uses the
result of the verb v to perform the selection.
"

Again, verbs are mentioned; yet again, I expect G@.0 1 to work, and it does,

   G@.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@.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 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 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-06 Thread Henry Rich
Coming late because of no internet.

The proposal is for a new noun type that contains a verb but not an AR, as
the current gerund does, right?
You can't unbox it, because that would produce an illegal result.

This is mainly a performance improvement, right?  The AR is not an internal
representation, and has to be reparsed to internal form.  The new form
would be faster, especially in low-rank explicit verbs.

I think it would be best if it is a new atomic type, which would address
the problem of how to test the type.

Basically, the new type would be to verbs as symbols are to literal lists.
It would be allowed as input to the structural verbs such as # $, and to ':
and = .  A new fill type would have to be defined.  The new type would be
created by a new adverb (perhaps foreign) that converts verbs/gerunds to
boxedverbs.

In the original proposal there was no way to see the contents of a boxed
verb.  I think this would be a crippling deficiency for practical use, but
as modified here the new type can be displayed.

I like this idea, which fits in with some other ideas I have about
preparsing explicit definitions.

But, I see it as almost entirely a performance improvement.  I am loath to
implement performance improvements unless I know the effort is worthwhile.
I will repeat here my request for performance-critical benchmarks that I
can analyze.  I have thought that converting ARs to verbs would be an
issue, but I have never seen it show up in any traces I have looked at.

In the absence of others' benchmarks, I use my own, and they show that the
performance of boxed nouns, especially usecount twiddling, is still
dominant.  I think usecounts and inplace operations on boxed nouns is what
needs working on next.

Henry Rich




On Thu, Aug 3, 2017 at 8:57 AM, Marshall Lochbaum 
wrote:

> Can I just point out that it's not too late to add some (documented) way
> to box verbs/adverbs/conjunctions? These could be treated as gerunds by
> everything that currently uses gerunds, and the interpreter can just
> throw an error if anything attempts to actually unbox them. They are
> much harder to confuse than the current gerunds, and will have far
> better performance.
>
> This sounds like a radical divergence from the way J works now, but I
> don't think it is in practice. Programmers would use some new
> conjunction to replace (`), and provided they don't inspect the
> structure of gerunds nothing else changes. I suppose there would need to
> be a way to check what class of object a box contains, because unboxing
> to check the type is not allowed. Gerunds would remain useful for
> programmers who want to inspect functions or build them from scratch,
> but would otherwise become obselete.
>
> Marshall
>
> On Thu, Aug 03, 2017 at 09:01:37AM +0800, Bill wrote:
> > J interpreter must know when a noun is a gerund, so is it possible to
> add a new primitive to test for gerund? Or is there already J script to
> test for gerund?
> >
> > Sent from my iPhone
> >
> > On 3 Aug, 2017, at 3:36 AM, Henry Rich  wrote:
> >
> > > I expect to make some more improvements to dyad u"n, and eventually to
> > > rewrite the monad to match the dyad.  My availability to work on this
> will
> > > be intermittent for a while.  The 8.06 code as is works, and fixes a
> > > long-standing bug reported by Martin Neitzel.
> > >
> > > I have suggested using m"n, where n is not _, to implement a cyclic
> gerund
> > > m.  If m doesn't look like a gerund, it would be treated as a simple
> noun.
> > > While this is not strictly compatible, I think it very unlikely that it
> > > would break any existing code.  I think m"n was wrongly defined and
> that
> > > this is the correct definition.  My opinion is not universally shared
> so I
> > > haven't acted on it.
> > >
> > > Henry Rich
> > >
> > > On Wed, Aug 2, 2017 at 5:03 PM, Thomas Costigliola 
> wrote:
> > >
> > >> You can try removing the conditional statement enclosing that line,
> but
> > >> for now I would say the patch is broken under Clang. Since the rank
> code
> > >> was completely rewritten in J805 and J806 and ":: is based on the
> J804 rank
> > >> with some unfinished updates Henry was working on, the real solution
> is to
> > >> rewrite ":: based on the new rank code. But that should wait until
> the code
> > >> is stable. Does anyone anticipate more changes?
> > >>
> > >> On a more philosophical note, ":: implements gerund left arguments
> that
> > >> apply to the items cyclically. The reason for adding a new primitive
> and
> > >> not extending ": is because it breaks using ": to define constant
> > >> functions. If someone has any ideas to make them play nicely together
> then
> > >> they can be merged into a single primitive. The issue is that there
> is no
> > >> distinction between a noun and gerund.
> > >>
> > >> Regards,
> > >> -Thomas
> > >>
> > >>
> > >> On 08/02/2017 11:52 AM, bill lam wrote:
> > >>
> > >>> Yes, I 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Raul Miller
potential side effects, probably.

-- 
Raul

On Fri, Aug 4, 2017 at 12:41 AM, Louis de Forcrand  wrote:
> Just wondering why
>
> isgerund=: 3 : 0 :: 0
> y@.]
> 1
> )
>
> isn't an acceptable test for “gerundality”?
>
> I also kind of agree with Bill, in the sense that J doesn’t seem to have been
> designed from the ground up (or halfway up for that matter) to facilitate
> programmatically building code / functions with gerunds. Gerunds seem
> to have been designed more for @. conditionals and sending multiple verbs
> to adverbs like }., and using foreigns to manipulate them just seems kind
> of “hacky” to me.
>
> This of course doesn’t mean that writing such code is impossible;
> just that doing so leads to highly incomprehensible code (at least to the 
> casual J
> programmer; sorry, but I haven’t the faintest idea how most of your wicked 
> tacit
> wizardry works Pepe!) There are other languages such as Lisp whose lists and
> highly regular syntax are designed specifically around that, or Haskell where
> currying means that any function taking more than one argument is a higher-
> order function returning another function; and J and APL’s syntaxes have other
> fortes, notably terseness and remarkable idiomatic qualities.
>
> I feel that a big part of this comes from being able to write code that does 
> a lot
> in a small space, with few parentheses, and with relatively simple parsing 
> rules;
> and without the current noun-verb-adverb hierarchy, one of those three 
> qualities
> would be lessened.
>
> Adding first-class verbs would kind of blur that hierarchy, and while they 
> are interesting
> to have in unofficial interpreters I believe that the official interpreter 
> should stay
> lean, efficient, relatively consistent, but especially practical to use for 
> the average
> J programmer. So the question is wether the “generality” or “completeness” 
> added
> by first-class verbs is worth the losses in other areas.
>
> All that to say that I agree with Bill that gerunds as they are now have been 
> designed
> to be created with the tie conjunction, and while they are not perfect, they 
> are
> an acceptable compromise.
>
> Louis
>
>> On 03 Aug 2017, at 19:31, Bill  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 
>>  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/019178.html
>>>
>>> Mind you  gerundYN  is not bulletproof.
>>>
>>>
>>> On Thu, Aug 3, 2017 at 5:46 AM, bill lam  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.

 On Thu, Aug 3, 2017 at 3:57 PM, Marshall Lochbaum 
 wrote:
> Can I just point out that it's not too late to add some (documented) way
> to box verbs/adverbs/conjunctions? These could be treated as gerunds by
> everything that currently uses gerunds, and the interpreter can just
> throw an error if anything attempts to actually unbox them. They are
> much harder to confuse than the current gerunds, and will have far
> better performance.
>
> This sounds like a radical divergence from the way J works now, but I
> don't think it is in practice. Programmers would use some new
> conjunction to replace (`), and provided they don't inspect the
> structure of gerunds nothing else changes. I suppose there would need to
> be a way to check what class of object a box contains, because unboxing
> to check the type is not allowed. Gerunds would remain 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Louis de Forcrand
Just wondering why

isgerund=: 3 : 0 :: 0
y@.]
1
)

isn't an acceptable test for “gerundality”?

I also kind of agree with Bill, in the sense that J doesn’t seem to have been
designed from the ground up (or halfway up for that matter) to facilitate
programmatically building code / functions with gerunds. Gerunds seem
to have been designed more for @. conditionals and sending multiple verbs
to adverbs like }., and using foreigns to manipulate them just seems kind
of “hacky” to me.

This of course doesn’t mean that writing such code is impossible;
just that doing so leads to highly incomprehensible code (at least to the 
casual J
programmer; sorry, but I haven’t the faintest idea how most of your wicked tacit
wizardry works Pepe!) There are other languages such as Lisp whose lists and
highly regular syntax are designed specifically around that, or Haskell where
currying means that any function taking more than one argument is a higher-
order function returning another function; and J and APL’s syntaxes have other
fortes, notably terseness and remarkable idiomatic qualities.

I feel that a big part of this comes from being able to write code that does a 
lot
in a small space, with few parentheses, and with relatively simple parsing 
rules;
and without the current noun-verb-adverb hierarchy, one of those three qualities
would be lessened.

Adding first-class verbs would kind of blur that hierarchy, and while they are 
interesting
to have in unofficial interpreters I believe that the official interpreter 
should stay
lean, efficient, relatively consistent, but especially practical to use for the 
average
J programmer. So the question is wether the “generality” or “completeness” added
by first-class verbs is worth the losses in other areas.

All that to say that I agree with Bill that gerunds as they are now have been 
designed
to be created with the tie conjunction, and while they are not perfect, they are
an acceptable compromise.

Louis

> On 03 Aug 2017, at 19:31, Bill  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 
>  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/019178.html
>> 
>> Mind you  gerundYN  is not bulletproof.
>> 
>> 
>> On Thu, Aug 3, 2017 at 5:46 AM, bill lam  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.
>>> 
>>> On Thu, Aug 3, 2017 at 3:57 PM, Marshall Lochbaum 
>>> wrote:
 Can I just point out that it's not too late to add some (documented) way
 to box verbs/adverbs/conjunctions? These could be treated as gerunds by
 everything that currently uses gerunds, and the interpreter can just
 throw an error if anything attempts to actually unbox them. They are
 much harder to confuse than the current gerunds, and will have far
 better performance.
 
 This sounds like a radical divergence from the way J works now, but I
 don't think it is in practice. Programmers would use some new
 conjunction to replace (`), and provided they don't inspect the
 structure of gerunds nothing else changes. I suppose there would need to
 be a way to check what class of object a box contains, because unboxing
 to check the type is not allowed. Gerunds would remain useful for
 programmers who want to inspect functions or build them from scratch,
 but would otherwise become obselete.
 
 Marshall
>> --
>> For information about J forums see 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Bill
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  
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/019178.html
> 
> Mind you  gerundYN  is not bulletproof.
> 
> 
> On Thu, Aug 3, 2017 at 5:46 AM, bill lam  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.
>> 
>> On Thu, Aug 3, 2017 at 3:57 PM, Marshall Lochbaum 
>> wrote:
>>> Can I just point out that it's not too late to add some (documented) way
>>> to box verbs/adverbs/conjunctions? These could be treated as gerunds by
>>> everything that currently uses gerunds, and the interpreter can just
>>> throw an error if anything attempts to actually unbox them. They are
>>> much harder to confuse than the current gerunds, and will have far
>>> better performance.
>>> 
>>> This sounds like a radical divergence from the way J works now, but I
>>> don't think it is in practice. Programmers would use some new
>>> conjunction to replace (`), and provided they don't inspect the
>>> structure of gerunds nothing else changes. I suppose there would need to
>>> be a way to check what class of object a box contains, because unboxing
>>> to check the type is not allowed. Gerunds would remain useful for
>>> programmers who want to inspect functions or build them from scratch,
>>> but would otherwise become obselete.
>>> 
>>> Marshall
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Jose Mario Quintana
Marshall, I could not agree more with you.  Actually, I can, so to speak ;)

Why shall we stop there?  Why not to go all the way instead?Jx shows
that the sky does not fall; it is compatible with all the libraries as far
as I know.  The only potential issues might occur when error handling code
might to match the Jx extensions behavior.

I know, I know, it is unlikely that higher-order functions would be
officially adopted in my life time, to say the  least.

Either way, I have had this opinion about gerunds since the first time you
mentioned, years ago, that boxing words seemed to be the natural way but I
am glad to hear that also it would improve performance.  I am certainly
willing to try it in Jx (of course, personally I know next to nothing about
C).

Currently in Jx one needs sometimes some extra steps to work with boxed
words,

   ( an=. ".. inv )
"..^:_1
   ( adv=. _1?:0  )
(_1?:0)



 [: +/ (\an) (an adv") _1 ]: NB. Boxed words
┌──┬─┬─┬──┐
│+/│\│"│_1│
└──┴─┴─┴──┘
 (an f.&.>   [: +/ (\an) (an adv") _1 ]:)
┌┬───┬───┬┐
│┌──┐│┌─┐│┌─┐│┌──┐│
││┌─┬──┐│││┌─┬─┐│││┌─┬─┐│││┌─┬──┐││
│││0│+/│0│\│0│"│0│_1│││
││└─┴──┘│││└─┴─┘│││└─┴─┘│││└─┴──┘││
│└──┘│└─┘│└─┘│└──┘│
└┴───┴───┴┘
   ("..@:(an f.&.>)  [: +/ (\an) (an adv") _1 ]:)
+/\"_1
   ("..@:(an f.&.>)  [: +/ (\an) (an adv") _1 ]:)  i.2 3 4
 0  1  2  3
 4  6  8 10
12 15 18 21

12 13 14 15
28 30 32 34
48 51 54 57

Sometimes one does not,

   [:v0 v1 v2 v3 v4]:
┌──┬──┬──┬──┬──┐
│v0│v1│v2│v3│v4│
└──┴──┴──┴──┴──┘
   ".. [:v0 v1 v2 v3 v4]:
v0 v1 v2 v3 v4








On Thu, Aug 3, 2017 at 3:57 AM, Marshall Lochbaum 
wrote:

> Can I just point out that it's not too late to add some (documented) way
> to box verbs/adverbs/conjunctions? These could be treated as gerunds by
> everything that currently uses gerunds, and the interpreter can just
> throw an error if anything attempts to actually unbox them. They are
> much harder to confuse than the current gerunds, and will have far
> better performance.
>
> This sounds like a radical divergence from the way J works now, but I
> don't think it is in practice. Programmers would use some new
> conjunction to replace (`), and provided they don't inspect the
> structure of gerunds nothing else changes. I suppose there would need to
> be a way to check what class of object a box contains, because unboxing
> to check the type is not allowed. Gerunds would remain useful for
> programmers who want to inspect functions or build them from scratch,
> but would otherwise become obselete.
>
> Marshall
>
>
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Raul Miller
You did. I retract these objections.

That said, given the extreme pervasiveness and quirky nature of this
new error, I think we should get a new, unique error message. (There's
plenty of precedent for that - for example, "index error" is a
specialized error when an index is not in the domain of a verb that
uses indices.)

Then again, bill lam's suggestion (of making gerunds a new noun type)
seems also worth thinking about. I'm not sure this is a good idea (as
it would break existing code which constructs gerunds), but it's good
to think through potential problem cases and useful cases.

Thanks,

-- 
Raul

On Thu, Aug 3, 2017 at 7:05 AM, Marshall Lochbaum  wrote:
> I stated in my post that any verb which would unbox a boxed verb should
> instead domain error. This is essentially the same thing that explicit
> verbs do when their last line has a non-noun result. Failure to do this
> would already be a bug, which makes the bugs mentioned in (2)
> irrelevant--the incorrect behavior should be stopped at the source.
>
> Marshall
>
> On Thu, Aug 03, 2017 at 05:14:35AM -0400, Raul Miller wrote:
>> Some notes:
>>
>> (1) This suggests that it would be legal for a verb result to be a
>> verb (because unbox is a verb and the proposal is that it produce verb
>> results).
>>
>> (2) Currently, we get crashes in some contexts where this behavior has
>> been allowed to leak into the interpreter.
>>
>> (3) By making the leak "official" we introduce new potential "leaky
>> abstraction" issues, which suggest that in some cases it may become
>> legal for a verb to be an argument to a verb. For example, consider
>> verbs like ;L:0 or ,~&.> or whatever with boxed arguments where some
>> or all of the boxes "contain verbs".
>>
>> There may be other issues?
>>
>> Thanks,
>>
>> --
>> Raul
>>
>>
>>
>>
>> On Thu, Aug 3, 2017 at 3:57 AM, Marshall Lochbaum  
>> wrote:
>> > Can I just point out that it's not too late to add some (documented) way
>> > to box verbs/adverbs/conjunctions? These could be treated as gerunds by
>> > everything that currently uses gerunds, and the interpreter can just
>> > throw an error if anything attempts to actually unbox them. They are
>> > much harder to confuse than the current gerunds, and will have far
>> > better performance.
>> >
>> > This sounds like a radical divergence from the way J works now, but I
>> > don't think it is in practice. Programmers would use some new
>> > conjunction to replace (`), and provided they don't inspect the
>> > structure of gerunds nothing else changes. I suppose there would need to
>> > be a way to check what class of object a box contains, because unboxing
>> > to check the type is not allowed. Gerunds would remain useful for
>> > programmers who want to inspect functions or build them from scratch,
>> > but would otherwise become obselete.
>> >
>> > Marshall
>> >
>> > On Thu, Aug 03, 2017 at 09:01:37AM +0800, Bill wrote:
>> >> J interpreter must know when a noun is a gerund, so is it possible to add 
>> >> a new primitive to test for gerund? Or is there already J script to test 
>> >> for gerund?
>> >>
>> >> Sent from my iPhone
>> >>
>> >> On 3 Aug, 2017, at 3:36 AM, Henry Rich  wrote:
>> >>
>> >> > I expect to make some more improvements to dyad u"n, and eventually to
>> >> > rewrite the monad to match the dyad.  My availability to work on this 
>> >> > will
>> >> > be intermittent for a while.  The 8.06 code as is works, and fixes a
>> >> > long-standing bug reported by Martin Neitzel.
>> >> >
>> >> > I have suggested using m"n, where n is not _, to implement a cyclic 
>> >> > gerund
>> >> > m.  If m doesn't look like a gerund, it would be treated as a simple 
>> >> > noun.
>> >> > While this is not strictly compatible, I think it very unlikely that it
>> >> > would break any existing code.  I think m"n was wrongly defined and that
>> >> > this is the correct definition.  My opinion is not universally shared 
>> >> > so I
>> >> > haven't acted on it.
>> >> >
>> >> > Henry Rich
>> >> >
>> >> > On Wed, Aug 2, 2017 at 5:03 PM, Thomas Costigliola  
>> >> > wrote:
>> >> >
>> >> >> You can try removing the conditional statement enclosing that line, but
>> >> >> for now I would say the patch is broken under Clang. Since the rank 
>> >> >> code
>> >> >> was completely rewritten in J805 and J806 and ":: is based on the J804 
>> >> >> rank
>> >> >> with some unfinished updates Henry was working on, the real solution 
>> >> >> is to
>> >> >> rewrite ":: based on the new rank code. But that should wait until the 
>> >> >> code
>> >> >> is stable. Does anyone anticipate more changes?
>> >> >>
>> >> >> On a more philosophical note, ":: implements gerund left arguments that
>> >> >> apply to the items cyclically. The reason for adding a new primitive 
>> >> >> and
>> >> >> not extending ": is because it breaks using ": to define constant
>> >> >> functions. If someone has any ideas to make them 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Don Guinn
   g=:;:'+-/\'
   (;0 2{g)(128!:2)i.5
10
   (;1 2 3{g)(128!:2)i.5
0 _1 1 _2 2

On Thu, Aug 3, 2017 at 5:05 AM, Marshall Lochbaum 
wrote:

> I stated in my post that any verb which would unbox a boxed verb should
> instead domain error. This is essentially the same thing that explicit
> verbs do when their last line has a non-noun result. Failure to do this
> would already be a bug, which makes the bugs mentioned in (2)
> irrelevant--the incorrect behavior should be stopped at the source.
>
> Marshall
>
> On Thu, Aug 03, 2017 at 05:14:35AM -0400, Raul Miller wrote:
> > Some notes:
> >
> > (1) This suggests that it would be legal for a verb result to be a
> > verb (because unbox is a verb and the proposal is that it produce verb
> > results).
> >
> > (2) Currently, we get crashes in some contexts where this behavior has
> > been allowed to leak into the interpreter.
> >
> > (3) By making the leak "official" we introduce new potential "leaky
> > abstraction" issues, which suggest that in some cases it may become
> > legal for a verb to be an argument to a verb. For example, consider
> > verbs like ;L:0 or ,~&.> or whatever with boxed arguments where some
> > or all of the boxes "contain verbs".
> >
> > There may be other issues?
> >
> > Thanks,
> >
> > --
> > Raul
> >
> >
> >
> >
> > On Thu, Aug 3, 2017 at 3:57 AM, Marshall Lochbaum 
> wrote:
> > > Can I just point out that it's not too late to add some (documented)
> way
> > > to box verbs/adverbs/conjunctions? These could be treated as gerunds by
> > > everything that currently uses gerunds, and the interpreter can just
> > > throw an error if anything attempts to actually unbox them. They are
> > > much harder to confuse than the current gerunds, and will have far
> > > better performance.
> > >
> > > This sounds like a radical divergence from the way J works now, but I
> > > don't think it is in practice. Programmers would use some new
> > > conjunction to replace (`), and provided they don't inspect the
> > > structure of gerunds nothing else changes. I suppose there would need
> to
> > > be a way to check what class of object a box contains, because unboxing
> > > to check the type is not allowed. Gerunds would remain useful for
> > > programmers who want to inspect functions or build them from scratch,
> > > but would otherwise become obselete.
> > >
> > > Marshall
> > >
> > > On Thu, Aug 03, 2017 at 09:01:37AM +0800, Bill wrote:
> > >> J interpreter must know when a noun is a gerund, so is it possible to
> add a new primitive to test for gerund? Or is there already J script to
> test for gerund?
> > >>
> > >> Sent from my iPhone
> > >>
> > >> On 3 Aug, 2017, at 3:36 AM, Henry Rich  wrote:
> > >>
> > >> > I expect to make some more improvements to dyad u"n, and eventually
> to
> > >> > rewrite the monad to match the dyad.  My availability to work on
> this will
> > >> > be intermittent for a while.  The 8.06 code as is works, and fixes a
> > >> > long-standing bug reported by Martin Neitzel.
> > >> >
> > >> > I have suggested using m"n, where n is not _, to implement a cyclic
> gerund
> > >> > m.  If m doesn't look like a gerund, it would be treated as a
> simple noun.
> > >> > While this is not strictly compatible, I think it very unlikely
> that it
> > >> > would break any existing code.  I think m"n was wrongly defined and
> that
> > >> > this is the correct definition.  My opinion is not universally
> shared so I
> > >> > haven't acted on it.
> > >> >
> > >> > Henry Rich
> > >> >
> > >> > On Wed, Aug 2, 2017 at 5:03 PM, Thomas Costigliola <
> fo...@iocane.net> wrote:
> > >> >
> > >> >> You can try removing the conditional statement enclosing that
> line, but
> > >> >> for now I would say the patch is broken under Clang. Since the
> rank code
> > >> >> was completely rewritten in J805 and J806 and ":: is based on the
> J804 rank
> > >> >> with some unfinished updates Henry was working on, the real
> solution is to
> > >> >> rewrite ":: based on the new rank code. But that should wait until
> the code
> > >> >> is stable. Does anyone anticipate more changes?
> > >> >>
> > >> >> On a more philosophical note, ":: implements gerund left arguments
> that
> > >> >> apply to the items cyclically. The reason for adding a new
> primitive and
> > >> >> not extending ": is because it breaks using ": to define constant
> > >> >> functions. If someone has any ideas to make them play nicely
> together then
> > >> >> they can be merged into a single primitive. The issue is that
> there is no
> > >> >> distinction between a noun and gerund.
> > >> >>
> > >> >> Regards,
> > >> >> -Thomas
> > >> >>
> > >> >>
> > >> >> On 08/02/2017 11:52 AM, bill lam wrote:
> > >> >>
> > >> >>> Yes, I use Clang and have -Werror -Wextra in CFLAGS.
> > >> >>> Sometimes vs2013 is much less tolerant.
> > >> >>>
> > >> >>> Ср, 02 авг 2017, Thomas Costigliola написал(а):
> > >> >>>
> > >>  That looks like Henry's code 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread bill lam
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.

On Thu, Aug 3, 2017 at 3:57 PM, Marshall Lochbaum  wrote:
> Can I just point out that it's not too late to add some (documented) way
> to box verbs/adverbs/conjunctions? These could be treated as gerunds by
> everything that currently uses gerunds, and the interpreter can just
> throw an error if anything attempts to actually unbox them. They are
> much harder to confuse than the current gerunds, and will have far
> better performance.
>
> This sounds like a radical divergence from the way J works now, but I
> don't think it is in practice. Programmers would use some new
> conjunction to replace (`), and provided they don't inspect the
> structure of gerunds nothing else changes. I suppose there would need to
> be a way to check what class of object a box contains, because unboxing
> to check the type is not allowed. Gerunds would remain useful for
> programmers who want to inspect functions or build them from scratch,
> but would otherwise become obselete.
>
> Marshall
>
> On Thu, Aug 03, 2017 at 09:01:37AM +0800, Bill wrote:
>> J interpreter must know when a noun is a gerund, so is it possible to add a 
>> new primitive to test for gerund? Or is there already J script to test for 
>> gerund?
>>
>> Sent from my iPhone
>>
>> On 3 Aug, 2017, at 3:36 AM, Henry Rich  wrote:
>>
>> > I expect to make some more improvements to dyad u"n, and eventually to
>> > rewrite the monad to match the dyad.  My availability to work on this will
>> > be intermittent for a while.  The 8.06 code as is works, and fixes a
>> > long-standing bug reported by Martin Neitzel.
>> >
>> > I have suggested using m"n, where n is not _, to implement a cyclic gerund
>> > m.  If m doesn't look like a gerund, it would be treated as a simple noun.
>> > While this is not strictly compatible, I think it very unlikely that it
>> > would break any existing code.  I think m"n was wrongly defined and that
>> > this is the correct definition.  My opinion is not universally shared so I
>> > haven't acted on it.
>> >
>> > Henry Rich
>> >
>> > On Wed, Aug 2, 2017 at 5:03 PM, Thomas Costigliola  
>> > wrote:
>> >
>> >> You can try removing the conditional statement enclosing that line, but
>> >> for now I would say the patch is broken under Clang. Since the rank code
>> >> was completely rewritten in J805 and J806 and ":: is based on the J804 
>> >> rank
>> >> with some unfinished updates Henry was working on, the real solution is to
>> >> rewrite ":: based on the new rank code. But that should wait until the 
>> >> code
>> >> is stable. Does anyone anticipate more changes?
>> >>
>> >> On a more philosophical note, ":: implements gerund left arguments that
>> >> apply to the items cyclically. The reason for adding a new primitive and
>> >> not extending ": is because it breaks using ": to define constant
>> >> functions. If someone has any ideas to make them play nicely together then
>> >> they can be merged into a single primitive. The issue is that there is no
>> >> distinction between a noun and gerund.
>> >>
>> >> Regards,
>> >> -Thomas
>> >>
>> >>
>> >> On 08/02/2017 11:52 AM, bill lam wrote:
>> >>
>> >>> Yes, I use Clang and have -Werror -Wextra in CFLAGS.
>> >>> Sometimes vs2013 is much less tolerant.
>> >>>
>> >>> Ср, 02 авг 2017, Thomas Costigliola написал(а):
>> >>>
>>  That looks like Henry's code taken from cr.c at some older version. It
>>  compiles fine for me in GCC and Visual Studio 2013. It is in the
>>  implementation of "::, which seems to be working in my tests, so that
>>  code
>>  never gets hit. Are you using Clang? It's much less tolerant of code 
>>  like
>>  that.
>> 
>>  Regards,
>>  -Thomas
>> 
>>  On 08/02/2017 11:21 AM, bill lam wrote:
>> 
>> > When I tried to compile, but this line in best.c failed.
>> >
>> >*((I*)0)=0;  // scaf
>> >
>> > and I can not understand its intention, access to memory
>> > address 0 should cause segfault.
>> >
>> > Вт, 01 авг 2017, Jose Mario Quintana написал(а):
>> >
>> >> A brief description of the Jx v1.0 extensions, together with links to 
>> >> a
>> >> Windows 64 bit dll, a Unix 64 bit so binaries and the patch
>> >> corresponding
>> >> to the J806 source can be found at,
>> >> http://www.2bestsystems.com/foundation/j/jx1
>> >>
>> >> Summary
>> >>
>> >> - Spelling
>> >>- Names with unicode characters
>> >>- 

Re: [Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Raul Miller
Some notes:

(1) This suggests that it would be legal for a verb result to be a
verb (because unbox is a verb and the proposal is that it produce verb
results).

(2) Currently, we get crashes in some contexts where this behavior has
been allowed to leak into the interpreter.

(3) By making the leak "official" we introduce new potential "leaky
abstraction" issues, which suggest that in some cases it may become
legal for a verb to be an argument to a verb. For example, consider
verbs like ;L:0 or ,~&.> or whatever with boxed arguments where some
or all of the boxes "contain verbs".

There may be other issues?

Thanks,

-- 
Raul




On Thu, Aug 3, 2017 at 3:57 AM, Marshall Lochbaum  wrote:
> Can I just point out that it's not too late to add some (documented) way
> to box verbs/adverbs/conjunctions? These could be treated as gerunds by
> everything that currently uses gerunds, and the interpreter can just
> throw an error if anything attempts to actually unbox them. They are
> much harder to confuse than the current gerunds, and will have far
> better performance.
>
> This sounds like a radical divergence from the way J works now, but I
> don't think it is in practice. Programmers would use some new
> conjunction to replace (`), and provided they don't inspect the
> structure of gerunds nothing else changes. I suppose there would need to
> be a way to check what class of object a box contains, because unboxing
> to check the type is not allowed. Gerunds would remain useful for
> programmers who want to inspect functions or build them from scratch,
> but would otherwise become obselete.
>
> Marshall
>
> On Thu, Aug 03, 2017 at 09:01:37AM +0800, Bill wrote:
>> J interpreter must know when a noun is a gerund, so is it possible to add a 
>> new primitive to test for gerund? Or is there already J script to test for 
>> gerund?
>>
>> Sent from my iPhone
>>
>> On 3 Aug, 2017, at 3:36 AM, Henry Rich  wrote:
>>
>> > I expect to make some more improvements to dyad u"n, and eventually to
>> > rewrite the monad to match the dyad.  My availability to work on this will
>> > be intermittent for a while.  The 8.06 code as is works, and fixes a
>> > long-standing bug reported by Martin Neitzel.
>> >
>> > I have suggested using m"n, where n is not _, to implement a cyclic gerund
>> > m.  If m doesn't look like a gerund, it would be treated as a simple noun.
>> > While this is not strictly compatible, I think it very unlikely that it
>> > would break any existing code.  I think m"n was wrongly defined and that
>> > this is the correct definition.  My opinion is not universally shared so I
>> > haven't acted on it.
>> >
>> > Henry Rich
>> >
>> > On Wed, Aug 2, 2017 at 5:03 PM, Thomas Costigliola  
>> > wrote:
>> >
>> >> You can try removing the conditional statement enclosing that line, but
>> >> for now I would say the patch is broken under Clang. Since the rank code
>> >> was completely rewritten in J805 and J806 and ":: is based on the J804 
>> >> rank
>> >> with some unfinished updates Henry was working on, the real solution is to
>> >> rewrite ":: based on the new rank code. But that should wait until the 
>> >> code
>> >> is stable. Does anyone anticipate more changes?
>> >>
>> >> On a more philosophical note, ":: implements gerund left arguments that
>> >> apply to the items cyclically. The reason for adding a new primitive and
>> >> not extending ": is because it breaks using ": to define constant
>> >> functions. If someone has any ideas to make them play nicely together then
>> >> they can be merged into a single primitive. The issue is that there is no
>> >> distinction between a noun and gerund.
>> >>
>> >> Regards,
>> >> -Thomas
>> >>
>> >>
>> >> On 08/02/2017 11:52 AM, bill lam wrote:
>> >>
>> >>> Yes, I use Clang and have -Werror -Wextra in CFLAGS.
>> >>> Sometimes vs2013 is much less tolerant.
>> >>>
>> >>> Ср, 02 авг 2017, Thomas Costigliola написал(а):
>> >>>
>>  That looks like Henry's code taken from cr.c at some older version. It
>>  compiles fine for me in GCC and Visual Studio 2013. It is in the
>>  implementation of "::, which seems to be working in my tests, so that
>>  code
>>  never gets hit. Are you using Clang? It's much less tolerant of code 
>>  like
>>  that.
>> 
>>  Regards,
>>  -Thomas
>> 
>>  On 08/02/2017 11:21 AM, bill lam wrote:
>> 
>> > When I tried to compile, but this line in best.c failed.
>> >
>> >*((I*)0)=0;  // scaf
>> >
>> > and I can not understand its intention, access to memory
>> > address 0 should cause segfault.
>> >
>> > Вт, 01 авг 2017, Jose Mario Quintana написал(а):
>> >
>> >> A brief description of the Jx v1.0 extensions, together with links to 
>> >> a
>> >> Windows 64 bit dll, a Unix 64 bit so binaries and the patch
>> >> corresponding
>> >> to the J806 source can be found at,
>> >> 

[Jprogramming] Boxed verbs as alternate gerunds

2017-08-03 Thread Marshall Lochbaum
Can I just point out that it's not too late to add some (documented) way
to box verbs/adverbs/conjunctions? These could be treated as gerunds by
everything that currently uses gerunds, and the interpreter can just
throw an error if anything attempts to actually unbox them. They are
much harder to confuse than the current gerunds, and will have far
better performance.

This sounds like a radical divergence from the way J works now, but I
don't think it is in practice. Programmers would use some new
conjunction to replace (`), and provided they don't inspect the
structure of gerunds nothing else changes. I suppose there would need to
be a way to check what class of object a box contains, because unboxing
to check the type is not allowed. Gerunds would remain useful for
programmers who want to inspect functions or build them from scratch,
but would otherwise become obselete.

Marshall

On Thu, Aug 03, 2017 at 09:01:37AM +0800, Bill wrote:
> J interpreter must know when a noun is a gerund, so is it possible to add a 
> new primitive to test for gerund? Or is there already J script to test for 
> gerund?
> 
> Sent from my iPhone
> 
> On 3 Aug, 2017, at 3:36 AM, Henry Rich  wrote:
> 
> > I expect to make some more improvements to dyad u"n, and eventually to
> > rewrite the monad to match the dyad.  My availability to work on this will
> > be intermittent for a while.  The 8.06 code as is works, and fixes a
> > long-standing bug reported by Martin Neitzel.
> > 
> > I have suggested using m"n, where n is not _, to implement a cyclic gerund
> > m.  If m doesn't look like a gerund, it would be treated as a simple noun.
> > While this is not strictly compatible, I think it very unlikely that it
> > would break any existing code.  I think m"n was wrongly defined and that
> > this is the correct definition.  My opinion is not universally shared so I
> > haven't acted on it.
> > 
> > Henry Rich
> > 
> > On Wed, Aug 2, 2017 at 5:03 PM, Thomas Costigliola  wrote:
> > 
> >> You can try removing the conditional statement enclosing that line, but
> >> for now I would say the patch is broken under Clang. Since the rank code
> >> was completely rewritten in J805 and J806 and ":: is based on the J804 rank
> >> with some unfinished updates Henry was working on, the real solution is to
> >> rewrite ":: based on the new rank code. But that should wait until the code
> >> is stable. Does anyone anticipate more changes?
> >> 
> >> On a more philosophical note, ":: implements gerund left arguments that
> >> apply to the items cyclically. The reason for adding a new primitive and
> >> not extending ": is because it breaks using ": to define constant
> >> functions. If someone has any ideas to make them play nicely together then
> >> they can be merged into a single primitive. The issue is that there is no
> >> distinction between a noun and gerund.
> >> 
> >> Regards,
> >> -Thomas
> >> 
> >> 
> >> On 08/02/2017 11:52 AM, bill lam wrote:
> >> 
> >>> Yes, I use Clang and have -Werror -Wextra in CFLAGS.
> >>> Sometimes vs2013 is much less tolerant.
> >>> 
> >>> Ср, 02 авг 2017, Thomas Costigliola написал(а):
> >>> 
>  That looks like Henry's code taken from cr.c at some older version. It
>  compiles fine for me in GCC and Visual Studio 2013. It is in the
>  implementation of "::, which seems to be working in my tests, so that
>  code
>  never gets hit. Are you using Clang? It's much less tolerant of code like
>  that.
>  
>  Regards,
>  -Thomas
>  
>  On 08/02/2017 11:21 AM, bill lam wrote:
>  
> > When I tried to compile, but this line in best.c failed.
> > 
> >*((I*)0)=0;  // scaf
> > 
> > and I can not understand its intention, access to memory
> > address 0 should cause segfault.
> > 
> > Вт, 01 авг 2017, Jose Mario Quintana написал(а):
> > 
> >> A brief description of the Jx v1.0 extensions, together with links to a
> >> Windows 64 bit dll, a Unix 64 bit so binaries and the patch
> >> corresponding
> >> to the J806 source can be found at,
> >> http://www.2bestsystems.com/foundation/j/jx1
> >> 
> >> Summary
> >> 
> >> - Spelling
> >>- Names with unicode characters
> >>- Primitives
> >>Added =.. =:: $:: [. ]. ]: ".. ":: `. ?: i.. O.
> >>Extended  ~ $.
> >>- Foreign
> >>Added 104!:5 Unnamed Execution
> >> 
> >> - Trains
> >>  a vAdded   (different from Jx v0)
> >>  a aExtended(different from Jx v0)
> >>  c aResurrected
> >>  a c a  Resurrected
> >> 
> >> The Jx v0 page,
> >> http://www.2bestsystems.com/foundation/j/jx0
> >> will be removed in the near future
> >> 
> >> Time permitting, there will be soon a script with assertions for those
> >> who
> >> want to verify binaries targeted for other platforms and I will