[Haskell-cafe] Unicode Haskell source -- Yippie!
rustompmody at gmail.com
Fri Apr 25 13:30:34 UTC 2014
On Fri, Apr 25, 2014 at 6:32 PM, Chris Warburton
<chriswarbo at googlemail.com>wrote:
> Rustom Mody <rustompmody at gmail.com> writes:
> > As for APL, it failed for various reasons eg
> > - mixing up assembly language (straight line code with gotos) with
> > functional idioms
> > - the character set was a major hurdle in the 60s. Thats not an issue
> > when most OSes/editors are unicode compliant
> I know it's bikeshedding, but I think Agda and Idris are more relevant
> to Haskell than APL, since their semantics are closer (and they're both
> implemented in Haskell).
> Agda makes extensive (ab)use of Unicode identifiers,
> eg. https://github.com/agda/agda-stdlib/blob/master/src/Algebra.agda
> Idris specifically avoids Unicode identifiers, for reasons outlined at
> Personally I prefer working in Idris to Agda, since the Unicode puts me
> off. I usually resort to copy/pasting symbols, which is tedious compared
> to typing names.
Thanks Chris for that evaluation. Not bike-shedding as far as I can see.
Yes input-ing things by some GUI-picker or copy-pasting etc would quickly
become a major pain.
I believe that there are roughly these 5 levels to this with
per-char cost decreasing and fixed cost increasing as we go down
1. GUI-picker (IBUS etc) copy-pasting from the web etc -- ok for arm-chair
discussions; ridiculous for serious development
2. Editor based input methods eg tex input-method in emacs
3. Window-system (X/MS etc) input methods
4. OS-based input methods
5. Special purpose hardware-keyboards
I believe 3 makes for a particularly good fixed/variable cost balance point
eg in X-windows if you run this command
$ setxkbmap -layout "us,gr" -option "grp:switch"
with right-alt depressed, gives:
For those who prefer a more moded approach (vi-users?) here is
$ setxkbmap -option "grp:switch,grp:alt_shift_toggle,grp_led:scroll"
This makes the Shift-Alt chord switch in and out (ie toggle) greek keyboard
with the scroll-lock light as indicator
All this is clearly just an analogy; what we need is not a greek keyboard
but a keyboard mapping analogous to gr(eek). Try s/gr/apl in the commands
above for apl which, while distant from haskell gives a taste for what a
*programmer* can use/make.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe