Live data from Hacker News

The emoji problem (2022)

artofproblemsolving.com

61–70 of 71 posts

Re: The emoji problem (2022)

#61
post #51

I tried giving this to ChatGPT. (Just by uploading the image to the base OpenAI interface.) I expected to either (a) have the model already know the question and give the right answer, (b) hallucinate an answer or (c) refuse to engage with the problem at all. Instead, this happened: https://chatgpt.com/share/682cce62-c53c-8003-be2c-2929395868... Basically, the model confidently outputs a guess, then calculates it, de…

Here's gemini https://g.co/gemini/share/ab287b25648f

I also asked Chat GPT o3 and it thought for 11.5 minutes! https://chatgpt.com/share/682d0993-db4c-8004-a66c-3908ef7203...

Re: The emoji problem (2022)

#62
post #54
post #24

On a related tangent, when I was teaching my younger kids about math and helping with homework, I would often rewrite things as a formula, or rewrite the formula itself once they got to that point. However instead of things like x I would use things like fluffy cloud, star, etc. They thought it was annoying but it still kept them interested and have said they've done the same when helping their peers. It's easy to fo…

> it could be the phrase "total number of kittens" There is this minimalism present in math culture, while I sort of understand it, when tossing and mixing formulas it helps to have everything as small as possible. but later, when it is published it really sucks for readability, "Okay here is an item doing some heavy lifting in this formula what is it for? hell if I know some joker labeled it 'φ' " I like to joke, If…

> don't encrypt it and call it "rho".

These programmers were not hazed enough in their fraternity days. It was not drilled into them that p is rho and that rho is p. Whichever one they choose was always wrong and punished with pushups.

Re: The emoji problem (2022)

#63

Earlier quoted context omitted.

While current year is 2025, the year the language was made in probably isnt

Good or not, many languages choose not to support emoji, even newer ones. The reasons are complicated but, many people prefer unicode normalization so that different forms of what appear to be the same word are considered the same word. People argue whether or not this is important but it can certainly be argued that it would be frustrating to get an error like let café = 1; café += 1; // error, unknown identifier '…

The level of blind trust that English speakers put on non-ASCII characters support always throw me off, knowing username on Windows 11 still has to be short ASCII sequences. Surely it's not 2010 anymore and you only have to recreate the user account rather than clean re-installing Windows, but still.

Non-ASCII comments in a source code can be scary enough sometimes, unless it's for an all-Unicode system like Android or something HTML based.

Re: The emoji problem (2022)

#64
I appreciate the deep dive into the depths of number theory and strange graphs, but what is supposed to be tricky/confusing about the original apple/banana/etc puzzle?

Is there supposed to be some easily confused bit so people argue or just be easy so everyone rushes to show off?

(I got 10, 4, 2; maybe it confused me?)

Re: The emoji problem (2022)

#65
post #55

Earlier quoted context omitted.

Here's Gemini's (brute force?) solution to the problem in C# using fruit emoji variables: https://imgur.com/a/cC5QPH0

Nice! Not going to work, but appreciate the emoji. UPD. This code is like that picture with Disney princesses. The closer you look, the scarier it gets

Yeah, don't deploy this to production :laughing_emoji:

I do use a lot of emojis in logs and status windows and in my comments. I'd not really thought about them in my code, but now I'm going to try to think of a way they could be used to improve code in a sensible way.

Re: The emoji problem (2022)

#66

I appreciate the deep dive into the depths of number theory and strange graphs, but what is supposed to be tricky/confusing about the original apple/banana/etc puzzle? Is there supposed to be some easily confused bit so people argue or just be easy so everyone rushes to show off? (I got 10, 4, 2; maybe it confused me ?)

The “trick” is that there are only three bananas in the last bunch and four in the others. Likewise there is a single coconut in the last equation. It appears this could be interpreted as 1 + 10 + 3.

Re: The emoji problem (2022)

#67

Earlier quoted context omitted.

The early pages of the Swift docs show you can use emojis as variable names, and iirc that was the very first page in the Swift 1.0 handbook. I have a theory that the language design was originally motivated by emojis, because there were also interesting choices around strings, like originally having no ".length" method.

Here: https://docs.swift.org/swift-book/documentation/the-swift-pr... Easter egg: The example is named dogcow, after a 90s Mac icon, designed by Susan Kare, which later became a small mascot: https://512pixels.net/dogcow/ Regarding .length: Effectly that is just the result of Unicode, there is no one-to-one equivalent between characters code points, the code units in an encoding and the resulting grapheme clusters. T…

Yeah I get the justification for the lack of .length, but they eventually added it for a good reason too, which is that anyone calling that doesn't really care and those who do care can use something more specific.

The other aspects of strings are also centered around things being of uncertain length, like how it's O(n) to take the nth character of a string, and how there are rather complicated objects involved in taking substrings. There's a lot more thought and resulting complexity than other languages' default strings. And yes a few languages use extended grapheme clusters, but I feel like emojis were the real motivation.

Re: The emoji problem (2022)

#68

I appreciate the deep dive into the depths of number theory and strange graphs, but what is supposed to be tricky/confusing about the original apple/banana/etc puzzle? Is there supposed to be some easily confused bit so people argue or just be easy so everyone rushes to show off? (I got 10, 4, 2; maybe it confused me ?)

The “trick” is that there are only three bananas in the last bunch and four in the others. Likewise there is a single coconut in the last equation. It appears this could be interpreted as 1 + 10 + 3.

That's actually half a coconut. The smaller one is ambiguous. Is it supposed to be another half or a quarter?

Re: The emoji problem (2022)

#69

Earlier quoted context omitted.

The “trick” is that there are only three bananas in the last bunch and four in the others. Likewise there is a single coconut in the last equation. It appears this could be interpreted as 1 + 10 + 3.

That's actually half a coconut. The smaller one is ambiguous. Is it supposed to be another half or a quarter?

Ohhh. I even looked for stuff like that and didn't notice it. Brains are weird, man.

Re: The emoji problem (2022)

#70

Earlier quoted context omitted.

Here: https://docs.swift.org/swift-book/documentation/the-swift-pr... Easter egg: The example is named dogcow, after a 90s Mac icon, designed by Susan Kare, which later became a small mascot: https://512pixels.net/dogcow/ Regarding .length: Effectly that is just the result of Unicode, there is no one-to-one equivalent between characters code points, the code units in an encoding and the resulting grapheme clusters. T…

Yeah I get the justification for the lack of .length, but they eventually added it for a good reason too, which is that anyone calling that doesn't really care and those who do care can use something more specific. The other aspects of strings are also centered around things being of uncertain length, like how it's O(n) to take the nth character of a string, and how there are rather complicated objects involved in ta…

To clarify, this tradeoff makes sense when you care a lot about complex emojis, but not so much otherwise. Other programming languages' strings can store grapheme clusters too but don't optimize around them. The only other example I found back then was a non-modern alternate Korean script.
Post reply on HN