top | item 45016263

It’s not wrong that (for HN) “[facepalm emoji]”.length == 36

34 points| program | 6 months ago |zaerl.com

59 comments

order

dang|6 months ago

Recent and related:

It’s not wrong that "\u{1F926}\u{1F3FC}\u200D\u2642\uFE0F".length == 7 (2019) - https://news.ycombinator.com/item?id=44981525 - Aug 2025 (274 comments)

(btw the title edit on that one was for fun, and came about this way: https://news.ycombinator.com/item?id=44981808)

Also related:

It’s not wrong that "🤦🏼‍♂️".length == 7 (2019) - https://news.ycombinator.com/item?id=36159443 - June 2023 (303 comments)

String length functions for single emoji characters evaluate to greater than 1 - https://news.ycombinator.com/item?id=26591373 - March 2021 (127 comments)

String Lengths in Unicode - https://news.ycombinator.com/item?id=20914184 - Sept 2019 (140 comments)

(as you can see, we've taken quite a few different whacks at that piñata of a title over the years)

program|6 months ago

Thanks for fixing the title of this post! [U+1F642 slightly smiling face emoji] (I wrote the post)

myfonj|6 months ago

I see delightful unintended layer of irony in a fact that what the page really uses for the Emoji display are in fact image elements: JavaScript on that page replaces Unicode text with them. So the main heading content

    It’s Not Wrong that “[that formidable facepalm]”.length == 36
(sic syntactically wrong quotes) is in reality (for JS-capable and enabled clients) presented as

    <h1 class="wp-block-post-title">It’s Not Wrong tha
    t (for HN)&nbsp;“<img draggable="false" role="img"
     class="emoji" alt="[that formidable facepalm]" sr
    c="https://s.w.org/images/core/emoji/16.0.1/svg/1f
    926-1f3fc-200d-2642-fe0f.svg">”.length == 36</h1>
(arbitrary line breaks added for convenience). Here the "true" `.length` of the (scare)quoted content is: 144.

---

This comment is brought to you thanks: "View Selection Source" context menu entry in Firefox.

subarctic|6 months ago

Great introduction, where's the rest of the article?

merelysounds|6 months ago

Perhaps the title should be changed to:

It’s Not Wrong that (for HN) “[facepalm emoji]”.length == 36

Or some alternative if the above is too long, like:

“[facepalm emoji]”.length == 36

Both seem more accurate than the current:

It’s Not Wrong that (for HN) “ ”.length == 36

chuckadams|6 months ago

That's kind of the whole joke.

franky47|6 months ago

"[man with blue shirt facepalm emoji]".length == 36

Checks out.

johnisgood|6 months ago

Or use "[facepalm emoji]" instead of the emoji itself or something.

MangoToupe|6 months ago

Only if you're counting bytes

stickfigure|6 months ago

Grumpy old guy: Can we just stop with new unicode characters? We don't need to be able to capture every human thought or concept in a character. Feels like the Unicode Consortium is chaired by Funes the Memorious.

deepsun|6 months ago

The main pain for me is that most tools now sexualize the emojis: they force me to choose between :man-facepalm:, :woman-facepalm: and just :facepalm:.

For. Every. Single. Emoji.

I don't remember a case when I really wanted a sexualized version, I always want to express just an emotion. Just remove all the prefixed versions, and leave the pure one.

chrismorgan|6 months ago

> “[facepalm emoji]”.length

Are there any even mildly-popular languages that use, or allow, curly quotes for strings? I’d kinda like there to be at least one.

tremon|6 months ago

Perl has quote operators which come close, but they start with a letter followed by your choice of delimiter:

  my $string1 = q{for example};
  my $string2 = q<angle brackets>;
  my $string3 = q/or any other symbol/;

dragonwriter|6 months ago

Like as delimiters? Ruby kind of does, in that:

  %{hello, world!}
is one way to write a string literal.

monkeyelite|6 months ago

I don’t want emojis in the headlines please. It makes it difficult to read and becomes an arms race for attention.

Also I’m not even sure it was a good idea to put them in text. Emojis are a special case that breaks a lot. Now you have to worry about multiple colors, etc.

kps|6 months ago

It pisses me off that Unicode retroactively changed the meaning of existing text by turning some symbols into emoji. So much for stability guarantees.

dcminter|6 months ago

I emailed the site to see what the policy is.

Generally I agree with you, but in rare cases like the article that this one is meta-commentary to it might perhaps have been justifiable to allow it? I see the "slippery slope" risk though.

65|6 months ago

These articles are about emojis and how they work, I don't see how having one in the title is a problem.

mbb70|6 months ago

A huge and growing percent of all realtime communication is happening via text.

It is reasonable and worthwhile to encode some nonverbal information in it, and emojis have won the day.

bigstrat2003|6 months ago

It definitely wasn't a good idea. Emojis aren't text, they don't belong in Unicode at all. It would be one thing to encode, say, Egyptian hieroglyphics. That would be legitimate. But putting emojis into Unicode was against the purpose of the standard and a huge mistake.

Joker_vD|6 months ago

> " ".length == 36

Heh. In my code, I always (idiosyncratically, I admit) spell '\x20' as '\x20' (or even just as 0x20, if it's C), unless it's a part of a multicharacter string e.g. "Hello world!": it just feels wrong to have an empty space inside single quotes. Is it really just U+0020 in there? Is it supposed to be U+0020 there? Silly worries, I know, but I just don't like the way ' ' looks.

zenethian|6 months ago

You should read the article...

criddell|6 months ago

If you are on Chrome, hover your mouse over the link to the article and look at the URL displayed in the bottom left corner (at least that's where Chrome puts it on my machine).

Retr0id|6 months ago

A good text editor will make all whitespace variants visually distinct.