Live data from Hacker News

The Case for Memory Safe Roadmaps

nsa.gov

161–170 of 427 posts

Re: The Case for Memory Safe Roadmaps

#161

Earlier quoted context omitted.

Why is Python listed there and not other languages like Ruby, Javascript or Perl?

I don't think Ruby is used a lot at NSA, other than that, it's weird that it did not get mentioned. They should've instead just said Python and languages alike?

No offense to Ruby, but if I were going to push people to change to a new language I would not recommend Ruby. It had its time of popularity and I feel like it's just a niche language now, surpassed by others.

Re: The Case for Memory Safe Roadmaps

#162

Earlier quoted context omitted.

Next thing they'll be giving requirements for people building bridges, houses, and gas and electricity fittings. Seriously, I think the time has long since passed software needs regulating. It's a major part of modern society, and as far as I'm aware, most people aren't opposed to building standards in principle.

People figured out how to build buildings prior to creating building codes

People also died, a lot.

Re: The Case for Memory Safe Roadmaps

#163
post #32

I advise training programmers instead of throwing them in front of a screen without any training. Companies these days provides no training at all. When I was hired over 40 years ago, I spent plenty of time being trained for my first 3 months. Now, nothing, and you if you want to train a new person, you do it on your own time.

"In attempts to mitigate the dangers of memory unsafe code in C and C++, many software manufacturers invest in training programs for their developers. Many of these training programs include tactics designed to reduce the prevalence of memory unsafe vulnerabilities produced by those languages. Additionally, there are numerous commercial and industry trade association training programs. Further, various organizations and universities offer trainings and a professional certificate for demonstrating knowledge of secure coding practices in C and C++. While training can reduce the number of vulnerabilities a coder might introduce, given how pervasive memory safety defects are, it is almost inevitable that memory safety vulnerabilities will still occur. Even the most experienced developers write bugs that can introduce significant vulnerabilities. Training should be a bridge while an organization implements more robust technical controls, such as memory safe languages."

Re: The Case for Memory Safe Roadmaps

#164

Can someone explain why we can't double-down on C++ and, through compiler wizardry and reduction in toolset (say, strings can only be fixed-size at 32 chars, 64, or 256 long. No raw pointers, allocator zeroes out all freed memory), achieve a memory-safe language? Obviously, making certain concessions would be a deal-breaker for some, but it might be viable for legacy codebases. If you were to try to make C++ memory-s…

I don't think you can do that without massive changes to existing codebases, at which point why not just use Rust?

There might be a better path for memory-safe language interoperable with C++ (Carbon?) but this will require significant effort.

Re: The Case for Memory Safe Roadmaps

#165
post #159
post #32

I advise training programmers instead of throwing them in front of a screen without any training. Companies these days provides no training at all. When I was hired over 40 years ago, I spent plenty of time being trained for my first 3 months. Now, nothing, and you if you want to train a new person, you do it on your own time.

As someone who has worked in C/C++ on teams for a while. My personal opinion is that safe C++ programmers never use pointers - put everything on the stack and use (usually const) references. But I've really got to ask - at that point do you really want to program in C++ anymore or is it just better to use a safer language that removes pointers entirely?

Do "references" even exist in C? Aren't they a C++ thing?

How do you manage heap allocations without ever touching a pointer?

Re: The Case for Memory Safe Roadmaps

#166
post #32

I advise training programmers instead of throwing them in front of a screen without any training. Companies these days provides no training at all. When I was hired over 40 years ago, I spent plenty of time being trained for my first 3 months. Now, nothing, and you if you want to train a new person, you do it on your own time.

I wonder of part of the issue is that 40 years ago, people typically stayed much longer with companies. (I actually don't know what the norm was. My dad was an EE for the defense industry, and IIRC he worked for 3 different employers over his career.)

Well 40 years ago stuff was absolutely laden with exploits... if you're talking about code written 40 years ago that we still use today? Most of that stuff is battle tested and came from teams that were highly disciplined to begin with - the good code floats.

Re: The Case for Memory Safe Roadmaps

#167
post #32

I advise training programmers instead of throwing them in front of a screen without any training. Companies these days provides no training at all. When I was hired over 40 years ago, I spent plenty of time being trained for my first 3 months. Now, nothing, and you if you want to train a new person, you do it on your own time.

Yea, clearly faang level engineers lack of training.

Edit.

Idk why downvotes

Chrome and Windows code bases had 70% of cves due to mem issues and their engineers arent some unqualified and lacking of training opportunities ppl

Re: The Case for Memory Safe Roadmaps

#168

Isn't C++ with RAII reasonably safe? I tried to learn/like Rust but it's against how I use to think. If no friendlier safe high speed programming language appears, I rather use C/C++ and trade safety for friendliness.

RAII is great, but unfortunately it breaks down when the resource it manages leaks out of the RAII type.

E.g. Whenever handing out the raw pointer stored in a unique_ptr, the code receiving that raw pointer can delete it, which will very likely lead to a use after free and certainly to a double free issue.

Re: The Case for Memory Safe Roadmaps

#169

Earlier quoted context omitted.

Not to worry! In the future most programmers will undergo tens of thousands of GPU hours of training.

We will see. I suspect things will not turn out as expected.

I think you just said you agree with me?

Re: The Case for Memory Safe Roadmaps

#170

Earlier quoted context omitted.

wait for gov contract projects mandate them in the fine prints, it's a signal that is serious enough for anyone interested in doing any software-related business with gov, for them, this is nearly the same as 'mandated'

That’s just a customer with requirements.. like all customers.

But, on the other hand it’s not. The government is a virtual monopsony. One customer has unappealing requirements and you can choose not to serve them. The federal government saying don’t hire c devs will hurt c devs. C devs will be understandably dismayed by this.
Post reply on HN