Re: [Bug-apl] Outer product with replicate error

2016-05-17 Thread Alexey Veretennikov
Hi, Dyalog also produces the same result as GNU APL: 1 2 3 /¨ 4 5 6 4 5 5 6 6 6 Juergen Sauermann writes: > Hi Peter, > > is seems like IBM APL2 computes > 1 2 3 /¨ 4 5 6 > as: > (1 2 3/4) (1 2 3/5) (1 2 3/6) > > However, the ISO standard says > > Z ← A f¨ B > Informal Descri

Re: [Bug-apl] Outer product with replicate error

2016-05-17 Thread Juergen Sauermann
Hi Kacper, yes. APL2 produces what you predicted. I believe that the standard says little about how / and friends shall be parsed. In GNU APL a value left of / makes it a function at tokenization time in order to avoid testing at runtime.

Re: [Bug-apl] Outer product with replicate error

2016-05-17 Thread Kacper Gutowski
On Tue, May 17, 2016 at 4:49 PM, Juergen Sauermann wrote: > is seems like IBM APL2 computes > 1 2 3 /¨ 4 5 6 > as: > (1 2 3/4) (1 2 3/5) (1 2 3/6) > However, the ISO standard says > Z ← A f¨ B (...) The difference isn't in each operator, but in parsing / always as a monadic operator (a

Re: [Bug-apl] Outer product with replicate error

2016-05-17 Thread Juergen Sauermann
Hi Peter, is seems like IBM APL2 computes 1 2 3 /¨ 4 5 6 as:   (1 2 3/4) (1 2 3/5) (1 2 3/6) However, the ISO standard says Z ← A f¨ B Informal Description: The operand function f is applied independently to correspondin

Re: [Bug-apl] Outer product with replicate error

2016-05-16 Thread Peter Teeson
Hi Jürgen: If my memory is (still) correct it did give SYNTAX ERROR on Sharp APL. (I recall it because I was once tasked with doing some heuristics to speed up outer product.) Peter > On May 15, 2016, at 5:29 AM, Juergen Sauermann > wrote: > Hi, > > even though outer product dates back to the

Re: [Bug-apl] Outer product with replicate error

2016-05-16 Thread Juergen Sauermann
Hi, even though outer product dates back to the early days of APL, if I remember correctly then you could only use it with scalar functions, not with mixed functions at that time. Therefore I believe that ∘./ would have given a SYNTAX ERROR eve

Re: [Bug-apl] Outer product with replicate error

2016-05-16 Thread Juergen Sauermann
Hi, I changed GNU APL already yesterday, but I could not commit since the SVN repo was down (and still is). You can apply the patch below to make GNU APL behave like Dyalog. /// Jürgen --- Parser.cc   (rev

Re: [Bug-apl] Outer product with replicate error

2016-05-16 Thread Hans-Peter Sorge
Am 15.05.2016 um 03:49 schrieb David B. Lamkins: > While `$ info apl` speaks to the issues around function/operator ambiguity, > it does not make any mention of the outer product case. > > I suspect that the failure of "outer product expand" is an oversight. This > case is disambiguated by notic

Re: [Bug-apl] Outer product with replicate error

2016-05-14 Thread David B. Lamkins
While `$ info apl` speaks to the issues around function/operator ambiguity, it does not make any mention of the outer product case. I suspect that the failure of "outer product expand" is an oversight. This case is disambiguated by noticing the outer product during the right-to-left scan that G

Re: [Bug-apl] Outer product with replicate error

2016-05-14 Thread Xiao-Yong Jin
> On May 14, 2016, at 1:54 PM, Ala'a Mohammad wrote: > > Isn't it the same as using reshape instead? > > 3 0 2 ∘.⍴ 5 1 7 > 5 5 5 1 1 1 7 7 7 > > 5 51 17 7 In this case, yes. If you have nested structure, no. > > Best, > > Ala'a > > On Sat, May 14, 2016 at 10:31 PM, Xiao-Yo

Re: [Bug-apl] Outer product with replicate error

2016-05-14 Thread Ala'a Mohammad
Isn't it the same as using reshape instead? 3 0 2 ∘.⍴ 5 1 7 5 5 5 1 1 1 7 7 7 5 51 17 7 Best, Ala'a On Sat, May 14, 2016 at 10:31 PM, Xiao-Yong Jin wrote: > >> On May 14, 2016, at 7:51 AM, David Tran wrote: >> >> Hi, >> >> Newbie study "MasteringDyalogAPL"; got error on pag

Re: [Bug-apl] Outer product with replicate error

2016-05-14 Thread Xiao-Yong Jin
> On May 14, 2016, at 7:51 AM, David Tran wrote: > > Hi, > > Newbie study "MasteringDyalogAPL"; got error on page #388 example: > > 3 0 2 ∘./ 5 1 7 > SYNTAX ERROR > 3 0 2∘./5 1 7 > ^ ^ > > bug? ( or this is a specify feature of Dyalog and not APL2 ? ) It’s documented i

[Bug-apl] Outer product with replicate error

2016-05-14 Thread David Tran
Hi, Newbie study "MasteringDyalogAPL"; got error on page #388 example: 3 0 2 ∘./ 5 1 7 SYNTAX ERROR 3 0 2∘./5 1 7 ^ ^ bug? ( or this is a specify feature of Dyalog and not APL2 ? ) my GNU APL is latest trunk version 1.5 / 726. Thanks, David