bug-apl
[Top][All Lists]
Advanced

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

Re: /⍨


From: Dr . Jürgen Sauermann
Subject: Re: /⍨
Date: Thu, 2 Jun 2022 13:54:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

Hi Hudson,

thanks for reporting your issues. I believe that I fixed (most of) them in SVN 1556.


Regarding the ISO PDF file, it is mentioned below the link in README-7-more-info
that the file needs to be unzipped.

Regarding ⌹{⍺+÷⍵}⍣1000⍨ 1 this works just fine on my machine:

      ⌹{⍺+÷⍵}⍣1000⍨ 1
0.6180339887

If you can reproduce the fault, then please check with gdb (after make apl.lines
in directory src as to get better line numbers in gdb).

Best Regards,
Jürgen


On 6/1/22 2:08 AM, hudson@hudsonlacerda.com wrote:
Hi Jürgen,

There are some APL implementations that accept the form /⍨ .
The GNU APL info manual had a section about the ambiguity of /⌿\⍀ , now removed, it seems.

I collected some other issues I have with GNU APL (exceptions caused by user errors and more).
See attachments. If you cannot replicate the exceptions, please tell me how to try inspect them.

Thanks,
Hudson


----- Em 31 de Maio de 2022, em 17:02, Dr. Jürgen Sauermann mail@jürgen-sauermann.de escreveu:

Hi Hudson,

I checked with IBM APL2.

Unfortunately my IBM APL2 has no ⍨ (aka. duplicate) operator.
But we can emulate it easily:

DUP ←{ ⍵ ⍶ ⍵ }
+ DUP 1 2 3
2 4 6
× DUP 1 2 3
1 4 9

In GNU APL, DUP gives the same result as ⍨:

/⍨1 2 3
SYNTAX ERROR
/⍨1 2 3
^^

/DUP 1 2 3
SYNTAX ERROR
/DUP 1 2 3
^^

However, in IBM APL2 I get the same (see attached screenshot),

The problem seems to be caused by the ambiguity of / and friends (i.e. ⌿, \, and
⍀ ).
You can work around this with a wrapper around /:

REPL←{ ⍺ / ⍵ } ⍝ disambiguates / to mean replicate and not reduce
3 REPL 1 2 3
1 1 1 2 2 2 3 3 3

REPL ⍨ 1 2 3
1 2 2 3 3 3

1 2 3 REPL 1 2 3 ⍝ same as REPL ⍨ 1 2 3
1 2 2 3 3 3

Best Regards,
Jürgen

On 5/31/22 2:18 AM, [ mailto:hudson@hudsonlacerda.com | hudson@hudsonlacerda.com
] wrote:

Hi.

        
I get "SYNTAX ERROR" messages for /⍨ or ⌿⍨ :

        
/⍨⍳3
⌿⍨⍳3

        
Regards,
Hudson


reply via email to

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