Glyph: Difference between revisions

Jump to navigation Jump to search
982 bytes added ,  16:12, 7 May 2021
m
No edit summary
(One intermediate revision by the same user not shown)
Line 9: Line 9:
Display problems have been mostly eliminated by the broad uptake of Unicode. However some difficulties with [[typing glyphs]] remain. Several APL-family languages such as [[J]], [[K]], and [[ELI]] have chosen to stick with ASCII, either by reducing and compacting functionality to use one character per glyph or by using multiple characters. Historically there have also been various encodings of APL in smaller character sets, typically as an alternate way of writing code for an APL with traditional glyphs.
Display problems have been mostly eliminated by the broad uptake of Unicode. However some difficulties with [[typing glyphs]] remain. Several APL-family languages such as [[J]], [[K]], and [[ELI]] have chosen to stick with ASCII, either by reducing and compacting functionality to use one character per glyph or by using multiple characters. Historically there have also been various encodings of APL in smaller character sets, typically as an alternate way of writing code for an APL with traditional glyphs.


== Bi-glyphs ==
=== Bi-glyphs ===
J and K use both ASCII symbols on their own, and followed by one or more periods and/or colons. J terminology calls these ''bigraphs'' and ''trigraphs''. For example, J uses <source lang=j inline>^</source> for [[Power]], <source lang=j inline>^.</source> for [[Logarithm]], and <source lang=j inline>^:</source> for the [[Power operator]], while K uses <source lang=k inline>':</source> for the equivalent of [[Windowed_Reduce#Notable_uses|pair-wise reduction]] (<source lang=apl inline>¯2f/</source>) and <source lang=k inline>0:</source> for line-by-line file read/write.
J and K use both ASCII symbols on their own, and followed by one or more periods and/or colons. J terminology calls these ''bigraphs'' and ''trigraphs''. For example, J uses <source lang=j inline>^</source> for [[Power]], <source lang=j inline>^.</source> for [[Logarithm]], and <source lang=j inline>^:</source> for the [[Power operator]], while K uses <source lang=k inline>':</source> for the equivalent of [[Windowed_Reduce#Notable_uses|pair-wise reduction]] (<source lang=apl inline>¯2f/</source>) and <source lang=k inline>0:</source> for line-by-line file read/write. Lately, J has gone beyond this and added <source lang=j inline>{{</source>…<source lang=j inline>}}</source> for explicit functions, similar to the syntax of [[dfns]].
 
[[Dyalog APL]] uses a few bi-glyphs, especially in dops (the operand equivalent of a dfn) where for example <source lang=apl inline>⍺⍺</source> and <source lang=apl inline>⍵⍵</source> denote the left and right [[operand]]s. [[GNU APL]] and [[dzaima/APL]] use <source lang=apl inline>⍶</source> and <source lang=apl inline>⍹</source> instead.
 
[[GNU APL]] also uses bi-glyphs consisting of <source lang=apl inline>⊤</source> follwed by a comparison function as the bit-wise equivalent of the comparison function. For example <source lang=apl inline>A⊤∧B</source> is bit-wise [[And]]. [[Number]]s are treated as 64-bit integers, and [[character]]s as 32-bit integers (with the result being character as well).
 
[[NARS2000]] uses <source lang=apl inline>..</source> for its [[Range]] function.


{{APL features}}
{{APL features}}
{{APL glyphs}}
{{APL glyphs}}
[[Category:Glyphs| ]]
[[Category:Glyphs| ]]

Navigation menu