User:⊂⍺m: Difference between revisions

Jump to navigation Jump to search
54 bytes added ,  19:54, 10 July 2023
m
add heading
(personal intro)
 
m (add heading)
Line 31: Line 31:


== Tools ==
== Tools ==
=== custom string mapping for entering APL glyphs ===
I’ve never used an APL keyboard mapping! Instead, in the Emacs text editor ([https://github.com/syl20bnr/spacemacs Spacemacs], in my case), I use a [https://github.com/cchando/config/blob/master/.emacs.d/elpa/xah-math-input-20200217.740/xah-math-input.el#L807 custom string mapping] ([http://xahlee.info/emacs/emacs/xmsi-math-symbols-input.html Xah Lee's Math Input Mode] package) that associates input strings with corresponding characters to print. So I just enter <code inline>gd<Shift><Space></code> for Grade Down <syntaxhighlight lang=apl inline>⍒</syntaxhighlight>, and even idioms like <code inline>ax<Shift><Space></code> for <syntaxhighlight lang=apl inline>⍳≢⍴</syntaxhighlight> (axes) and <code inline>ax'<Shift><Space></code> for the tacit version <syntaxhighlight lang=apl inline>⍳∘≢∘⍴⍤</syntaxhighlight>. Truly coding at the speed of thought! The other advantage here is that it uses function mnemonics rather than glyph mnemonics—e.g. you can type either <code>mi</code> (Mix) or <code inline>ta</code> (Take) for the glyph <syntaxhighlight lang=apl inline>↑</syntaxhighlight>, so you're typing in accordance with what you want to do, rather than having to type, say, "au" for the visual mnemonic "arrow up" corresponding to the glyph. Furthermore, you can type e.g. <code inline>(<Shift><Space></code> for <syntaxhighlight lang=apl inline>⊂</syntaxhighlight>, and then <code inline><Shift><Space></code> again to change it to <syntaxhighlight lang=apl inline>⊆</syntaxhighlight>, coupling mnemonics in a natural way. Through successive <code inline><Shift><Space></code>'s you can cycle through <syntaxhighlight lang=apl inline>⊂⊆⊄⊈⊂</syntaxhighlight>—thus you can alternate between e.g. <syntaxhighlight lang=apl inline>⍳</syntaxhighlight> and <syntaxhighlight lang=apl inline>⍸</syntaxhighlight> by successive <code inline><Shift><Space></code>'s as well. In Emacs, such mapping functionality is easy to write, whereas most IDEs and text editors are not extensible enough to allow implementing this at all. I'm thinking about writing the same functionality for the Kakoune editor since it's much more cleanly designed than Emacs…
I’ve never used an APL keyboard mapping! Instead, in the Emacs text editor ([https://github.com/syl20bnr/spacemacs Spacemacs], in my case), I use a [https://github.com/cchando/config/blob/master/.emacs.d/elpa/xah-math-input-20200217.740/xah-math-input.el#L807 custom string mapping] ([http://xahlee.info/emacs/emacs/xmsi-math-symbols-input.html Xah Lee's Math Input Mode] package) that associates input strings with corresponding characters to print. So I just enter <code inline>gd<Shift><Space></code> for Grade Down <syntaxhighlight lang=apl inline>⍒</syntaxhighlight>, and even idioms like <code inline>ax<Shift><Space></code> for <syntaxhighlight lang=apl inline>⍳≢⍴</syntaxhighlight> (axes) and <code inline>ax'<Shift><Space></code> for the tacit version <syntaxhighlight lang=apl inline>⍳∘≢∘⍴⍤</syntaxhighlight>. Truly coding at the speed of thought! The other advantage here is that it uses function mnemonics rather than glyph mnemonics—e.g. you can type either <code>mi</code> (Mix) or <code inline>ta</code> (Take) for the glyph <syntaxhighlight lang=apl inline>↑</syntaxhighlight>, so you're typing in accordance with what you want to do, rather than having to type, say, "au" for the visual mnemonic "arrow up" corresponding to the glyph. Furthermore, you can type e.g. <code inline>(<Shift><Space></code> for <syntaxhighlight lang=apl inline>⊂</syntaxhighlight>, and then <code inline><Shift><Space></code> again to change it to <syntaxhighlight lang=apl inline>⊆</syntaxhighlight>, coupling mnemonics in a natural way. Through successive <code inline><Shift><Space></code>'s you can cycle through <syntaxhighlight lang=apl inline>⊂⊆⊄⊈⊂</syntaxhighlight>—thus you can alternate between e.g. <syntaxhighlight lang=apl inline>⍳</syntaxhighlight> and <syntaxhighlight lang=apl inline>⍸</syntaxhighlight> by successive <code inline><Shift><Space></code>'s as well. In Emacs, such mapping functionality is easy to write, whereas most IDEs and text editors are not extensible enough to allow implementing this at all. I'm thinking about writing the same functionality for the Kakoune editor since it's much more cleanly designed than Emacs…


trusted
83

edits

Navigation menu