Actually, reading the primitives.ijs, only the 2 character notations are actually defined. With the special form /:~ it becomes a bit awkward.
Can I suggest an additional file entry to the standard libraries to handle special monads and/or dyads like the following: SortUpValue=: /:~ SortDownValue=: \:~ Reshape=: $, IndexOfLargest=: i.>./ (im using examples from the J reference card pinned on the corkboard in front of me) I know that a lot of us has this set of commands that we've always used because they were useful in everyday programming. Do we have something like this right now? If not, I believe it would be a great idea if we can come up with one so as to consolidate them to names and added as add-ons or as standard library. r/Alex -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Fraser Jackson Sent: Wednesday, March 04, 2009 12:59 PM To: General forum Subject: Re: [Jgeneral] SortUp and GradeUp in the Primitives 1. The standard library contains the verb sort which gives as monadic case the sorted argument but retains the Dictionary sortup definition. Note the Vocab page uses Sort as the dyadic case not SortUp but since the verb sort is in the standard library it is not provided as an alternative in the primitives script. 2. If you want an alternative name for the dyadic case sortwith or sortby might be simple options. 3. The primitives script uses the Dictionary names. If Roger changes those then the primitives script should be changed. 4. In any case you cannot arbitrarily change the primitives script, especially after just 24 hours discussion on the forum. You do not know who all may be using it. If there are changes it should be with a new release and they should be documented, and where possible retain backwards compatibility. Fraser ---- Original Message ----- From: "Alex Rufon" <[email protected]> To: "General forum" <[email protected]> Sent: Wednesday, March 04, 2009 4:15 PM Subject: Re: [Jgeneral] SortUp and GradeUp in the Primitives > Thanks for the comments guys. > > Currently, I internally redefined SortUp ... > > So, who should change the primitives.ijs file from SortUp to > SortUpUsingKeys? > > -----Original Message----- > From: [email protected] [mailto:[email protected]] > On Behalf Of Henry Rich > Sent: Tuesday, March 03, 2009 10:14 PM > To: General forum > Subject: Re: [Jgeneral] SortUp and GradeUp in the Primitives > > I suggest renaming SortUp to SortUpUsingKeys. > > Henry Rich > > > > bill lam wrote: >> On Tue, 03 Mar 2009, Sherlock Ric wrote: >>> ---Alex Rufon wrote: >>>> SortUp and GradeUp are both defined as /: in the primitives. In >>>> parallel, SortDown and GradeDown also suffers the same issue. >>> SortUp refers to dyadic use of /:, GradeUp refers to monadic use of /: >>> >>> /:~ myarray >>> Is the special case of SortUp where you are sorting it by the grade of >>> itself, i.e. >>> myarray /: myarray >>> However often you will want to use >>> myarray /: my2ndarray >>> >>> You cannot do this if you redefine SortUp as /:~ >> >> I think Alex's argument is reasonable. Dyadic sort is alien to most >> programmers. If primitives are meant for beginners, rename SortUp as >> DyadSortUp and define SortUp as /:~ will cause less surprise for those >> not yet initiated. >> > ---------------------------------------------------------------------- > 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
