Live data from Hacker News

"No way to prevent this" say users of only language where this regularly happens

xeiaso.net

11–20 of 342 posts

Re: "No way to prevent this" say users of only language where this regularly happens

#11

Just in case someone needs the reference, the onion uses '"no way to prevent this" says only nation where this regularly happens' as a reoccurring article at every major school shooting[0], to highlight the frequency of such events and the fact that nothing has really changed since the last one. [0] https://www.theonion.com/no-way-to-prevent-this-says-only-na...

This is also an ongoing series on that blog, if you look at previous entries there's lots with the same title, also about C having buffer overflows

https://xeiaso.net/shitposts/no-way-to-prevent-this/

Generated by exactly 69 lines of Go every time: https://github.com/Xe/site/blob/main/cmd/no-way-to-prevent-t...

Re: "No way to prevent this" say users of only language where this regularly happens

#12
post #2

The headline is misleadingly focusing on a soundbite out of the full quote. "It's a shame, but what can we do? There really isn't anything we can do to prevent memory safety vulnerabilities from happening if the programmer doesn't want to write their code in a robust manner." -- Some (uncredited?) C programmer. Does C have more footguns as a low level language? Of course. That's part of the freedom of bringing only t…

What’s missing from Rust? I don’t care if you use C, but don’t pretend like there isn’t another option

Re: "No way to prevent this" say users of only language where this regularly happens

#14
post #2

The headline is misleadingly focusing on a soundbite out of the full quote. "It's a shame, but what can we do? There really isn't anything we can do to prevent memory safety vulnerabilities from happening if the programmer doesn't want to write their code in a robust manner." -- Some (uncredited?) C programmer. Does C have more footguns as a low level language? Of course. That's part of the freedom of bringing only t…

I'm trying to decide if this is a good satirical response to a satirical article? If so, well done!

Because at this point, where can we find programmers who aren't 'less skilled practitioners'? Because it's clear Microsoft, Google, Apple, and major open source projects, have failed to find them based on memory corruption issues in the Linux, Windows and Mac kernels, chrome, and firefox.

Re: "No way to prevent this" say users of only language where this regularly happens

#15
Alternative headline should be "But I have been taught that using C++ makes me the better programmer" because the stereotypes of echo chambers on the internet raised a lot of unreflected programmers to be this way.

There is a place for C, where there's no alternative. But that place is where 99% of programmers never work, because they are not doing kernel nor firmware development (which, in the meantime, also has a lot of support by and for memory safe VMs and languages).

The issue I have with this narcisstic fatigue (similar to the author's point I assume) is that there is no reflection when they fuck up a codebase.

The best code is the code that is safe and easy to read, and doesn't need to use "clever tricks" that beginners cannot understand.

If you are using some tricks for type casting to implement your ideas into code, you probably should not write code.

Code should be dumb and easily maintainable. If it is not, you made the wrong choice for the programming language.

Re: "No way to prevent this" say users of only language where this regularly happens

#16
post #2

The headline is misleadingly focusing on a soundbite out of the full quote. "It's a shame, but what can we do? There really isn't anything we can do to prevent memory safety vulnerabilities from happening if the programmer doesn't want to write their code in a robust manner." -- Some (uncredited?) C programmer. Does C have more footguns as a low level language? Of course. That's part of the freedom of bringing only t…

The lack of memory safety is a property of C implementations, not the language itself. You can have an implementation that reliably crashes on memory errors if you want, though it does get easier if you leave out a few features like casting pointers to ints and back.

Re: "No way to prevent this" say users of only language where this regularly happens

#17
post #2

The headline is misleadingly focusing on a soundbite out of the full quote. "It's a shame, but what can we do? There really isn't anything we can do to prevent memory safety vulnerabilities from happening if the programmer doesn't want to write their code in a robust manner." -- Some (uncredited?) C programmer. Does C have more footguns as a low level language? Of course. That's part of the freedom of bringing only t…

What’s missing from Rust? I don’t care if you use C, but don’t pretend like there isn’t another option

Simplicity.

Re: "No way to prevent this" say users of only language where this regularly happens

#18
post #2

The headline is misleadingly focusing on a soundbite out of the full quote. "It's a shame, but what can we do? There really isn't anything we can do to prevent memory safety vulnerabilities from happening if the programmer doesn't want to write their code in a robust manner." -- Some (uncredited?) C programmer. Does C have more footguns as a low level language? Of course. That's part of the freedom of bringing only t…

This "accommodate less skilled practitioners" you wrote is something that never fails to puzzle me from C/C++ practicing colleagues: the idea that in the problem space there is a high-risk high-reward zone of top performance where only the heroes dare tread.

I am sorry but my observarion is that Nim and LLVM and dare I say even GC-less Java all achieve the same performance as C without the footgun baggage. Sometimes it is good to find a way to move on.

Post reply on HN