Dyalog APL: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
Miraheze>Adám Brudzewsky
m (Text replacement - "</code>" to "</source>")
Miraheze>Marshall
No edit summary
Line 32: Line 32:
* 2014: [[Tacit]] syntax similar to that of [[J]] (<source lang=apl inline>+⌿÷≢</source>)
* 2014: [[Tacit]] syntax similar to that of [[J]] (<source lang=apl inline>+⌿÷≢</source>)
* 2014: Futures and isolates for [[parallel programming|Parallel computing]]
* 2014: Futures and isolates for [[parallel programming|Parallel computing]]
== Primitives ==
=== Functions ===
{|class=wikitable
! Glyph                              !! Monadic              !! Dyadic
|-
| <source lang=apl inline>+</source> || [[Conjugate]]        || [[Plus]]
|-
| <source lang=apl inline>-</source> || [[Negate]]            || [[Minus]]
|-
| <source lang=apl inline>×</source> || [[Signum]]            || [[Times]]
|-
| <source lang=apl inline>÷</source> || [[Reciprocal]]        || [[Divide]]
|-
| <source lang=apl inline>|</source> || [[Magnitude]]        || [[Residue]]
|-
| <source lang=apl inline>⌊</source> || [[Floor]]            || [[Minimum]]
|-
| <source lang=apl inline>⌈</source> || [[Ceiling]]          || [[Maximum]]
|-
| <source lang=apl inline>*</source> || [[Exponential]]      || [[Power function|Power]]
|-
| <source lang=apl inline>⍟</source> || [[Natural Logarithm]] || [[Logarithm]]
|-
| <source lang=apl inline>!</source> || [[Factorial]]        || [[Binomial]]
|-
| <source lang=apl inline>○</source> || [[Pi Times]]          || [[Circle function|Circular]]
|-
| <source lang=apl inline>~</source> || [[Not]]              || [[Without]]
|-
| <source lang=apl inline>?</source> || [[Roll]]              || [[Query]]
|-
| <source lang=apl inline>∧</source> ||                      || [[And]]
|-
| <source lang=apl inline>∨</source> ||                      || [[Or]]
|-
| <source lang=apl inline>⍲</source> ||                      || [[Nand]]
|-
| <source lang=apl inline>⍱</source> ||                      || [[Nor]]
|-
| <source lang=apl inline><</source> ||                      || [[Less]]
|-
| <source lang=apl inline>≤</source> ||                      || [[Less Or Equal]]
|-
| <source lang=apl inline>=</source> ||                      || [[Equal]]
|-
| <source lang=apl inline>≥</source> ||                      || [[Greater Or Equal]]
|-
| <source lang=apl inline>></source> ||                      || [[Greater]]
|-
| <source lang=apl inline>≠</source> || [[Unique Mask]]      || [[Not Equal]]
|-
| <source lang=apl inline>⍴</source> || [[Shape]]            || [[Reshape]]
|-
| <source lang=apl inline>,</source> || [[Ravel]]            || [[Catenate]]
|-
| <source lang=apl inline>⍪</source> || [[Table]]            || [[Catenate First]]
|-
| <source lang=apl inline>⌽</source> || [[Reverse]]          || [[Rotate]]
|-
| <source lang=apl inline>⊖</source> || [[Reverse First]]    || [[Rotate First]]
|-
| <source lang=apl inline>⍉</source> ||colspan=2| [[Transpose]]
|-
| <source lang=apl inline>↑</source> || [[Mix]]/[[Disclose]]  || [[Take]]
|-
| <source lang=apl inline>↓</source> || [[Split]]            || [[Drop]]
|-
| <source lang=apl inline>⊂</source> || [[Enclose]]          || [[Partitioned Enclose]]
|-
| <source lang=apl inline>⊆</source> || [[Nest]]              || [[Partition]]
|-
| <source lang=apl inline>∊</source> || [[Enlist]]/[[Type]]  || [[Membership]]
|-
| <source lang=apl inline>⊃</source> || [[Disclose]]/[[Mix]]  || [[Pick]]
|-
| <source lang=apl inline>/</source> ||                      || [[Replicate]]
|-
| <source lang=apl inline>⌿</source> ||                      || [[Replicate First]]
|-
| <source lang=apl inline>\</source> ||                      || [[Expand]]
|-
| <source lang=apl inline>⍀</source> ||                      || [[Expand First]]
|-
| <source lang=apl inline>∩</source> ||                      || [[Intersection]]
|-
| <source lang=apl inline>∪</source> || [[Unique]]            || [[Union]]
|-
| <source lang=apl inline>⊣</source> || [[Identity|Same]]    || [[Left Identity|Left]]
|-
| <source lang=apl inline>⊢</source> || [[Identity|Same]]    || [[Right Identity|Right]]
|-
| <source lang=apl inline>⍳</source> || [[Index Generator]]  || [[Index Of]]
|-
| <source lang=apl inline>⍸</source> || [[Where]]            || [[Interval Index]]
|-
| <source lang=apl inline>⍒</source> ||colspan=2| [[Grade Down]]
|-
| <source lang=apl inline>⍋</source> ||colspan=2| [[Grade Up]]
|-
| <source lang=apl inline>⍷</source> ||                      || [[Find]]
|-
| <source lang=apl inline>≡</source> || [[Depth]]            || [[Match]]
|-
| <source lang=apl inline>≢</source> || [[Tally]]            || [[Not Match]]
|-
| <source lang=apl inline>⍎</source> ||colspan=2| [[Execute]]
|-
| <source lang=apl inline>⍕</source> ||colspan=2| [[Format]]
|-
| <source lang=apl inline>⊥</source> ||                      || [[Base]]
|-
| <source lang=apl inline>⊤</source> ||                      || [[Represent]]
|-
| <source lang=apl inline>⌹</source> || [[Matrix Inverse]]    || [[Matrix Divide]]
|-
| <source lang=apl inline>⌷</source> || [[Materialise]]      || [[Squad Indexing]]
|}


== External links ==
== External links ==

Revision as of 16:49, 31 October 2019

Dyalog APL was first released by British company Dyadic Systems Ltd. (later Dyalog Ltd.) in 1983 for the Zylog Z80 processor. The name Dyalog is a portmanteau of Dyadic and Zylog. As of 2018, Dyalog APL is available for AIX, Linux (including on the Raspberry Pi), macOS and Microsoft Windows platforms. While mainly based is based on APL2, it adds support for both object-oriented, functional, and tacit programming. Dyalog APL also serves as the inspiration for many hobby implementations of APL.

In 1995, two of the development team — John Scholes and Peter Donnelly — were awarded the Iverson Award for their work on the interpreter. Gitte Christensen and Morten Kromberg were joint recipients of the Iverson Award in 2016.

Dyalog APL is unique among commercial APLs in getting additional primitives and constructs. The most important novel extension to the original APL language include:

  • 1983: Naming derived functions (sum←+⌿)
  • 1990: Namespaces (MyUtils.Fun args)
  • 1995: Keywords (If/Then/Else, Repeat/Until, exception handling, and so on)
  • 1996: Functional programming: dfns provide lexical scope and lambda-style expressions
  • 2006: Object orientated programming, allowing integration with OO frameworks and Microsoft .NET
  • 2014: Tacit syntax similar to that of J (+⌿÷≢)
  • 2014: Futures and isolates for Parallel computing

Primitives

Functions

Glyph Monadic Dyadic
+ Conjugate Plus
- Negate Minus
× Signum Times
÷ Reciprocal Divide
| Magnitude Residue
Floor Minimum
Ceiling Maximum
* Exponential Power
Natural Logarithm Logarithm
! Factorial Binomial
Pi Times Circular
~ Not Without
? Roll Query
And
Or
Nand
Nor
< Less
Less Or Equal
= Equal
Greater Or Equal
> Greater
Unique Mask Not Equal
Shape Reshape
, Ravel Catenate
Table Catenate First
Reverse Rotate
Reverse First Rotate First
Transpose
Mix/Disclose Take
Split Drop
Enclose Partitioned Enclose
Nest Partition
Enlist/Type Membership
Disclose/Mix Pick
/ Replicate
Replicate First
\ Expand
Expand First
Intersection
Unique Union
Same Left
Same Right
Index Generator Index Of
Where Interval Index
Grade Down
Grade Up
Find
Depth Match
Tally Not Match
Execute
Format
Base
Represent
Matrix Inverse Matrix Divide
Materialise Squad Indexing

External links

Template:APL programming language