You are, of course, correct.  Rank that was a misnomer for rank items,
which I think is what Pascal had in mind, and I should have presented it as
an adverb.  That is (I am including the full tacit Calvinian definition of
invoke for completeness; but, the explicit one from the other thread should
work as well),

   an=.<@:((,'0') ,&< ])      NB. Atomizing nouns (or words in general)
   evoke=. (<'`:')(0:`)(,^:)  NB. Verbing evoke (`:)

   invoke=. <@:(evoke&0)@:[ (evoke&6)@:, an@:]

   ri=.  &(($~ #@]) invoke f."_1 ])  NB. Rank items (adv)

   (-:`+:)   ri i.3 4
0 0.5  1 1.5
8  10 12  14
4 4.5  5 5.5
   (-:`+:`*:)ri i.3 4
 0 0.5   1 1.5
 8  10  12  14
64  81 100 121

A model for the rank (") conjunction, that should have been, is somewhat
more complicated.  Even modeling the case n"m when m is a single rank
instead of more would require extra effort.  One could write an explicit or
even a tacit version (in the form of an adverb) but I will pass because all
the above only strengthens your point that rank should have been defined
the way you are suggesting; it might be even easier, for someone familiar
with the source code, to modify its definition instead and be done with it,
albeit sacrificing some backward compatibility.

Yet, it seems to me that we could almost have it both ways: For the form
(m"n), test whether or not m is a gerund, if it is use the new meaning
otherwise use the old one.  The only hole would the very rare case where
verbing a gerund is wanted and in that case one could use the form (&])…
 Does it make sense?

We might give it a try as another Jx extension; Jx is not a new language
but a permissive J dialect.  It would not be entirely backward compatible
but ultimately, strictly speaking, no extension is (due to the availability
of the adverse (::) conjunction).

On Sun, Aug 9, 2015 at 9:05 PM, Henry Rich <[email protected]> wrote:

> Yes.
>
> In general, we want the gerund to apply to cells of specified rank, not
> just items.
>
>
> Henry Rich
>
>
> On 8/9/2015 9:01 PM, Jose Mario Quintana wrote:
>
>>     Rank=. ($~ #@]) invoke f."_1 ]
>>
>>     (-:`+:) Rank i.3 4
>> 0 0.5  1 1.5
>> 8  10 12  14
>> 4 4.5  5 5.5
>>
>>     (-:`+:`*:) Rank i.3 4
>>   0 0.5   1 1.5
>>   8  10  12  14
>> 64  81 100 121
>>
>>
>> On Sun, Aug 9, 2015 at 7:58 PM, 'Pascal Jasmin' via Programming <
>> [email protected]> wrote:
>>
>> The alternatives to m"n aren't terrible.  We have all made sensible
>>> workarounds.
>>>
>>> Of those workarounds, I strongly prefer # to $ as the selector.
>>>
>>> posting new definitions that saddly won't work unless definitions from
>>> other thread are gattered,
>>>
>>> lvProcsRest =: (1 : '(> {: m) eval }: m')
>>>
>>> lvProcsStrand =: 'lrS lvProcsRest eval' aatrainaltMs =:  ('apply every~
>>> (',  ') $~#',~ lr ) lvProcsStrand
>>>
>>>    9: -: +: altMs
>>> apply&>~ ((<;._1 ' (-:) (+:)') $~ #)
>>>
>>> This seems to me to be the most likely thing to want
>>>
>>>    9: -: +: *: altMs"1 i.3 4
>>> 0  2   4 1.5
>>> 2 10  36 3.5
>>> 4 18 100 5.5
>>>
>>>
>>>    9: -: +: *: altMs i.3 4
>>> 0 0.5   1 1.5
>>> 8  10  12  14
>>> 64  81 100 121
>>>
>>>
>>>
>>> ----- Original Message -----
>>> From: Raul Miller <[email protected]>
>>> To: Programming forum <[email protected]>
>>> Cc:
>>> Sent: Sunday, August 9, 2015 7:08 PM
>>> Subject: Re: [Jprogramming] How m"n shoulda been defined
>>>
>>> I'm still not clear on what "apply the selected verb to each cell" means
>>> here.
>>>
>>> Which of these three cases should be the consequence of (+`-"1 i.3 4)
>>> and why is that the right choice?
>>>
>>> length error
>>>
>>> 1 _1 1*i.3 4
>>>
>>> 1 _1 1 _1*"1 i.3 4
>>>
>>> Thanks,
>>>
>>> --
>>> Raul
>>> --
>>> Raul
>>>
>>> On Sun, Aug 9, 2015 at 6:52 PM, Henry Rich <[email protected]> wrote:
>>>
>>>> The rank of those verbs doesn't enter into it.
>>>>
>>>> +`-;.2 for example means 'partition y, then apply the selected verb to
>>>>
>>> the
>>>
>>>> partition'.
>>>>
>>>> Same with +`|."2 y for example.  Break y into 2-cells, then apply the
>>>> selected verb to each cell.
>>>>
>>>> Henry Rich
>>>>
>>>> On 8/9/2015 6:38 PM, Raul Miller wrote:
>>>>
>>>>>
>>>>> Hmm... but what should the effect be when the verbs in the gerund are
>>>>> not rank zero?
>>>>>
>>>>> ----------------------------------------------------------------------
>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>>
>>>
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>
>>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to