Live data from Hacker News

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

queue.acm.org

191–200 of 291 posts

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

#191

Earlier quoted context omitted.

English is not my first language and my native language doesn't use Latin script, still all the keyboards that I ever saw supported entering ASCII characters. As far as I know all the keyboards that are in active use support English layout. We shouldn't dismiss this as "cultural imperialism". Instead we should use this to our advantage. Currently source code written in China or in Russia can be read by developers in…

The availability of alternative commercial keyboards is possibly not the best metric to use to judge actual need/desire. There are a large number of non-ASCII layouts that can be mapped on top of a standard QWERTY[0] which show that ASCII is not a valid assumption for a modern general purpose programming language. The idea that we should all be grateful for the unification that using one language brings is a sentimen…

Please lookup in Image Search a Russian keyboard and a Japanese keyboard. What do they have in common? Right, besides the respective alphabets they have QWERTY Latin layout on them. Basically all of the keyboards can be used to input ASCII symbols out of the box.

I don't really care whether you call this cultural imperialism or not. What matters is that a whole industry can use the same standard worldwide. It's the same as metric system. We already have to deal with imperial system, imagine how much more painful would it be if every country used its own measurement system or its one calendar.

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

#192

Earlier quoted context omitted.

I respectfully disagree with this. I do a lot of maths-heavy work, but for me in languages (not Julia!) being able to quickly write the LaTeX names for symbols is more than enough. It's also much quicker, and easier to search for when reading someone elses' code. I personally find it also helpful to make the distinction between the maths and its implementation, though I accept that others would vehemently disagree iw…

It makes it easy to type, but does it make it easy to read/maintain? As they say, it's already way too easier to write code than to read it. A programmer should make every effort to make code more readable. An editor should make it relatively easy to enter special symbols (especially if you can specify a limited set); it is totally solvable problem. An editor can only help you so far with reading code...

For me, the biggest problem with the whole maths ---> code mapping is that of nested brackets. For a random quick example, I mean things like

    (a*(1+exp(1i*theta[0,:]))+foo(x))/((b-cosh(bar(x))+(b+sinh(y[:,-1])). 
The sort of thing where it just _looks_ far nicer on a page with like _real fractions_ -- where missing a bracket or changing the order of two brackets can _totally_ bugger you. Yes, changing the form of the expression a bit can make it "far nicer" or simpler -- for example, by defining intermediate terms -- but sometimes there's something to be said for matches in the paper.

Another example where I think ASCII actually _is_ limiting is for entries of matrices directly. I mean, we try, but I'm not convinced we succeed. For an example (picked at random), hands up if you think this is a nice Euler angle transformation, where cphi/sphi etc are the cosine and sine of phi? No matter how you write it, it's going to be ugly.

   alpha = [cpsi*cphi-ctheta*sphi*spsi   cpsi*sphi+ctheta*cphi*spsi  spsi*stheta;
            -spsi*cphi-ctheta*sphi*cpsi  -spsi*sphi+ctheta*cphi*cpsi cpsi*stheta;
            stheta*sphi                  -stheta*cphi                ctheta];

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

#193
post #133

Earlier quoted context omitted.

Translation: i learned my domain’s variable names, so you should have to as well. Currently learning some dsp. One of the biggest barriers to entry has been the inscrutable variable names inherited from the field’s math connections.

Feel free to reason about a complex statistics formula with full-blown variable names. There are reasons for short variable names. Pass into a specific function a descriptive name of what you do, but do use the mathematically "accepted" writing mode in the implementation of a well-known function.

> There are reasons for short variable names

Which are? I suspect the reasons are a combination of the price of paper and ink, the history of teaching using chalkboards. None of those mean we can’t make the canonical version of an equation the expanded representation.

Why do we all know e=mc2 and not energy = mass * lightspeed^2.

The broader the base of people that have to interact with a formula, the less mathy the terminology tends to be. Think of trigonometry. Instead of greek letters the sides of a triangle and the functions get real world names. Sine(angle) = opposite / hypotenuse. Sure when you write that out you use sin ϴ = O/H but that’s just a compressed representation of human-readable variable names.

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

#194
post #136

Earlier quoted context omitted.

I have a degree in math and I disagree with this. ω_0 definitely looks better than omega_0, but it is much harder to enter unless you have a special keyboard setup. Suppose you write a function that uses a variable ω_0, and somebody else wants to change it. Unless they have the same keyboard setup as you, they will have to just copy-past it everywhere. And what if you have several variable with special names?

Keep in my that in Unicode there are several symbols that look alike. It is not just the character set that matters, but how many of such things we have. May be instead of arguing for Unicode, community needs to come up with a unambiguous smaller set of symbols languages should support.

And ASCII has the reverse problem: one symbol gets extremely overloaded semantically (syntax wars?!).

Tell me what does ":" mean?

Now if I tell you the language is Typescript, what does "?" mean?

I personally believe semantic overloading causes a lot of problems, but we are so steeped in the existing limitations that we don't recognise it is a problem.

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

#195
post #165
post #143

>> For some reason computer people are so conservative [...] Well, one of the underlying reasons for the lack of imagination might be... keyboards . If keyboard keys were small e-ink displays, easily configurable and accessible by programs, programmers would have come up with a lot of interesting stuff already. We do it with function icons in regular interfaces. If we could intergrate with keyboards, we'd definitely…

> If we could intergrate with keyboards, we'd definitely take advantage of it. From my own personal experience this is extremely true. A while back I made myself a custom keyboard [0] which can enter lots of characters, mostly for linguistic tasks. I didn’t intend to start using it for things outside linguistics, but before long I was using it everywhere — and my inventory of available characters expanded correspondi…

For anyone on Vim, you can insert lots of special characters by hitting Ctrl+K: =3 is ≡, -> is →, l* is λ, M- is —, etc. You can also run :dig! to see a list of all digraphs, and :help digraph for information on how to define your own.

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

#196
post #165
post #143

>> For some reason computer people are so conservative [...] Well, one of the underlying reasons for the lack of imagination might be... keyboards . If keyboard keys were small e-ink displays, easily configurable and accessible by programs, programmers would have come up with a lot of interesting stuff already. We do it with function icons in regular interfaces. If we could intergrate with keyboards, we'd definitely…

> If we could intergrate with keyboards, we'd definitely take advantage of it. From my own personal experience this is extremely true. A while back I made myself a custom keyboard [0] which can enter lots of characters, mostly for linguistic tasks. I didn’t intend to start using it for things outside linguistics, but before long I was using it everywhere — and my inventory of available characters expanded correspondi…

See also the Compose key: https://en.wikipedia.org/wiki/Compose_key.

I started using a Compose key under Linux five or six years ago. I have progressively accumulated fairly extensive customisation in my ~/.XCompose. (e.g. Compose+;+; = ‘, Compose+"+" = ”, Compose+"+` = ″, Compose+z+Space = ZWSP, Compose+Space+' = NARROW NO-BREAK SPACE, Compose+++1 = THUMBS UP SIGN), Compose+-+-+= = −, Compose+l+* = λ.) Some are of my own division, and some (like Greek letters) are copied from Vim’s digraphs which I had used commonly before setting up a Compose key. I consistently type exactly what I mean. (If I type a straight quote, I meant a straight quote.)

My last laptop ended up being a Surface Book; had WinCompose not existed, I wouldn’t have been willing to shift to Windows.

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

#198

Earlier quoted context omitted.

I have a degree in math and I disagree with this. ω_0 definitely looks better than omega_0, but it is much harder to enter unless you have a special keyboard setup. Suppose you write a function that uses a variable ω_0, and somebody else wants to change it. Unless they have the same keyboard setup as you, they will have to just copy-past it everywhere. And what if you have several variable with special names?

Okay, so we need better keyboards then. If a character is annoying to type, that is a keyboard problem, not a language or charset problem. So let's improve the keyboard. Currently we are stuck with the garbage qwerty keyboard (and various slightly better permutations of it) which doesn't even let you type all of ascii. Computers should just do what humans want. If you see a character, you should just be able to type…

> If you see a character, you should just be able to type it.

How should we do this?

I am imagining that we have a "char-bank" that lives on a little touch display at the left of my keyboard. I can add chars to my bank by highlighting them and pressing a 'yank' key. I can scroll up and down through my charbank and type the chars with a tap or rearrange them with touch-and-hold similarly to apps on a phone's homepage.

If I want to map a char to my keyboard, I can press and hold a "map" key, tap the char, and press the key I want to map it to. If I want to map the char directly from the screen I highlight it and press the map and yank keys together.

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

#199

Earlier quoted context omitted.

OK, I guess that’s a reasonable use of the word “special”. Here is what I was trying to get at: I can not effectively use my computer for anything without customizing the keyboard a little. I need to make the capslock key into an extra control key. I need to set up a compose key so I can type accents when writing in Spanish (even if I didn’t do that, what about writing people's names?). Even sticking with English, I…

Right, but the whole point of language design is to be used by many people. I’ve programmed for 30 years and have never customized my keyboard setup. If you want to create a language for both of us, sticking with standard keyboard characters seems like the best choice.

What do you mean by standard keyboard characters? Pretty sure characters on keyboards are often country and language dependent.

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

#200
post #139

> And need I remind anybody that you cannot buy a monochrome screen anymore? Syntax-coloring editors are the default. Why not make color part of the syntax? Why not tell the compiler about protected code regions by putting them on a framed light gray background? Or provide hints about likely and unlikely code paths with a green or red background tint? I'm colorblind, please never do that. Syntax highlighting is fine…

Yeah, I'm a blind coder and having color matter like this does not sound like fun.
Post reply on HN