Hacker News new | past | comments | ask | show | jobs | submit login

Actually once you setup a compose key it can become second nature.

I program in Raku, which can be written using only ASCII, but it can be clearer if you mix in a bit of Unicode.

For example, a raw quote can be written like this using only ASCII

    Q[C:\Windows\]
Or you can write it like this

    「C:\Windows\」
To get those two characters I have added these two sequences

    Compose [ [
    Compose ] ]
I use them so often that it was worth making them a double press of the same key. The other options would have probably been `Q[` and `Q]`.

Another example is

    * * *
That is a lambda that takes two arguments and multiplies them together. It is also much clearer as

    * × *
I didn't even have to add this

    Compose x x
There is also

    1, 2, 3 <<+>> 40, 50, 60
    1, 2, 3  «+»  40, 50, 60

    @array>>.is-prime
    @array».is-prime
These were also already there

    Compose < <
    Compose > >
Most of the compose sequences I have added match the ASCII equivalent. Which makes it very easy to remember them, even though I may not use them often.

    π   pi
    τ   tau
    ∪   (|)
    ⊎   (+)
    ∩   (&)
    ≡   (==)
    ≢   !(==)
(That is I type `Compose p i` for `π`, and it is equivalent to `pi`.)

or are at least similar

    Unicode
        Compose
                #   Actual ASCII

    ∅   set     #   set()
(That is I type `Compose s e t` and it is equivalent to `set()`.)

Though some of the ASCII operators are apparently too long to do that with.

    ∈   (el)    #   (elem)
    ∉   !(el)   #   !(elem)
    ∋   (co)    #   (cont)
    ∌   !(co)   #   !(cont)
I would like to point out that I actually had to read my .XCompose to remember how to type this last four. I don't use them as often as `「」`, and they don't match the ASCII like `≡`.

There are also some that I had to make the compose sequence longer.

    ∘   &o      #   o
---

There are some codes that I just remember for some reason like `U2424` is `␤`. (That's not even an operator in Raku, though it is useful for messaging the camelia eval-bot on irc.)




Applications are open for YC Winter 2022

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: