[Top][All Lists]

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

Re: [Bug-apl] The Dyalog ⌸ operator

From: Christian Robert
Subject: Re: [Bug-apl] The Dyalog ⌸ operator
Date: Wed, 27 Apr 2016 01:18:43 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0

That is probably what I was missing for a very long time.


On 2016-04-27 01:00, Elias Mårtenson wrote:
The Dyalog language reference guide contains all the Dyalog stuff: 

In particular, ⍤ is described on page 146, and ⌸ on page 139.

The formal ISO APL specification can be downloaded here: 

Note that for the last link, the file is actually gzipped, so you have to 
uncompress it before you can read it.


On 27 April 2016 at 12:41, Christian Robert <address@hidden 
<mailto:address@hidden>> wrote:

    where are you taking the definition of various functions like ?

    power operator ?

    dieresis jot ? like: (⊂⍤1) z,⍪z  (I really don't know what it is doing)

    I see no references anywhere on the web. None in apl2 manual, none in 
Dyalog manual.

    how can I learn thoses ...  without a manual and/or some examples ?


    On 2016-04-26 23:02, Elias Mårtenson wrote:

        I was reading about the Dyalog "key" operator ⌸. It's certainly a 
useful function, and something that should probably be added to GNU APL, in my opinion.

        As always when thinking about useful additions to GNU APL, I wanted to 
try to do some things that ⌸ can do, without having access to it.

        So, I wanted to simply take a string of characters, and create a list 
of each character and the number of occurrences of each character in that 
string. My solution works, but feels clumsy:

        *       { ⊃{(↑⍵) (↑⍴⍵)}¨(⎕UCS v) ⊂ v←⍵[⍋⍵] } "abcfoobat"*
        ↓'a' 2┃
        ┃'b' 2┃
        ┃'c' 1┃
        ┃'f' 1┃
        ┃'o' 2┃
        ┃'t' 1┃

        Can anyone improve this? In particular, can it be improved to the point 
of convincing me that ⌸ is not needed?


reply via email to

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