bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: David B. Lamkins
Subject: Re: [Bug-apl] Outer product with replicate error
Date: Sat, 14 May 2016 18:49:18 -0700
User-agent: Mutt/1.6.0 (2016-04-01)

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 GNU APL does anyway (step 3 in the referenced info page).

Outer product is a common idiom dating from the earliest days of APL. It 
doesn't make any sense to require special (i.e. specific to GNU APL) syntax for 
this particular case.


On Sat, May 14, 2016 at 01:31:13PM -0500, Xiao-Yong Jin wrote:
> 
> > On May 14, 2016, at 7:51 AM, David Tran <address@hidden> 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 in the info page of gnu apl.  A feature (bug?) of the parser 
> treats / as an operator in this case.  Simple workaround would be
> 
>       3 0 2 ∘.{⍺/⍵} 5 1 7
>  5 5 5  1 1 1  7 7 7 
>                      
>  5 5    1 1    7 7   
> 
> I have too limited experience to say whether it is good or bad.  Perhaps the 
> parser should accept some exceptional cases?
> 
> Best,
> Xiao-Yong
> 
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]