I appreciate it. I thought so - but wanted to confirm.

NuVoc pages are excellent and go a long way at explaining it. Like many
complicated topics, for me at least, its helpful to see it from different
angles -- including NuVoc, the dictionary, the various J books and texts,
the wikipedia page on rank[1], dissect, and others

Eventually it starts to click and then after some absence from use it needs
to be reread. I was back to the re-reading stage after starting up
adventofcode after minimal use of J over the past year. Fortunately, each
reread also offers a greater appreciation and comprehension.

Thanks

[1] - https://en.wikipedia.org/wiki/Rank_(J_programming_language)

On Sun, Dec 3, 2017 at 9:13 AM, Henry Rich <[email protected]> wrote:

> If you look at the ranks on the NuVoc main page, or at the start of the
> page for fork or hook, you will see that the ranks for both are all
> infinite.
>
> Verb rank is one of the most important concepts in J, and one of the
> hardest to explain clearly.  NuVoc has several pages devoted to it, as you
> can see in the list of ancillary pages below the main table.  They're worth
> reading.
>
> Henry Rich
>
>
> On 12/3/2017 9:06 AM, Joe Bogner wrote:
>
>> Thanks for the suggestion to reread and dig into / . I reread the docs and
>> they are clear now. The bits that stick out to me that are relevant to my
>> problem:
>>
>> "1. If the rank of u is not 0, it doesn't produce a table"[1]
>>
>> This seems to be a reference to  "u/ y is equivalent to x u"(lu,_) y where
>> lu is the left rank of u ."[2] in the dictionary
>>
>> So back to your first reply
>>
>> This verb has left rank of 0 which means it will result in a table
>>
>> (0&= @ |~) b.0
>> _ 0 0
>>
>> Whereas this is _ meaning it won't be a table
>>
>> (~: *. (0&= @ |~)) b.0
>> _ _ _
>>
>>
>> But if we force the left rank it will return a table:
>>
>>
>> (~: *. (0&= @ |~))"(0,_)~ (5,9,2,8)
>> 0 0 0 0
>> 0 0 0 0
>> 0 0 0 0
>> 0 0 1 0
>>
>> (~: *. (0&= @ |~))"0/~ (5,9,2,8)
>> 0 0 0 0
>> 0 0 0 0
>> 0 0 0 0
>> 0 0 1 0
>>
>> The only remaining question is: are all forks infinite rank? I tested with
>> b.0 different examples and they all seem to be. I assumed the rank of a
>> fork would be the rank of the middle tine, g.  If all forks aren't rank
>> infinite, what determines the rank of the fork? Admittedly my rank
>> knowledge is still developing even after several years of J use
>>
>>
>> [1] - http://code.jsoftware.com/wiki/Vocabulary/slash#dyadic
>> [2] - http://www.jsoftware.com/help/dictionary/d420.htm
>>
>>
>> On Sat, Dec 2, 2017 at 3:49 PM, Henry Rich <[email protected]> wrote:
>>
>> Please elaborate on what confused you in that article.  [May I say, if you
>>> want to learn about x u/ y, there's much more information on the page for
>>> that primitive rather than the page for {y ].
>>>
>>> The inner verb rank of u/ DOES matter.  It's crucial.  Please read the
>>> page on x u/ y and then tell me if you still think the docs need more
>>> work.
>>>
>>> Henry Rich
>>>
>>>
>>> On 12/2/2017 3:07 PM, Joe Bogner wrote:
>>>
>>> Thanks Henry & Raul - I figured it was rank but couldn't figure out why.
>>>> I
>>>> guess I assumed it would somehow use the rank of the tines.
>>>>
>>>> This NuVoc article is what tripped me up -
>>>> http://code.jsoftware.com/wiki/Vocabulary/curlylf
>>>>
>>>> Specifically this example got me thinking that the 'inner' verb rank
>>>> mattered, but it was just my misread of the parentheses (there is no
>>>> inner
>>>> verb!)
>>>>
>>>> 0 1 (<@,"0)/ 7 8 9
>>>>
>>>> vs
>>>>
>>>>    0 1 (<@,)"0/ 7 8 9
>>>>
>>>> vs
>>>>
>>>> 0 1 <@,"0/ 7 8 9
>>>>
>>>> all are the same, but it doesn't mean that placing rank inside the verb
>>>> for
>>>> the / adverb matters. Sharing in case it helps someone else...
>>>>
>>>> Thanks again
>>>>
>>>> On Sat, Dec 2, 2017 at 2:39 PM, Henry Rich <[email protected]>
>>>> wrote:
>>>>
>>>> Rank.
>>>>
>>>>>      (~: *. (0&= @ |~)) b. 0
>>>>> _ _ _
>>>>>      (0&= @ |~) b. 0
>>>>> _ 0 0
>>>>>      ~: b. 0
>>>>> _ 0 0
>>>>>
>>>>> Henry Rich
>>>>>
>>>>>
>>>>>
>>>>> On 12/2/2017 2:34 PM, Joe Bogner wrote:
>>>>>
>>>>> I was working on my adventofcode solution earlier today and was stuck
>>>>> and
>>>>>
>>>>>> still can't figure out why this doesn't work.
>>>>>>
>>>>>> Take this expression.
>>>>>>
>>>>>> (0&= @ |~)/~ 5 9 2 8
>>>>>>
>>>>>> 1 0 0 0
>>>>>>
>>>>>> 0 1 0 0
>>>>>>
>>>>>> 0 0 1 0
>>>>>>
>>>>>> 0 0 1 1
>>>>>>
>>>>>>
>>>>>> And this expression
>>>>>>
>>>>>>
>>>>>> (~:)/~ 5 9 2 8
>>>>>>
>>>>>> 0 1 1 1
>>>>>>
>>>>>> 1 0 1 1
>>>>>>
>>>>>> 1 1 0 1
>>>>>>
>>>>>> 1 1 1 0
>>>>>>
>>>>>>
>>>>>> Why can't I combine it into a single fork to AND the two tines?
>>>>>>
>>>>>>
>>>>>> (~: *. (0&= @ |~))/~ 5 9 2 8
>>>>>>
>>>>>> 0 0 0 0
>>>>>>
>>>>>>
>>>>>>
>>>>>> Instead I have to do this
>>>>>>
>>>>>>
>>>>>> (~:/~ *. (0&= @ |~)/~) 5 9 2 8
>>>>>>
>>>>>> 0 0 0 0
>>>>>>
>>>>>> 0 0 0 0
>>>>>>
>>>>>> 0 0 0 0
>>>>>>
>>>>>> 0 0 1 0
>>>>>> ------------------------------------------------------------
>>>>>> ----------
>>>>>> For information about J forums see http://www.jsoftware.com/forum
>>>>>> s.htm
>>>>>>
>>>>>>
>>>>>> ---
>>>>> This email has been checked for viruses by AVG.
>>>>> http://www.avg.com
>>>>>
>>>>> ----------------------------------------------------------------------
>>>>> 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