Mnemonics: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
Line 11: Line 11:
<source lang=apl inline>!</source> is [[Binomial]] in addition to [[Factorial]], as the two are closely related.
<source lang=apl inline>!</source> 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]]]]
<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''.
<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''.


<source lang=apl inline>@</source> applies a function or substitutes elements ''[[at]]'' specific locations.
<source lang=apl inline>@</source> 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.]]
<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.
<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.


<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.
<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.


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


Line 65: Line 68:
<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.
<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.


[[File:Computer console.jpg|thumb|The [[Quad]] glyph <source lang=apl inline>⎕</source> 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.
<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.


Line 92: Line 96:


<source lang=apl inline>/</source> and <source lang=apl inline>⌿</source> are also called "by" which can be remembered as reduce by.
<source lang=apl inline>/</source> and <source lang=apl inline>⌿</source> are also called "by" which can be remembered as reduce by.
<gallery>
File:Bristol Type 223 top-view silhouette.png|The [[Grade]] glyphs <source lang=apl inline>⍋</source> and <source lang=apl inline>⍒</source> look like [[wikipedia:supersonic transport|supersonic transport]]s.
File:TreeLog.jpg|The [[Log]] glyph <source lang=apl inline>⍟</source> looks like a tree log.
File:Computer console.jpg|The [[Quad]] glyph <source lang=apl inline>⎕</source> looks like a console.
</gallery>


== Pairing glyphs/functionality with their keyboard locations ==
== Pairing glyphs/functionality with their keyboard locations ==

Revision as of 06:26, 19 October 2020

Mnemonics can assist with remembering the meaning of APL glyphs where on they keyboard they are found for typing them. Both of these skills are essential for an effective APL programmer. This article currently provides examples such aide-mémoires, but will be completed in due time.

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 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 [[self]ie, 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.

[drop]]s 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 the 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 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).

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

looks like a tally mark.

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.

looks like the base of a pillar. Antibase uses by analogy.

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

Below is a US English APL keyboard layout (from Dyalog APL), annotated with short mnemonics. Some of the mnemonics are then fully explained.

Keyboard Mnemonics.png

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.

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 ()