Live data from Hacker News

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

queue.acm.org

111–120 of 291 posts

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

#111
post #24

> My disappointment with Rob Pike's Go language is that the rest of the world has moved on from ASCII, but he did not. Um, the Go reference explicitly states that "Source code is Unicode text encoded in UTF-8" [1], so I'm not sure what the hell this guy is talking about. The language itself maybe? Well contrary to the author of the article I'm really no fan of Rob Pike and I think he's a massive arrogant prick, but i…

It's even more funny, given the fact Rob Pike co invented UTF-8 with Ken Thompson. So he must know a thing or two about Unicode. Not using Unicode for Go syntax is a great thing.

Both of which coinvented Golang, haha

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

#112
post #97

Earlier quoted context omitted.

You don’t need a “special keyboard setup”. Linux with X11 can do this out of the box. Add a line to your xmodmap file to put the dead Greek key where you want, and you’re done. I type ω by tapping a modifier key and then w. It’s even easier than typing W, because I don’t even have to hold down the modifier.

That... sounds like a special keyboard setup to me.

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 need to type curly quotes and apostrophes, and em- and en- dashes, plus, now and then, symbols like ™ or ©. And I need to be able to type Greek letters when talking about physics or math. So, since my keyboard is already set up to handle all this, and it is easy to do so, for me it is delightful that I can use ω in my Julia code. The math looks more like math, equations take more familiar forms (which makes it easier to spot errors), and the code can be made more expressive. So, for me (but clearly not for everyone) this is not a “special” setup.

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

#113
post #97

Earlier quoted context omitted.

That... sounds like a special keyboard setup to me.

It was the default for me.

That it was your default doesn't mean it was everyone's. OP's argument is that programmers should make it easy for someone else to change their code. It doesn't matter what your defaults were, it matters what the defaults of the next maintainer are.

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

#114

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.

Overall, Unicode is a good idea. That said, languages should limit themselves to a subset of Unicode to avoid the use of glyphs that look too similar or that have too much variation (e.g. emoji).

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

#115
post #100
post #67

Earlier quoted context omitted.

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.

Realistically, English will still the lingua franca for software in the short-term future, and I don't think anyone is saying we should change this. The thing is, for many people "interacting with the worldwide programming community" is not a thing they need. Imagine a computer class teacher in (for example) China teaching primary school children. Why should they need to learn English before starting to write "Hello…

I already addressed education.

> If the source code is proprietary or for education then it doesn't matter

I'm not forcing you to speak and teach children in English. My country actually was under cultural imperialism and people back then weren't allowed to speak or learn in our native language. And you make it sound like a joke, but whatever.

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

#116
I think it's good to think outside the box. Maybe incorporating some tried and true Unicode would make sense.

However, I don't think the issue is ASCII but rather consistency. I'm making a C-competetor language and using "c-like syntax" except I'm enforcing consistency. () is always one or more statements, with the last expression returning the value. {} is always representing concrete data like a struct, array or function args/result. []? That's a piece of a type name, allowing the developer to name something Foo[U32; Str]

fn foo: {a: U32, b: Str} -> U32 ( if a > 5 then b + "is greater then 5" else b + "lte 5" ) )

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

#117

Earlier quoted context omitted.

Having to do math and physics heavy work, I very much support the "fad" of having Unicode literals. "omega_0" is much worse than "ω_0" especially if you have tons of these variables. If you don't do math it's difficult to understand, but try writing without the alphabet and expressing the same concepts. Possible but clunky

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...

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

#118
post #67

Earlier quoted context omitted.

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.

There is already open source software written in other languages.

Sometimes identifiers and comments are transliterated into ASCII, sometimes they remain in the original script.

Of course, they won't get many contributions from English speakers. They will get more contributions from speakers of that language. That decision is for the project to make, not others to impose.

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

#119
post #91
post #60

Earlier quoted context omitted.

Part of the problem here is that a variable in mathematics is a different concept from a variable in programming. Mathematicians are used to using one letter variables. Using a set of unwritten naming rules, mathematicians almost always know what concepts the variables are referring to (in a mathematical context). So, I'd say if the code is only to be maintained by mathematicians, one letter variables for mathematica…

I'm also under the impression that mathematicians generally work much more deeply with a smaller set of variables, so you actually don't need to name that many individual concepts. A typical program contains thousands and thousands of "named things", so you're naturally going to see a proliferation of names. That just doesn't seem to be that necessary in math once you're working in a particular context (e.g. statisti…

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.

Post reply on HN