17 ms·
Thanks! This convinced me. I'll stick to C for low-level, C++ for CUDA stuff, and C# for everything else.
by fortran77 6y ago
Thanks! This convinced me. I'll stick to C for low-level, C++ for CUDA stuff, and C# for everything else.
- gameswithgo 6y agoWhat if you were working on something where a cve or data leak from a buffer overrun could kill the company, or end a life?
- joerichey 6y agoIf you're working on safety-citical software, I think using formally verified C code (as discussed in the article) would be the best approch. If a bug could kill someone, you should (to the greatest extent possible) have a proof that such bugs are impossible.
- pjmlp 6y agoHow do you ensure an unsafe block on an dependency downloaded from cargo out of some pad-left like implementation doesn't do exactly that? Also should be noted that Rust lacks the necessary certifications.
- dodobirdlord 6y agoIn a situation where memory unsafety could put people (or the future of the company) at risk downloading random unaudited dependencies off of crates.io is obviously a no-go. Ideally downloading off of crates.io is a no-go during building anyway, since cargo can work with all of your external dependencies mirrored to a local filesystem or your own custom crate registry.
- pjmlp 6y agoSo basically the same approach as required by ISO security standards for C, C++, Ada and Java.
- scns 6y agoyou use cargo-geiger for that: https://github.com/anderejd/cargo-geiger https://github.com/anderejd/cargo-geiger
- pjmlp 6y agoIt doesn't work with binary libraries, something that is quite common on Ada, C and C++ worlds, the domains targeted by Rust.
- EE84M3i 6y agocargo-geiger isn't foolproof, there are well-known false negatives: https://github.com/rust-secure-code/cargo-geiger/issues/101 https://github.com/rust-secure-code/cargo-geiger/issues/101
- Ensorceled 6y agoPeople safely wrote software that could kill people long before Rust was invented.
- zelly 6y agoAda, Java, C#, Go, Python
- ausjke 6y agohttps://www.youtube.com/watch?v=iOBXVOAbpdY https://www.youtube.com/watch?v=iOBXVOAbpdY Rust is not as safe as it claimed, not to mention many will use its unsafe mode in practice anyways.
- throwaway17_17 6y agoI’m not sure what the downvotes are for. The paper, upon which the video is based is linked in the description and is easily accessed. Is the issue primarily with parent’s less than substantial comment (basically just linking to a conference talk) or is there some issue with the underlying empirical analysis of Rust’s library codebase? The thrust of the article is, from the abstract, that Rust should consider altering the compiler and the crates ecosystem to better enable the safety features that Rust champions, because ‘ results indicate that software engineers use the keyword \unsafe in less than 30% of Rust libraries, but more than 75% cannot be entirely statically checked by the Rust compiler’.
- steveklabnik 6y ago> Is the issue primarily with parent’s less than substantial comment I would assume this, but also > is there some issue with the underlying empirical analysis of Rust’s library codebase? this is hard to tell, because > The paper, upon which the video is based is linked in the description and is easily accessed I don't think this is true, or else, I am missing it somehow. Where is the paper? I don't see it linked from the page that's linked in the description, and a quick google of the title didn't turn it up for me either.
- throwaway17_17 6y agoIt is available on arXiv. Link follows: https://arxiv.org/abs/2007.00752 https://arxiv.org/abs/2007.00752
- steveklabnik 6y agoIt's... fine. It's got some issues though. Like: > Since Unsafe Rust may modify an arbitrary memory location, any use of Unsafe Rust in any dependency compromises the static guarantees of the whole library With this definition, literally every Rust program is not safe, because: 1. Most operating systems don't have syscalls written in Rust, so doing anything at all ends up needing unsafe. 2. Even if you wrote an OS with safe syscalls, doing things with the hardware is going to require unsafe. So, buried somewhere in there, unsafe will exist. So I don't personally think this definition makes a lot of sense. To me personally, comments like this are more interesting, and tell a different story: > The number of unsafe blocks per crate is small for the majority of the crates, more than 90% of the crates have fewer than ten unsafe blocks This validates one of Rust's core propositions, IMHO. From eyeballing the graph, it seems that ~70 of crates have zero unsafe? Very interesting.
- disown 6y agoThe evangelical hype around rust is quite something. Not only does rust save companies, it saves lives. Check in next week to see if it can stop hair loss.
- 1tCKV3QfIo 6y agoLol, why does it seem that most (if not, all) Rust evangelists are ignorant of formal verification.
- rvz 6y agoI'm also convinced that there's still no mature cross-platform GUI libraries written in Rust, so that's that. All you get is a mixture of unmaintained or unstable bindings that may break when the library changes its API.
- deleted 6y ago[deleted]
- pjmlp 6y agoThat was my decision as well after a few forays with Rust in GUI programming, I just add Java alongside with .NET due to different deployment scenarios.
- nikki93 6y agoJust to clarify: do you still have a realm where you would use Rust?
- pjmlp 6y agoOnly for my hobby coding trying out ideas across as many languages as I can, as language geek to get inspired about new ways to approach solving problems. For my line of work. I rather use what is available out of the box in SDK installers and respective IDEs, no need to add extra complexity. Now in general, I think Rust's sweet spot is on kernel, drivers and maybe composition engine, anything else GC languages with low level features, e.g. Swift, D, Nim, Crystal, .NET Native, Java (after Panama/Vahlala), Go (assuming 2020 generics get in) are a much more productive way to tackle problems. EDIT: Just like with FP, I am a firm believer that eventually all mainstream languages will have some form of affine types, and Rust will have played the role of a stepping stone into the adoption of Cyclone and ATS ideas for low level coding.