Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
simonask
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
421.
▲
by
simonask
1y ago
But the problem here is that our nice programmer-brained mental model does not match the actual requirements of text. Unless you know about tree structures, it doesn’t make sense to the average person why you would have to stop and then res
422.
▲
by
simonask
1y ago
If you are making technical decisions based on how strangers on the internet make you feel, I fear there's not much I could have done anyway.
423.
▲
by
simonask
1y ago
I think you are pointing out that garbage collected languages can be very fast, right? I agree about that, but it does fundamentally comes with some very big caveats. There's a huge number of use cases that are perfectly served by GC l
424.
▲
by
simonask
1y ago
It's fine to have a sober view of the severity, but we can hopefully agree in general that writing any program in C or C++ that faces the internet requires extreme caution.
425.
▲
by
simonask
1y ago
I don't have time to respond to all of this, but let me just say that you seem to be under the impression that it is somehow my responsibility to "win you over" and convince you to use Rust. I have stated very clearly that th
426.
▲
by
simonask
1y ago
Cost is a useful metric because it reflects a number of relevant things: Time to develop, effort to maintain - yes, but also people turnover, required expertise levels, satisfaction, and so on. Whether or not you like it, you have to care a
427.
▲
by
simonask
1y ago
I propose that we start taking the appropriate amount of professional responsibility. That includes being honest about the actual costs of software when you don’t YOLO the details. Zero UB is table stakes now - it didn’t use to be, but we d
428.
▲
by
simonask
1y ago
I’m sorry, but there is an incredible amount of hard data on this, including the number of CVEs directly attributable to memory safety bugs. This is publicly available information, and we as an industry should take it seriously. I don’t mea
429.
▲
by
simonask
1y ago
To be clear, I recognize that some kind of general mechanism is useful, I’m just not sure why files and byte streams are considered especially great. Because the flip side of your example is that you now have a plain text protocol, and if y
430.
▲
by
simonask
1y ago
I've never quite understood why the idea "everything is a file [descriptor]" is often revered as some particularly great insight. Perhaps it was for its time, but I think we have to be honest and say that it is a really awkwa
431.
▲
by
simonask
1y ago
I've worked with some of the best C++ programmers on the planet, and none of them would ever propose this as a solution. They are the first to recognize that developing software in C++ is expensive and error-prone. We've tried thi
432.
▲
by
simonask
1y ago
If you think a strong and convenient type system helps with functional safety, then Rust helps with functional safety. This is also generally the experience in the industry.
433.
▲
by
simonask
1y ago
Memory safety (as defined by Rust) actually goes a very long way to help with functional safety, mostly because in order to have a memory safe language, you need a number of additional language features that generally aid with correctness.
434.
▲
by
simonask
1y ago
It all comes down to whether pointers into the arena do something different than normal pointers when they are dangling. Normal pointers cause UB. That’s astronomically bad. If your arena pointers crash your program in a well-defined way, t
435.
▲
by
simonask
1y ago
Rust competes with both GC languages (offering way superior performance) and with C++ (offering safety and modern language features). It’s a pretty strong value proposition, but it doesn’t mean there aren’t good reasons to pick a GC languag
436.
▲
by
simonask
1y ago
Linked lists aren’t just possible in Rust, they are in the standard library. They are just an example of the borrow checker’s limitations, which mean that you can only form a DAG of mutable references. But that’s why we have `unsafe`.
437.
▲
by
simonask
1y ago
The point about "gibberish" is getting at a fundamental misunderstanding that people have about Undefined Behavior. Rust's concept of "safety" really means "absence of Undefined Behavior". Lots of people d
438.
▲
by
simonask
1y ago
This is true out of the box - Rust isn't magical, and it can't fix all your bugs for you. But it does make its own tools available to you, an API designer. Lifetimes are available to you without ever making any actual references
439.
▲
by
simonask
1y ago
I think you have both misread the comment you replied to and misunderstood the concept of memory safety.
440.
▲
by
simonask
1y ago
Zig is an immense improvement, but it’s not a production language at the time of writing. Not a lot of people feel qualified to actually compare the two. At the same time, I will argue that Zig’s improvements over C are much less substantia
441.
▲
by
simonask
1y ago
You know, the `unsafe` keyword exists. You’re allowed to use it. If your algorithm is truly safe, and as you say, there are many safe things the borrow checker cannot verify, that’s exactly what `unsafe` is for. Ideally you can also design
442.
▲
by
simonask
1y ago
This is an interesting comment, because you point directly at the exact reason Rust’s approach is so productive. In the C/C++/Zig code, you would add the second concurrent access, and then start fixing things up and restructuring
443.
▲
by
simonask
1y ago
There’s just no good reason to conflate the two. Rust’s Arc and C++’s std::shared_ptr do not reclaim reference cycles, so you can call it “garbage collection” if you want, but the colloquial understanding is way more useful.
444.
▲
by
simonask
1y ago
The benefit of Zig seems to be that it allows you to keep thinking like a C programmer. That may be great, but to a certain extent it’s also just a question of habit. Seasoned Rust coders don’t spend time fighting the borrow checker - their
445.
▲
by
simonask
1y ago
I’m not an idiot! However, 3 months ago me was clearly an idiot judging from the utter crap he wrote. Me in 3 months is also an idiot, he won’t get the greatness of these genius hacks I’m making.
446.
▲
by
simonask
1y ago
I never really understood why nobody ever just forked YAML and took out the ugly bits. It’s not a very complicated parser. In the mean time, I’m very much enjoying KDL.
447.
▲
by
simonask
1y ago
KDL is really, really nice. And lightweight.
448.
▲
by
simonask
1y ago
It’s not even a particularly obscure low-level operation: atomic add. Every computer in the world performs that exact instruction a huge number of times running normal, non-Apple software. The key insight is the kind of “vertical integratio
449.
▲
by
simonask
1y ago
We’re not trying to come up with a convincing argument - there’s thousands - but we’re trying to understand how it’s even possible to conceive of such idiocy for a person who is otherwise reasonable.
450.
▲
by
simonask
1y ago
It varies somewhat by continent, but living very far from the ocean is what’s new. Humans have historically had by far the densest population near shores - river deltas, archipelagos, and so on. The notion that “seeing the ocean” was a very
More ›