Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
whytevuhuni
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
61.
▲
by
whytevuhuni
11mo ago
> I think an improved C can be memory safe even without GC That's a very interesting belief. Do you see a way to achieve temporal memory safety without a GC, and I assume also without lifetimes?
62.
▲
by
whytevuhuni
11mo ago
I’ve written self-referential structures in Rust with the ouroboros and self_cell crates. It was fine, and I got way more guarantees I got it right compared to C++.
63.
▲
by
whytevuhuni
11mo ago
Sure, that makes sense. I agree this is all very subjective, given we don't have the benefit of hindsight for what Zig can accomplish yet. I think where we disagree is that you believe Zig is as safe as Rust (by making it easier to mak
64.
▲
by
whytevuhuni
11mo ago
> Why not ATS? As in, why not use a language with much stronger formal verification? Because people have tried it and failed. Like you said, Rust is hard, it already feels at the limit of what people can handle. But unlike ATS, many peop
65.
▲
by
whytevuhuni
11mo ago
I don't know what the next programming language after Rust will look like, but it will definitely have built-in effects and capabilities. It won't fix everything (see TARmageddon), but left-pad-rs's build.rs file should defin
66.
▲
by
whytevuhuni
11mo ago
I think what clippy needs the most is a way to say, "make all clippy warnings as errors, but only for warnings up to Rust 1.80". And then devs can update that number whenever they want, as opposed to whenever new updates come in.
67.
▲
by
whytevuhuni
1y ago
> I did NOT claim this. Nobody would claim this either. Regardless of what you wanted to convey, I hope the responses make a bit more sense now. > What an insane thing to contest even. We just simply thought so too.
68.
▲
by
whytevuhuni
1y ago
> would you therefore conclude that using vim/emacs leads to garbage software? I cannot conclude that "it leads to garbage software", but I can definitely conclude that "it has ever led to garbage software" at le
69.
▲
by
whytevuhuni
1y ago
> > facts to counter-argue your point of: "hasn't ever led to quality software in any shape or form, neither it ever will". > Your line of reasoning is something akin to - there are some skilled programmers that have
70.
▲
by
whytevuhuni
1y ago
Okay, I see what you mean now. I suppose that could be right.
71.
▲
by
whytevuhuni
1y ago
> This simply doesn't work. I think it works, and quite well even. Defaults matter, a lot, and Rust and its stdlib do a phenomenal job at choosing really good ones, compared to many other languages. Cargo's defaults maybe not s
72.
▲
by
whytevuhuni
1y ago
That might be true. In my case, it is precisely because I do play a lot with my code, doing big 2-day refactors sometimes too. With Rust, when it finally compiles, it very often tends to run without crashing, and often correctly too, sa
73.
▲
by
whytevuhuni
1y ago
One caveat (which most apps already do anyway) is to ensure apps have at most one open instance (i.e. switch focus to the existing one), otherwise this might block both versions and result in some really confusing errors for the user, or co
74.
▲
by
whytevuhuni
1y ago
Ah, that makes a lot of sense. Thanks! My intuition was wrong, my naive understanding was that: * Non-human intermediate targets would either be namespaced and available only in that namespace, or could be marked as hidden, and not clutter
75.
▲
by
whytevuhuni
1y ago
> where Bazel's fine-grained target definitions are pushed as "best practice" and everybody ends up hating the results, for good reasons. What are some of those good reasons (assuming they differ from GP's)? I don
76.
▲
by
whytevuhuni
1y ago
I'd really like them not to hurry (or at least not "ASAP"). Among features that Rust should get right, this is definitely one of them. And from its tracking issue [1], it seems there's alternatives with really important
77.
▲
by
whytevuhuni
1y ago
I wonder if a device with worse RAM can measure radiation by checking how many of its own bits are being randomly flipped. Coding a program that could self-heal and survive in such a situation would be fun.
78.
▲
by
whytevuhuni
1y ago
The short answer is that both values and errors are usually better scoped to only the places where they should be used. For one, Rust's unwrapping of values is done in one step, as opposed to a "check first, unwrap second".
79.
▲
by
whytevuhuni
1y ago
I think there is indeed an inherent reason. In order to get conciseness, you need to accept defaults that work for everyone. Those defaults might not be that great for you, but they're good enough. In order to get performance, those &q
80.
▲
by
whytevuhuni
1y ago
Ah, that makes a lot more sense. Thanks!
81.
▲
by
whytevuhuni
1y ago
But isn't it the case that Python is vastly more popular than Rust? If Gemini is equally good at them in spite of that, doesn't that mean it'd be better at Rust than at Python if it had equal training in both?
82.
▲
by
whytevuhuni
1y ago
I assume that simple technique is to not write any C++, despite being pretty good at it?
83.
▲
by
whytevuhuni
1y ago
> I will never use Rust because of it's awful syntax, I'll stick with C/C++ Oh, that's very interesting. Rust tried to match C++'s syntax as much as possible. Which parts do you find awful? Lifetimes and trait bo
84.
▲
by
whytevuhuni
1y ago
The "Comparison" section feels unfair. Add some things that some languages have but Bau is missing. I have no idea what trade-offs I'd be doing when choosing Bau. You have the "Non-Features" section of course, but I
85.
▲
by
whytevuhuni
1y ago
You can do that with less syntax, this works just fine: fn xy_mut(&mut self) -> (&mut f64, &mut f64) { let Point { x, y } = self; (x, y) } Also, I assume this is just a super trivial example, beca
86.
▲
by
whytevuhuni
1y ago
From HN's guidelines: > Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something. I'm curious to know why you think so, I thought it was a great article, sh
87.
▲
by
whytevuhuni
1y ago
> You would just end up with a bunch of functions that take a struct of that type as their first argument. I don't see that as a necessarily bad thing, it brings uniformity with the rest of the functions. I've coded with librar
88.
▲
by
whytevuhuni
1y ago
Rust is more closely related to C++ than C. I want Rust, but without panics, without generics (aside for lifetimes), without traits and bounds (aside for lifetimes), without operator overloading, without methods on structs, without RAII, wi
89.
▲
by
whytevuhuni
1y ago
If anything I'd like an even lower-level Rust. There's so many good high-level languages to choose from, but when you need to go low-level, there's essentially only C, C++, Rust. Maybe Zig once it reaches 1.0. What we need is
90.
▲
by
whytevuhuni
1y ago
You're right, but just to add a bit more to this, you can call make_ascii_lowercase and make_ascii_uppercase on &mut str, which can sometimes be useful.
More ›