Re: [Bug-apl] Supporting negative ranks for ⍤ operator

2016-04-27 Thread Louis de Forcrand
Whoops. Looks like I got here too late. Well done! Louis > On 28 Apr 2016, at 00:29, Louis de Forcrand wrote: > > The three-item form is used if the associated function is ambivalent (applied > to the P-cells of ⍵ if monadic, applied to corresponding Q-cells of ⍺ and > R-cells of ⍵ if dyadic)

Re: [Bug-apl] Supporting negative ranks for ⍤ operator

2016-04-27 Thread Louis de Forcrand
The three-item form is used if the associated function is ambivalent (applied to the P-cells of ⍵ if monadic, applied to corresponding Q-cells of ⍺ and R-cells of ⍵ if dyadic). I don't believe it is possible to define ambivalent functions in ISO APL however, so it is kind of redundant. It is pro

Re: [Bug-apl] The Dyalog ⌸ operator

2016-04-27 Thread Louis de Forcrand
Most operators which seem alien to APL2-like APLs are mostly taken from Sharp APL and J (key, rank, and even enclosing, although it and the power operator behave quite differently). Therefore you can find quite good info (except for the lack of the corresponding symbol) in the J dictionary: http

Re: [Bug-apl] Unexpected result when attempting to enclose over rows

2016-04-27 Thread Juergen Sauermann
Hi, thanks, fixed in SVN  724. /// Jürgen On 04/26/2016 01:41 PM, Jay Foad wrote: I agree that this seems like a bug. Your example works in NARS2000 and Dyalog. To make it work in GNU APL I currently have to do an extra enc

Re: [Bug-apl] Defect in 722 and 723

2016-04-27 Thread Juergen Sauermann
Hi Fred, thanks, fixed in *SVN 724*. /// Jürgen On 04/26/2016 05:28 PM, Fred Weigel wrote: A defect was introduced in revision 722. In libapl.cc, line 410, a parameter "false" should be added. FredW

Re: [Bug-apl] Supporting negative ranks for ⍤ operator

2016-04-27 Thread Jay Foad
Incidentally, it works like this in Dyalog and NARS2000 too, though the Dyalog documentation doesn't mention the 3-item form. Jay. On 27 April 2016 at 09:02, Jay Foad wrote: > Given g ← f⍤P Q R: > P is the monadic rank > Q is the left rank > R is the right rank > > So: > g Y applies g to the P-c

Re: [Bug-apl] Supporting negative ranks for ⍤ operator

2016-04-27 Thread Elias Mårtenson
Thanks, that's interesting. However, I'm still a big confused about the 3-value case. When is P, Q and R all used? Secondly, do you agree that that negative ranks would be useful? Regards, Elias On 27 April 2016 at 16:02, Jay Foad wrote: > You're reading section 9.3.4 "Rank operator deriving

Re: [Bug-apl] Supporting negative ranks for ⍤ operator

2016-04-27 Thread Jay Foad
You're reading section 9.3.4 "Rank operator deriving monadic function". You also need to look at 9.3.5 "Rank operator deriving dyadic function". Given g ← f⍤P Q R: P is the monadic rank Q is the left rank R is the right rank So: g Y applies g to the P-cells of Y X g Y applies g to the Q-cells of

[Bug-apl] Supporting negative ranks for ⍤ operator

2016-04-27 Thread Elias Mårtenson
Dyalog supports the use of a negative rank parameter, while GNU APL does not. Instead GNU APL follows the ISO spec which says that a negative value should be clamped to 0. However, the Dyalog model is quite useful. Here's how it's described in their documentation: *“The Rank operator ⍤ 1 applies