• Re: Compose Key (was Re: iso646.h)

    From Lawrence D'Oliveiro@21:1/5 to David Brown on Fri Jan 26 21:22:52 2024
    On Fri, 26 Jan 2024 15:59:11 +0100, David Brown wrote:

    On 25/01/2024 21:18, Lawrence D'Oliveiro wrote:

    The compose key on *nix systems gives you a fairly mnemonic way of
    typing many of them.

    It lets you type some, but it is still limited in the default setup.

    The default keys come from /usr/share/X11/locale/en_US.UTF-8/Compose,
    which on my system contains something like 5000 entries.

    It's very useful for things like diacriticals on letters that you
    already have, but if you want to use it for something out of the
    ordinary, you need to make your own .XCompose file.

    Works fine for things like curly quotes “‘’”, em-dashes—, arithmetic operators ×÷, some subscripts and superscripts ₉₂U²³⁹, arrows ←↑→↓.

    I have a small number of entries in my .XCompose, because I don’t want to have to remember too many customizations.

    For less-commonly-used things, I go to an Emacs editor window and use its ability to enter characters by their Unicode names, then copy and paste
    from there.

    And it's easy to have different symbols that appear quite similar as
    glyphs, but are very different characters as far as the compiler is
    concerned.

    You can actually take advantage of that. E.g. from some of my Python
    code:

    for cłass in (Window, Pixmap, Cursor, GContext, Region) :
    delattr(cłass, "__del__")
    #end for

    The human reader might not actually notice (or care) that a particular
    identifier looks like a reserved word, since the meaning is obvious
    from context. The compiler cannot deduce the meaning from that context,
    but then, it doesn’t need to.

    I am not at all keen on that. I am not against using non-ASCII letters
    as though they were special symbols for particular purposes, but I'd
    want them to stand out clearly.

    The whole point about this example is that they do not need to “stand out clearly”.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to Lawrence D'Oliveiro on Sat Jan 27 16:17:47 2024
    On 26/01/2024 22:22, Lawrence D'Oliveiro wrote:
    On Fri, 26 Jan 2024 15:59:11 +0100, David Brown wrote:

    On 25/01/2024 21:18, Lawrence D'Oliveiro wrote:

    The compose key on *nix systems gives you a fairly mnemonic way of
    typing many of them.

    It lets you type some, but it is still limited in the default setup.

    The default keys come from /usr/share/X11/locale/en_US.UTF-8/Compose,
    which on my system contains something like 5000 entries.

    But most of these cannot be typed (by most people), because the
    combinations include things like dead keys that they don't have, or
    letters or keys that are from other keyboard layouts. And many of the
    lines are duplicates, allowing you to use any order of the keys. For
    keyboard layouts without dead keys, such as standard UK and US layouts,
    there's maybe a hundred symbols they can use from that file. Those of
    us with dead keys or other layouts (excluding things like Chinese with
    very different input methods) get perhaps three or four hundred. Almost
    all of these are letters with diacriticals. The whole point of this
    file is to have one file that handles many languages - Russian typists
    will see a different set of 3-400 symbols than Greek typists, but it is
    all conveniently in one file. It is /not/ a set of symbols that someone
    with a en_US.UTF-8 locale can access.

    Out of all this, there are maybe 20-30 symbols.

    Now, I agree that the compose key is a great idea, and a useful way to
    get these symbols. Compose ":" "-" gives you ÷, which is ÷ great for
    people who don't have an AltGr key letting them press AltGr "/" to get
    it. And it lets people who have an English language layout type café,
    ça, naïve, etc., making occasional use of diacriticals. But many of
    these are already available (certainly on *nix, and sometimes even on
    Windows) with an international keyboard layout with AltGr and a few dead
    keys.


    It's very useful for things like diacriticals on letters that you
    already have, but if you want to use it for something out of the
    ordinary, you need to make your own .XCompose file.

    Works fine for things like curly quotes “‘’”, em-dashes—, arithmetic
    operators ×÷, some subscripts and superscripts ₉₂U²³⁹, arrows ←↑→↓.

    I can type all of these, except the subscripts, without the compose key.

    I do sometimes have use of the compose key. But of the symbols or
    letters that I want to type and which are not available on my normal
    keys (including AltGr and dead key combinations), at most a quarter are available in the standard compose key setup. If I expect to need the
    symbol again, I'll often put it into my .XCompose file. As I say, the
    compose key is good, but not /that/ useful in its default setup.


    I have a small number of entries in my .XCompose, because I don’t want to have to remember too many customizations.

    For less-commonly-used things, I go to an Emacs editor window and use its ability to enter characters by their Unicode names, then copy and paste
    from there.

    I use a character map applet. But regardless, it is not convenient for
    most people to use such extra symbols in normal coding.


    And it's easy to have different symbols that appear quite similar as
    glyphs, but are very different characters as far as the compiler is
    concerned.

    You can actually take advantage of that. E.g. from some of my Python
    code:

    for cłass in (Window, Pixmap, Cursor, GContext, Region) :
    delattr(cłass, "__del__")
    #end for

    The human reader might not actually notice (or care) that a particular
    identifier looks like a reserved word, since the meaning is obvious
    from context. The compiler cannot deduce the meaning from that context,
    but then, it doesn’t need to.

    I am not at all keen on that. I am not against using non-ASCII letters
    as though they were special symbols for particular purposes, but I'd
    want them to stand out clearly.

    The whole point about this example is that they do not need to “stand out clearly”.

    Yes, I know that was your point. And /my/ point was that I think that's
    an absolutely terrible idea. But that is merely my subjective opinion.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to David Brown on Sat Jan 27 21:28:30 2024
    On Sat, 27 Jan 2024 16:17:47 +0100, David Brown wrote:

    On 26/01/2024 22:22, Lawrence D'Oliveiro wrote:

    The default keys come from /usr/share/X11/locale/en_US.UTF-8/Compose,
    which on my system contains something like 5000 entries.

    But most of these cannot be typed (by most people), because the
    combinations include things like dead keys that they don't have, or
    letters or keys that are from other keyboard layouts.

    OK, after some examination, here’s the expression I came up with:

    grep '^<Multi' /usr/share/X11/locale/en_US.UTF-8/Compose |
    grep -cvE '<dead|<U|<Cyril|<Greek|<.horn|<kana'

    That comes up with a figure of 1540. Given there were a few more obscure
    names I didn’t bother to filter out, I’d say that figure is only a few dozen too high. Then divide by 2 (crudely) to allow for alternative
    orders, that still leaves several hundred, I would say, that can be typed
    on a regular US keyboard (which we also use in NZ).

    Looking at the list in more detail, I see things like currency signs,
    musical notes, the hammer and sickle, the peace symbol, a heart, single
    and double arrows, a bunch of maths symbols, circled letters and numbers,
    a few APL symbols ... and all typable, if you have a font that can display them.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Blue-Maned_Hawk@21:1/5 to All on Sat Jan 27 22:38:56 2024
    I just use the compose key for all nonascii because i find it more
    convenient to have everything in one place.



    --
    Blue-Maned_Hawk│shortens to Hawk│/ blu.mɛin.dÊ°ak/ │he/him/his/himself/Mr.
    blue-maned_hawk.srht.site
    Despite the fact that you're killing everybody, here's a million dollars.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)