Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
whytevuhuni
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
whytevuhuni
14d ago
Why is that? What do those have that embassy does not (or vice-versa)?
2.
▲
by
whytevuhuni
18d ago
> cars are to be driven by qualified humans only As a Rust programmer I'm fine with cars driven by dogs, I just want that to be clearly acknowledged as unsafe, and if that car is be driven in public roads, I would also like a safety
3.
▲
by
whytevuhuni
2mo ago
> Tell me why you think you're right. The more verification you do, the more likely it is for a program to be correct. Lean towards Assembly, and you get less correctness, but lean towards Ada/SPARK, and you get more. Rust is a
4.
▲
by
whytevuhuni
2mo ago
> * laugh track deafening * No shallow dismissals please, tell me why you think I'm wrong. > Rust is not a major advance over C/C++ Rust adds the borrow checker (and especially with non-linear lifetimes it's an implemen
5.
▲
by
whytevuhuni
2mo ago
The Blub Paradox [1]. Granted I doubt how true that is, I always understood the benefits of languages like Haskell and Ada/SPARK, it's just that pragmatically speaking I want beginners in my team to be able to code too. [1] https
6.
▲
by
whytevuhuni
2mo ago
Many Rust proponents are experienced C programmers (me as an example). We speak of the horrors of C/C++ precisely because we've seen both sides (3 sides more specifically), and can compare.
7.
▲
by
whytevuhuni
2mo ago
Yes, except imagine the distance in correctness between Assembly and C, and triple it. Less so compared to C++ of course. The sentiment of "if it compiles it probably works" for languages like Rust and Haskell is there for a good
8.
▲
by
whytevuhuni
2mo ago
How much of Valhalla is this? 50% of it? 90% of it?
9.
▲
by
whytevuhuni
2mo ago
Probably dance.
10.
▲
by
whytevuhuni
2mo ago
Yeah, this has come up a few times when I was coding Rust. From just reading your code I know for sure that i is a usize (indexing is very common), but don't know what j is (I usually expect Rust to throw some kind of "could not i
11.
▲
by
whytevuhuni
2mo ago
In production you generally want your code to not be 1.5x-2x slower than C/C++, otherwise people will ditch your whole language with all its other benefits in pursuit of performance. There's a lot of safe but slow languages, Rust
12.
▲
by
whytevuhuni
2mo ago
Rust helps prevent some race conditions, but an unqualified "prevents race conditions" sounds like it eliminates them, hence why GP says it does not.
13.
▲
by
whytevuhuni
2mo ago
> So you haven't understood the distinction or you're letting your feelings for software get the best of you. Maybe? I'm not sure. > The proof that there are no (for rust's definition of "no") memory bugs
14.
▲
by
whytevuhuni
2mo ago
I’ve understood the distinction. I just don’t like you equating “actually not safe” with “worthless”.
15.
▲
by
whytevuhuni
2mo ago
Of course, but even the presence of CVEs does not make software worthless, it just makes it worth less.
16.
▲
by
whytevuhuni
2mo ago
But code is not mathematics, so incorrect code is not worthless, it’s just worth less. It’ll most likely still do 99% of the things people need it to do, there’ll be a an issue created for that broken 1%, and eventually it’ll be iterated up
17.
▲
by
whytevuhuni
2mo ago
Only ~4% of code is inside an unsafe block, so the idea is that for new code/contributions, the chance of introducing a new memory-safety bug is an order of magnitude lower. Maybe in the future the unsafe code will go down to 1%, bring
18.
▲
by
whytevuhuni
2mo ago
If cve-rs exists, we still say that safe Rust is safe, in the same way that we say Python is safe despite potential bugs in its interpreter or native libraries, and that Java is safe despite potential bugs in the JVM or JNI libraries, and s
19.
▲
by
whytevuhuni
2mo ago
> "unsafe" is in practice often needed for performance in Rust That's the power of Rust, not a limitation of it. Rust thrives on its ability to provide safe interfaces over unsafe code. You'll see this practice in oth
20.
▲
by
whytevuhuni
2mo ago
> honestly thats the biggest problem with rust, they come up with a lot of useful changes but then take ages to stabilize because the core team is overworked On the contrary, that has been one of Rust's biggest strengths. My impress
21.
▲
by
whytevuhuni
2mo ago
GP is referring to the article's title, as in "safe Rust", as in "Rust with no unsafe keyword", as in whether it has undefined behavior or not. Granted the premise is rather brittle, since all Cpp2Rust does is to co
22.
▲
by
whytevuhuni
2mo ago
And also one I'd like to see in more languages! Especially a simpler one, closer to C.
23.
▲
by
whytevuhuni
2mo ago
> If you don't use panics, you don't get the machinery. I'm not using panics, and yet I'm getting the machinery. That is where my frustration is coming from.
24.
▲
by
whytevuhuni
2mo ago
It is a fundamental language limitation, unless you want to claim that the core library (or rather what's left when using no_std) is not part of the language. The problem comes from a combination of three things: 1. Rust's stand
25.
▲
by
whytevuhuni
2mo ago
I tried to use Rust for a tiny microcontroller (GD32VF103, 128KB flash). First of all, I was amazed by how much I could do with Rust ( safe Rust, even), and how well it was interfacing with my handwritten RISC-V assembly. I will definitely
26.
▲
by
whytevuhuni
2mo ago
Pretty much everything except Haskell and the like can be considered as such. That's because closely following PL theory isn't always the right goal for a language. Ergonomics and pragmatism are far more important.
27.
▲
by
whytevuhuni
2mo ago
Languages, no. But for language-agnostic package managers, Nix/Guix and Gentoo are similar. Sadly, Gentoo is not great for managing per-project dependencies in the same way as is done by npm, pipenv, etc. Nix however works great (if yo
28.
▲
by
whytevuhuni
3mo ago
Ah, okay. In that case I feel like the only sane way to approach this is to completely abolish null-terminated strings, and reimplement everything (including stuff like printf's format and arguments) in terms of strv. Otherwise if ther
29.
▲
by
whytevuhuni
3mo ago
How does strv2cstr work? I assume it doesn't allocate, so not sure how it can add a null terminator.
30.
▲
by
whytevuhuni
3mo ago
> The concept of "a garbage-collected language" is not well-defined. There are languages, like Java, Rust, and Python that depend on a garbage collection mechanism, and languages like C, C++ and Zig, which don't. C++ happe
More ›