
Co-Dfns: High-Performance, Reliable, and Parallel APL - setra
https://github.com/arcfide/Co-dfns
======
avhon1
Apart from being opensource, how does this differ from Dyalog APL [1], which
is also currently featured on HN?

[1]
[https://news.ycombinator.com/item?id=12017078](https://news.ycombinator.com/item?id=12017078)

~~~
Avshalom
Well. Not an expert so this is lacking nuance: So Dyalog back some years ago
came up dfns. Traditional Dyalog functions are something like:

    
    
      RV←foo MyFun bar;x;y;z
       ....
       ....
    

where RV is semi-optional the return value; foo and bar are the right and left
arguements; and x y z are all local variables. Any variables declared in the
function body are global. You can't nest functions like this.

Dfns look like

    
    
      MyFun ← {
       ...
      }
    

this comes with four variables automatically ⍺ ⍵ which are the right and left
values and ⍺⍺ ⍵⍵ the right and left functions. you can nest dfns and variables
declared inside are lexically scoped.

Co-Dfns is a compiler (written in Dyalog) which adds parallel primitives into
this existing dialect of Dyalog.

~~~
Athas
I don't think the idea is that Co-Dfns extends the Dyalog APL language.
Rather, it exploits the data-parallelism that is already inherent in most APL
code.

