I think that violates the “only X, but in different fonts” dictum. Those are technically different glyphs and therefore very distinct names. A font would be the same character tagged in different ways, those are absolutely different characters. Aside from the visual similarity, a computer would never be confused into think they’re even remotely similar (kind of how to us 1000000001 and 10000000001 look almost indistinguishably similar, but are almost impossible for a computer to confuse).
"Since each variable has a corresponding color, assignment is easily represented with background colors. For instance, A denotes the assignment of the number 12345⅔ to the variable #F00BA2. Note that this could also be written as rm -rf /, because we are removing the arbitrary indirect association between text and meaning to focus only on the clear meaning conveyed by the formatting."
I am disappointed that the references at the end are made up and are not the prior art in the obviously important field of non-textual languages. I'd really love to learn about that "system for aromatic computation and its applications in cheese production [7]"!
Back in the late nineties I worked with a software called Origin. It had a BASIC like programming language where variable names consisted of single letters. If you now think 26 variable names should be enough: Some of the letters, like X and Y, had special predefined meaning and you couldn't change that. If you used seem you encountered strange behaviour, like values changing behind your back. To add insult to injury I could never find documentation about which variables were special, so I stuck with the few I new were safe, which were not many...
Like registers in a processor. e.g. the ARM1 had 16 32-bit registers, some of which were special (e.g. one was the pointer to the next instruction). From the point of view of a running program, those registers are the only true 'variables' that the processor had. Everything else was achieved by swapping them in and out of memory. I guess its the same for all processors. So a language with a restricted number of variables is actually pretty realistic - it represents the bare metal quite well.
The old TRS-80 Model 1, Level 1 had 4KB of memory and the only permitted variables were integers (A-Z), and two strings A$ and B$. No decimals, floats etc.
Level 2 allowed any number of letters in a variable name... but only the first two were recognised as unique. CUSTORDER was seen as the same variable as CUSTLINE.
There was a basic programming cartridge for the Atari 2600. It was limited to programs that could fit on a single low-res screen (I think six lines?) and only allowed one or two variables, if I recall correctly. I remember trying to write a simple program on a friend's Atari and found something that seemed really fundamental (maybe altering the value of an index variable in a for loop) was not allowed.
> That's just a "template" file, which I use search and replace in order to generate the three monomorphized go files.
They were using a separate codegen step (really just a sed run) to actually "do generics". In fact, that was the entire reason this thing was introduced[0], the structure originally used interface{} for its items.
The "generic" part was then moved to a `go_` file from which monomorphisations on bool, ArrayT and ScalarT got generated.
Also
> Go allows characters from the Canadian Aboriginal Syllabics for identifiers
I'd expect just about any language which supports unicode identifiers to allow this, as canadian aboriginal syllabics is a "normal" abugida, and its "textual" components are (properly) tagged as XID_Start and XID_Continue.
A good set of variable names could be found in Unicode’s confusables list, starting at line 3795 (or search for CANADIAN SYLLABICS FULL STOP → LATIN SMALL LETTER X)
Algol-60 (and its younger cousin Algol-68) did actually use boldface to distinguish special keywords such as "if", "begin", "true", etc, from the namespace of ordinary identifiers. But that was only used in publications, not in machine-readable source code, since few encodings could support boldface. Instead various stropping[0] methods were used in the implementations of Algol. Today there is really no technical reason why rich text can't be used, but my guess is that syntax highlighting serves a similar purpose without complicating file formats and parsers.
Useful - for what? Do you want that link to be written & maintained by you, or to be automatically generated by the tools? Because we already have the latter... (e.g. in many IDEs, ctrl-/cmd-click on symbols performs useful actions, eg. takes you to the definition or finds all references if you're at the definition site).
It's very hard to survey with precision the exact state of a body of rich text. I don't even like using rich text editors for prose, for this reason. HTML/Markdown are the closest thing we have to "rich text that's explicit and precise", but at that point you're back to plain text with special machine-readable syntaxes. And who wants to write out explicit formatting directives solely so that formatting can then drive program behavior?
I think this hits close to home. I wish creators of new programming languages would reuse syntax of existing programming languages (ideally the ones in the mainstream). Or at least think about it.
Also think if you even need a new language. It seems that too many new languages have features that can be handled by functions or macros in existing languages.
Some languages like Forth, Lisp or Haskell are very powerful, have strong metaprogramming facilities, and most likely can already do anything that would need a new language and new syntax.
Think about it - if you avoid creating another syntax variation, and work with an existing syntax (or better existing language), your chances of somebody actually using your efforts will vastly increase.
I heard a story that someone giving a talk at IAS only used M's on the chalkboard (lowercase, uppercase, doublestroke, script, etx) before he was told to cut it out. I can't remember who it was if anyone else heard the story.
I had a class in grad school where the textbook ran out of english, greek, and hebrew letters and subscripts and resorted to serif vs sans fonts. It was interesting.
I am delighted to see an xkcd comic make it to Hacker News's front page, but also a little disappointed it happened to be this one. It's a perfectly fine comic, but there are so many others that could have engendered even more interesting discussions, which I'd love to have been able to read.
I'm also really missing the xkcd forums. The quality of the discussion was below what I'd expect to read on HN†, but it was still nice to have something for each of the comics.
† No disrespect intended to anyone who was on those forums—you're all great people, but there's less of you, and, well, there's nothing quite like HN.
[+] [-] mkl|5 years ago|reply
https://unicode-table.com/en/blocks/mathematical-alphanumeri...
[+] [-] qubex|5 years ago|reply
[+] [-] bufferoverflow|5 years ago|reply
[+] [-] unknown|5 years ago|reply
[deleted]
[+] [-] lifthrasiir|5 years ago|reply
[+] [-] vinniejames|5 years ago|reply
[+] [-] bisRepetita|5 years ago|reply
[+] [-] Agentlien|5 years ago|reply
http://www.stroustrup.com/whitespace98.pdf
[+] [-] riffraff|5 years ago|reply
[0] https://en.wikipedia.org/wiki/ColorForth
[+] [-] norrius|5 years ago|reply
[+] [-] teddyh|5 years ago|reply
[+] [-] taneq|5 years ago|reply
[+] [-] OkGoDoIt|5 years ago|reply
[+] [-] aasasd|5 years ago|reply
[+] [-] neves|5 years ago|reply
[+] [-] weinzierl|5 years ago|reply
[+] [-] codeulike|5 years ago|reply
[+] [-] Starwatcher2001|5 years ago|reply
Level 2 allowed any number of letters in a variable name... but only the first two were recognised as unique. CUSTORDER was seen as the same variable as CUSTLINE.
[+] [-] dhosek|5 years ago|reply
[+] [-] filipn|5 years ago|reply
Go allows characters from the Canadian Aboriginal Syllabics for identifiers, so you can define structs or methods like this:
You can pretend that go has generics :)[+] [-] masklinn|5 years ago|reply
> That's just a "template" file, which I use search and replace in order to generate the three monomorphized go files.
They were using a separate codegen step (really just a sed run) to actually "do generics". In fact, that was the entire reason this thing was introduced[0], the structure originally used interface{} for its items.
The "generic" part was then moved to a `go_` file from which monomorphisations on bool, ArrayT and ScalarT got generated.
Also
> Go allows characters from the Canadian Aboriginal Syllabics for identifiers
I'd expect just about any language which supports unicode identifiers to allow this, as canadian aboriginal syllabics is a "normal" abugida, and its "textual" components are (properly) tagged as XID_Start and XID_Continue.
[0] https://github.com/google/enjarify/commit/55e8e65e681b15f026...
[+] [-] 0-_-0|5 years ago|reply
[+] [-] robin_reala|5 years ago|reply
http://www.unicode.org/Public/security/latest/confusables.tx...
[+] [-] lucideer|5 years ago|reply
- Thinks of "variable variable" title text joke
- "Now I just need to come up with a scenario that will allow me to make this joke"
[+] [-] accelbred|5 years ago|reply
[1]: https://www.php.net/manual/en/language.variables.variable.ph...
[+] [-] sjagoe|5 years ago|reply
[+] [-] TopHand|5 years ago|reply
[+] [-] weinzierl|5 years ago|reply
[+] [-] bufferoverflow|5 years ago|reply
https://en.wikipedia.org/wiki/Brainfuck
[+] [-] ccmcarey|5 years ago|reply
[1] https://en.wikipedia.org/wiki/Whitespace_(programming_langua...
[+] [-] katsura|5 years ago|reply
[+] [-] Tade0|5 years ago|reply
Imagine having a e.g. link in the code. Wouldn't that be useful?
[+] [-] cuspycode|5 years ago|reply
[0]. https://en.wikipedia.org/wiki/Stropping_(syntax)
[+] [-] virgilp|5 years ago|reply
Useful - for what? Do you want that link to be written & maintained by you, or to be automatically generated by the tools? Because we already have the latter... (e.g. in many IDEs, ctrl-/cmd-click on symbols performs useful actions, eg. takes you to the definition or finds all references if you're at the definition site).
[+] [-] _bxg1|5 years ago|reply
[+] [-] avianlyric|5 years ago|reply
Have you ever wrestled with MS Word to make you heading appear on the right page? Imagine having to do that to make code compile.
[+] [-] rootlocus|5 years ago|reply
[+] [-] tomaskafka|5 years ago|reply
[+] [-] aasasd|5 years ago|reply
Terminals.
[+] [-] gosub|5 years ago|reply
https://en.wikipedia.org/wiki/ColorForth
[+] [-] js8|5 years ago|reply
Also think if you even need a new language. It seems that too many new languages have features that can be handled by functions or macros in existing languages.
Some languages like Forth, Lisp or Haskell are very powerful, have strong metaprogramming facilities, and most likely can already do anything that would need a new language and new syntax.
Think about it - if you avoid creating another syntax variation, and work with an existing syntax (or better existing language), your chances of somebody actually using your efforts will vastly increase.
[+] [-] giggly_gopher|5 years ago|reply
[+] [-] dodleptjdnd|5 years ago|reply
[+] [-] emilecantin|5 years ago|reply
[+] [-] bregma|5 years ago|reply
[+] [-] adolph|5 years ago|reply
http://www.hardhats.org/fileman/pm/cl_dic.htm
[+] [-] Wowfunhappy|5 years ago|reply
Limiting myself purely to more recent ones:
• https://xkcd.com/2307/ - Alive or Not
• https://xkcd.com/2224/ - Software Updates
• https://xkcd.com/2221/ - Emulation
I'm also really missing the xkcd forums. The quality of the discussion was below what I'd expect to read on HN†, but it was still nice to have something for each of the comics.
† No disrespect intended to anyone who was on those forums—you're all great people, but there's less of you, and, well, there's nothing quite like HN.
[+] [-] pella|5 years ago|reply
[+] [-] hprotagonist|5 years ago|reply
https://en.wikipedia.org/wiki/ColorForth
[+] [-] Analemma_|5 years ago|reply