Live data from Hacker News

Neverflow: C macros that guard against buffer overflows

github.com

131–140 of 150 posts

Re: Neverflow: C macros that guard against buffer overflows

#131
post #101

Earlier quoted context omitted.

You will be surprised. https://www.eff.org/deeplinks/2023/05/eus-proposed-cyber-res...

None of this is going to meaningfully impact C/C++ software. If it comes to pass at all, it'll be used at the margins to replace more C code with Rust.

We will see. In a regulatory context, "the implementation is the spec" usually does not convince.

Re: Neverflow: C macros that guard against buffer overflows

#132
post #99

Earlier quoted context omitted.

Yes, because I don't expect you to understand anyway and ELI5 would take a bit, much longer than these dumb comments. Hint, someone else got it.

I'm starting to think you didn't understood the message or you wouldn't be avoiding explaining yourself while trying to insult people.

Joker_vD got it.

Re: Neverflow: C macros that guard against buffer overflows

#133
post #87

Earlier quoted context omitted.

Sometimes it is better to have rotten wood to build something than nothing at all. If we want to encourage Rust adoption, it is by having a middle path, not via Rust Advocacy Strike Force. That only shuts the audience off, specially when Rust has a glass ceiling of depending on C++ infrastructure for its reference compilers.

I believe conventionally they're called the Rust Evangelism Strike Force. And it's true that the rotten wood was better than nothing. Nobody is suggesting that NT or Linux should somehow have been developed in Rust in the 1990s. But likewise we shouldn't resist renewal in newer, better materials. That applies to compiler internals too. Plenty of trouble down there for C++, it's just that C++ programmers can more ofte…

Yet if I want to contribute to Rust backend, or its upcoming GCC implementation, write C++ I must.

Same applies to the runtimes of the languages I use at work, and GPGPU related tooling when not using shaders.

Maybe then do a Go/zig/D, focus on cranelift and fully bootstrap Rust, before trying to rewrite the world.

Re: Neverflow: C macros that guard against buffer overflows

#134
post #101

Earlier quoted context omitted.

You will be surprised. https://www.eff.org/deeplinks/2023/05/eus-proposed-cyber-res...

None of this is going to meaningfully impact C/C++ software. If it comes to pass at all, it'll be used at the margins to replace more C code with Rust.

It only needs to have money attached to code fixes.

The problem with developers that don't do consulting is that they have no idea how each hour of their work relates to product development costs.

In Germany, services companies are already required to provide security fixes free of charge and warranties.

Someone has to pay those hours.

It is no accident that Google, Apple, Microsoft always mention increasing costs with bug fixes, when pushing for writing new code in safer languages.

Re: Neverflow: C macros that guard against buffer overflows

#135

Earlier quoted context omitted.

It's a standard library feature, rather than a language feature. And you might say, "Who cares? Even freestanding has the standard library". Nope, std::array wasn't added to freestanding. You can dig into the messy details for yourself if you want, but suffice to say your freestanding C++ doesn't have std::array So the C++ language has "arrays" but they're garbage, and if you point out that the arrays are garbage you…

The only valid complaint about std::array is that it's awkward to declare and takes more characters to type. It is, otherwise, vastly superior in every other way. That doesn't make them garbage. That makes them annoying.

I feel like I already explained it's not even part of the language itself, it's a library feature, you aren't given this feature without the rest of the hosted C++ standard library.

Which is fine if you write Windows desktop apps, but this is an array type, unlike a GUI widget, or an XML parser, it seems like I'd probably want an array type for this $1 per unit micro controller I'm writing firmware for. In Rust the nice array type works just fine, it's a proper first class type, it knows how big it is, mutable arrays coerce into a slice I can sort (only unstably, but hey, we're embedded firmware let's not get fancy), I can iterate over it properly... in C++ only the crappy C-style array is available unless I can butcher the std::array so that it works outside the hosted library. Ugh.

Re: Neverflow: C macros that guard against buffer overflows

#136
post #127

Earlier quoted context omitted.

>Except it's being used for serious development today No, its being used for pet projects by people. Serious development = major companies using it in backends. >So one of the most widely used applications programming languages in the world? Because of CS programs, and legacy software written in java. Java has a community dedicated to pushing theoretical CS concepts into the language (much like Rust), while allowing…

> No, its being used for pet projects by people. Serious development = major companies using it in backends. You mean companies like Dropbox, Cloudflare, Amazon, Microsoft...? Are they too small to be relevant?

Very few things in those companies are being written in Rust, and half of those projects chose Rust around ideological reasons rather than technical, with plenty of 'unsafe' thrown in for performance reasons

https://github.com/firecracker-microvm/firecracker/search?q=...

The fact that 'unsafe' even exists in Rust means it's no better than C with some macros.

Don't get me wrong, Rust has it's place, like all the other languages that came about for various reasons, but it's not going to gain wide adoption.

Future of programming consists of 2 languages - something like C that has a small instruction set for adopting to new hardware, and something that is very high level, higher than Python with LLM in the background. Everything in the middle is fodder.

Re: Neverflow: C macros that guard against buffer overflows

#137
post #132

Earlier quoted context omitted.

I'm starting to think you didn't understood the message or you wouldn't be avoiding explaining yourself while trying to insult people.

Joker_vD got it.

How does what they are saying have anything to do with what I replied to ?

Re: Neverflow: C macros that guard against buffer overflows

#139
post #111
post #52

Earlier quoted context omitted.

Basically all the libraries, IDEs, game engines, game console SDKs, HFT, HPC, OS SDKs, embedded OSes, High Integrity Computing certifications, and plenty more stuff deployed into production since C++ ARM [0] was published in 1990, 33 years ago. [0] - The Annotated C++ Reference Manual

That's not C++ tooling. That's tooling written in C++. Two very different things.

Word games, those are domains dominated by C++, take the meaning the way it makes you happier.

Re: Neverflow: C macros that guard against buffer overflows

#140
post #138

Earlier quoted context omitted.

How does what they are saying have anything to do with what I replied to ?

https://en.m.wikipedia.org/wiki/Allegory

That's the definition of an allegory, but how do the two things relate?

Why did you say you "don't have time" then go to great lengths to not explain anything or back up what you're saying in any way?

Post reply on HN