Mnemonics: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
Tags: Mobile edit Mobile web edit
 
(12 intermediate revisions by 3 users not shown)
Line 5: Line 5:
Many glyphs have meaning [[Comparison_with_traditional_mathematics#Identical|identical to their mathematical counterparts]].
Many glyphs have meaning [[Comparison_with_traditional_mathematics#Identical|identical to their mathematical counterparts]].


<source lang=apl inline>⋄</source> (Diamond) separates statements. That is, no functions or operators can break through <source lang=apl inline>⋄</source>, just as diamonds are virtually indestructible.
<syntaxhighlight lang=apl inline>⋄</syntaxhighlight> (Diamond) separates statements. That is, no functions or operators can break through <syntaxhighlight lang=apl inline>⋄</syntaxhighlight>, just as diamonds are virtually indestructible.


<source lang=apl inline>⌺</source> looks like a <source lang=apl inline>⋄</source>-shaped [[Stencil]] laid on a piece of paper, <source lang=apl inline>⎕</source>.
<syntaxhighlight lang=apl inline>⌺</syntaxhighlight> looks like a <syntaxhighlight lang=apl inline>⋄</syntaxhighlight>-shaped [[Stencil]] laid on a piece of paper, <syntaxhighlight lang=apl inline>⎕</syntaxhighlight>.


<source lang=apl inline>!</source> is [[Binomial]] in addition to [[Factorial]], as the two are closely related.
<syntaxhighlight lang=apl inline>!</syntaxhighlight> is [[Binomial]] in addition to [[Factorial]], as the two are closely related.


[[File:I beam HEB 100.png|thumb|[[I-beam]] <source lang=apl inline>⌶</source> does look like an [[wikipedia:I-beam|I-beam]]]]
[[File:I beam HEB 100.png|thumb|[[I-beam]] <syntaxhighlight lang=apl inline>⌶</syntaxhighlight> does look like an [[wikipedia:I-beam|I-beam]]]]
<source lang=apl inline>⌶</source> ([[I-beam]]) calls system services. APL was originally developed at [[IBM]], so system services were also IBM services. <source lang=apl inline>⌶</source> is an [[wikipedia:I-beam|I-beam]] and ''I-beam'' is pronounced almost identically to ''IBM''.
<syntaxhighlight lang=apl inline>⌶</syntaxhighlight> ([[I-beam]]) calls system services. APL was originally developed at [[IBM]], so system services were also IBM services. <syntaxhighlight lang=apl inline>⌶</syntaxhighlight> is an [[wikipedia:I-beam|I-beam]] and ''I-beam'' is pronounced almost identically to ''IBM''.


<source lang=apl inline>@</source> applies a function or substitutes elements ''[[at]]'' specific locations.
<syntaxhighlight lang=apl inline>@</syntaxhighlight> applies a function or substitutes elements ''[[at]]'' specific locations.


[[File:Bristol Type 223 top-view silhouette.png|thumb|The [[Grade]] glyphs <source lang=apl inline>⍋</source> and <source lang=apl inline>⍒</source> look like [[wikipedia:supersonic transport|supersonic transport]]s.]]
[[File:Bristol Type 223 top-view silhouette.png|thumb|The [[Grade]] glyphs <syntaxhighlight lang=apl inline>⍋</syntaxhighlight> and <syntaxhighlight lang=apl inline>⍒</syntaxhighlight> look like [[wikipedia:supersonic transport|supersonic transport]]s.]]
<source lang=apl inline>⍋</source> and <source lang=apl inline>⍒</source> give the indices ([[grade]]s) needed to sort ascending and descending respectively, and look like an ascending and descending supersonic transport, respectively.
<syntaxhighlight lang=apl inline>⍋</syntaxhighlight> and <syntaxhighlight lang=apl inline>⍒</syntaxhighlight> give the indices ([[grade]]s) needed to sort ascending and descending respectively, and look like an ascending and descending supersonic transport, respectively.


<source lang=apl inline>⌽</source>, <source lang=apl inline>⊖</source>, and <source lang=apl inline>⍉</source> [[reverse]] or [[transpose]] an array over a given [[axis]]. The <source lang=apl inline>○</source> part of the glyphs symbolise the array, while the line component (<source lang=apl inline>|</source>, <source lang=apl inline>\</source>, or <source lang=apl inline>-</source>) indicates the line across which the reversal/transposal is done.
<syntaxhighlight lang=apl inline>⌽</syntaxhighlight>, <syntaxhighlight lang=apl inline>⊖</syntaxhighlight>, and <syntaxhighlight lang=apl inline>⍉</syntaxhighlight> [[reverse]] or [[transpose]] an array over a given [[axis]]. The <syntaxhighlight lang=apl inline>○</syntaxhighlight> part of the glyphs symbolise the array, while the line component (<syntaxhighlight lang=apl inline>|</syntaxhighlight>, <syntaxhighlight lang=apl inline>\</syntaxhighlight>, or <syntaxhighlight lang=apl inline>-</syntaxhighlight>) indicates the line across which the reversal/transposal is done.


[[File:TreeLog.jpg|thumb|The [[Log]] glyph <source lang=apl inline>⍟</source> looks like a tree log.]]
[[File:TreeLog.jpg|thumb|The [[Log]] glyph <syntaxhighlight lang=apl inline>⍟</syntaxhighlight> looks like a tree log.]]
<source lang=apl inline>⍟</source> looks like the cross-section of a tree [[log]]
<syntaxhighlight lang=apl inline>⍟</syntaxhighlight> looks like the cross-section of a tree [[log]]


<source lang=apl inline>⍱</source> and <source lang=apl inline>⍲</source> ([[Nor]] and [[Nand]]) have the [[Not]] glyph <source lang=apl inline>~</source> on top of or overlaid on the [[Or]] glyph <source lang=apl inline>∨</source> and [[And]] glyph <source lang=apl inline>∧</source> respectively.
<syntaxhighlight lang=apl inline>⍱</syntaxhighlight> and <syntaxhighlight lang=apl inline>⍲</syntaxhighlight> ([[Nor]] and [[Nand]]) have the [[Not]] glyph <syntaxhighlight lang=apl inline>~</syntaxhighlight> on top of or overlaid on the [[Or]] glyph <syntaxhighlight lang=apl inline>∨</syntaxhighlight> and [[And]] glyph <syntaxhighlight lang=apl inline>∧</syntaxhighlight> respectively.


<source lang=apl inline>×</source> can be seen as an <math>x</math> when monadic, indicating the unknown [[sign]] to be determined.
<syntaxhighlight lang=apl inline>×</syntaxhighlight> can be seen as an <math>x</math> when monadic, indicating the unknown [[sign]] to be determined.


<source lang=apl inline>+</source> negates the imaginary part (that is, it [[conjugate]]s) by analogy to monadic <source lang=apl inline>-</source> which negates both the real and the imaginary parts.
<syntaxhighlight lang=apl inline>+</syntaxhighlight> negates the imaginary part (that is, it [[conjugate]]s) by analogy to monadic <syntaxhighlight lang=apl inline>-</syntaxhighlight> which negates both the real and the imaginary parts.


<source lang=apl inline>÷</source> takes a default left argument of <source lang=apl inline>1</source> (thus computing the [[reciprocal]]), that being the [[identity element]] of [[division]].
<syntaxhighlight lang=apl inline>÷</syntaxhighlight> takes a default left argument of <syntaxhighlight lang=apl inline>1</syntaxhighlight> (thus computing the [[reciprocal]]), that being the [[identity element]] of [[division]].


<source lang=apl inline>⌹</source> is [[matrix divide]] with a <source lang=apl inline>⎕</source> symbolising a matrix and an inscribed <source lang=apl inline>÷</source> for "divide".
<syntaxhighlight lang=apl inline>⌹</syntaxhighlight> is [[matrix divide]] with a <syntaxhighlight lang=apl inline>⎕</syntaxhighlight> symbolising a matrix and an inscribed <syntaxhighlight lang=apl inline>÷</syntaxhighlight> for "divide".


<source lang=apl inline>?</source> symbolises the unknown, and thus [[roll]]s dice and [[deal]]s cards randomly.
<syntaxhighlight lang=apl inline>?</syntaxhighlight> symbolises the unknown, and thus [[roll]]s dice and [[deal]]s cards randomly.


<source lang=apl inline>⍺</source> and <source lang=apl inline>⍵</source> are the leftmost and rightmost letters of the [[wikipedia:Greek alphabet|Greek alphabet]]. They therefore denote the left and right arguments of [[dfn]]s, respectively.
<syntaxhighlight lang=apl inline>⍺</syntaxhighlight> and <syntaxhighlight lang=apl inline>⍵</syntaxhighlight> are the leftmost and rightmost letters of the [[wikipedia:Greek alphabet|Greek alphabet]]. They therefore denote the left and right arguments of [[dfn]]s, respectively.


<source lang=apl inline>∊</source> is the Greek letter [[Epsilon]] which corresponds to the letter ''E'' for [[Enlist]] and [[Element of]].
<syntaxhighlight lang=apl inline>∊</syntaxhighlight> is the Greek letter [[Epsilon]] which corresponds to the letter ''E'' for [[Enlist]] and [[Element of]].


<source lang=apl inline>⍴</source> is the Greek letter [[Rho]] which corresponds to the letter ''R'' for [[Reshape]].
<syntaxhighlight lang=apl inline>⍴</syntaxhighlight> is the Greek letter [[Rho]] which corresponds to the letter ''R'' for [[Reshape]].


<source lang=apl inline>~</source> is [[Not]] when monadic, but its dyadic form, [[Without]], can also be remembered as ''but not''.
<syntaxhighlight lang=apl inline>~</syntaxhighlight> is [[Not]] when monadic, but its dyadic form, [[Without]], can also be remembered as ''but not''.


<source lang=apl inline>⍨</source> is a monadic operator that looks like a face. When its derived function is applied monadically, it can be called ''[[self]]ie'', in that it applies the operand function to the argument with the argument itself as left argument too.
<syntaxhighlight lang=apl inline>⍨</syntaxhighlight> is a monadic operator that looks like a face. When its derived function is applied monadically, it can be called ''[[self]]ie'', in that it applies the operand function to the argument with the argument itself as left argument too.


<source lang=apl inline>↑</source> and <source lang=apl inline>↓</source> ([[Mix]] and [[Split]]) increase and decrease rank (if possible) when used monadically.
<syntaxhighlight lang=apl inline>↑</syntaxhighlight> and <syntaxhighlight lang=apl inline>↓</syntaxhighlight> ([[Mix]] and [[Split]]) increase and decrease rank (if possible) when used monadically.


<source lang=apl inline>↓</source> [[drop]]s elements, and so it points down, the direction in which things are dropped. Take uses <source lang=apl inline>↑</source> by analogy.
<syntaxhighlight lang=apl inline>↓</syntaxhighlight> [[drop]]s elements, and so it points down, the direction in which things are dropped. Take uses <syntaxhighlight lang=apl inline>↑</syntaxhighlight> by analogy.


<source lang=apl inline>⍳</source> is the Greek letter [[Iota]] which corresponds to the letter ''I'' for [[Index generator]] and [[Index of]].
<syntaxhighlight lang=apl inline>⍳</syntaxhighlight> is the Greek letter [[Iota]] which corresponds to the letter ''I'' for [[Index generator]] and [[Index of]].


<source lang=apl inline>⍸</source> is also the Greek letter [[Iota]] which corresponds to the letter ''I'' for [[Indices]] and [[Interval Index]].
<syntaxhighlight lang=apl inline>⍸</syntaxhighlight> is also the Greek letter [[Iota]] which corresponds to the letter ''I'' for [[Indices]] and [[Interval Index]].


<source lang=apl inline>○</source> is a circle for [[Circular]] functions and the ratio between the circumference and the diameter of a circle, [[Pi times|Pi]].
<syntaxhighlight lang=apl inline>○</syntaxhighlight> is a circle for [[Circular]] functions and the ratio between the circumference and the diameter of a circle, [[Pi times|Pi]].


<source lang=apl inline>⍥</source> and <source lang=apl inline>⍤</source> ([[Over]] and [[Atop]]) both apply the left operand after the right operand. However, <source lang=apl inline>⍥</source> has a larger "circle of influence" in that it applies its right operand twice (once on each argument) while <source lang=apl inline>⍤</source> only applies it once (between the arguments).
<syntaxhighlight lang=apl inline>⍥</syntaxhighlight> and <syntaxhighlight lang=apl inline>⍤</syntaxhighlight> ([[Over]] and [[Atop]]) both apply the left operand after the right operand. However, <syntaxhighlight lang=apl inline>⍥</syntaxhighlight> has a larger "circle of influence" in that it applies its right operand twice (once on each argument) while <syntaxhighlight lang=apl inline>⍤</syntaxhighlight> only applies it once (between the arguments).


<source lang=apl inline>*</source> and <source lang=apl inline>⍣</source> repeatedly apply multiplication and a function, respectively. The star symbolises [[power (function)]]/[[power (operator)]].
<syntaxhighlight lang=apl inline>*</syntaxhighlight> and <syntaxhighlight lang=apl inline>⍣</syntaxhighlight> repeatedly apply multiplication and a function, respectively. The star symbolises [[power (function)]]/[[power (operator)]].


<source lang=apl inline>←</source> [[assign]]s by putting the value on its right into the name on its left.
<syntaxhighlight lang=apl inline>←</syntaxhighlight> [[assign]]s by putting the value on its right into the name on its left.


<source lang=apl inline>→</source> points at the destination it is [[branch]]ing to.
<syntaxhighlight lang=apl inline>→</syntaxhighlight> points at the destination it is [[branch]]ing to.


<source lang=apl inline>⍬</source> ([[Zilde]]) is a combination of <source lang=apl inline>~</source> for [[Without]] and <source lang=apl inline>0</source> indicating numbers. Indeed, it is the "vector without numbers", equivalent to <source lang=apl inline>0~0</source>.
<syntaxhighlight lang=apl inline>⍬</syntaxhighlight> ([[Zilde]]) is a combination of <syntaxhighlight lang=apl inline>~</syntaxhighlight> for [[Without]] and <syntaxhighlight lang=apl inline>0</syntaxhighlight> indicating numbers. Indeed, it is the "vector without numbers", equivalent to <syntaxhighlight lang=apl inline>0~0</syntaxhighlight>.


<source lang=apl inline>⊣</source> and <source lang=apl inline>⊢</source> point a finger towards the [[left]] and [[right]], which are exactly the argument they, respectively, return.
<syntaxhighlight lang=apl inline>⊣</syntaxhighlight> and <syntaxhighlight lang=apl inline>⊢</syntaxhighlight> point a finger towards the [[left]] and [[right]], which are exactly the argument they, respectively, return.


[[File:Computer console.jpg|thumb|The [[Quad]] glyph <source lang=apl inline>⎕</source> looks like a console.]]
[[File:Computer console.jpg|thumb|The [[Quad]] glyph <syntaxhighlight lang=apl inline>⎕</syntaxhighlight> looks like a console.]]
<source lang=apl inline>⎕</source> is the prefix for all [[system name]]s, and also also manages input from the console as well as output to the console. For that, it is a stylised console. <source lang=apl inline>⍞</source> looks like a <source lang=apl inline>⎕</source> with a quote <source lang=apl inline>'</source> indicating [[string]] input and message output.
<syntaxhighlight lang=apl inline>⎕</syntaxhighlight> is the prefix for all [[system name]]s, and also manages input from the console as well as output to the console. For that, it is a stylised console. <syntaxhighlight lang=apl inline>⍞</syntaxhighlight> looks like a <syntaxhighlight lang=apl inline>⎕</syntaxhighlight> with a quote <syntaxhighlight lang=apl inline>'</syntaxhighlight> indicating [[string]] input and message output.


<source lang=apl inline>⌈</source> and <source lang=apl inline>⌊</source> are pictograms of a wall with a piece of [[ceiling]] and [[floor]], respectively.
<syntaxhighlight lang=apl inline>⌈</syntaxhighlight> and <syntaxhighlight lang=apl inline>⌊</syntaxhighlight> are pictograms of a wall with a piece of [[ceiling]] and [[floor]], respectively.


<source lang=apl inline>⌈</source> and <source lang=apl inline>⌊</source> can also be seen as indicators on a vertical number line, pointing at the [[maximum]] and [[minimum]], respectively.
<syntaxhighlight lang=apl inline>⌈</syntaxhighlight> and <syntaxhighlight lang=apl inline>⌊</syntaxhighlight> can also be seen as indicators on a vertical number line, pointing at the [[maximum]] and [[minimum]], respectively.


<source lang=apl inline>∇</source> is an upside-down Greek [[Delta]], which corresponds to the letter ''D'' for [[Defined function]] or (own) definition (for recursion).
<syntaxhighlight lang=apl inline>∇</syntaxhighlight> is an upside-down Greek [[Delta]], which corresponds to the letter ''D'' for [[Defined function]] or (own) definition (for recursion).


<source lang=apl inline>⌸</source> ([[Key]]) applies a function for each collection of all elements that are [[equal]] (<source lang=apl inline>⌸</source>).
<syntaxhighlight lang=apl inline>⌸</syntaxhighlight> ([[Key]]) applies a function for each collection of all elements that are [[equal]] (<syntaxhighlight lang=apl inline>⌸</syntaxhighlight>).


<source lang=apl inline>≡</source> can be see as a stack of layers. When used monadically, it finds the [[depth]] of an array.
<syntaxhighlight lang=apl inline>≡</syntaxhighlight> can be see as a stack of layers. When used monadically, it finds the [[depth]] of an array.


<source lang=apl inline>≢</source> looks like a [[tally]] mark. It being sideways can be justified by it counting the length of the leading axis; the vertical axis of a matrix.
<syntaxhighlight lang=apl inline>≢</syntaxhighlight> looks like a [[tally]] mark. It being sideways can be justified by it counting the length of the leading axis; the vertical axis of a matrix.


<source lang=apl inline>⊂</source> [[enclose]]s its argument in a layer of nesting, and [[Disclose]] uses <source lang=apl inline>⊃</source> by analogy. <source lang=apl inline>⊆</source> is exactly like <source lang=apl inline>⊂</source> except that it only does a [[conditional enclose]], namely only if the argument is [[simple]].
<syntaxhighlight lang=apl inline>⊂</syntaxhighlight> [[enclose]]s its argument in a layer of nesting, and [[Disclose]] uses <syntaxhighlight lang=apl inline>⊃</syntaxhighlight> by analogy. <syntaxhighlight lang=apl inline>⊆</syntaxhighlight> is exactly like <syntaxhighlight lang=apl inline>⊂</syntaxhighlight> except that it only does a [[conditional enclose]], namely only if the argument is [[simple]].


<source lang=apl inline>⊂</source> and <source lang=apl inline>⊆</source> enclose at specific locations, per a specification, so their dyadic forms are [[Partitioned enclose]] and [[Partition]], respectively.
<syntaxhighlight lang=apl inline>⊂</syntaxhighlight> and <syntaxhighlight lang=apl inline>⊆</syntaxhighlight> enclose at specific locations, per a specification, so their dyadic forms are [[Partitioned enclose]] and [[Partition]], respectively.


<source lang=apl inline>∪</source> is a styled letter ''U'' for [[Unique]] or [[Union]] if used dyadically.
<syntaxhighlight lang=apl inline>∪</syntaxhighlight> is a styled letter ''U'' for [[Unique]] or [[Union]] if used dyadically.


<source lang=apl inline>⊥</source> looks like the [[base]] of a pillar. [[Antibase]] uses <source lang=apl inline>⊤</source> by analogy.
<syntaxhighlight lang=apl inline>⊥</syntaxhighlight> looks like the [[base]] of a pillar, converting from that base. [[Antibase]] uses <syntaxhighlight lang=apl inline>⊤</syntaxhighlight> by analogy, and looks a styled letter ''T'' for "To base". <syntaxhighlight lang=apl inline>⊤</syntaxhighlight> and <syntaxhighlight lang=apl inline>⊥</syntaxhighlight> are also respectively known as [[Encode]] and [[Decode]]. To remember which is which, <syntaxhighlight lang=apl inline>⊤</syntaxhighlight> looks like a styled letter ''T'', so think "Ten-code".


[[File:Lamp bulb.png|thumb|The [[Lamp]] glyph <source lang=apl inline>⍝</source> looks like a a lamp bulb filament.]]
[[File:Lamp bulb.png|thumb|The [[Lamp]] glyph <syntaxhighlight lang=apl inline>⍝</syntaxhighlight> looks like a a lamp bulb filament.]]
<source lang=apl inline>⍝</source> looks like a [[wikipedia:filament lamp|filament lamp]] and provides enlightenment by indicating [[comment]]s.
<syntaxhighlight lang=apl inline>⍝</syntaxhighlight> looks like a [[wikipedia:filament lamp|filament lamp]] and provides enlightenment by indicating [[comment]]s.


<source lang=apl inline>,</source> [[concatenate]]s arrays, much like the common punctuation symbol concatenates phrases. <source lang=apl inline>⍪</source> has an added styled row, indicating that for matrices, it concatenates additional rows.
<syntaxhighlight lang=apl inline>,</syntaxhighlight> [[concatenate]]s arrays, much like the common punctuation symbol concatenates phrases. <syntaxhighlight lang=apl inline>⍪</syntaxhighlight> has an added styled row, indicating that for matrices, it concatenates additional rows.


<source lang=apl inline>.</source> is just a low dot, but performs the same operation (though generalised) as [[traditional mathematics]]' [[wikipedia:dot product|dot product]].
<syntaxhighlight lang=apl inline>.</syntaxhighlight> is just a low dot, but performs the same operation (though generalised) as [[traditional mathematics]]' [[wikipedia:dot product|dot product]].


<source lang=apl inline>/</source> and <source lang=apl inline>⌿</source> are also called "by" which can be remembered as reduce by.
<syntaxhighlight lang=apl inline>/</syntaxhighlight> and <syntaxhighlight lang=apl inline>⌿</syntaxhighlight> are also called "by" which can be remembered as reduce by.


== Pairing glyphs/functionality with their keyboard locations ==
== Pairing glyphs/functionality with their keyboard locations ==
:''This list is incomplete; you can help by [{{fullurl:{{FULLPAGENAME}}|action=edit&section=2}} expanding it].''
The following mnemonics are for [[Dyalog APL]]'s US English keyboard layout, but can easily be adapted to similar layouts.
Below is a US English APL keyboard layout (from [[Dyalog APL]]), annotated with short mnemonics. Some of the mnemonics are then fully explained.
=== Number row keys ===
<syntaxhighlight lang=apl inline>⋄</syntaxhighlight> begins new APL expressions just like <kbd>`</kbd> button begins the main section of the keyboard. <syntaxhighlight lang=apl inline>⌺</syntaxhighlight> is a modified version of <syntaxhighlight lang=apl inline>⌺</syntaxhighlight>, so it is <kbd>Shift</kbd>+<syntaxhighlight lang=apl inline>⋄</syntaxhighlight>.


<syntaxhighlight lang=apl inline>¨</syntaxhighlight> applies a function to each 1 of the argument elements, so it is on <kbd>APL</kbd>+<kbd>1</kbd>. <syntaxhighlight lang=apl inline>⌶</syntaxhighlight> looks like a [[wikipedia:Roman numerals|Roman numeral]] 1, so it also lives on the <kbd>1</kbd>, albeit in the shifted position.
<syntaxhighlight lang=apl inline>¯</syntaxhighlight>, <syntaxhighlight lang=apl inline><</syntaxhighlight>, <syntaxhighlight lang=apl inline>≤</syntaxhighlight>, <syntaxhighlight lang=apl inline>=</syntaxhighlight>, <syntaxhighlight lang=apl inline>≥</syntaxhighlight>, <syntaxhighlight lang=apl inline>></syntaxhighlight>, and <syntaxhighlight lang=apl inline>≠</syntaxhighlight> form a block. The number line 1–9 (because 0 on the far right) is split into two [[equal]] halves by <kbd>5</kbd> so that gives <syntaxhighlight lang=apl inline>=</syntaxhighlight>. <kbd>4</kbd> and <kbd>6</kbd> are slightly less and more, respectively, so they give <syntaxhighlight lang=apl inline>≤</syntaxhighlight> and <syntaxhighlight lang=apl inline>≥</syntaxhighlight>. <kbd>3</kbd> and <kbd>7</kbd> are much less and more, respectively, so they give <syntaxhighlight lang=apl inline><</syntaxhighlight> and <syntaxhighlight lang=apl inline>></syntaxhighlight>. Finally, <kbd>2</kbd> is so much less that it is negative, giving the negative sign <syntaxhighlight lang=apl inline>¯</syntaxhighlight>, and <kbd>8</kbd> is so much greater that it is completely [[not equal|unequal]], <syntaxhighlight lang=apl inline>≠</syntaxhighlight>.
<syntaxhighlight lang=apl inline>⍒</syntaxhighlight> and <syntaxhighlight lang=apl inline>⍋</syntaxhighlight> are located on <kbd>#</kbd> (read "pound", <kbd>£</kbd> on British keyboards). <syntaxhighlight lang=apl inline>⍒</syntaxhighlight> pointing down is on the lower of the two numbers 3 and 4. This can be remembered as the pound going down due to [[wikipedia:Brexit|Brexit]].
<syntaxhighlight lang=apl inline>⌽</syntaxhighlight> mirrors an array over its vertical centre, so it is placed on the centre of the 1–9 number line. <syntaxhighlight lang=apl inline>⍉</syntaxhighlight> is slightly off centre, while <syntaxhighlight lang=apl inline>⊖</syntaxhighlight> has completely fallen over.
<syntaxhighlight lang=apl inline>∨</syntaxhighlight> and <syntaxhighlight lang=apl inline>∧</syntaxhighlight> are on the largest (<kbd>9</kbd>) and smallest (<kbd>0</kbd>) digits, respectively, as <syntaxhighlight lang=apl inline>∨</syntaxhighlight> is inclusive (any argument being true gives true) while <syntaxhighlight lang=apl inline>∧</syntaxhighlight> is exclusive (any false gives false). Their negated versions <syntaxhighlight lang=apl inline>⍱</syntaxhighlight> and <syntaxhighlight lang=apl inline>⍲</syntaxhighlight> are on the shifted positions.
<syntaxhighlight lang=apl inline>×</syntaxhighlight> is adjacent to <syntaxhighlight lang=apl inline>∧</syntaxhighlight> for which it is equivalent on [[Boolean]] arguments. <syntaxhighlight lang=apl inline>!</syntaxhighlight> is above it, being <syntaxhighlight lang=apl inline>×/⍳</syntaxhighlight>. <syntaxhighlight lang=apl inline>÷</syntaxhighlight> is adjacent to its inverse, <syntaxhighlight lang=apl inline>×</syntaxhighlight>. And <syntaxhighlight lang=apl inline>⌹</syntaxhighlight> is in the shifted position, being the [[matrix]] equivalent of <syntaxhighlight lang=apl inline>÷</syntaxhighlight>.
=== Top row keys ===
<syntaxhighlight lang=apl inline>?</syntaxhighlight> is on <kbd>q</kbd> for '''''q'''uestion''.
<syntaxhighlight lang=apl inline>⍵</syntaxhighlight>, <syntaxhighlight lang=apl inline>∊</syntaxhighlight>, and <syntaxhighlight lang=apl inline>⍳</syntaxhighlight> look similar to <kbd>w</kbd>, <kbd>e</kbd>, and <kbd>i</kbd>. <syntaxhighlight lang=apl inline>⍷</syntaxhighlight> and <syntaxhighlight lang=apl inline>⍸</syntaxhighlight> are the shifted variants of <syntaxhighlight lang=apl inline>∊</syntaxhighlight> and <syntaxhighlight lang=apl inline>⍳</syntaxhighlight>. The Greek letters <syntaxhighlight lang=apl inline>∊</syntaxhighlight>, and <syntaxhighlight lang=apl inline>⍳</syntaxhighlight> are also equivalent to the Latin ''e'', and ''i''.
<syntaxhighlight lang=apl inline>⍴</syntaxhighlight> is the Greek equivalent of ''r''.
<syntaxhighlight lang=apl inline>~</syntaxhighlight> is on <kbd>t</kbd> for its name '''''t'''ilde'', and its variant with diaeresis, <syntaxhighlight lang=apl inline>⍨</syntaxhighlight>, is on the shifted position.
<syntaxhighlight lang=apl inline>↑</syntaxhighlight> is on <kbd>y</kbd> for '''''y'''ank'' (=take), and <syntaxhighlight lang=apl inline>↓</syntaxhighlight> is on the adjacent <kbd>u</kbd> for '''''drop''' down '''u'''nder''.
<syntaxhighlight lang=apl inline>○</syntaxhighlight> is on <kbd>o</kbd> due to the similar looks, and <syntaxhighlight lang=apl inline>⍥</syntaxhighlight> is the shifted variant. <syntaxhighlight lang=apl inline>⍥</syntaxhighlight> is also on <kbd>O</kbd> for '''''O'''ver''.
<syntaxhighlight lang=apl inline>*</syntaxhighlight> is on <kbd>p</kbd> for '''''p'''ower'', and <syntaxhighlight lang=apl inline>⍣</syntaxhighlight> is the shifted variant.
<syntaxhighlight lang=apl inline>←</syntaxhighlight>  and <syntaxhighlight lang=apl inline>→</syntaxhighlight> match the directionality of <kbd>[</kbd> and <kbd>]</kbd>. <syntaxhighlight lang=apl inline>⍞</syntaxhighlight> is usually immediately assigned to/from using <syntaxhighlight lang=apl inline>←</syntaxhighlight>, so they share key. <syntaxhighlight lang=apl inline>⍬</syntaxhighlight> is the empty vector and vectors are usually pictured as arrows pointing right, so it shares key with <syntaxhighlight lang=apl inline>→</syntaxhighlight>.
<syntaxhighlight lang=apl inline>⊢</syntaxhighlight> is on the '''right'''most key, and its shifted variant <syntaxhighlight lang=apl inline>⊣</syntaxhighlight> points the other way.
=== Home row keys ===
<syntaxhighlight lang=apl inline>⍺</syntaxhighlight> looks similar to <kbd>a</kbd>. The Greek letter <syntaxhighlight lang=apl inline>⍺</syntaxhighlight>is also equivalent to the Latin ''a''. Finally, <syntaxhighlight lang=apl inline>⍺</syntaxhighlight>, being the left argument, is (below and) to the left of the right argument <syntaxhighlight lang=apl inline>⍵</syntaxhighlight> on <kbd>w</kbd>.
<syntaxhighlight lang=apl inline>⌈</syntaxhighlight> is on <kbd>s</kbd> for '''''s'''eiling'' (since ''c'' is pronounced like ''s'' here) and also finds the superlative argument. <syntaxhighlight lang=apl inline>⌊</syntaxhighlight> is adjacent on <kbd>d</kbd> for ''rounding '''d'''own''.
<syntaxhighlight lang=apl inline>_</syntaxhighlight> is on <kbd>f</kbd> for being a '''''f'''loormat''.
<syntaxhighlight lang=apl inline>∇</syntaxhighlight> is on <kbd>g</kbd> for '''''g'''o!'', indicating the beginning of a function definition or going around again (recursion). Adjecent, we find its upturned variant, <syntaxhighlight lang=apl inline>∆</syntaxhighlight>, which is a '''''h'''ome'' tent, located on on <kbd>h</kbd>.
<syntaxhighlight lang=apl inline>∘</syntaxhighlight> on <kbd>j</kbd> is called '''''j'''ot''. Its variant with diaeresis, <syntaxhighlight lang=apl inline>⍤</syntaxhighlight>, is on the shifted position.
<syntaxhighlight lang=apl inline>'</syntaxhighlight> is on <kbd>k</kbd> for '''''k'''uote'' (since ''q'' is reserved for ''question'', as in "Q&A").
<syntaxhighlight lang=apl inline>⌸</syntaxhighlight> is also on <kbd>K</kbd> for '''''K'''ey''.
<syntaxhighlight lang=apl inline>⎕</syntaxhighlight> is on <kbd>L</kbd> which looks like its lower left half. <syntaxhighlight lang=apl inline>⌷</syntaxhighlight> is its squished equivalent, on the shifted key.
<syntaxhighlight lang=apl inline>⍎</syntaxhighlight> executes code, and is on <kbd>;</kbd> which is a ubiquitous symbol in code. Adjacent is <syntaxhighlight lang=apl inline>⍕</syntaxhighlight> which is its inverse and is found on <kbd>'</kbd> because it makes things into text, as indicated by the quote.
<syntaxhighlight lang=apl inline>≡</syntaxhighlight> is on <kbd>:</kbd> — a stack of lines on a stack of dots. <syntaxhighlight lang=apl inline>≢</syntaxhighlight> is its negation and is found adjacent to it, on the <kbd>'</kbd> key, <syntaxhighlight lang=apl inline>≢</syntaxhighlight> being a <syntaxhighlight lang=apl inline>≡</syntaxhighlight> with a <code>'</code> drawn on top.
=== Bottom row keys ===
<syntaxhighlight lang=apl inline>⊂</syntaxhighlight> is on <kbd>z</kbd> because it '''''z'''ips'' up (encloses) a value into a scalar. Its shifted variant <syntaxhighlight lang=apl inline>⊆</syntaxhighlight> only does so conditionally. Its inverse and mirror-image, <syntaxhighlight lang=apl inline>⊃</syntaxhighlight>, is located adjacent, on <kbd>x</kbd> because it ''e'''x'''tracts'' (discloses) the content of an enclosed scalar.
<syntaxhighlight lang=apl inline>∩</syntaxhighlight> is on <kbd>c</kbd> for '''''c'''ap'', and its upturned variant, <syntaxhighlight lang=apl inline>∪</syntaxhighlight>, is adjacent on <kbd>v</kbd> to which it is visually similar.
<syntaxhighlight lang=apl inline>⊥</syntaxhighlight> is on <kbd>b</kbd> because it evaluates digits in a given '''''b'''ase''. Its upturned variant <syntaxhighlight lang=apl inline>⊤</syntaxhighlight> is adjacent on <kbd>n</kbd> because it (''e'')'''''n'''code''s a normal '''''n'''umber'' to a custom '''''n'''umber'' system.
<syntaxhighlight lang=apl inline>|</syntaxhighlight> is on <kbd>m</kbd> for '''''modulo''/'''''m'''agnitude'' and '''''modulus''.
<syntaxhighlight lang=apl inline>⍝</syntaxhighlight> is on <kbd>,</kbd> due to the similarity of the words ''comma'' and ''comment''. Shifted <kbd>,</kbd> gives the barred version, <syntaxhighlight lang=apl inline>⍪</syntaxhighlight>.
<syntaxhighlight lang=apl inline>⍀</syntaxhighlight> is adjacent to its mirrored counter-part <syntaxhighlight lang=apl inline>⌿</syntaxhighlight> which in turn is a barred version of its key, <kbd>/</kbd>.
<syntaxhighlight lang=apl inline>⍠</syntaxhighlight> varies the meaning of its operand, so it is in the corner on <kbd>?</kbd>, adjacent to all the shifting keys.
=== Summary ===
All the above mnemonics are annotated on the below image of a US English keyboard layout:
{{#css:.image img{width:100%;height:auto}}[[File:Keyboard Mnemonics.png]]
{{#css:.image img{width:100%;height:auto}}[[File:Keyboard Mnemonics.png]]


<source lang=apl inline></source> begins new APL expressions just like <kbd>`</kbd> button begins the main section of the keyboard.<br>
== Pairing monadic and dyadic meanings ==
<source lang=apl inline></source> is a modified version of <source lang=apl inline></source>, so it is <kbd>Shift</kbd>+<source lang=apl inline></source>.
Meaning pairings fall into three groups as follows.
 
=== Monadic form is like dyadic form with a default left argument ===
 
{| class=wikitable
! Glyph
! Default left argument
|-
| <syntaxhighlight lang=apl inline>+</syntaxhighlight>
| <syntaxhighlight lang=apl inline>0J¯2×11○x</syntaxhighlight> i.e. <math>-2\!\cdot\!\Im(x)</math>
|-
| <syntaxhighlight lang=apl inline>-</syntaxhighlight>
| 0
|-
| <syntaxhighlight lang=apl inline>×</syntaxhighlight>
| <syntaxhighlight lang=apl inline>÷(|x)+x=0</syntaxhighlight> i.e. <math>\frac1{|x|+[x=0]}</math>
|-
| <syntaxhighlight lang=apl inline>÷</syntaxhighlight>
| 1
|-
| <syntaxhighlight lang=apl inline>*</syntaxhighlight>
| <syntaxhighlight lang=apl inline>*1</syntaxhighlight> i.e. <math>e</math>
|-
| <syntaxhighlight lang=apl inline>⍟</syntaxhighlight>
| <syntaxhighlight lang=apl inline>*1</syntaxhighlight> i.e. <math>e</math>
|-
| <syntaxhighlight lang=apl inline>,</syntaxhighlight>
| <syntaxhighlight lang=apl inline>⍬</syntaxhighlight> (for scalars and vectors only)
|-
| <syntaxhighlight lang=apl inline>?</syntaxhighlight>
| 1 (almost; monadic form gives a scalar, dyadic form gives a vector)
|-
| <syntaxhighlight lang=apl inline>⍒</syntaxhighlight>
| <syntaxhighlight lang=apl inline>⎕UCS 0,⍳111411</syntaxhighlight>
|-
| <syntaxhighlight lang=apl inline>⍋</syntaxhighlight>
| <syntaxhighlight lang=apl inline>⎕UCS 0,⍳111411</syntaxhighlight>
|-
| <syntaxhighlight lang=apl inline>⍉</syntaxhighlight>
| <syntaxhighlight lang=apl inline>⌽⍳≢⍴x</syntaxhighlight>
|-
| <syntaxhighlight lang=apl inline>⍎</syntaxhighlight>
| <syntaxhighlight lang=apl inline>⎕THIS</syntaxhighlight>
|-
| <syntaxhighlight lang=apl inline>⌹</syntaxhighlight>
| <syntaxhighlight lang=apl inline>∘.=⍨⍳≢x</syntaxhighlight> i.e. <math>I_n</math>
|-
| <syntaxhighlight lang=apl inline>⊂</syntaxhighlight>
| <syntaxhighlight lang=apl inline>,1</syntaxhighlight> (almost; monadic form gives a scalar, dyadic form gives a vector)
|-
| <syntaxhighlight lang=apl inline>⊃</syntaxhighlight>
| <syntaxhighlight lang=apl inline>⊂(≢⍴x)⍴1</syntaxhighlight>
|-
| <syntaxhighlight lang=apl inline>∪</syntaxhighlight>
| <syntaxhighlight lang=apl inline>∪x</syntaxhighlight>
|-
| <syntaxhighlight lang=apl inline>⌷</syntaxhighlight>
| <syntaxhighlight lang=apl inline>⊂⍳≢⌷x</syntaxhighlight>
|-
| <syntaxhighlight lang=apl inline>⊣</syntaxhighlight>
| <syntaxhighlight lang=apl inline>x</syntaxhighlight>
|-
| <syntaxhighlight lang=apl inline>⊢</syntaxhighlight>
| <syntaxhighlight lang=apl inline>x</syntaxhighlight>
|}
 
=== Both forms are good fit for the glyph ===
 
{| class=wikitable
! Glyph
! Explanation
|-
| <syntaxhighlight lang=apl inline>≡</syntaxhighlight>
| indicates (3) layers of depth for the monadic form
|-
| <syntaxhighlight lang=apl inline>≢</syntaxhighlight>
| indicates a counting rod marking for the monadic form
|-
| <syntaxhighlight lang=apl inline>↑</syntaxhighlight>
| take elements and increase rank
|-
| <syntaxhighlight lang=apl inline>↓</syntaxhighlight>
| drop elements and decrease rank
|-
| <syntaxhighlight lang=apl inline>∊</syntaxhighlight>
| &quot;'''e'''lement of&quot; and &quot;'''e'''nlist&quot;
|-
| <syntaxhighlight lang=apl inline></syntaxhighlight>
| &quot;enclose at positions where condition is met&quot; and &quot;enclose on condition of being simple&quot;
|-
| <syntaxhighlight lang=apl inline></syntaxhighlight>
| &quot;'''i'''ndices where elements fit into intervals&quot; and &quot;'''i'''ndices where true&quot;
|-
| <syntaxhighlight lang=apl inline>⍪</syntaxhighlight>
| <syntaxhighlight lang=apl inline>,[1]x</syntaxhighlight> (for non-scalars) and <syntaxhighlight lang=apl inline>,⍤¯1</syntaxhighlight> (for higher-rank arrays)
|}


<source lang=apl inline>¨</source> applies a function to each 1 of the argument elements, so it is on <kbd>APL</kbd>+<kbd>1</kbd>.<br>
=== The two forms are conceptually related ===
<source lang=apl inline>⌶</source> looks like a [[wikipedia:Roman numerals|Roman numeral]] 1, so it also lives on the <kbd>1</kbd>.


<source lang=apl inline>¯</source>, <source lang=apl inline><</source>, <source lang=apl inline></source>, <source lang=apl inline>=</source>, <source lang=apl inline></source>, <source lang=apl inline>></source>, and <source lang=apl inline></source> form a block. The number line 1–9 (because 0 on the far right) is split into two [[equal]] halves by <kbd>5</kbd> so that gives <source lang=apl inline>=</source>. <kbd>4</kbd> and <kbd>6</kbd> are slightly less and more, respectively, so they give <source lang=apl inline></source> and <source lang=apl inline></source>. <kbd>3</kbd> and <kbd>7</kbd> are much less and more, respectively, so they give <source lang=apl inline><</source> and <source lang=apl inline>></source>. Finally, <kbd>2</kbd> is so much less that it is negative, giving the negative sign <source lang=apl inline>¯</source>, and <kbd>8</kbd> is so much greater that it is completely [[not equal|unequal]], <source lang=apl inline></source>.
{| class=wikitable
! Glyph
! Relationship
|-
| <syntaxhighlight lang=apl inline></syntaxhighlight>
| next higher integer or highest argument
|-
| <syntaxhighlight lang=apl inline></syntaxhighlight>
| next lower integer or lowest argument
|-
| <syntaxhighlight lang=apl inline>|</syntaxhighlight>
| both forms can be called [[wikipedia:modulo|modulo]] and use the symbol: <math>|x|</math> and <math>a|b</math>
|-
| <syntaxhighlight lang=apl inline>!</syntaxhighlight>
| factorial is prominent in the formula for binomial
|-
| <syntaxhighlight lang=apl inline></syntaxhighlight>
| both the trigonometric functions and <math>\pi</math> relate to the (unit) circle
|-
| <syntaxhighlight lang=apl inline>~</syntaxhighlight>
| &quot;not&quot; and &quot;but not&quot;
|-
| <syntaxhighlight lang=apl inline></syntaxhighlight>
| monadic means &quot;not equal to any preceding item&quot;
|-
| <syntaxhighlight lang=apl inline></syntaxhighlight>
| shape and reshape
|-
| <syntaxhighlight lang=apl inline></syntaxhighlight>
| indices of and index of
|-
| <syntaxhighlight lang=apl inline></syntaxhighlight>
| rotate and mirror along last axis
|-
| <syntaxhighlight lang=apl inline></syntaxhighlight>
| rotate and mirror along first axis
|-
| <syntaxhighlight lang=apl inline></syntaxhighlight>
| format and format with specification
|}


{{APL development}}{{APL glyphs}}
{{APL development}}{{APL glyphs}}
[[Category:APL character set]]
[[Category:APL character set]]

Latest revision as of 08:54, 3 August 2023

Mnemonics can assist with learning the meaning of APL glyphs and where on they keyboard they are found for typing them. Both of these skills are essential for an effective APL programmer. This article provides such aide-mémoires.

Pairing glyphs with their meaning

Many glyphs have meaning identical to their mathematical counterparts.

(Diamond) separates statements. That is, no functions or operators can break through , just as diamonds are virtually indestructible.

looks like a -shaped Stencil laid on a piece of paper, .

! is Binomial in addition to Factorial, as the two are closely related.

I-beam does look like an I-beam

(I-beam) calls system services. APL was originally developed at IBM, so system services were also IBM services. is an I-beam and I-beam is pronounced almost identically to IBM.

@ applies a function or substitutes elements at specific locations.

The Grade glyphs and look like supersonic transports.

and give the indices (grades) needed to sort ascending and descending respectively, and look like an ascending and descending supersonic transport, respectively.

, , and reverse or transpose an array over a given axis. The part of the glyphs symbolise the array, while the line component (|, \, or -) indicates the line across which the reversal/transposal is done.

The Log glyph looks like a tree log.

looks like the cross-section of a tree log

and (Nor and Nand) have the Not glyph ~ on top of or overlaid on the Or glyph and And glyph respectively.

× can be seen as an when monadic, indicating the unknown sign to be determined.

+ negates the imaginary part (that is, it conjugates) by analogy to monadic - which negates both the real and the imaginary parts.

÷ takes a default left argument of 1 (thus computing the reciprocal), that being the identity element of division.

is matrix divide with a symbolising a matrix and an inscribed ÷ for "divide".

? symbolises the unknown, and thus rolls dice and deals cards randomly.

and are the leftmost and rightmost letters of the Greek alphabet. They therefore denote the left and right arguments of dfns, respectively.

is the Greek letter Epsilon which corresponds to the letter E for Enlist and Element of.

is the Greek letter Rho which corresponds to the letter R for Reshape.

~ is Not when monadic, but its dyadic form, Without, can also be remembered as but not.

is a monadic operator that looks like a face. When its derived function is applied monadically, it can be called selfie, in that it applies the operand function to the argument with the argument itself as left argument too.

and (Mix and Split) increase and decrease rank (if possible) when used monadically.

drops elements, and so it points down, the direction in which things are dropped. Take uses by analogy.

is the Greek letter Iota which corresponds to the letter I for Index generator and Index of.

is also the Greek letter Iota which corresponds to the letter I for Indices and Interval Index.

is a circle for Circular functions and the ratio between the circumference and the diameter of a circle, Pi.

and (Over and Atop) both apply the left operand after the right operand. However, has a larger "circle of influence" in that it applies its right operand twice (once on each argument) while only applies it once (between the arguments).

* and repeatedly apply multiplication and a function, respectively. The star symbolises power (function)/power (operator).

assigns by putting the value on its right into the name on its left.

points at the destination it is branching to.

(Zilde) is a combination of ~ for Without and 0 indicating numbers. Indeed, it is the "vector without numbers", equivalent to 0~0.

and point a finger towards the left and right, which are exactly the argument they, respectively, return.

The Quad glyph looks like a console.

is the prefix for all system names, and also manages input from the console as well as output to the console. For that, it is a stylised console. looks like a with a quote ' indicating string input and message output.

and are pictograms of a wall with a piece of ceiling and floor, respectively.

and can also be seen as indicators on a vertical number line, pointing at the maximum and minimum, respectively.

is an upside-down Greek Delta, which corresponds to the letter D for Defined function or (own) definition (for recursion).

(Key) applies a function for each collection of all elements that are equal ().

can be see as a stack of layers. When used monadically, it finds the depth of an array.

looks like a tally mark. It being sideways can be justified by it counting the length of the leading axis; the vertical axis of a matrix.

encloses its argument in a layer of nesting, and Disclose uses by analogy. is exactly like except that it only does a conditional enclose, namely only if the argument is simple.

and enclose at specific locations, per a specification, so their dyadic forms are Partitioned enclose and Partition, respectively.

is a styled letter U for Unique or Union if used dyadically.

looks like the base of a pillar, converting from that base. Antibase uses by analogy, and looks a styled letter T for "To base". and are also respectively known as Encode and Decode. To remember which is which, looks like a styled letter T, so think "Ten-code".

The Lamp glyph looks like a a lamp bulb filament.

looks like a filament lamp and provides enlightenment by indicating comments.

, concatenates arrays, much like the common punctuation symbol concatenates phrases. has an added styled row, indicating that for matrices, it concatenates additional rows.

. is just a low dot, but performs the same operation (though generalised) as traditional mathematics' dot product.

/ and are also called "by" which can be remembered as reduce by.

Pairing glyphs/functionality with their keyboard locations

The following mnemonics are for Dyalog APL's US English keyboard layout, but can easily be adapted to similar layouts.

Number row keys

begins new APL expressions just like ` button begins the main section of the keyboard. is a modified version of , so it is Shift+.

¨ applies a function to each 1 of the argument elements, so it is on APL+1. looks like a Roman numeral 1, so it also lives on the 1, albeit in the shifted position.

¯, <, , =, , >, and form a block. The number line 1–9 (because 0 on the far right) is split into two equal halves by 5 so that gives =. 4 and 6 are slightly less and more, respectively, so they give and . 3 and 7 are much less and more, respectively, so they give < and >. Finally, 2 is so much less that it is negative, giving the negative sign ¯, and 8 is so much greater that it is completely unequal, .

and are located on # (read "pound", £ on British keyboards). pointing down is on the lower of the two numbers 3 and 4. This can be remembered as the pound going down due to Brexit.

mirrors an array over its vertical centre, so it is placed on the centre of the 1–9 number line. is slightly off centre, while has completely fallen over.

and are on the largest (9) and smallest (0) digits, respectively, as is inclusive (any argument being true gives true) while is exclusive (any false gives false). Their negated versions and are on the shifted positions.

× is adjacent to for which it is equivalent on Boolean arguments. ! is above it, being ×/⍳. ÷ is adjacent to its inverse, ×. And is in the shifted position, being the matrix equivalent of ÷.

Top row keys

? is on q for question.

, , and look similar to w, e, and i. and are the shifted variants of and . The Greek letters , and are also equivalent to the Latin e, and i.

is the Greek equivalent of r.

~ is on t for its name tilde, and its variant with diaeresis, , is on the shifted position.

is on y for yank (=take), and is on the adjacent u for drop down under.

is on o due to the similar looks, and is the shifted variant. is also on O for Over.

* is on p for power, and is the shifted variant.

and match the directionality of [ and ]. is usually immediately assigned to/from using , so they share key. is the empty vector and vectors are usually pictured as arrows pointing right, so it shares key with .

is on the rightmost key, and its shifted variant points the other way.

Home row keys

looks similar to a. The Greek letter is also equivalent to the Latin a. Finally, , being the left argument, is (below and) to the left of the right argument on w.

is on s for seiling (since c is pronounced like s here) and also finds the superlative argument. is adjacent on d for rounding down.

_ is on f for being a floormat.

is on g for go!, indicating the beginning of a function definition or going around again (recursion). Adjecent, we find its upturned variant, , which is a home tent, located on on h.

on j is called jot. Its variant with diaeresis, , is on the shifted position.

' is on k for kuote (since q is reserved for question, as in "Q&A").

is also on K for Key.

is on L which looks like its lower left half. is its squished equivalent, on the shifted key.

executes code, and is on ; which is a ubiquitous symbol in code. Adjacent is which is its inverse and is found on ' because it makes things into text, as indicated by the quote.

is on : — a stack of lines on a stack of dots. is its negation and is found adjacent to it, on the ' key, being a with a ' drawn on top.

Bottom row keys

is on z because it zips up (encloses) a value into a scalar. Its shifted variant only does so conditionally. Its inverse and mirror-image, , is located adjacent, on x because it extracts (discloses) the content of an enclosed scalar.

is on c for cap, and its upturned variant, , is adjacent on v to which it is visually similar.

is on b because it evaluates digits in a given base. Its upturned variant is adjacent on n because it (e)ncodes a normal number to a custom number system.

| is on m for modulo/magnitude and modulus.

is on , due to the similarity of the words comma and comment. Shifted , gives the barred version, .

is adjacent to its mirrored counter-part which in turn is a barred version of its key, /.

varies the meaning of its operand, so it is in the corner on ?, adjacent to all the shifting keys.

Summary

All the above mnemonics are annotated on the below image of a US English keyboard layout: Keyboard Mnemonics.png

Pairing monadic and dyadic meanings

Meaning pairings fall into three groups as follows.

Monadic form is like dyadic form with a default left argument

Glyph Default left argument
+ 0J¯2×11○x i.e.
- 0
× ÷(|x)+x=0 i.e.
÷ 1
* *1 i.e.
*1 i.e.
, (for scalars and vectors only)
? 1 (almost; monadic form gives a scalar, dyadic form gives a vector)
⎕UCS 0,⍳111411
⎕UCS 0,⍳111411
⌽⍳≢⍴x
⎕THIS
∘.=⍨⍳≢x i.e.
,1 (almost; monadic form gives a scalar, dyadic form gives a vector)
⊂(≢⍴x)⍴1
∪x
⊂⍳≢⌷x
x
x

Both forms are good fit for the glyph

Glyph Explanation
indicates (3) layers of depth for the monadic form
indicates a counting rod marking for the monadic form
take elements and increase rank
drop elements and decrease rank
"element of" and "enlist"
"enclose at positions where condition is met" and "enclose on condition of being simple"
"indices where elements fit into intervals" and "indices where true"
,[1]x (for non-scalars) and ,⍤¯1 (for higher-rank arrays)

The two forms are conceptually related

Glyph Relationship
next higher integer or highest argument
next lower integer or lowest argument
| both forms can be called modulo and use the symbol: and
! factorial is prominent in the formula for binomial
both the trigonometric functions and relate to the (unit) circle
~ "not" and "but not"
monadic means "not equal to any preceding item"
shape and reshape
indices of and index of
rotate and mirror along last axis
rotate and mirror along first axis
format and format with specification


APL development [edit]
Interface SessionTyping glyphs (on Linux) ∙ FontsText editors
Publications IntroductionsLearning resourcesSimple examplesAdvanced examplesMnemonicsISO 8485:1989ISO/IEC 13751:2001A Dictionary of APLCase studiesDocumentation suitesBooksPapersVideosAPL Quote QuadVector journalTerminology (Chinese, German) ∙ Neural networksError trapping with Dyalog APL (in forms)
Sharing code Backwards compatibilityAPLcartAPLTreeAPL-CationDfns workspaceTatinCider
Implementation ResourcesOpen-sourceMagic functionPerformanceAPL hardware
Developers Timeline of corporationsAPL2000DyalogIBMIPSASTSC
APL glyphs [edit]
Information GlyphTyping glyphs (on Linux) ∙ UnicodeFontsMnemonicsOverstrikesMigration level
Individual glyphs Jot () ∙ Right Shoe () ∙ Up Arrow () ∙ Zilde () ∙ High minus (¯) ∙ Dot (.) ∙ Del ()