Live data from Hacker News

Why can't you reverse a string with a flag emoji?

davidamos.dev

161–170 of 247 posts

Re: Why can't you reverse a string with a flag emoji?

#161
post #159

Earlier quoted context omitted.

Why is this stuff even reinvented for every programming language? Isn't it about time that we have some common language that every other language builds on?

So said every writer of a standard immediately before writing another standard to replace all others.

Obligatory xkcd https://xkcd.com/927/

Re: Why can't you reverse a string with a flag emoji?

#162

What I'd like to know is, given the explosion of the character set for emoji, does the rationale for Han unification still make sense? The case for not allowing national variants seems less and less compelling with every emoji they add. This is a bit of a hobby horse, but imagine if every time you read an article in English on your phone some of the letters were replaced with "equivalent" Greek or Cyrillic one and yo…

> were replaced with "equivalent" Greek or Cyrillic one The subset of equivalent letters, or different ones? If they looked the same, it wouldn't bother me if the letters in the center were a single codepoint between European languages: https://upload.wikimedia.org/wikipedia/commons/8/84/Venn_dia...

The problem is they don't look the same. So imagine, for instance, Я instead of "R" or И instead of "N" (I don't think the sounds are actually equivalent but let's run with it for the sake of example). Not insurmountable. One could still read a text with these substitutions. But it'd be distracting, and extra detrimental for people who don't speak English as their first language.

Re: Why can't you reverse a string with a flag emoji?

#163

What I'd like to know is, given the explosion of the character set for emoji, does the rationale for Han unification still make sense? The case for not allowing national variants seems less and less compelling with every emoji they add. This is a bit of a hobby horse, but imagine if every time you read an article in English on your phone some of the letters were replaced with "equivalent" Greek or Cyrillic one and yo…

It doesn't make sense but there's also no way to fix it now. Once the Han characters were unified, there's no non-trivial way to ununify them.

Re: Why can't you reverse a string with a flag emoji?

#164

Earlier quoted context omitted.

> It always feels like the most amount of work goes to the least used emoji. I always feel like those emoji were added on purpose in order to force implementations to fix their unicode support. Before emoji were added, most software had completely broken support for anything beyond the BMP (case study: MySQL's so-called "UTF8" encoding). The introduction of emoji, and their immediate popularity, forced many systems t…

WTF business do emojis have in Unicode? The BMP is all there ever should have been. Standardize the actual writing systems of the world, so everyone can write in their language. And once that is done, the standard doesn't need to change for a hundred years. What we need now is a standardized, sane subset of Unicode that implementations can support while rejecting the insane scope creep that got added on top of that.…

You are underestimating how much language evolves. In fact, you are proposing brakes to stop if evolving. If nothing else, new currency symbols need to be incorporated every few years. The initial emoji were part of the actual writing systems of the world, even if it was relatively new and only being used by foreigners. Or maybe they have been part of world culture since the 1950s :-) ? https://en.wikipedia.org/wiki/Smiley

Re: Why can't you reverse a string with a flag emoji?

#165

If you think the Unicode flag emoji take a lot of bytes, then consider the family emoji! ( https://unicode.org/emoji/charts/full-emoji-list.html#family ) I'm in the process of designing a scripting language and implementing it in C++. I plan to put together a YouTube series about it. (Doesn't everyone want to see Bison and Flex mixed with proper unit tests and C++20 code?) Due to my future intended use case, I needed…

It always feels like the most amount of work goes to the least used emoji. So many revisions and additions to the family emoji and yet it’s one of the ones I don’t recall anyone ever using. I think the trap Unicode got in to is technically they can have infinite emoji so they just don’t ever have a way to say no to new proposals.

This work wasn't done for emoji. They use the same zero-width joiner character [1] that exists to support Indic scripts like Devanagari, and any system that properly handles these languages will also properly handle the emoji.

Yes, this adds a lot of complexity, but it's really a question of whether that complexity is justified in order to support all of the world's languages. And I think many would argue that it is.

[1] https://en.wikipedia.org/wiki/Zero-width_joiner

Re: Why can't you reverse a string with a flag emoji?

#166
post #115

Earlier quoted context omitted.

Exactly this. Humans have incredibly complicated writing systems, and all Unicode wants to do is encode them all. Keep in mind that the trivial toy system we're more familiar with, ASCII, already has some pretty strange features because even to half-arse one human writing system they needed those features. Case is totally wild, it only applies to like 5% of the symbols in ASCII, but in the process it means they each…

>Humans have incredibly complicated writing systems Not only that, there isn't even agreement about what's correct all the time! >it doesn't understand how to spell a bunch of common English words like naïve or café, pretty disappointing. A perfect example of this, since I would argue English doesn't have any diacritics at all. So the use of café is code switching. :)

https://dictionary.cambridge.org/dictionary/english/resume, for example, makes the distinction between "resume" and "résumé" pretty clear.

Re: Why can't you reverse a string with a flag emoji?

#167
post #115

Earlier quoted context omitted.

>Humans have incredibly complicated writing systems Not only that, there isn't even agreement about what's correct all the time! >it doesn't understand how to spell a bunch of common English words like naïve or café, pretty disappointing. A perfect example of this, since I would argue English doesn't have any diacritics at all. So the use of café is code switching. :)

Not a New Yorker writer, I see....

Thank God!

(seriously, every time I read an article from them I get distracted/nerd sniped by their diaeresis use...)

Re: Why can't you reverse a string with a flag emoji?

#168

If you think the Unicode flag emoji take a lot of bytes, then consider the family emoji! ( https://unicode.org/emoji/charts/full-emoji-list.html#family ) I'm in the process of designing a scripting language and implementing it in C++. I plan to put together a YouTube series about it. (Doesn't everyone want to see Bison and Flex mixed with proper unit tests and C++20 code?) Due to my future intended use case, I needed…

Do you have a YouTube for people to subscribe to in anticipation of you releasing your YouTube series about your work? The development processes of new languages is so intriguing.

Re: Why can't you reverse a string with a flag emoji?

#170
It's an emoji... Are there any emojis with only one character? My assumption going in would be that any emoji is > 1 character. Admittedly, despite lots of string processing, I never have to deal with emojis so I guess I'm not sure.

An interesting exercise would be emoji detection during string reversal to preserve the original emoji. I though something like that would be the crux of the article.

Am I wrong about single character emojis?

Post reply on HN