A+: Difference between revisions
m (→External links) |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 31: | Line 31: | ||
! Glyph !! Dyadic !! Monadic | ! Glyph !! Dyadic !! Monadic | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>+</source> || [[Add]] || [[Conjugate|Identity]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>-</source> || [[Subtract]] || [[Negate]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>×</source> || [[Multiply]] || [[Sign]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>÷</source> || [[Divide]] || [[Reciprocal]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>*</source> || [[Power]] || [[Exponential]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍟</source> || [[Log]] || [[Natural log]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>|</source> || [[Residue]] || [[Absolute value]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⊥</source> || [[Decode]] || Pack | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⊤</source> || [[Encode]] || Unpack | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>?</source> || [[Deal]] || [[Roll]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>○</source> || [[Circle function|Circle]] (sin, cos, ...) || [[Pi times]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⌹</source> || [[Solve]] || [[Matrix Inverse]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⌈</source> || [[Max]] || [[Ceiling]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⌊</source> || [[Min]] || [[Floor]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline><</source> || [[Less than]] || [[Enclose]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>≤</source> || [[Less than or Equal to]] || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>=</source> || [[Equal to]] || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>></source> || [[Greater than]] || [[Disclose]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>≥</source> || [[Greater than or Equal to]] || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>≠</source> || [[Not equal to]] || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍋</source> || [[Bins]] || [[Grade up]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍒</source> || || [[Grade down]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>≡</source> || [[Match]] || [[Depth]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍳</source> || [[Index Of|Find]] || [[Interval]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>∊</source> || [[Member]] || [[Rake]] (like [[Enlist]]) | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>^</source> || [[And]] || Stop | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>∨</source> || [[Or]] or Cast || [[Type]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍕</source> || [[Format]] || [[Default Format]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍎</source> || Execute in Context or Protected Execute || [[Execute]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>%</source> || Value in Context || Value (of a symbol) | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>←</source> || [[Assignment]] or [[Selective Assignment]] || Result (returns from functions) | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⊃</source> || [[Pick]] || [[Raze]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>#</source> || [[Choose]] || [[Count]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>[;]</source> ||colspan=2| [[Bracket Indexing]] (varying number of arguments) | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>↑</source> || [[Take]] || [[Signal]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>↓</source> || [[Drop]] || Print | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⌽</source> || [[Rotate]] || [[Reverse]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍉</source> || [[Dyadic transpose|Transpose Axes]] || [[Transpose]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>!</source> || [[Restructure]] || [[Item Ravel]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⊂</source> || Partition (a little like [[Split]]) || Partition Count | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍴</source> || [[Reshape]] || [[Shape]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⊣</source> || [[Left]] || Null (returns <syntaxhighlight lang=apl inline>()</source>) | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⊢</source> || || [[Right]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>∪</source> || Combine Symbols || Separate Symbols | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>,</source> || [[Catenate]] || [[Ravel]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>~</source> || [[Laminate]] || [[Not]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>/</source> || [[Replicate]] || [[Reduce]] (+ × ⌈ ⌊ ∧ ∨) | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>\</source> || [[Expand]] || [[Scan]] (+ × ⌈ ⌊ ∧ ∨) | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>.</source> || [[Inner Product]] (+.× ⌈.+ ⌊.+) || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>∘.</source> || [[Outer Product]] (+ - × ÷ | ⌈ ⌊ < ≤ = ≥ > ≠) || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>@</source> || [[Rank operator|Rank]] || | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>¨</source> || || [[Each]] or Apply | ||
|- | |- | ||
| < | | <syntaxhighlight lang=apl inline>⍨</source> || || Bitwise | ||
|} | |} | ||
Revision as of 21:10, 10 September 2022
- This page is about the Morgan Stanley dialect. For the project based on APL 90 (dialect) and presented at APL90, which replaced functions with first-class blocks, see A+ (Girardot).
A+ is an extension of the A language. A was created in 1985 by Arthur Whitney, then of Morgan Stanley. At the time, various departments had a significant investment in APL applications and talent, APL being a language well-suited to the manipulation of large arrays of numbers. As technology was moving from the mainframe to distributed systems, there was a search for a suitable APL implementation to run on SunOS, the distributed platform of the period, and this prompted Whitney to create A as a statically typed dialect of APL with various novelties like symbols as a simple scalar type and the Rank operator.
Over the course of the next few years, various extensions were made to the language, culminating in A+ in 1988, with "+" referring to the graphical user interface. While an A+ development group was formally in 1992, presented the very first version of K that very same year, and by 1994, K became the official successor of A+. In 2001, the source code was made public, and various volunteers took over development until 2008. From then until 2014 it was maintained by Robert Lefkowitz.
Primitives
Glyph | Dyadic | Monadic |
---|---|---|
<syntaxhighlight lang=apl inline>+</source> | Add | Identity |
<syntaxhighlight lang=apl inline>-</source> | Subtract | Negate |
<syntaxhighlight lang=apl inline>×</source> | Multiply | Sign |
<syntaxhighlight lang=apl inline>÷</source> | Divide | Reciprocal |
<syntaxhighlight lang=apl inline>*</source> | Power | Exponential |
<syntaxhighlight lang=apl inline>⍟</source> | Log | Natural log |
</source> | Residue | Absolute value |
<syntaxhighlight lang=apl inline>⊥</source> | Decode | Pack |
<syntaxhighlight lang=apl inline>⊤</source> | Encode | Unpack |
<syntaxhighlight lang=apl inline>?</source> | Deal | Roll |
<syntaxhighlight lang=apl inline>○</source> | Circle (sin, cos, ...) | Pi times |
<syntaxhighlight lang=apl inline>⌹</source> | Solve | Matrix Inverse |
<syntaxhighlight lang=apl inline>⌈</source> | Max | Ceiling |
<syntaxhighlight lang=apl inline>⌊</source> | Min | Floor |
<syntaxhighlight lang=apl inline><</source> | Less than | Enclose |
<syntaxhighlight lang=apl inline>≤</source> | Less than or Equal to | |
<syntaxhighlight lang=apl inline>=</source> | Equal to | |
<syntaxhighlight lang=apl inline>></source> | Greater than | Disclose |
<syntaxhighlight lang=apl inline>≥</source> | Greater than or Equal to | |
<syntaxhighlight lang=apl inline>≠</source> | Not equal to | |
<syntaxhighlight lang=apl inline>⍋</source> | Bins | Grade up |
<syntaxhighlight lang=apl inline>⍒</source> | Grade down | |
<syntaxhighlight lang=apl inline>≡</source> | Match | Depth |
<syntaxhighlight lang=apl inline>⍳</source> | Find | Interval |
<syntaxhighlight lang=apl inline>∊</source> | Member | Rake (like Enlist) |
<syntaxhighlight lang=apl inline>^</source> | And | Stop |
<syntaxhighlight lang=apl inline>∨</source> | Or or Cast | Type |
<syntaxhighlight lang=apl inline>⍕</source> | Format | Default Format |
<syntaxhighlight lang=apl inline>⍎</source> | Execute in Context or Protected Execute | Execute |
<syntaxhighlight lang=apl inline>%</source> | Value in Context | Value (of a symbol) |
<syntaxhighlight lang=apl inline>←</source> | Assignment or Selective Assignment | Result (returns from functions) |
<syntaxhighlight lang=apl inline>⊃</source> | Pick | Raze |
<syntaxhighlight lang=apl inline>#</source> | Choose | Count |
<syntaxhighlight lang=apl inline>[;]</source> | Bracket Indexing (varying number of arguments) | |
<syntaxhighlight lang=apl inline>↑</source> | Take | Signal |
<syntaxhighlight lang=apl inline>↓</source> | Drop | |
<syntaxhighlight lang=apl inline>⌽</source> | Rotate | Reverse |
<syntaxhighlight lang=apl inline>⍉</source> | Transpose Axes | Transpose |
<syntaxhighlight lang=apl inline>!</source> | Restructure | Item Ravel |
<syntaxhighlight lang=apl inline>⊂</source> | Partition (a little like Split) | Partition Count |
<syntaxhighlight lang=apl inline>⍴</source> | Reshape | Shape |
<syntaxhighlight lang=apl inline>⊣</source> | Left | Null (returns <syntaxhighlight lang=apl inline>()</source>) |
<syntaxhighlight lang=apl inline>⊢</source> | Right | |
<syntaxhighlight lang=apl inline>∪</source> | Combine Symbols | Separate Symbols |
<syntaxhighlight lang=apl inline>,</source> | Catenate | Ravel |
<syntaxhighlight lang=apl inline>~</source> | Laminate | Not |
<syntaxhighlight lang=apl inline>/</source> | Replicate | Reduce (+ × ⌈ ⌊ ∧ ∨) |
<syntaxhighlight lang=apl inline>\</source> | Expand | Scan (+ × ⌈ ⌊ ∧ ∨) |
<syntaxhighlight lang=apl inline>.</source> | Inner Product (+.× ⌈.+ ⌊.+) | |
<syntaxhighlight lang=apl inline>∘.</source> | Outer Product (+ - × ÷ | ⌈ ⌊ < ≤ = ≥ > ≠) | |
<syntaxhighlight lang=apl inline>@</source> | Rank | |
<syntaxhighlight lang=apl inline>¨</source> | Each or Apply | |
<syntaxhighlight lang=apl inline>⍨</source> | Bitwise |
External links
APL dialects [edit] | |
---|---|
Maintained | APL+Win ∙ APL2 ∙ APL64 ∙ APL\iv ∙ Aplette ∙ April ∙ Co-dfns ∙ Dyalog APL ∙ Dyalog APL Vision ∙ dzaima/APL ∙ GNU APL ∙ Kap ∙ NARS2000 ∙ Pometo ∙ TinyAPL |
Historical | A Programming Language ∙ A+ (A) ∙ APL# ∙ APL2C ∙ APL\360 ∙ APL/700 ∙ APL\1130 ∙ APL\3000 ∙ APL.68000 ∙ APL*PLUS ∙ APL.jl ∙ APL.SV ∙ APLX ∙ Extended Dyalog APL ∙ Iverson notation ∙ IVSYS/7090 ∙ NARS ∙ ngn/apl ∙ openAPL ∙ Operators and Functions ∙ PAT ∙ Rowan ∙ SAX ∙ SHARP APL ∙ Rationalized APL ∙ VisualAPL (APLNext) ∙ VS APL ∙ York APL |
Derivatives | AHPL ∙ BQN ∙ CoSy ∙ ELI ∙ Glee ∙ I ∙ Ivy ∙ J ∙ Jelly ∙ K (Goal, Klong, Q) ∙ KamilaLisp ∙ Lang5 ∙ Lil ∙ Nial ∙ RAD ∙ Uiua |
Overviews | Comparison of APL dialects ∙ Timeline of array languages ∙ Timeline of influential array languages ∙ Family tree of array languages |