Hacker News new | ask | show | jobs
by beforeolives 1834 days ago
> Maybe, and this is a fat maybe, Greek symbols could make the odd write-once math or scientific code easier to read.

The Julia community has been trying really hard to convince people that this is a good idea and I'm still not on board with it.

4 comments

Scientific computing is actually a use-case I see this working well in; IMO, it's perfectly fine to have terse code that exactly matches up to equations in a longer paper that justifies correctness, etc. (as long as the paper is easy to find from the code!)
It helps here to have good shortcuts (i.e. \tex like commands) for all the symbols. Otherwise writing them is a PITA and nobody will do it (e.g. Go supports full unicode identifiers, when was the last time you saw one in the wild?)
> Go supports full unicode identifiers, when was the last time you saw one in the wild?

Back when someone used them to add pseudo-generics https://old.reddit.com/r/rust/comments/5penft/parallelizing_...

This is the one thing I used to love about Maple back in college. You can compute directly with mathematical symbols, draw matrices and rational numbers the same way you would on paper, and the language runtime understands it. Too bad it's a $5000 license or whatever.
maybe we can have some keyboard plugin/"mode" that merges letters to form symbols in special way?

Korean windows have a "special-emoji" keyboard that can be invoked by: 1. type a charactor 2. press 'hanja' key 3. (wild special character selection menu appears)

example: § (from 'ㅁ') / ㈜ (from 'ㅁ') / ㎖ (from 'ㄹ')

Most Linux environments already have this, it's called "compose key". You may need to enable it in your desktop environment's settings, but then after pressing the key you can press !? to type ‽, 12 to type ½, <= to type ≤, n~ to type ñ, <3 to type ♥, etc. Here's GTK's list: https://help.ubuntu.com/community/GtkComposeTable
It would be nice if this were built into Windows, but in lieu of that, I have been using WinCompose[0] for several years for typing diacritics (as part of my learning French). For example:

* ALT e' = é

* ALT u " = ü

* ALT n ~ = ñ

It's not limited to diacritics; you can type ligatures (ALT ae = æ), extended characters (ALT [/] = ), I assume the majority of UTF (ALT #G = 𝄞) and so on. And yes, even emoji (ALT ALT alembic = )

edit: apparently, HN won't show the checkbox (U+2611) or alembic[1].

[0] http://wincompose.info/

[1] https://emojipedia.org/alembic/

> It would be nice if this were built into Windows, but in lieu of that

Something that's basically equivalent is builtin. Just switch your keyboard from EN-US to EN-INTL, and now several accent characters become dead keys, so ' e = é, etc.

For Windows, the ENG-INTL keyboard layout is pretty good for simple accented characters, covering latin-based European languages [1].

Windows+. also allows you to just type to search for emojis, so e.g. typing WINDOWS+. sad ENTER gives you a sad emoji. Sadly this doesn't work for symbols, even though the Windows+. menu has a good coverage of symbols.

I guess you can always switch your keyboard to Korean input.

1: https://community.windows.com/en-us/stories/keyboard-shortcu...

Julia does this in a pretty simple way, you type \lamdba then press tab and it becomes λ, emojis and many other things work like this, so typing them is very wasy.