Hacker Newsnew | past | comments | ask | show | jobs | submit | more dizzant's commentslogin

Did you happen to attend a prestigious school? I find that the level of rigor (and corresponding freedom) varies tremendously from program to program.

I did my undergrad at a state school with a middling engineering program, where I had ample free time to explore topics in depth, pursue extracurriculars that taught me far more than my classes, and have a thriving social life.

Contrast that experience to what I saw as a teaching assistant at Georgia Tech: undergrads who are so full of classwork that they're punting on the least-valuable graded assignments, never mind extracurriculars. The level of rigor in courses is much higher, but it presses out freedom to explore independently.

Another datapoint: I competed against GT extracurricular teams during my undergrad years, and we beat them handily almost every time because their students couldn't justify high effort for work that wasn't graded. I once saw a GT team arrive a day late to a competition, work on a robot for three hours at the adjacent table, realize their robot did not work, and drive home without competing.


Is the original intent of strncpy() germane to the GPs comment? Explicitly stating the max length to copy is an effective tool for avoiding buffer overruns, regardless of whether the designers imagined that important use case.


But the thing it does (fill out a fixed sized buffer without caring about NUL-termination) is not at all what you'd want from a safety feature.

If you look at this function assuming it's a safety feature, that's a huge surprise, and indeed if you were skimming you might miss what it does because (in the context of "it's a safety feature") this is an insane choice. "Why would you do that?". Well, because it's not a safety feature.

The perf cost isn't what you'd expect from a safety feature either. Suppose we have a 1MB buffer, and we strncpy "THIS" into it using n = 1024. That's just four bytes right? Nope. strncpy() will write "THIS" and then 1020 zero bytes.


Except strncpy is broken for C strings, because it doesn't guarantee nul termination. So if you forget to force a termination on every use, you get buffer overruns.

Not only that, but (because of its actual purpose) it also fills the buffer with nuls, which is a complete waste of resources.

So yes, the original intent of strncpy() germane to the GPs comment, because it makes strncpy actively dangerous and complete shit when working with C strings.


The issue is that strncpy() isn't a str___() function, despite its name. It's a 0x00-padded memcpy.


The output side of strncpy() might not be a str___() function, but AFAICS the input side of strncpy() is clearly a str___() function, since it stops reading (but not writing) at the first NUL byte.


But it's not an str* function, it's an strn* function. And most (though not all, that would be too easy) work on fixed-size (hence the n) nul-padded strings.


No, it isn't a string function of any kind. "A string is a contiguous sequence of characters terminated by and including the first null character." § 7.1.1.

Calling a bespoke byte-sequence data structure a "string" is inaccurate. Treating strncpy() as a string function is erroneous and can easily lead to memory corruption.


[flagged]


> Have you considered giving reading comprehension a try?

Don't do this.


Then don’t demand it by wilfully misunderstanding comments in order to “well actually” them.


This is a fascinating observation about the funding of nutrition education, thank you for sharing it.

What do you think are the reasons most education efforts are spent on children? It seems to mirror the fact that children spend a significant part of their time on education, while adult education is ad-hoc and self-directed. Are there other factors that you can see from inside the field?


The press release that went along with the study is here: https://iac.gatech.edu/electric-scooters-car-use-atlanta?utm...


> We have largely moved away from viewing humans or “consciousness” as something special.

Who is “we” in this comment? Christianity and Islam emphasize consciousness and the uniqueness of human experience, and their adherents still account more than 50% of the population.

As much popularity as the many worlds theory is gaining, the generic “we” almost certainly still doesn’t believe it, and many (most?) probably don’t even know about it.


The link you posted supports the GP’s assertion that not declaring the current economic situation as a recession is politically motivated. The third paragraph specific cites common criticism of the NBER on that very front.

That there could and should be some more sophisticated, objective definition of a recession than “two years of GDP decline” isn’t in question. But, at least according to your own source, NBER fails to provide that definition and is commonly criticized for is subjectivity during political years.


> The link you posted supports the GP’s assertion that not declaring the current economic situation as a recession is politically motivated.

1/5 indicators shows significant decline (real GDP) I'll give you. but 1/5 is slight decline (real income 1% down), the other 3 (employment, industrial production, retail sales) are up. this is based on data available from FRED, do you have data showing otherwise?

links at https://news.ycombinator.com/item?id=33032470#33036403


I really like the idea of using the motor as a combined power source/user interface component! As the proud owner of a 2004 sedan, hacks to get digital audio on the original stereo are a common daydream of mine.

Maybe Bluetooth low energy could fit in that power envelope too?


The appearance of this article on HN strikes an uncanny valley for me. I independently recalled and told a friend about this river just a few hours ago, having not thought of it or done any digital interactions with the idea in probably more than a year. I searched it on DDG to show a picture. Now, suddenly, it’s #3 on HN.

Am I going mad? Is the surveillance state so deep in my subconscious that I fail to notice it’s observations? This article isn’t even tech related, why is it here?


There’s a popular video heavily recommended on YouTube right now which has likely bounced around link aggregators like Reddit, HN, and other blogs etc. Odds are you saw some derivative of that.

This is just the regurgitation of the internet causing a deja vu effect


You are not going mad.

Now, just relax. The HN interface to your brain waves is a little noisy right now, and it works better when you are relaxed... /s


Either we’re all living in your dream (not terribly likely from my perspective) or you’ve stumbled upon one of life’s great joys: the so-called “delusion of reference”, a fun trick our minds like to play on us sometimes. Congrats on your unsettling coincidence :)


Delusions of reference should be statistically verifiable as delusions. Has anybody ever tried?

For starters how many thoughts does a typical human have in a day?



Just the Baader–Meinhof phenomenon at work! Or perhaps a synchronicity, if you are inclined to believe in such things.

A similar thing happened to me the last time the Strid popped up on Reddit and HN. It was only a day after I had just returned from a popular walking route which passes alongside it and the Abbey.


Or your friend is the OP?


This happens to me frequently too. Think of something obscure then it appears on HN. It is neither coincidence or surveillance. Reality is an information fractal.


No, there are thousands of us here, and by chance one of us will have thought of the idea recently, and this time it's you.


is that what uncanny valley means?


No, that relates to human aesthetics.


> Competition keeps people from being evil. Evil only happens when there's no reason for them to NOT do evil things.

I don’t agree. People generally don’t steal, but if they have no food, they will resort to theft to survive. Competition can prevent some ill effects of monopolistic tyranny, which I think is what you’re getting at here, but it breeds other evils.


When motor vehicles do that, it’s called Talladega.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: