Live data from Hacker News

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

xeiaso.net

21–30 of 342 posts

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

#21

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 l…

> Code should be dumb and easily maintainable.

We now have enough resources to do this. When C was created, we had to do those tricks to have good performance. Currently C is best used for constrained devices, where sometimes you need those tricks.

> If it is not, you, yes ... you, made the wrong choice for the programming language.

Or your project manager or CTO, or some other stakeholder.

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

#22
More broadly:

> "No way to prevent $THIS" say users of only language where $THIS regularly happens

A weird psychological quirk I've noticed (of myself, and others) is we'll often exhibit a sort of 'programming language xenophobia', where we apathetically accept (or don't even notice) unpleasantries of our language of choice, yet be quite averse to the unpleasantries of other languages.

Maybe it's due to sunk cost; time/effort has already been spent finding work arounds for or adapting to the warts of our native tongue, whereas doing so for unfamiliar languages would require additional effort.

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

#23
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…

[deleted]

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

#24

Earlier quoted context omitted.

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

Simplicity.

Simple | Fast | Safe. Choose two.

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

#25
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 have a longer nuanced post to write out at some point about my feelings here, but here's the cliff's notes:

We should not be developing new projects in C, and we should make it politically hard to make new projects written in C in distribution repositories. C is going to stay around for a long time and that's okay, but there are so many inherent problems of its design and implementation that make it unsuited for unsupervised use. I wish that we didn't have to make such hard-line stances about this, but people have continuously proven that this tool is unsuitable for modern development and it's only going to get worse as time goes on.

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

#26

Earlier quoted context omitted.

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

Simplicity.

This. Learning Rust is like a long series of jousting matches with the compiler.

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

#27

Earlier quoted context omitted.

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

Simplicity.

Well computing has gotten a lot more complex since c’s inception. It’s model has held up well but the cracks are there

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

#28

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 l…

> There is a place for C, where there's no alternative.

Alternatives to C have started appearing for a long while, and they are quite mature now.

> because they are not doing kernel development

FluentBit, where this error occurred, is a userspace application.

> there is no reflection when they fuck up a codebase

C does not support runtime reflection, that is correct. It's one of the reasons why it's a programming and debugging nightmare.

> If you are using some tricks for type casting to implement your ideas into code

There seem to be no casting issues involved in https://www.tenable.com/security/research/tra-2024-17.

> 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.

It's just a pile of truisms.

Is your whole post even related to this article?

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

#29

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

Didn't catch that, thanks!

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

#30
post #25
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 have a longer nuanced post to write out at some point about my feelings here, but here's the cliff's notes: We should not be developing new projects in C, and we should make it politically hard to make new projects written in C in distribution repositories. C is going to stay around for a long time and that's okay, but there are so many inherent problems of its design and implementation that make it unsuited for un…

> We should not be developing new projects in C

I would give at least embedded development a pass, since you rarely do have a choice there

Post reply on HN