- 55 Posts
- 111 Comments
SorteKanin@feddit.dkto
Rust@programming.dev•Enabling the next iteration of the borrow checker on nightly
3·3 days agoSuper cool! Hopefully that can resolve some of the long standing issues with the borrow checker.
SorteKanin@feddit.dkto
Rust@programming.dev•New to Dioxus and Rust. Any tips about getting started?
2·6 days agoI’m not really sure what you’re asking. Or I guess I mean, it’s a very broad question. Just start a project and get learning.
If you have any more specific questions, feel free to ask!
Isn’t it pretty obvious? Fastrand is not cryptographically secure, urandom provides that option.
SorteKanin@feddit.dkOPto
Rust@programming.dev•'Rust makes coding fun again': Why Linux is moving away from C, according to Greg Kroah-Hartman
2·21 days agoworking on a project where memory safety isn’t that important
I can’t really imagine anything where this is not the case, unless you’re doing like… I dunno, small scripts for personal use or something? But why would you use Zig or C or even Rust for that, just do Python or even bash at that point? Python is memory safe and perfectly suitable for very small programs where static analysis gives little benefit.
SorteKanin@feddit.dkOPto
Rust@programming.dev•'Rust makes coding fun again': Why Linux is moving away from C, according to Greg Kroah-Hartman
1·21 days agoReleaseSafe which have runtime checks to prevent illegal behavior
To prevent some illegal behaviour. Again, I’m not an expert on Zig, but as far as I understand, even Release"Safe" is not actually memory safe.
SorteKanin@feddit.dkOPto
Rust@programming.dev•'Rust makes coding fun again': Why Linux is moving away from C, according to Greg Kroah-Hartman
1·21 days agoSaying that “memory safety is checked by tests” is basically saying “memory safety is not checked”. Yes, you can write tests. How do you know the tests cover all cases? How do you know the tests aren’t buggy?
Also, what about memory safety across threads? Are you testing multi-threaded scenarios? Are you ensuring you have no data races?
I also don’t understand how this is an argument for Zig over C. You can also test memory safety of your C code via various means, but it’s never a guarantee. Zig is the same. So again, it seems a bit more pointless to go from C to Zig. Going from C to Rust brings actual tangible guarantees of memory safety (outside of any
unsafeusage, obviously).
SorteKanin@feddit.dkOPto
Rust@programming.dev•'Rust makes coding fun again': Why Linux is moving away from C, according to Greg Kroah-Hartman
2·21 days agorust does a great job, however there are some inconsistentcies where a lot of memory allocations can throw out of memory errors that will crash the app
That is not an “inconsistency”. Crashing the application when you run out of memory is honestly in almost all cases the correct call and crashing is memory safe. Most applications can do absolutely nothing when running out of memory. “Handling” OOM is extremely complicated and most applications simply cannot handle it in any way.
Of course low level stuff needs to sometimes actually handle this, but it’s mostly an operating system thing. And Rust still allows you that control, it’s just not the default behavior of the collections and such in the standard library, because again, it almost never makes sense to try to handle OOM. But if you really need that behavior, you can have it.
SorteKanin@feddit.dkOPto
Rust@programming.dev•'Rust makes coding fun again': Why Linux is moving away from C, according to Greg Kroah-Hartman
5·21 days agoAgreed that it makes the transition from C easier, but I’d also say it makes the transition from C more pointless. I don’t really know that much about Zig but from what I’ve heard, I don’t really get the benefits - if you want a fast systems-level language without guard rails, why aren’t you just writing C (or C++, if that’s your thing)?
SorteKanin@feddit.dkOPto
Rust@programming.dev•'Rust makes coding fun again': Why Linux is moving away from C, according to Greg Kroah-Hartman
16·22 days agoCan’t argue with that
SorteKanin@feddit.dkOPto
Rust@programming.dev•'Rust makes coding fun again': Why Linux is moving away from C, according to Greg Kroah-Hartman
7·22 days agoWhy are you considering Zig instead of Rust? Or is it in addition?
SorteKanin@feddit.dkto
Rust@programming.dev•crates.io front-end and its accessiblity issue(s)
5·25 days agoGenerally agree with the takes here and similarly befuddled that an unofficial site like lib.rs seems to be entirely better in almost every way than the official site. It’s a bit disappointing.
I’ve unfortunately seen first hand the stubbornness of some developers on the Rust project when I tried to contribute a minor thing myself. I perhaps just had a bad unlucky experience, but it turned me off from ever contributing again.
SorteKanin@feddit.dkto
Rust@programming.dev•crates.io front-end and its accessiblity issue(s)
6·25 days agoit becomes possible to discover parts of the website that exist but you can’t access.
This doesn’t really apply as a concept to crates.io though, as all crates on the site are public. It seems kinda like security theater to be doing these 403s when all the data is public anyway. GitHub doing this makes sense as there are private repos.
A code viewer for the actual uploaded code is much appreciated. The upcoming diff view sounds really useful too.
Rust-based JS engine that isn’t just AI generated unsafe everywhere
Tbf only 4% of the code was unsafe after the rewrite, which is much better than the 100% of the Zig code being unsafe. Honestly it’s not surprising you’d have such a large amount of unsafe when you translate Zig to Rust. But as I understand it, it’s since been refactored to much less than 4%.
I mean it was 600,000 lines of Zig prior to the rewrite yea? If we say that a team is ~6 people, that’s 100,000 lines each to read through and translate. Assuming 250 working days in a year, that’s 400 lines of code you just need to read every day, let alone the Rust you need to be writing (approximately another 400 lines).
Add to that overhead for planning and coordination… I actually think a year for a team might be an underestimate.
SorteKanin@feddit.dkOPto
Rust@programming.dev•Together for a healthier Clippy | Inside Rust Blog
1·1 month agoPresumably such behavior could get you into moderation trouble, just guessing.
SorteKanin@feddit.dkOPto
Rust@programming.dev•On OpenAI's Support for Rust - The Rust Foundation
18·2 months agoAlso, Foundation members have no say on the direction of the language.
SorteKanin@feddit.dkOPto
Rust@programming.dev•zlib-rs in Firefox - Trifecta Tech Foundation
2·2 months agoI was kinda surprised as well that you couldn’t annotate the function or something. But then again, an attribute like “please don’t use this instruction” sounds like something that’s pretty hard to integrate in the code generation. What kind of flag would you use? I don’t think you want to apply that flag to everything, just to that particular function.
SorteKanin@feddit.dkOPto
Rust@programming.dev•zlib-rs in Firefox - Trifecta Tech Foundation
12·2 months agoI honestly don’t think that is very usual. I would even say it’s more usual to see bare links posted, at least if I look in my own feed. But maybe that’s just the sort of stuff I follow.










Already posted, duplicate post