Earlier quoted context omitted.
Right. And what I'm saying is I refuse to believe the Linux kernel approval procedures are that inefficient. Therefore, your belief "bottleneck was most likely not mechanical code changes" is most likely incorrect. It would be interesting to get the actual answer to this question. EDIT: Substantially changing your argument after posting isn't nice. But to answer your charge - no - I never made that claim.
Sorry, I didn't feel like this thread needed to be dragged out any longer since it's going in circles at this point and expanded my comment, but I didn't realize you had already replied.
Linux eliminates the strncpy API after six years of work, 360 patches
121–130 of 340 posts
Re: Linux eliminates the strncpy API after six years of work, 360 patches
#122Earlier quoted context omitted.
The way we do it in modern languages with things like std::optional and even that is not the best example.
And higher level languages that works. But what do you do when you get down to low level C or assembly? You basically end up with null/0 don’t you?
Seeking performance we've been very prone to avoid abstractions and over and over again have shown why we need the safe abstractions.
Re: Linux eliminates the strncpy API after six years of work, 360 patches
#123Earlier quoted context omitted.
Genuinely curious, how would you handle cases where a value is unset without NULL? This is a legitimate case that happens a lot in eg data modeling
Sum types, of course.
Re: Linux eliminates the strncpy API after six years of work, 360 patches
#124Earlier quoted context omitted.
AGI might. AI? No way. See, AI was trained on existing data - on all that existing C code out there (sure, and also on all the papers and articles saying what was wrong with that C code). Those bugs are in the training data , and often not marked as bugs. So when AI generates C code, is it going to avoid making the mistakes that human code made? No, it's going to generate the kind of code it was trained on. How could…
When's the last time you saw a decent coding model create a buffer-overflow bug while trying to use C strings? Serious question. Anyone else seen this happen in the last 12-18 months? If so, which model and version were you using?
Re: Linux eliminates the strncpy API after six years of work, 360 patches
#125This sort of boring grind is where the real work of systems engineering is done. Big infrastructure projects like this work on making the Linux kernel more reliable while still keeping it workable throughout the process move on the scale of decades, not months.
Re: Linux eliminates the strncpy API after six years of work, 360 patches
#126This sort of boring grind is where the real work of systems engineering is done. Big infrastructure projects like this work on making the Linux kernel more reliable while still keeping it workable throughout the process move on the scale of decades, not months.
Re: Linux eliminates the strncpy API after six years of work, 360 patches
#127Earlier quoted context omitted.
The way we do it in modern languages with things like std::optional and even that is not the best example.
And higher level languages that works. But what do you do when you get down to low level C or assembly? You basically end up with null/0 don’t you?
So yes, it's nulls underneath, but the developer never has to think about them.
Re: Linux eliminates the strncpy API after six years of work, 360 patches
#128the zero terminated string is I think is computing's biggest mistake. Pascal style strings were much safer.
Partly agree but there would have been squabbling on the data type of the size, unless it was variable length. The latter would have had other issues too. For a while, 16bit would probably have seemed too extravagant. Now 32bit would probably seem too small. For a “strongly typed” language, C is pretty damn loose where would have mattered.
Re: Linux eliminates the strncpy API after six years of work, 360 patches
#129Earlier quoted context omitted.
Compared to scripting languages with actual tagged types, C doesn't really have a type system, and that's readily apparent to anyone who has written C in the last 43 years and debugged a program written in it. C pretends types exist with you, but once bytes hit the road, it's all real-life and segmentation faults.
C actually does have a type system and it's one of the bigger issues with the language. If it didn't, unaligned pointers and signed overflow would be totally fine.
Issue with types and C is while the compiler knows about them the standards committees don't want you to be able to. If C had first class types more people would abandon C++ and that can't be allowed to happen.
Re: Linux eliminates the strncpy API after six years of work, 360 patches
#130the zero terminated string is I think is computing's biggest mistake. Pascal style strings were much safer.
In addition to having to pick a size for the length counter and then, later, having to differentiate between lengths in bytes, codepoints, and glyphs, you can't subdivide a Pascal string using pointer arithmetic. To pass just the end of a string into a function, you have to either copy the tail of one Pascal-style string to another with a smaller size value, or your string has to be a struct with an integer and a poi…