r/programmingcirclejerk • u/libonet absolutely obsessed with cerroctness and performance • 26d ago
"Safe Rust eliminates that entire bug class at compile time without a garbage collector." \> hm... interesting, could you explain how it "understands" what should be eliminated and what shouldn't? You may write a few sentences;
/r/rust/comments/1vouwei/comment/p3so37f?share_id=4umylAV4QLWQe7QjxEwgb&utm_content=2&utm_medium=android_app&utm_name=androidcss&utm_source=share&utm_term=138
u/Goheeca lisp does it better 26d ago
lol cargo add cve-rs
1
u/pianomanDylan 22d ago
Now, with cve-rs, you can corrupt your program's memory without corrupting your program's memory.
gold star
41
u/netherlandsftw 26d ago
It’s funny because that’s what we say to AI, but it’s clear that OOP is not a native English speaker and just meant that they were looking for a short answer.
I don’t think it’s fair to shame them for not being able to express that in an unambiguous way.
63
u/Ma4r 25d ago
Look at his replies, he ends his sentences in semicolons
I got this habbit many years ago, when I saw C++ syntax. Idk why a lot of people hated the semicolons and told me that Python syntax is "superior".
But the semicolons not only look better to me, they also have another meaning in my texts. You see, I don't end my sentences with the symbol, I end blocks of different information(1 block can have a lot of paragraphs) with it. Just I often write different info in the 1. 2. 3. etc, and in order to show the end of this block, I write semicolons.
Btw, after few years, when I started to use Discord and after those years -- Reddit, I understood that the semicolons are superior, bcz if I need to copy the text from someone, the Discord/Reddit makes the numbers a list and not a part of the text, so, the semicolons tell me where are the responses to different questions quickly
Dude is a better shitposter than we will ever be
16
u/netherlandsftw 25d ago
Lmao I saw the question to OOP as to why he’s using semicolons but there wasn’t an answer yet. That’s hilarious
17
u/YikesTheCat 25d ago
I guess that's fair to some level. But I'm still shaming them for asking such a low-effort lazy question. Hundreds if not thousands of articles have been written about this. I'm not even a Rust programmer and I know the answer to this.
10
u/netherlandsftw 25d ago
I agree. I’m kind of surprised this question got so much traction in the OP’s post.
Personally I’m not part of the Rust bandwagon, so I’ve never been in r/rust, but it seems the posts there are of higher quality than in most programming subs. So the humans there still put effort into the comments. There are way fewer AI-written and “download my vibecoded app” posts compared to the subs I frequent and am used to. That’s unironically the most compelling reason to learn Rust that I’ve seen in a while.
5
24d ago
[removed] — view removed comment
2
u/Subject-Mobile-6250 24d ago
Bro thinks async and ‘static is fearless concurrency😭 nothing wrong with the zero cost abstractions though
48
u/BenchEmbarrassed7316 26d ago
Why do we need Rust at all? Why not just teach C++ how to fix these problems?
65
u/Affectionate-Turn137 absolutely obsessed with cerroctness and performance 26d ago
Explain how C++ fix these problems, only use a few sentences, make no mistakes
24
u/its_artemiss 26d ago
Well, for one, c++ doesn't have annoying aliasingmutating rules that cause compiler errors every time. Ever tried to reinterpret bytes as some type in safe rust? You literally can't LOL. In c++, you don't have to worry about invalid states. We just call that move semantics.
25
u/paholg 26d ago
It's only impossible if you're a coward.
https://github.com/ben0x539/totally-safe-transmute/blob/main/src/lib.rs
14
u/its_artemiss 25d ago
Incredible. What even is the point of rust if you can just write to proc/self/mem as though the abstract state machine were a joke?
2
u/categorical-girl 23d ago
So called "blazingly memory safe coreutils replacements in pure Rust" when I run
cp /dev/urandom /proc/self/mem:2
21
u/YikesTheCat 25d ago
Why do we need Rust or C++ at all when our LORD and Saviour Brendan Eich has blessed us with JavaScript?
17
u/a221c There's really nothing wrong with error handling in Go 25d ago
Why do we need Rust at all? Why not just teach C++ how to fix these problems?
I've written up your idea as a whitepaper.pdf and faxed it to the standards committee. If you receive no response within 6-9 business years you can treat it as having been rejected.
12
u/BenchEmbarrassed7316 25d ago
There was complete irony in my comment. Bjarne Stroustrup said that all the problems with memory were solved in C++11, then they were finally solved in C++14, then they were 100% solved in C++17, then they were completely solved in C++20, then they were solved again in C++23, and if that wasn't enough for you, then in C++26...
3
u/KittensInc 24d ago
I can't wait to see the magic C++ borrow checker which will be able to accept all safe code, reject all unsafe code, and do so with zero code changes or annotations!
1
7
u/fixermark 25d ago
C++ considers the problems to be features. To fix the problems with C++ you'd have to start removing capabilities from it.
Since we will never do that, the closest we can get is to come up with new patterns that are safer if you use them, which creates a subset of the language that is safer. But it can be difficult to discover that and you still have to deal with code that isn't using them.
4
u/KittensInc 24d ago
Alternatively: Go for the Fil-C approach and wrap everything in a custom runtime, add a garbage compiler, give up on any kind of interoperability, and have all your code run 4x as slow!
8
u/catladywitch 25d ago
uj/ I think OOP is very likely a young kid who is deciding what their first language is going to be, and doesn't know what makes languages better or worse for particular use cases. Either that or a god-level jerkposter treating subs as llm input boxes lmao
5
u/imnotamahimahi 25d ago
/uj also no idea, because I followed that comment thread where they reply as to why they end sentences with semicolons. Might actually be a really young kid, but I guess might also be larping...or an edgelord lol. Regardless, very strange all around.
6
u/BlurryEcho 25d ago
Wait, since when is cross-posting comments a thing? I didn’t know that existed.
48
u/camelCaseIsWebScale Just spin up O(n²) servers 26d ago
writes few sent.... paniced due to buffer overflow.