Hi Raul, On Mon, Oct 26, 2015 at 2:23 AM, Raul Miller <[email protected]> wrote:
> Hmm... interesting. > > Personally, I try to use 1 + instead of >: except where >: saves > typing (like saves me a parenthesis). > > For me, when number 1 has special meaning in the context (like the base line or something) I prefer using >: and differentiate it from other "N +" phrases. > I can't think of any personally valid reasons for using sort over /:~ > in that context, but it is defined and is a part of J, and I imagine > that makes the code more accessible to a novice audience. > > Yeah. However, I usually recommend J novices to start from and get used to the symbols, instead of the identifier names such as sort. Anyways, the code works, and is valid J (at least in current > implementations), so that's something. > > Yeah. Except the totally redundant parentheses. ;) > Thanks, > > -- > Raul > > > On Sun, Oct 25, 2015 at 1:05 PM, June Kim (김창준) <[email protected]> > wrote: > > Hello, > > > > I found a mention of J in a book called Apprenticeship Patterns : > > > > > https://books.google.co.kr/books?id=I3xFAoZT_5AC&lpg=PP1&dq=apprenticeship%20patterns&pg=PA21#v=onepage&q&f=false > > > > Unfortunately, the example code in J given in the text is, I consider, > > unidomatic. > > > > sort 1 + (6?49) > > > > I'd rather have coded it as: > > > > /:~>:6?49 > > > > One more important thing is the other codes, as in Java and Io, have to > > loop over until we get unique six random numbers, whereas J, as I > believe, > > does not have to -- I guess it internally uses a smarter algorithm to > > Deal(for example, Fisher-Yates). Could anyone tell me the internal > > algorithm it uses? > > ---------------------------------------------------------------------- > > 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
