πŸ’Ύ Archived View for diesenbacher.net β€Ί blog β€Ί entries β€Ί apl-symbols.gmi captured on 2023-01-29 at 02:40:28. Gemini links have been rewritten to link to archived content

View Raw

More Information

➑️ Next capture (2024-05-10)

-=-=-=-=-=-=-

Howto get APL symbols (and others) at your fingertips

APL and the funny symbols

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.

Dyalog APL

APLWiki

GNU APL

Typing glyphs on Linux

APL Fonts and Keyboards

Unix/Linux: X Window and .XCompose

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

.XCompose

MacOSX / OSX

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:", "€");

| };

| };

| }

`----

here

Apple Developer notes

Microsoft Windows

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.

wincompose,

Footnotes

_________

[1]