6 ms·
No matter what the outcome is, remember: We should keep telling ourselves that it is possible for someone, somewhere unaided by typechecking, memory safety con
by AaronFriel 6y ago
No matter what the outcome is, remember: We should keep telling ourselves that it is possible for someone, somewhere unaided by typechecking, memory safety constraints, static analysis, and fuzz testing to write safe C.
We haven't found that person yet, but if we stop believing that person exists, then why are we still writing in these languages?
- nineteen999 6y agoI'm just so thankful we have so many people in the LISP, Rust and Haskell communities ready to step up to the plate and replace over 50 years of C/C++ OS development with their grand, impervious and indestructible vision of what a safe, secure OS should be. All they'd have to do is provide us a stable, secure foundation and a hypervisor that can run legacy OS's. Oh, and reimplement/replace the tens of thousands of API's provided by Windows/UNIX/Linux which are in use by millions of programmers everyday. Also they'd need to be able to support all those other secure languages that have been written in C/C++ over the years. I guess they will be able to rewrite those as well in short order on top of their new "secure" foundation. I'm sure it will happen any minute now.
- AaronFriel 6y agoThose folks are actually chomping at the bit to be taken seriously and have been for a very long time! Their proposition is simple: better tools can make us better developers. JavaScript developers have told me on a few occasions that TypeScript is unnecessary, they can just write good JS and they don't need types! And it doesn't even catch every bug, so why bother? I think I'm just tired of being told that while I can't write safe C, it's because I'm not smart enough (which may be true, I guess!), but also that the reason everyone else can't write safe C is because they, too, happen to also be not smart enough: https://news.ycombinator.com/item?id=23289693 https://news.ycombinator.com/item?id=23289693 > I design high-scale database kernels, large code bases, written in modern C++. I can’t remember the last time we had a memory safety issue. It isn’t as though we don’t have plenty of bugs during development, just not those kinds of bugs. Competent idiomatic code simply doesn’t leave much room for those kinds of bugs to occur. If you “constantly struggle with memory safety issues”, you are doing something fundamentally wrong. That’s not something you can blame on the language. > > I am always baffled by the people that supposedly write modern C++ professionally and constantly have memory safety issues. Most serious projects won’t hire you if you aren’t capable of writing memory safe code in your sleep, it is a basic skill.
- nineteen999 6y ago> Those folks are actually chomping at the bit to be taken seriously and have been for a very long time! The problem is, to be taken seriously, eventually they will need to demonstrate that they can solve the problem, rather than just talk about it. I don't dispute the need for OS/systems development to move towards more secure languages, that much is clear. It's just none of the "visionaries" that talk about it so much have a clear roadmap that wouldn't put millions of working programmers out of jobs, let alone much in the way of working prototype code. As such, it seems to be somewhat of a programming language enthusiasts pipe dream. 99.5% of people who seems to working on hobby OS projects choose C/C++, because that's where most of the accessible prior art is, and because it gives them a snowballs chance in hell of being able to port of wide range of pre-existing software and applications to their platform.
- roblabla 6y agoWhat are you even talking about? First of all, the people working on the language are obviously not going to be the people implementing the OS. There's only so many hours in a day, and a language as large as Rust, Haskell are a full-time job to maintain. Rust has a bunch of hobby OS projects, and a very serious OS project called Redox OS[0]. Redox has a libc that's complete enough to allow it to run bash and other existing programs. It has a complete graphics stack, including its own compositor and UI toolkit. Meanwhile, Microsoft is actively testing Rust as a language, both for new components and rewriting old code that would traditionally be written in C/C++[1]. They're doing this because memory safety bugs account for 70% of their critical bugs[2]. This is a major player in the industry, actively looking at a memory-safe language because they find C or C++ to be inadequate. If that's not validation enough, I don't know what is. [0]: https://www.redox-os.org/ https://www.redox-os.org/ [1]: https://msrc-blog.microsoft.com/2019/11/07/using-rust-in-windows/ https://msrc-blog.microsoft.com/2019/11/07/using-rust-in-win... [2]: https://www.zdnet.com/article/microsoft-70-percent-of-all-security-bugs-are-memory-safety-issues/ https://www.zdnet.com/article/microsoft-70-percent-of-all-se...
- nineteen999 6y ago
- viraptor 6y agoIt will naturally take time, but it's not like nothing's happening. Redox is growing and supporting libc-based apps. There were people looking at porting KVM to it, but I haven't seen any recent mentions - either way, the momentum is there. Of course it will not be quick. But I don't see the point of ridiculing that effort either. It's not like Linux took over from Unix immediately either (even though the interface then was tiny in comparison).
- nineteen999 6y agoI'm not ridiculing Redox at all, if you read further down the thread I give credit top them where credit is due, although I think they will have an uphill battle unless they receive some major corporate backing at some point. I save my ridicule for the frothing at the mouth C/C++ haters jeering from the sidelines who seem to that think that that battle is already won. Linux grew rapidly in part because there was already a huge amount of C programmers on the Internet as well as UNIX admins, and Linux was reimplementing a fairly well known set of API's. Rust/Redox don't have quite the same head start. I wish them every success though.