4 ms·
How practical is a language that uses all these non-ascii symbols? Do developers remember the alt-codes or do they use visual IDEs like the one OP linked or may
by barbazoo 5y ago
How practical is a language that uses all these non-ascii symbols? Do developers remember the alt-codes or do they use visual IDEs like the one OP linked or maybe even special keyboards?
- naikrovek 5y agoThere was an APL keyboard. And, the APL interpreter/compiler was weird. if you typed an F followed by a backspace, followed by an L, it would merge those into an E, as if they were typed on top of each other, like a typewriter.
- besnn00 5y agoMakes sense because some special functions were meant to be expressed as a combination of symbols. Natural logarithm was ○, backspace, star ; circle was used for logarithms and star was used for both exponentiation and the constant e.
- lanstin 5y agoBack in the day it was special keyboards. (Source I had an internship in 1984 or so, and at night I could use the mainframe for fun. I wrote a calculate digits of Pi with APL program. I had a slowly converging algorithm and the machine despite being bad ass was quite a lot smaller than my iPad, but it was awesome. I did have a deep maths background so was used to at least all the Greek letters).
- dharmaturtle 5y agoIf I were to use a language like this, I'd use AutoHotKey to map certain strings to symbols. I already have several, e.g. α = qalpha β = qbeta ↑ = qup ∀ = qall ¬ = qnot Since you read code more often than you write it, I think it is actually preferable to work with a language like this.
- anthk 5y agovi/nvi/vim has the :ab command with does literally that on typing. In ~/.exrc/.vimrc ab qalpha α ab qbeta β ab qup ↑ ab qall ∀ ab qnot ¬ Also, for rlwrap users: https://github.com/utkarshkukreti/apl-inputrc https://github.com/utkarshkukreti/apl-inputrc
- RojerGS 5y agoWhile you are getting started, your IDE generally has a "language bar" with the glyphs, that you can press to type them, but hovering the language bar will show you the keyboard shortcuts for the glyphs... And you learn the shortcuts fairly quickly, to be honest. Also, most of the symbols have plenty of mnemonics or just end up being in the key you would expect.
- b2gills 5y agoActually 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.)