HN demographics lean pretty heavily towards the lower end of the school pecking order. See also pg's essay on the topic: http://www.paulgraham.com/nerds.html
Yeah, but I work as programmer in company where almost all employees are programmers. Quite a few are also the "I am technically technical type who is passionate" kind of people. Based on discussions I have, they dont have such trauma from school. Except one they dont recall about being bullied and that one studied humanities and worked in mostly non-technical position originally. He also never claimed his issues stemmed from being too smart (I wont repeat his analysis of why here, but he thinks reasons were different).
To large extend, even that essay does not strike me as something describing people I know or my experience. But it strikes me as very populist writing targeted at those who identify as outsiders. Something written by person who was obsessed by popularity and social position himself quite a lot. In our school, kids with good grades were not unpopular or hated. Good results in programming or math or literary competition did not made you outsider. I never perceived such abilities as social liability.
There was something like "unpopular" kid in our class, someone who don't have many friends. Not that everyone was friend with everyone. And I think that guys did to one what would be called verbal bullying now in one period. But in neither case it was really not because he was smarter then everyone. And none of these ended up in tech work and none was interested in tech.
The very concept of 'popularity' is completely foreign to my experience. I don't think there was a thing such as a popular kid when I was at school or high school.
I personally enjoyed a lot going to school because I could spend time with my friends. I have never witnessed any violence apart from fights form time to time between two malse wanting to show who the strongest was. I was not in a privileged school.
Went to mostly private schools in America and my home country and none of them were anything like this. I've seen some violence back home but not physical. Alcohol, drugs, general bad behavior etc were a much bigger problem and definitely the worst at one public school I briefly went to.
In every school I'd say like people hung out with like people. So the "popularity" would be limited to that in-group. Most of people who PG would call "nerds" had a clique of their own as far as I could tell.
Some people might have been broadly disliked though.
it's not just a US specific thing, it's a generation specific thing.
The scenarios described in the GP link is a very late 70s-80s (Gen X) thing. 90s and early 00s high-schoolers had somewhat different experiences, but they know the trope since that's what was in movies. Schools today have a different concept of a "pecking order" - it's not that nerds aren't at the bottom anymore, it's that the whole concept changed.