*Take* is probably not the only place in the Dictionary where $ is used instead of # when talking about length, from years of use by one or both of the authors. When talking about the rank of an array, especially, old-timers "get" $$x right away (from the ⍴⍴x of APL) but #$x takes some getting used to.
On Sat, Oct 5, 2013 at 6:47 PM, Ganesh Rapolu <[email protected]> wrote: > I see now that my confusion stems from my misuse of words. I should not > have said 'error' or 'mistake'. My opinion was/is that the dictionary entry > would be clearer if it used #$y instead. But I can see that a discussion on > clarity would quickly turn into matters of personal taste and not be > worthwhile. Anyway, thank you for your patience and quick responses, and an > even bigger thanks for implementing and maintaining J. > > > On Sat, Oct 5, 2013 at 3:24 PM, Roger Hui <[email protected]> > wrote: > > > The dictionary entry says: > > > > In general, if y is not an atom, x may be a list of length not more than > > $$y , and if y is an atom, it is replaced by ((#x)$1)$y . Element k > > produces (k{x){."(($$y)-k) y ; an infinite value is replaced by the > length > > of the corresponding axis. > > > > > > The statement is correct, both formally (executes on a computer) and > > informally, if it says $$y or #$y. If it is correct, then it is not a > > mistake. It is not to say that # and $ are interchangeable in all > > situations. > > > > > > > > > > On Sat, Oct 5, 2013 at 6:13 PM, Ganesh Rapolu <[email protected]> > wrote: > > > > > Brevity is not always conducive to understanding. I would be grateful > if > > > you gave an explanation > > > as to why this flexibility in the rank of a length is not a mistake. > > > > > > > > > On Sat, Oct 5, 2013 at 3:01 PM, Roger Hui <[email protected]> > > > wrote: > > > > > > > If it is a mistake I'd correct it, but it's not a mistake. > > > > > > > > > > > > On Sat, Oct 5, 2013 at 5:44 PM, Ganesh Rapolu <[email protected]> > > > wrote: > > > > > > > > > I am having difficulty finding reasons other than tradition that a > > > length > > > > > should be allowed to be a list. > > > > > > > > > > badlength =. $ > > > > > mean =. +/ % badlength > > > > > $ mean"1 i. 5 5 > > > > > 5 1 > > > > > > > > > > Of course, J already does the right thing by providing # . It might > > be > > > in > > > > > the spirit of J to continue to correct mistakes made in APL by > > > correcting > > > > > the documentation for take. > > > > > > > > > > > > > > > On Sat, Oct 5, 2013 at 2:19 PM, Roger Hui < > [email protected] > > > > > > > > wrote: > > > > > > > > > > > It is traditional in APL (and APL-like) systems that a length is > a > > > list > > > > > or > > > > > > a scalar. > > > > > > > > > > > > > > > > > > > > > > > > On Sat, Oct 5, 2013 at 4:53 PM, Ganesh Rapolu < > [email protected] > > > > > > > > wrote: > > > > > > > > > > > > > Although it is the case that for a verb v and integer k, v"k > and > > > v"(, > > > > > k) > > > > > > > are the same, it might be confusing if the length referred to > in > > > the > > > > > > phrase > > > > > > > 'x may be a list of length not more than $$y' is not a scalar. > > > > > > > > > > > > > > > > > > > > > On Sat, Oct 5, 2013 at 1:36 PM, Roger Hui < > > > [email protected] > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > Both $$y or #$y are correct in this case. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sat, Oct 5, 2013 at 4:14 PM, Ganesh Rapolu < > > > [email protected] > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > In the last paragraph, $$y should be #$y. > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > > > > > 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 > > > > > > > ---------------------------------------------------------------------- > > > 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
