πΎ Archived View for diesenbacher.net βΊ blog βΊ entries βΊ apl-symbols.gmi captured on 2023-06-14 at 13:55:10. Gemini links have been rewritten to link to archived content
β¬ οΈ Previous capture (2023-01-29)
β‘οΈ Next capture (2024-05-10)
-=-=-=-=-=-=-
APL and its dialects (f.e. [Dyalog APL]) use funny symbols:
β Conway's Game of Life by John Scholes life β {β1 β΅ β¨.β§ 3 4 = +/ +βΏ Β―1 0 1 β.β Β―1 0 1 β½Β¨ ββ΅}
APL (=A Programming Language, also short for Array Programming Language) is a very interesting way to describe (and actually program) algorithms. Notation as a tool of thought[1]. For more details about APL, have a look at the [APLWiki]. A fantastic open source implementation mimicking APL2 is [GNU APL].
But, quite a challenge for the novice, howto get this symbols at your keyboard. In the past this was quite a thing - you needed special graphics adapters and keyboards, but today in the time of unicode it is not that difficult. One way - to access βΊ,β‘,β,β and their other friends - is to have a specific keyboard layout that supports these characters, f.e. see [Typing glyphs on Linux] at the APLWiki or [APL Fonts and Keyboards] at Dyalog.
Another way, the one that I chose, and least for X Window (unix/linux) and MacOS seems less effort, is to utilize a compose-key.
Simply put a proper [.XCompose] file into your home directory. Restart your application, and whatever you defined in your .XCompose file is available. No need to restart your xwindow server. As I type quite often APL-symbols, I chose <period> as an extra compose key.
As an example, my .XCompose file:
,----
| # APL Characters
| # https://www.x.org/releases/X11R7.7/doc/libX11/i18n/compose/en_US.UTF-8.html
| include "%L"
|
| <period> <period> : "."
| <period> <dead_grave> : "β"
| <period> s : "β"
| <period> <exclam> : "βΆ"
| <period> <1> : "Β¨"
| <period> <at> : "β«"
| <period> <2> : "Β―"
| <period> <numbersign> : "β"
| <period> <3> : "<"
| <period> <dollar> : "β"
| <period> <4> : "β€"
| <period> <percent> : "β½"
| <period> <5> : "="
| <period> <dead_circumflex> : "β"
| <period> <asciicircum> : "β"
| <period> <6> : "β₯"
| <period> <ampersand> : "β"
| <period> <7> : ">"
| <period> <asterisk> : "β"
| <period> <8> : "β "
| <period> <parenleft> : "β±"
| <period> <9> : "β¨"
| <period> <parenright> : "β²"
| <period> <0> : "β§"
| <period> <underscore> : "!"
| <period> <minus> : "Γ"
| <period> <plus> : "βΉ"
| <period> <equal> : "Γ·"
| <period> <q> : "?"
| <period> <W> : "βΉ"
| <period> <w> : "β΅"
| <period> <E> : "β·"
| <period> <e> : "β"
| <period> <r> : "β΄"
| <period> <T> : "β¨"
| <period> <t> : "~"
| <period> <Y> : "Β₯"
| <period> <y> : "β"
| <period> <u> : "β"
| <period> <I> : "βΈ"
| <period> <i> : "β³"
| <period> <O> : "β₯"
| <period> <o> : "β"
| <period> <P> : "β£"
| <period> <p> : "β"
| <period> <braceleft> : "β"
| <period> <bracketleft> : "β"
| <period> <braceright> : "β¬"
| <period> <bracketright> : "β"
| <period> <bar> : "β£"
| <period> <backslash> : "β’"
| <period> <A> : "βΆ"
| <period> <a> : "βΊ"
| <period> <s> : "β"
| <period> <d> : "β"
| <period> <F> : "β«"
| <period> <f> : "_"
| <period> <g> : "β"
| <period> <H> : "β"
| <period> <h> : "β"
| <period> <J> : "β€"
| <period> <j> : "β"
| <period> <K> : "βΊ"
| <period> <k> : "'"
| <period> <L> : "β·"
| <period> <l> : "β"
| <period> <colon> : "β‘"
| <period> <semicolon> : "β"
| <period> <quotedbl> : "β’"
| <period> <apostrophe> : "β"
| <period> <z> : "β"
| <period> <Z> : "β"
| <period> <X> : "Ο"
| <period> <x> : "β"
| <period> <C> : "β§"
| <period> <c> : "β©"
| <period> <v> : "βͺ"
| <period> <B> : "Β£"
| <period> <b> : "β₯"
| <period> <n> : "β€"
| <period> <m> : "|"
| <period> <less> : "βͺ"
| <period> <comma> : "β"
| <period> <greater> : "β"
| <period> <question> : "β "
| <period> <slash> : "βΏ"
| <period> <adiaeresis> : "β"
| <period> <asciitilde> : "β"
| <period> <odiaeresis> : "]"
| <period> <Adiaeresis> : "{"
| <period> <Odiaeresis> : "}"
| <period> <udiaeresis> : "β"
| <period> <Udiaeresis> : "β"
| <period> <Q> <u> : "ΓΌ"
| <period> <Q> <U> : "Γ"
| <period> <Q> <a> : "Γ€"
| <period> <Q> <A> : "Γ"
| <period> <Q> <o> : "ΓΆ"
| <period> <Q> <O> : "Γ"
| <period> <Q> <s> : "Γ"
| <period> <Q> <e> : "β¬"
| <period> <M> <F> <G> : "mit freundlichen GrΓΌΓen - Florian"
| <period> <M> <f> <g> : "best regards - Florian"
`----
You see, quite simple, and not limited to special chars, you can also include abbreviations for often used phrases.
You don't have to care about your keyboard layout. Dvorak or QWERTY? Just have in mind, to get an 'β' simply type '.e'.
MacOSX offers similar to .XCompose (which you nevertheless need, if you run a Xserver, f.e. XQuartz) the file '~/Library/KeyBindings/DefaultKeyBinding.dict'. See more about this file [here] and the [Apple Developer notes].
See below my DefaultKeyBinding.dict. Unfortunately the situation around this file is not that coherent, as for XCompose under X Window. Some applications (f.e. some QT apps) ignore this file and it seems you can not address all keys.
,----
| {
| "." = {
| "." = ("insertText:", ".");
| "!" = ("insertText:", "βΆ");
| "1" = ("insertText:", "Β¨");
| "\U0040" = ("insertText:", "β«"); /* @ */
| "2" = ("insertText:", "Β―");
| "\043" = ("insertText:", "β"); /* # */
| "3" = ("insertText:", "<");
| "\044" = ("insertText:", "β"); /* $ */
| "4" = ("insertText:", "β€");
| "%" = ("insertText:", "β½");
| "5" = ("insertText:", "=");
| "\136" = ("insertText:", "β"); /* ^ */
| "6" = ("insertText:", "β₯");
| "&" = ("insertText:", "β");
| "7" = ("insertText:", ">");
| "*" = ("insertText:", "β");
| "8" = ("insertText:", "β ");
| "(" = ("insertText:", "β±");
| "9" = ("insertText:", "β¨");
| ")" = ("insertText:", "β²");
| "0" = ("insertText:", "β§");
| "_" = ("insertText:", "!");
| "-" = ("insertText:", "Γ");
| "+" = ("insertText:", "βΉ");
| "=" = ("insertText:", "Γ·");
| "q" = ("insertText:", "?");
| "W" = ("insertText:", "βΉ");
| "w" = ("insertText:", "β΅");
| "E" = ("insertText:", "β·");
| "e" = ("insertText:", "β");
| "r" = ("insertText:", "β΄");
| "T" = ("insertText:", "β¨");
| "t" = ("insertText:", "βΌ");
| "Y" = ("insertText:", "Β₯");
| "y" = ("insertText:", "β");
| "u" = ("insertText:", "β");
| "I" = ("insertText:", "βΈ");
| "i" = ("insertText:", "β³");
| "O" = ("insertText:", "β₯");
| "o" = ("insertText:", "β");
| "P" = ("insertText:", "β£");
| "p" = ("insertText:", "β");
| "{" = ("insertText:", "β");
| "[" = ("insertText:", "β");
| "}" = ("insertText:", "β¬");
| "]" = ("insertText:", "β");
| "|" = ("insertText:", "β£");
| "\\" = ("insertText:", "β’");
| "A" = ("insertText:", "βΆ");
| "a" = ("insertText:", "βΊ");
| "s" = ("insertText:", "β");
| "d" = ("insertText:", "β");
| "F" = ("insertText:", "β«");
| "f" = ("insertText:", "_");
| "g" = ("insertText:", "β");
| "H" = ("insertText:", "β");
| "h" = ("insertText:", "β");
| "J" = ("insertText:", "β€");
| "j" = ("insertText:", "β");
| "K" = ("insertText:", "βΊ");
| "k" = ("insertText:", "'");
| "L" = ("insertText:", "β·");
| "l" = ("insertText:", "β");
| ":" = ("insertText:", "β‘");
| ";" = ("insertText:", "β");
| "\"" = ("insertText:", "β’");
| "'" = ("insertText:", "β");
| "z" = ("insertText:", "β");
| "Z" = ("insertText:", "β");
| "X" = ("insertText:", "Ο");
| "x" = ("insertText:", "β");
| "C" = ("insertText:", "β§");
| "c" = ("insertText:", "β©");
| "v" = ("insertText:", "βͺ");
| "B" = ("insertText:", "Β£");
| "b" = ("insertText:", "β₯");
| "n" = ("insertText:", "β€");
| "m" = ("insertText:", "|");
| "<" = ("insertText:", "βͺ");
| "," = ("insertText:", "β");
| ">" = ("insertText:", "β");
| "?" = ("insertText:", "β ");
| "/" = ("insertText:", "βΏ");
| "Q" = {
| "u" = ("insertText:", "ΓΌ");
| "U" = ("insertText:", "Γ");
| "a" = ("insertText:", "Γ€");
| "A" = ("insertText:", "Γ");
| "o" = ("insertText:", "ΓΆ");
| "O" = ("insertText:", "Γ");
| "s" = ("insertText:", "Γ");
| "e" = ("insertText:", "β¬");
| };
| };
| }
`----
As I try not to use Windows, I am not aware, what would be the best solution for this operating system. If someone has an idea, please send me an email, and I would add this information to this post.
There is [wincompose,] but I have never used it, so no idea, whether this is a good idea.
Footnotes
_________
[1]