7 ms·
Physicists, mathematicians, and engineers have been writing µ and u on chalkboards for years with no issues. Why should it be harder on a screen?
by dkarl 5y ago
Physicists, mathematicians, and engineers have been writing µ and u on chalkboards for years with no issues. Why should it be harder on a screen?
- dnautics 5y agoIt's not the screen so much as the keyboard that is the problem
- eigenspace 5y agoThey’re very easy to type in Julia’s repl, or any text editor with Julia support. You just type \mu and then hit the tab button and you get μ. I actually switch over to my Julia REPL all the time when I’m emailing someone and want to type a greek character.
- dnautics 5y ago> with Julia support. So you can see how this becomes a bit of a barrier to entry.
- eigenspace 5y agoI'm not sure I'd want to do any serious coding in an editor that doesn't have the most basic support for the language I'm using, but to each their own I guess. For new users, if they're not used to writing unicode characters and don't have an editor with nice support, then they don't have to write them. The julia community has a pretty strong convention of giving both unicode and ascii versions of almost all functions. Some packages don't have this convention, but I'm not aware of any big important ones that don't follow it.
- pjmlp 5y agoAnyone that doesn't use a language aware editor is making themselves a disservice.
- dnautics 5y agothat's not really acceptable. I'm a big julia fanboy, have been since 0.4 (proof in bio) but dismissing real pain felt by newcomers is kind of bad for the ecosystem.
- manwe150 5y agoWhat editor do you use, if I may ask, and have you asked them to add unicode support? Part of the goal in permitting unicode variable names is that more and more niche editors might be forced to become fluent in languages other than english, benefits everyone (and might be a bit overdue at this point). I use vim, and have a completions plugin (part of julia-vim mode), so that I can write \mu<tab> for any unicode name, which makes it as easy to type as "mu", but easier for me to read (as it matches my textbook expectation of the formula).
- dnautics 5y agoIt's not a display issue. Do I want to type ctrl-u <whatever hex> or copy-paste if I want to write some code that calls a function when I'm playing around with a new library? Well those are the two strategies I've used with experience... But some person coming new to Julia will grab some package, and then see some function call and get deer in the headlights "how the hell do i do this". And LaTeX codes are not always obvious. For example it's \triangleleft but \leftarrow
- fnord77 5y agothat's two extra strokes than just "mu"
- dkarl 5y agoCode is read more often than it's written, even scientific computing code.
- gnufx 5y agoIf Emacs doesn't have enough input methods, you can add one reasonably easily... A good deal of early-ish work on multilingual support in Emacs was done out of interest in editing technical text, which is basically the same problem as more-or-less complex natural language scripts (which deserve support anyway, of course).
- Traster 5y agoHow exactly do you type mu? On a chalkboard writing the mu sign is trivial, on a computer... well I don't have a mu button. Edit: There are like 5 replies to this mentioning different ways of doing it (including memorizing 3 digit unicode values) none of which seem more intuitive than writing "mu".
- datastoat 5y agoFor me: alt+enter (switches to Greek keyboard layout), m, alt+enter (back to usual layout). I use Greek symbols in Python and in Javascript. I do it almost without thinking now, as lots of my coding is tightly linked to maths.
- enriquto 5y agoyou can map a useless key like capslock to do that in a single step. Thus to type μ, for example, you simply press CAPS+m, and similarly for all greek letters
- ravar 5y agoWhat is a capslock key, I only have ctrl and hyper ;)
- enriquto 5y agoman, it's the only key that has an assigned light in my keyboard! Funnily, the capslock light in my laptop seems to be detached to the configuration of that key, so that the light shows the parity of the total number of greek characters that I have typed.
- bruce343434 5y agoYou probably have what is called a GUI key, hyper died out with the space cadet keyboard. Caps lock is above the left shift.
- deleted 5y ago[deleted]
- 1270018080 5y agoBecause of keyboards?
- yellowcake0 5y agoThe difference is that form is important in mathematics and not very important in programming. Therefore symbols are used because it makes it easier for the eye to recognize patterns. For example these equations look similar, x^2+4x+5=0 y"+4y'+5=0 Even though one is a polynomial equation and the other is a differential equation, the common visual pattern suggests that the techniques needed to solve them may be similar. On the other hand in programming there's no need to do this, all the math has already been worked out on paper, so it's better to use clear, distinct, easy to type variable names.
- Buttons840 5y ago> form is important in mathematics and not very important in programming How important is form when I'm programming mathematics?
- yellowcake0 5y ago> How important is form when I'm programming mathematics? Not important.
- eigenspace 5y agoAs a physicist who does a lot of mathematical programming for my every day job, I'm going to disagree pretty hard.
- yellowcake0 5y agoWith how I've defined form, I'm not sure how you could. Who in their right mind does math on a computer, math is implemented on a computer, but it's done by hand.
- eigenspace 5y ago> Who in their right mind does math on a computer, math is implemented on a computer, but it's done by hand. Maybe you think this becuase your used to writing math on computers that make writing that math ugly and obtuse? Besides, having the math you've written by hand closely match the syntax you use on the computer can greatly reduce the cognitive burden of switching between code and paper.
- giantrobot 5y agoBesides the good points about the difficulty typing characters, not all fonts have good glyphs for non-alphanumeric (by that I mean low ASCII) characters. Sometimes they don't have those glyphs at all and the system has to go to a fallback font. Terminals can also shit the bed with Unicode characters. The solutions to those problems is to use better fonts, terminals, and editors. Using Unicode characters is fine but some people do have legitimate problems with them.
- dragonwriter 5y ago> Besides the good points about the difficulty typing characters, not all fonts have good glyphs for non-alphanumeric (by that I mean low ASCII) characters Not all fonts are good fonts for an evey use use; heck, not all fonts make 0 and O or 1 and l and I clearly distinguishable. > The solutions to those problems is to use better fonts, terminals, and editors Exactly.
- deleted 5y ago[deleted]
- cbkeller 5y agoOn that topic, I'll throw in a shoutout to Cormullion's excellent JuliaMono font [1,2]! Typing certainly does add more friction between u and µ than a chalkboard would, though it is perhaps also notable that mathematicians seem to have felt that it's worth the effort, and have come up with a quite nice system for it in LaTeX -- and I would certainly not mind seeing more languages and editors add support for LaTeX completions the way the Julia ecosystem has. [1] https://juliamono.netlify.app/ https://juliamono.netlify.app/ [2] https://github.com/cormullion/juliamono https://github.com/cormullion/juliamono
- Sr_developer 5y agoBecause they dont do it at all on a screen. All papers written in Latex use \mu .