News for hackers. Stuff that matters.
Re:Which word begins with "y" and looks like an axe in this ... by Jun8 on Wednesday January 17, 2024 @06:01PM (#39034845)
No, although this answer is awesome and very well researched, it cannot match the famous answer to the question about parsing HTML using regular expressions :-) : https://stackoverflow.com/questions/1732348/regex-match-open....

BTW, I got curious about the highest scored answer and this meta answer explains how to find it: https://meta.stackoverflow.com/a/266570. The highest scored answer is this one: https://stackoverflow.com/questions/11227809/why-is-processi... (of course this is related to teh size of the community)

Re:Which word begins with "y" and looks like an axe in this ... by lolinder on Wednesday January 17, 2024 @06:24PM (#39035085)
The best part about that RegEx answer is the moderator's note at the bottom.

> Moderator's Note

> This post is locked to prevent inappropriate edits to its content. The post looks exactly as it is supposed to look - there are no problems with its content. Please do not flag it for our attention.

From back in the day when Stack Overflow was fun.

Re:Which word begins with "y" and looks like an axe in this ... by nullhole on Wednesday January 17, 2024 @06:50PM (#39035348)
Hi lolinder, welcome to HackerNews. Your comment implies that Stack Overflow isn't currently fun. You are of course well within your rights to make that assertion. However, I find that your comment may be improved by removing any implication that Stack Overflow isn't fun. So I invite you to explain your reasons and maybe consider future improving edits to your post.
Re:Which word begins with "y" and looks like an axe in this ... by exikyut on Wednesday January 17, 2024 @07:43PM (#39035884)
Comments are not for extended discussion; this conversation has been [moved to chat].
Re:Which word begins with "y" and looks like an axe in this ... by Waterluvian on Wednesday January 17, 2024 @07:31PM (#39035757)
This is almost too polite to be Stack Exchange satire.
Re:Which word begins with "y" and looks like an axe in this ... by Vicinity9635 on Wednesday January 17, 2024 @08:02PM (#39036076)
I feel like a lot of commenters here mistake passive-aggression for politness.
Re:Which word begins with "y" and looks like an axe in this ... by Waterluvian on Wednesday January 17, 2024 @08:25PM (#39036285)
Well I guess some of us just have a higher tolerance for passive-aggression.

… ;)

Re:Which word begins with "y" and looks like an axe in this ... by kkoncevicius on Thursday January 18, 2024 @02:46AM (#39039100)
Nowadays it seems like every other comment on Stack Exchange is full of forced and phony politeness. That's in their rules too.
Re:Which word begins with "y" and looks like an axe in this ... by CRConrad on Monday January 22, 2024 @07:11AM (#39088626)
A bit like HN in that regard.
Re:Which word begins with "y" and looks like an axe in this ... by fenomas on Wednesday January 17, 2024 @08:25PM (#39036278)
Here is a comment that must be helpful because it got upvoted, but it's impossible to understand because the sibling comment it replies to is hidden somewhere at the bottom of the comment list.
Re:Which word begins with "y" and looks like an axe in this ... by omgmajk on Thursday January 18, 2024 @03:21PM (#39047113)
Re:Which word begins with "y" and looks like an axe in this ... by matheusmoreira on Wednesday January 17, 2024 @11:11PM (#39037717)
I miss those days. I tried to go back there now and discovered things had escalated up to Wikipedia tier deletionism.
Re:Which word begins with "y" and looks like an axe in this ... by Aeolun on Thursday January 18, 2024 @06:24AM (#39040500)
Hmm, I recently thought it would be a great idea to answer a question on SO again, and did that by first posting a link. Then I realized how useless that would be if the link disappeared, so I clicked edit and pasted the actual info.

All this took like 20 seconds, but the hounds had already descended. Someone had posted a note on an answer that was literally 20 seconds old saying that it could be improved.

When I responded with an offended comment they deleted all their comments, and I lost the ability to report them.

That was the first, and also the last time in the past 4 years I thought to post anything there.

TH̘Ë͖́̉ ͠P̯͍̭O̚ N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ

Re:Which word begins with "y" and looks like an axe in this ... by User3456335 on Thursday January 18, 2024 @11:53AM (#39044133)
You wanted to report them for asking you to do the thing that you also thought had to be done? What would you even report them for? Giving valid criticism? Responding quickly?
Re:Which word begins with "y" and looks like an axe in this ... by Aeolun on Thursday January 18, 2024 @09:14PM (#39050828)
There is something like malicious compliance. And just being mean spirited in general.
Re:Which word begins with "y" and looks like an axe in this ... by dotancohen on Wednesday January 17, 2024 @06:12PM (#39034938)
Have you read this one? It's got the HTML parser answer beat by a lap and a half.

The only comparable answer I'd ever seen was something on Seasoned Advice, the culinary SE. I'll have to go dig that up.

Re:Which word begins with "y" and looks like an axe in this ... by jaxrtech on Wednesday January 17, 2024 @08:29PM (#39036313)
“Even Jon Skeet cannot parse HTML using regular expressions.”
Re:Which word begins with "y" and looks like an axe in this ... by hardlianotion on Wednesday January 17, 2024 @09:18PM (#39036696)
He meant Chuck Norris.
Re:Which word begins with "y" and looks like an axe in this ... by earleybird on Wednesday January 17, 2024 @10:16PM (#39037249)
Jon Skeet is who Chuck Norris calls when confronted with a regex[0]

(Apologies for the Medium link)

[0] https://medium.com/geekculture/the-chuck-norris-of-programmi...

Re:Which word begins with "y" and looks like an axe in this ... by behnamoh on Wednesday January 17, 2024 @09:19PM (#39036701)
My favorite is this one:

    A bear falls into a well. The depth of the well is 19.617 meters, and it takes the bear 2.0000 second to reach the bottom of the well. What is the color of the bear?
https://qr.ae/pKqzpC
Re:Which word begins with "y" and looks like an axe in this ... by lifthrasiir on Wednesday January 17, 2024 @10:59PM (#39037607)
I don't really like that because it's obviously a troll question. Its wording and a large number of significant digits clearly demands the acceleration of gravity to be reverse-engineered, so it can't be a real question even by a chance. One thing to consider if it's indeed real: how much water is in that well?
Re:Which word begins with "y" and looks like an axe in this ... by hinkley on Wednesday January 17, 2024 @11:57PM (#39038047)
One variant of this question was designed to test the theory that students try to fit the inputs to an answer regardless of whether the answer has anything to do with the question.

People see this as some sort of failing of students but I think it says more about the teachers. You’ve overtrained students on problems that mean nothing to them, then you throw another nothing problem at them that’s simply three times as much nothing as the usual level of irrelevance.

Randall Monroe said it best: we should be teaching high school students how to split the bill for a birthday dinner. That’s more complicated math than most 20 year olds can correctly manage. It’s also what they’re going to do with math about 75% of the time.

Re:Which word begins with "y" and looks like an axe in this ... by throwaway167 on Thursday January 18, 2024 @12:30AM (#39038268)
> how much water is in that well?

Given the viscosity of air vs. water, one might assume there's no water in the well. Also, given some surface area of a bear, and air pressure from a cushion of air formed under the falling bear, the fall speed does seem a little high, at least for a calculation with that number of decimal places, but perhaps the well was located in the crust of the earth where gravity's a tad higher.

Living bears are also buoyant, and will be slowed down considerably on meeting the water, so the bear is unlikely to have reached the bottom of a water-filled well for a long period, if at all.

To answer OP, I'd say the bear is brown, because of the mud from the base of the (somewhat empty) well. However to an outside observer, given the lack of light in the well the shade of brown might not be discernable. A human in the well with the bear will see the colour of the bear as a low relative concern compared to A) being in a well and B) being in a well with a bear.

Re:Which word begins with "y" and looks like an axe in this ... by thaumasiotes on Thursday January 18, 2024 @01:09AM (#39038517)
> Its wording and a large number of significant digits clearly demands the acceleration of gravity to be reverse-engineered

I think if a bear fell into a well, there would be friction between the bear and the side of the well...

Re:Which word begins with "y" and looks like an axe in this ... by oneshtein on Thursday January 18, 2024 @02:51AM (#39039139)
If bear is alive and not oiled, then yes.
Re:Which word begins with "y" and looks like an axe in this ... by CRConrad on Monday January 22, 2024 @07:15AM (#39088659)
Fur is probably pretty low-friction to begin with. Also, bears presumably have wax glands in their skin like other mammals, so if the bear hasn't showered very recently that would lessen the friction even more.
Re:Which word begins with "y" and looks like an axe in this ... by bregma on Thursday January 18, 2024 @06:57AM (#39040701)
Well, if we start by assuming the bear is perfectly spherical and there is no friction...
Re:Which word begins with "y" and looks like an axe in this ... by Ekaros on Thursday January 18, 2024 @02:28AM (#39038998)
What is definition of bottom of the well? The water level or the possible bottom when pumped empty or dry?
Re:Which word begins with "y" and looks like an axe in this ... by ziptron on Wednesday January 17, 2024 @09:47PM (#39036961)
Maybe I am bad at promoting, but I could not get ChatGPT3.5 anywhere near a logical process to answer this question.

https://chat.openai.com/share/67998d60-0f81-410e-ba8b-ec5a0f...

Re:Which word begins with "y" and looks like an axe in this ... by jiggawatts on Wednesday January 17, 2024 @10:28PM (#39037356)
I couldn't get GPT4 to answer it either, even with several variations on the prompt. It gets too fixated on the "bear" part, so it just assumes that the answer is "white", because that's a "common trick question".

I find it interesting that it disregards the rest of the question, and just picks "the most common answer to a trick question involving the color of a bear"!

Re:Which word begins with "y" and looks like an axe in this ... by fbn79 on Thursday January 18, 2024 @06:55AM (#39040683)
Chat GPT 3.5: https://chat.openai.com/share/9187924c-64ab-4246-a2b0-0c9cea...

Regenerate for more languages solutions

Re:Which word begins with "y" and looks like an axe in this ... by philwelch on Thursday January 18, 2024 @04:33AM (#39039778)
I like the work he put into the answer but he totally flubs it at the end. Black bears are actually dark brown and brown bears are also brown, so there’s no need to try and guess a specific bear species; the bear is necessarily brown.
Re:Which word begins with "y" and looks like an axe in this ... by CRConrad on Monday January 22, 2024 @07:17AM (#39088669)
Except polar bears are actually black, AIUI. On their skin, underneath the fur. Or if you go by the fur, they're (off-)white.
Re:Which word begins with "y" and looks like an axe in this ... by philwelch on Monday January 22, 2024 @10:18AM (#39090343)
Except the guy already ruled out polar bears based on latitude.
Re:Which word begins with "y" and looks like an axe in this ... by bazoom42 on Thursday January 18, 2024 @01:41AM (#39038716)
The famous answer is wrong though, since the question is about tokenization of XHTML (not parsing into a tree) which is indeed possible using a regex.

This is why none of the condescending answers suggest a better way. There isn’t one.

Re:Which word begins with "y" and looks like an axe in this ... by mgaunard on Thursday January 18, 2024 @03:46AM (#39039482)
I can't say that comment about regular expressions is particularly good -- it isn't even true.

(Some variants of regular expressions can implement arbitrary context-free grammars).

Re:Which word begins with "y" and looks like an axe in this ... by umanwizard on Thursday January 18, 2024 @07:46AM (#39041051)
The HTML parsing question is an annoying meme that people laugh along with to feel part of nerd culture. This one is an extremely thorough attempt at answering the question. Not comparable at all.
Re:Which word begins with "y" and looks like an axe in this ... by antegamisou on Thursday January 18, 2024 @12:56PM (#39045019)
> it cannot match the famous answer to the question about parsing HTML using regular expressions

Man people on SE are cringe af ngl