7 ms·
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 se
by eterevsky 5y ago
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?
- leephillips 5y agoYou 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.
- umvi 5y agoThat... sounds like a special keyboard setup to me.
- Avamander 5y agoIt was the default for me.
- lolinder 5y agoThat 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.
- Avamander 5y agoGlad you understand why there's no need to restrict everyone to US-ASCII.
- leephillips 5y agoOK, 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.
- stan_rogers 5y agoAnd again, this helps other people who have to edit your code how?
- leephillips 5y agoWell, if my Julia code ever gets to the point where other people want to edit it, the community has embraced Unicode, so there won’t be a problem there. More generally, I’ll turn my comment into a question: how are people using computers without already having them set up to easily type these characters?
- umvi 5y ago> how are people using computers without already having them set up to easily type these characters? Current solution for most people is google + clipboard For example, to type the word "cliché" here, I googled it, then copied it, then pasted it.
- leephillips 5y agoThat’s not what I would describe as “easily type”.
- harikb 5y agoKeep 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.
- taeric 5y agoI dread the day when I edit some code that has both \Sigma and \sum in the same scope.
- creata 5y agoYou mean ∑ and Σ? Yeah, that'd be terrible. It doesn't seem like it should be Unicode's job to assign meaning to characters, so I don't know why ∑ ("U+2211 N-Ary Summation") exists.
- taeric 5y agoYeah. I was offering up an example.
- a1369209993 5y ago> I don't know why [it] exists. Ill-considered backward 'compatibility' with block-drawing character sets for mathematical typesetting. (Fucked if I know which character set, but presumably the same one they found U+23B2 '⎲' and U+23B3 '⎳' in.)
- taeric 5y agoPretty sure those are necessary with the extenders when you want to sum larger things like integrals. Can't remember the details, though.
- robocat 5y agoAnd 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.
- saiojd 5y agoIt really doesn't have to be. For instance, in Julia IDEs \omega would complete to ω, which takes 2 extra characters to enter (\ and tab). Its not hard to imagine this concept, but applied at the OS level...
- voldacar 5y agoOkay, 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 it. It's absurd that cpus can do billions of ops per second but you can't just type an omega. Absolutely shameful, really. You should dream bigger. A better world is possible but only if people really want to throw out all the shitty designs from the ancient past
- bckr 5y ago> 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.
- voldacar 5y agoSome other people in this thread suggested having a keyboard with little e-ink displays on the keycaps. Then the character map could be completely user-defined. Then you could just have a big bank of keys off to the side to select your desired set of characters, i.e. greek, math, emoji etc. You can already sort of do this in software, but you have to manually remember the location of every character in each extra mapping. But with displays on the keycaps, you could have as many different mappings as you want. And that's how you would be able to type in a sane world
- adkadskhj 5y agoWell damn. I don't have a dog in this fight but boy oh boy do i want that keyboard now. The possibilities of every key being changed to match context sounds awesome. Especially since i love modal editors with visible prompts. Vim/Kakoune users could have their help menu _be_ the keyboard. Every action changes all of your keys to whatever is possible. Sort of mind blowing. Come to think of it, i bet someone has done this with Vim & LED Keycaps. Huh