Live data from Hacker News

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

xeiaso.net

51–60 of 342 posts

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

#51
I thought it was going to be about JS and npm, given some of their fiascos [1][2][3]

[1] https://qz.com/646467/how-one-programmer-broke-the-internet-...

[2] https://www.bleepingcomputer.com/news/security/dev-corrupts-...

[3] https://www.sonatype.com/blog/everything-matters-why-the-npm...

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

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

If your distribution refuses to package useful free software, I'll use another distribution. I think this is true for most people.

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

#53
I've been doing programming for ~31 years in total and ~22 years professionally and at this point I have lost all hope that programmers at large will ever gain these mythic qualities called "self-reflection" and "introspection".

Truth is, these people are simply afraid for their cozy jobs, that's all there is to it. Derivative states of mind like Stockholm Syndrome and Sunk Cost Fallacy are quite normal to appear in these conditions.

On OP: I could not agree more. People always downplay their fuck-ups, that's sadly part of being a Homo Sapiens, but the lack of awareness is still both despairing and hilarious to watch.

And finally, C/C++'s niches have decreased but these people will not adapt, of course. Almost anything I've done with those languages 15-20 years can today be done with Rust. Or if you are on a tight time budget -- Golang, and you still won't lose too much speed.

But sure, "nothing can be done, these things sometimes happen". Sigh.

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

#55

Earlier quoted context omitted.

Yeah, was about to note that the link is unexpectedly SFW.

Why? Furries are NSFW because they look cartoonish and "unprofessional"? I don't like them but what a boring workplace would that be.

They're being satirical. People usually berate my posts because I have cartoon characters for Socratic exchanges to teach people things like Kubernetes, claiming that is "unprofessional" or something. These people are sarcastically berating my post for NOT using that Socratic system.

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

#56

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…

Kernels have been developed in safer languages already before C became widespread outside Bell Labs, it is a myth that C is even required for that, other than historical baggage.

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

#57
post #8
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…

> only the baggage a project needs What projects need manual memory management? Those where the hardware costs are comparable to development/maintenance costs. That is much rarer than people think. RAM is cheap, and few applications really need bespoke allocation. And it's not just a question of skill; even the most disciplined make mistakes. It's one of how much brainpower you want to allocate to... memory allocatio…

>What projects need manual memory management

Games.

Big/specialiased games to be precise, as for smaller projects managed language offer good enough performance.

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

#58

I thought it was going to be about JS and npm, given some of their fiascos [1][2][3] [1] https://qz.com/646467/how-one-programmer-broke-the-internet-... [2] https://www.bleepingcomputer.com/news/security/dev-corrupts-... [3] https://www.sonatype.com/blog/everything-matters-why-the-npm...

[dead]

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

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

>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

This is just false. Sure, they probably are 'close enough', but you can't claim the performance is 'the same' simply because those languages inherently do more to achieve the same results.

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

#60

Earlier quoted context omitted.

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.

There is a multiple decade long history of coaxing a memory safe C embodiment. If it was possible to simply implement memory safety without fundamentally changing the language, you would have a compiler flag that would give to you, requiring no source modifications. No compiler gives you that memory safety flag (aside from very specific security features, ex. -fstack-protector) because it's not possible in C.

It is totally possible for pointers with bounds checking to exist in C. Turbo C did that 30 years ago. However, why bother trying when whole culture is biased against it and you can use any of the other languages?
Post reply on HN