Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

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)



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.


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.


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.


Comments are not for extended discussion; this conversation has been [moved to chat].



This is almost too polite to be Stack Exchange satire.


I feel like a lot of commenters here mistake passive-aggression for politness.


Well I guess some of us just have a higher tolerance for passive-aggression.

… ;)


Nowadays it seems like every other comment on Stack Exchange is full of forced and phony politeness. That's in their rules too.


A bit like HN in that regard.


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̨̥̫͎̭ͯ̿̔̀ͅ


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?


There is something like malicious compliance. And just being mean spirited in general.


I miss those days. I tried to go back there now and discovered things had escalated up to Wikipedia tier deletionism.


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


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?


> 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.


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.


What is definition of bottom of the well? The water level or the possible bottom when pumped empty or dry?


> 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...


Well, if we start by assuming the bear is perfectly spherical and there is no friction...


If bear is alive and not oiled, then yes.


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.


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.


Except polar bears are actually black, AIUI. On their skin, underneath the fur. Or if you go by the fur, they're (off-)white.


Except the guy already ruled out polar bears based on latitude.


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...


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"!


Chat GPT 3.5: https://chat.openai.com/share/9187924c-64ab-4246-a2b0-0c9cea...

Regenerate for more languages solutions


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.


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.


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.


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).


> it cannot match the famous answer to the question about parsing HTML using regular expressions

Man people on SE are cringe af ngl


“Even Jon Skeet cannot parse HTML using regular expressions.”


He meant Chuck Norris.


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...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: