Is there a "glibrust" or equivalent standard library for Rust, yet?
Rewrite Everything in Rust
31–40 of 242 posts
Re: Rewrite Everything in Rust
#32Earlier quoted context omitted.
> A rewrite would clean up the code, sure, but then you're left in the same situation, only with brand new bugs that nobody has time to fix. The entire point is that you're not in the same situation regarding memory safety problems/vulnerabilities.
Memory safety problems are the low-hanging fruit of vulnerabilities. A re-write by unskilled programmers will not guarantee the code is safe, because they will introduce many other kinds of vulnerabilities.
(Incidentally, there are other classes of vulnerabilities that Rust and/or its libraries heavily mitigate, such as deserialization issues along the lines of the Rails YAML bug.)
Re: Rewrite Everything in Rust
#33Earlier quoted context omitted.
> A rewrite would clean up the code, sure, but then you're left in the same situation, only with brand new bugs that nobody has time to fix. The entire point is that you're not in the same situation regarding memory safety problems/vulnerabilities.
Memory safety problems are the low-hanging fruit of vulnerabilities. A re-write by unskilled programmers will not guarantee the code is safe, because they will introduce many other kinds of vulnerabilities.
Re: Rewrite Everything in Rust
#34If a given piece of software has been largely written using certain patterns or conventions, then it is often possible for a syntactic rewrite engine to be able to match those patterns, then output idiomatic code patterns in the target language. This may well be applicable to kernels and other constituents of an OS.
Isn't that just what a compiler is, where the target language is machine code?
Chances is successfully going from some not-so-obfuscated C code to equally not-so-obfuscated Rust code?
Re: Rewrite Everything in Rust
#35I think this misses the real problem. So many pieces of foundational software like glibc and OpenSSL are understaffed, underfunded, and plagued by terrible code. Go read glibc getaddrinfo: it's a mess! Rewriting the software in Rust would not solve these problems any more than rewriting it in C++ would. A rewrite would clean up the code, sure, but then you're left in the same situation, only with brand new bugs that…
This is why I personally think the OSS community should be more encouraging of "salary" style funding. There is a loud, poisonous minority of advocates that seem to think that asking for money is just plain evil. That attitude is a material disservice to OSS in general: it makes OSS weaker and less capable, for the sake of some weird puritan reflex. N.B.: I have never and will never ask for, nor accept any income fro…
Re: Rewrite Everything in Rust
#36I think this misses the real problem. So many pieces of foundational software like glibc and OpenSSL are understaffed, underfunded, and plagued by terrible code. Go read glibc getaddrinfo: it's a mess! Rewriting the software in Rust would not solve these problems any more than rewriting it in C++ would. A rewrite would clean up the code, sure, but then you're left in the same situation, only with brand new bugs that…
This is why I personally think the OSS community should be more encouraging of "salary" style funding. There is a loud, poisonous minority of advocates that seem to think that asking for money is just plain evil. That attitude is a material disservice to OSS in general: it makes OSS weaker and less capable, for the sake of some weird puritan reflex. N.B.: I have never and will never ask for, nor accept any income fro…
Re: Rewrite Everything in Rust
#37There is no silver bullet, just because you use Rust it doesn't mean your programs will be completely safe.
A lot of these C libraries were written in more innocent times where a small bug would not affect as many people as it would today.
We live in a C world and I don't see that changing any time soon.
Re: Rewrite Everything in Rust
#38Is there a "glibrust" or equivalent standard library for Rust, yet?
Rust of course has a standard library[0] and it includes a libc, but (I might be wrong here) I think the libc portion is FFI into glibc or similar. I think the stuff written in rust is considerably more high-level, focusing more on data structures, concurrency, string manipulation, etc. [0]: https://doc.rust-lang.org/std/
Re: Rewrite Everything in Rust
#391: So a new generation, new rewrite of everything... Then hitting brand new problems (sometimes old ones avoided by previous designs) not foreseen by majority. A new language spawns with the coming of a new generation, addressing some of these problems. Rewrites everything. Hits another set of problems. Goto 1.
Iteration without progress is bad.
Which one do you think would happen?
Re: Rewrite Everything in Rust
#40How practical is rust for small processor IoT applications? Like the ESP8266 we saw recently? https://news.ycombinator.com/item?id=11148129 They often have horrible security, but are very small programs when you use them as wifi temperature sensors or similar. They are good targets for rewrites and greenfield applications. Right now it seems like ardunio C++ or some scripting language is the target.