News for hackers. Stuff that matters.
Re:X by mkl on Thursday May 21, 2020 @07:40AM (#23257224)
Even without technically changing font, there are more than you might expect: XxˣₓẊẋẌẍⅩⅹ⠭ꭖꭗꭘꭙ🄧⒳ⓍⓧXx𝐗𝐱𝑋𝑥𝑿𝒙𝓍𝓧𝔁𝔛𝔵𝕏𝕩𝖃𝖝𝖷𝗑𝗫𝘅𝘟𝘹𝙓𝙭𝚇𝚡🅇🅧🆇

https://unicode-table.com/en/blocks/mathematical-alphanumeri...

Re:X by qubex on Thursday May 21, 2020 @08:10AM (#23257427)
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).
Re:X by mkl on Thursday May 21, 2020 @10:11AM (#23258538)
That seems obviously true, except it is actually incorrect, at least as far as Python (3) goes.

The following are all interpreted as X in variable names: XⅩX𝐗𝑋𝑿𝓧𝔛𝕏𝖃𝖷𝗫𝘟𝙓𝚇

And these are all interpreted as x: xˣₓⅹx𝐱𝑥𝒙𝓍𝔁𝔵𝕩𝖝𝗑𝘅𝘹𝙭𝚡

I.e. 𝖃𝖝, 𝕏𝕩 and Xx all represent the same variable!

Edit: As a mathematician, this is actually kind of annoying. Sometimes I would love to have different variables named x and 𝐱, or whatever. Oh well, at least I can have θ, λ, φ, π, etc. Autohotkey macros make them easy to type.

Re:X by ineedasername on Thursday May 21, 2020 @10:35AM (#23258825)
Sure, that's true in Python. Python has some reasonable assumptions built into it in this ares. The X programming language, on the other hand, was built by someone whose prior work in language creation was so egregious as to warrant a court order against further such activity. (Only to be overturned, one would presume, on 1st amendment grounds)
Re:X by qubex on Thursday May 21, 2020 @03:09PM (#23263438)
“Language P has a mechanism by which it conflates several different glyphs into a canonical form for the sake of variable names” is not an “actually not true” kind of exception.

A mathematician such as yourself (and myself too) should recognise that asserting different things to be functionally equal is an entirely distinct phenomenon from what is being discussed here, which is differentiating a unique glyph based on a formatting that (font).

Re:X by mkl on Thursday May 21, 2020 @06:10PM (#23266086)
This bit is the incorrect bit: "a computer would never be confused into think they’re even remotely similar". Python is treating different glyphs as if they're the same but formatted differently.
Re:X by bufferoverflow on Thursday May 21, 2020 @08:00AM (#23257355)
I never understood why Unicode has bold versions of characters, that's the function of the font, not the character set.
Re:X by mkl on Thursday May 21, 2020 @08:05AM (#23257383)
Most of them are because they have different meanings in maths, so this makes it easier to represent maths using Unicodemath [1] or MathML.

[1] https://www.unicode.org/notes/tn28/UTN28-PlainTextMath-v3.1...., https://docs.microsoft.com/en-gb/archive/blogs/murrays/unico...

Edit: [2] Similar for Latex https://www.ctan.org/pkg/unicode-math?lang=en

Re:X by dbmueller on Thursday May 21, 2020 @08:10AM (#23257428)
I'm pretty sure the first two links refer to something very different than the third:

The first two are about a way to encode maths using unicode, as in conventions and special characters allowing e.g. to write fractions, aligned equations, etc. So, this would essentially furnish an alternative to the "math" subset of latex (think mathjax or katex) or mathml.

The third is a package for latex, and allows to use unicode symbols (greek letters, math symbols, etc.) in your math environments + something related to the use of unicode in the output (requiring compatible fonts); it seems the second part is the main one but I'm not sure what that means exactly.

Re:X by mkl on Thursday May 21, 2020 @08:12AM (#23257453)
The Latex package says "Maths input can also be simplified with Unicode since literal glyphs may be entered instead of control sequences in your document source." So it at least includes a similar idea.
Re:X by dbmueller on Thursday May 21, 2020 @08:15AM (#23257469)
Superficially similar, yes, but my point was just that it may seem from your bunching up the links together that all refer to the same thing, while they don't.
Re:X by mkl on Thursday May 21, 2020 @08:20AM (#23257521)
Fair enough, I've edited it. I just tried using the Latex package with a formula typed using Unicode symbols, and it does work, but doesn't follow all the UnicodeMath rules.
Re:X by bmn__ on Thursday May 21, 2020 @08:16AM (#23257484)
> why Unicode has

Because the distinction did already exist in the originating repertoire.

https://news.ycombinator.com/item?id=23029871

Re:X by diegoperini on Thursday May 21, 2020 @09:02AM (#23257826)
Symbolically same but semantically different characters are most of the time represented differently in the byte level so that searching in large text can still be implemented as simple byte comparison, if Unicode can be called simple.
Re:X by lonelappde on Thursday May 21, 2020 @09:47AM (#23258276)
"simply byte comparison" is not a term associated with Unicode. Unicode is usually in strings, and reverse engineering a string is -- very hard, and surprisingly I haven't found a paper proving whether it is NP complete.
Re:X by ken on Thursday May 21, 2020 @11:02AM (#23259183)
That's the opposite of the rule for CJK characters, right? For those, symbolically-same characters get the same codepoint regardless of semantics (language) or shape (glyph).
Re:X by lloydde on Thursday May 21, 2020 @08:08AM (#23257404)
I have always assumed this related to achieving a differentiated character set for Math and science formulas.