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

Nitpick: icons are about signifiers, not affordances. A button affords being pressed, an icon on the button signifies what pressing it will do.

In context, binary breakup and binary fracture apppear to mean a splitting ofa whole into two parts along a given line or plane


Since the optimiser is allowed to assume you're not invoking UB, and strlen of null is UB, I don't believe that it would consider that case when optimising this function.


I understand that, but I don't agree that such optimizer behavior is worth it and I won't put it in my compilers.


I appreciate that greatly.


The notion that because it is undefined behavior means that the compiler is free to replace it with anything up to and including "launch nuclear missiles". This is just nuts.

If I program it to cause a null pointer seg fault, I expect a null pointer seg fault. If I program it to cause a twos complement overflow, I want a twos complement overflow.


Yeah, I feel the same way. It's refreshing to hear that that's not just because I'm insane. I think C compiler teams are sort of forced into this stupid shit because they don't have new CPU architectures to port to anymore, so, unless they want to go find new jobs, they're forced to waste their time and everyone else's by "improving" the compilers by increasing performance in riskier and riskier ways.


You mean the same problem that the article is trying to solve in C? Generic data structures?


"Just FYI I have a PhD in cosmology" is the credentials for the poster being an expert.


That would certainly catch nearly all migration issues, but it doesn't provide a helpful error message like a test for a specific mistake like this does.

Ideally both approaches would be used, with the general case being used to detect and inform more targeted tests.


And the Greek mathematician is pronounced OY-clid ;)


I think the author misspoke and meant to say "easy-to-misuse" instead, which it definitely was.


The Ninja files being that huge is likely more to do with the Android build environment or the tool that generates them. The main advantages of Ninja as a build executor are that the language is simple and it processes the build graph very quickly.


They're locale independent, which the C stol, stof, etc functions are not.


Yes, exactly. Which means that, while the speed gains are real, they only apply in cases where your libc is dangerously defective.


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

Search: