Live data from Hacker News

Sir, Please Step Away from the ASR-33 (2010)

queue.acm.org

61–70 of 291 posts

Re: Sir, Please Step Away from the ASR-33 (2010)

#61

The best thing about using only ASCII for the main syntax is that everyone can type it with their keyboard. I think the recent fad of supporting Unicode identifiers is misguided. Of course, Unicode should be permitted in string literals, but not in the code itself. *Also I don't think Go is better than modern C++, though it might be better than C++99 which was the main standard when the article was written.

But "everyone" doesn't have the same keyboard nor does everyone speak the same language. ASCII is not a universal character set and treating it as such is nothing short of cultural imperialism: "If it's good enough for us, it's good enough for everyone". Artificial limits on language and characters sets might sound simple to you but it introduces a lot of complexity for others. Unicode code solves that problem with n…

>> The best thing about using only ASCII for the main syntax is that everyone can type it with their keyboard.

Well, some keyboard layouts make it harder though. I have spent a considerable amount of time trying to teach programming constructs over Zoom to budding developers in Japan over the past two years. The placement, access mode, and actual typing of characters such as `{`, `$`, `~`, `|`, `:` etc has been the biggest stumbling block during these sessions.

So, there the subset of ASCII that is equally easy to type on all keyboards is smaller than the full range of non-control characters.

> But "everyone" doesn't have the same keyboard nor does everyone speak the same language.

I like that Vim's digraph feature lets me solve the problem in my editor without having to rely on the keyboard layout or OS level preferences. So, typing these lines:

    my $μ = "İstanbul'da hava çok güzelmiş";
    say uc($μ);
takes the exact same keystrokes regardless of the OS/environment I am in:

    m y CTRL-K m * = "CTRL-K \ I s t a
On my own machines, this has the advantage of not having to switch languages in the act of typing (although Win+SPACE is pretty easy on Windows, cycling through the five I have installed is not trivial). And, do I really remember where ø is on the Danish keyboard as opposed to where ö is on the Turkish keyboard?

Re: Sir, Please Step Away from the ASR-33 (2010)

#62
post #14
post #4

If I wanna use something like a ™ I have to google how to enter it, or just google and copy the character. I don't want any extra glyphs in my code until it's just as easy to enter (at close to full speed) as the glyphs I already have access to.

Last year, when I suddenly had to teach symbol-heavy stuff over the internet, I put together a tool for this because my handwriting is just too bad with a mouse or even a tablet. I wanted to be able to "live" calculate with symbols while I talked over it with my students. I called this tool √𝚎𝚍, the rich Unicode text editing suite (RUTED, pronounced ˈruːtɪd) and I use it in vim: https://gitlab.com/ruted/ruted-vim .…

vim has digraphs and it does the same thing.

Re: Sir, Please Step Away from the ASR-33 (2010)

#63

Earlier quoted context omitted.

> The best thing about using only ASCII for the main syntax is that everyone can type it with their keyboard. My keyboard doesn't have a key for NUL, BEL, VT, EOT. What kind of keyboard do you have which has buttons for these?

Let's not be so pedantic. I meant visible ASCII symbols, character codes 32-126 plus newline.

Please start with not making incorrect statements. If you mean something else than what you write, then write what you mean instead.

Re: Sir, Please Step Away from the ASR-33 (2010)

#64
post #10
post #7

Earlier quoted context omitted.

Compose, T, M. https://en.wikipedia.org/wiki/Compose_key

I use the compose key a lot; when writing docs I tend to use → instead of ->, I use – instead of -, etc. I have an extensive XCompose set up for all this, and I find it very convenient. But it's still three keystrokes instead of one. I wouldn't really look forward to using × instead of *, ÷ instead of /, etc. all the time, even though I can type them here with relative ease the hassle increases the more you use it (I…

BTW: there is another obstacle aside from typing issues: readability problems and similarities between operators and ordinary characters with computer fonts.

In case of manually written math equations (or LaTeX-ones) operators are easy distinguishable from arguments. They have a different sizes too.

For example, "result = axe" and "result = a×e" in many cases looks the same and, even in my browser, with font larger, than ones usually used by my colleagues, they are very hard to distinguish. Difference between "result a÷n" and "result a-b" can be spot easier, but it depends on two one-pixel dots.

Ok that was only a mumbling of malcontent - in fact we all know that we all have a sharp, young eyes and we never will be tired or distracted, I'm pretty sure of that. ;)

Re: Sir, Please Step Away from the ASR-33 (2010)

#65
I've recently dipped my toe into APL, and I tend to agree.

APL only really advances from lines of ASCII text to lines of Unicode text. It's still very line-oriented. If Unicode expands toward Tex/LaTeX/&c it could look a lot more like written math. Subscripts are nice, but there's more to it.

Unicode entry is so poorly supported on macOS & Windows it's really not funny. Emacs (C-x 8 ENTER) is my best bet, or Xah Lee's website &c.

If one were to design a new APL, one would be tempted to just use the few characters Apple lets you type with an Option or Command key. (and of course I can't easily type those symbols so I refer to them by six letters each—that's likely not going to change)

All APL needs though (EDIT: and really I mean any language, as long as we have common sequences), is leader key sequences. Rho is `r. To me, it always will be. The interface [1] has this down pat. We should be able to type anything in Unicode with just a few of the 104 keys. Like how T9 allows 12 buttons to type 26, &c.

The world is never going to build a 12,000-key Unicode keyboard. We're going to have to use leader sequences. Just my (beginner's) opinion.

[1] even tryapl.org/ !

Re: Sir, Please Step Away from the ASR-33 (2010)

#66
I use Unicode characters in Java identifiers as much as I can get away with; I wrote a code generator that embeds all kinds of funny brackets that are ‘meaningful’ as an emergent property.

For entry I have symbols cut-and-pasted faster than most people type. Also the completion feature of the IDE works just fine.

Re: Sir, Please Step Away from the ASR-33 (2010)

#67
post #53

Earlier quoted context omitted.

Diversity? Like what, you want source code to be written in Cyrillic or Chinese? Please elaborate. ASCII is the standard, and programmers already learned to deal with it. What's the problem?

Why not? English is a convention only, not a law of computing.

The Tower of Babel. If the source code is proprietary or for education then it doesn't matter, but for the open source world it'd mean division onto multiple different languages where no one can understand and learn from each other. No one is going to learn 5 different alphabets and 12 different languages just so they can understand the source code.

Re: Sir, Please Step Away from the ASR-33 (2010)

#68
post #4

If I wanna use something like a ™ I have to google how to enter it, or just google and copy the character. I don't want any extra glyphs in my code until it's just as easy to enter (at close to full speed) as the glyphs I already have access to.

The thing is, not everyone has your keyboard, and not everyone speaks your language. Having languages support unicode doesn't mean your project must be written using non-ascii characters, it means other people's projects can be.

Re: Sir, Please Step Away from the ASR-33 (2010)

#70

A programming language designed by a Mac user might make use of the symbols §, ±, ≤ and ≥, among others. I think the tyranny of ASCII is really the tyranny of the tragically poor support for entering characters beyond a small national-language set on the commonly-used OSes, especially Windows. (macOS is significantly better here but no utopia.) Windows-1252, MacRoman and so on may not be the standard character sets a…

Character inputs will always differ between platforms and the most common denominator will always end up being popular for text input. Most of the world is on Windows, so most of the world will use Windows text input. From that input, a limited subset of characters will be used for common expressions, because many people simply don't know they can write the ¬ symbol. Does it make sense to use that instead of the exclamation mark for negation? I don't think so.

The US International keyboard has loads of other characters currently not used in programming languages either, whether it's the ¡¿, the ²³ powers, the euro character, guillemets («») or the negation character. If Apple would decide their next Swift project will use the characters only quickly accessible to Apple users, it'll be treated just like that, only accessible to Apple users.

With Apple shipping keyboards that have the £ character where the # character would otherwise be, I wouldn't be so sure if using all the available characters would blow over well.

With ligature support being in every major IDE there's very little reason to step away from the old comparison operators in my opinion.

What OSes make easy to type depends on where you live. It can be quite a challenge to write the Spanish ¿? style operators repeatedly, but there's no reason not to use, for example, ¿expression? instead of parentheses for "if" "switch" statements, or to use ¡expression! as a shorthand for "return". Format strings could just as easily have been written as «string» or „string”, but the characters on the American English keyboard were chosen because they were available on most layouts or out of pure laziness.

I personally prefer US International over Apple's layout. I rarely need to use the paragraph key in normal text processing, and the short shift makes for a very awkward typing experience for me. The vertical enter also just seems like a waste of space to me. I don't really see how Apple's keyboard input is that much better than Windows', their special character set seems just as arbitrary as the rest.

Adding more special characters found in US English only makes the situation worse for people on, for example, Italian keyboards or Polish keyboards, where despite writing in a language based on the Latin alphabet, characters with additional diacritics and such are part of the main layout and deserve separate keys. Cyrillic keyboards are just as bad, lacking most programming characters already because of the larger Cyrillic character set, although they'll have to cope with unaccessibily because of the character set difference anyway.

In my opinion, the amount of special characters used in a programming language should be reduced, not increased. Backticks are already impossible to find on some keyboards, bbut languages like Javascript have gone and used them for format strings anyway. Driving people to learn a special "programmer's" keyboard layout just because the required characters aren't on their native keyboard layouts isn't a good thing. We want more compatibility, not less.

Post reply on HN