Earlier quoted context omitted.
Agree, the claim "secure because Rust" is wrong. But "more secure than if it were written in an unsafe language" is probably going to be true most of the time.
Nah. You’re assuming that the developer has some experience. The false assurance that the magic of Rust will protect the developer from himself/herself will lead that young developer to make worse decisions. An experienced developer typically has discernment, and has learned, rather painfully, that he/she can make serious errors in any language.
My Software North Star
131–140 of 166 posts
Re: My Software North Star
#132Earlier quoted context omitted.
Writing memory safe code in unsafe languages requires global reasoning, which LLMs are terrible at. The whole point of a type system or a borrow checker like Rust's is to thread the requirements for safety throughout the program syntax in a way that makes it possible to spot problems locally. That's why LLMs tend to be rather good at writing Rust.
> Writing memory safe code in unsafe languages requires global reasoning If you learn how to use arena allocators and in general use modern techniques, you don't need global reasoning to write correct memory management code pretty much never. If your code is a RAII and abstraction maze, then yes, you will probably need global reasoning, but that's not the case with Zig.
Re: My Software North Star
#133> It doesn’t matter that the language you use is memory-safe, if you didn’t design for correctness or have no process that will eventually lead you to fixing all bugs. After many years in the business I have come to a more pragmatic view. There is no meaningful way of distinguishing features from bugs. It doesn't matter that work tracking software usually does. Once you realize that the lack of a feature is the same…
From a user perspective, a bug is when behavior deviates from reasonable expected behavior.
From a dev perspective, a bug is when the code actions mismatches the mental model (aka spec if it exists, else a reasonable mental model of the system).
A bug becomes a feature when it becomes expected behavior.
Re: My Software North Star
#134Earlier quoted context omitted.
Grandparent is onto something. You can't define correctness without a spec. And since most business-oriented software, which most of us work with, isn't made against a comprehensive spec, you can argue that anything falling outside it is either a bug or a feature. 'If your disk backup software corrupts backups' has behind it a clean definition that's (pretty) unambiguous and you don't care about, since it's already o…
> Grandparent is onto something. You can't define correctness without a spec. Sure you can. Correctness doesn't mean "follows a spec", it means "It does what the developer intended it to do without problems". I mean that casually and within reason, it's not supposed to be a formal statement checkable by proof checker. z I don't need a spec to know that e.g. my email client has a bug if it crashes when I try to make s…
Re: My Software North Star
#135Earlier quoted context omitted.
1. Fixing memory errors wasn't the reason the project migrated to Zig, but a beef between the Bun maintainer not getting his own changes in the upstream compiler and the Bun's new employer focus on Rust. 2. You can write memory safe code in C (Redis, SQLite, OpenBSD, Git, etc), let alone in Zig which provides more tools to write memory safe code. 3. AI can write very good Zig already. This isn't 2024 anymore where "t…
Believe what you want, I guess. https://xcancel.com/jarredsumner/status/2055796104302858694#... > I’m just tired of dealing with crashes and memory leaks & want language features to help prevent things (Edit: this reply seemed less flippant before the parent edited their reply)
Re: My Software North Star
#136Earlier quoted context omitted.
Grandparent is onto something. You can't define correctness without a spec. And since most business-oriented software, which most of us work with, isn't made against a comprehensive spec, you can argue that anything falling outside it is either a bug or a feature. 'If your disk backup software corrupts backups' has behind it a clean definition that's (pretty) unambiguous and you don't care about, since it's already o…
> Grandparent is onto something. You can't define correctness without a spec. Sure you can. Correctness doesn't mean "follows a spec", it means "It does what the developer intended it to do without problems". I mean that casually and within reason, it's not supposed to be a formal statement checkable by proof checker. z I don't need a spec to know that e.g. my email client has a bug if it crashes when I try to make s…
Re: My Software North Star
#137Earlier quoted context omitted.
"Like unsafe Rust, but more convenient to use" is basically every imperative language around there, I still don't understand the specific niche that Zig intended to fill
It's weird to talk about "basically every" language, when you have exactly three mature systems languages: C, C++, Rust. C is from the 70s, C++ is an incoherent kludge on top of it, and Rust has a miserable DX (especially when actually used as a systems language instead of relying on pulling in 500 cargo dependencies that handle the unsafe code for you). Nothing else is used for serious systems programming. You don't…
Re: My Software North Star
#138Earlier quoted context omitted.
This might be a very naive take on my part, but I don't think of vibecoding as a competitor to actual coding the same way I don't think of doing amphetamines (even if they make you more productive in the short term) as a competitor to being clean. I think it's a self-destructive behavior that is ultimately going to degrade your critical thinking skills, especially if you're a beginner. As with everything, the smarter…
I take amphetamines prescribed by a doctor for ADHD, and without them I am considerably less effective. And the same way your amphetamine analogy doesn't work, I think it similarly doesn't work for LLMs either. At the end of the day if you are more effective with something than without it, it would be silly to avoid it out of some sense of "purity".
(Aside wrt being more effective with something than without: this is anecdotal, but my paragliding instructor once said that modern wings are often designed to correct for various pilot errors. He advised against buying those because he had seen people make worse mistakes after getting accustomed to them. In his own words: "you become dumber under a smart wing". Sharing because I think this applies to many things in life.)
[1] https://pmc.ncbi.nlm.nih.gov/articles/PMC3639428/
[2] https://pmc.ncbi.nlm.nih.gov/articles/PMC2670101/
[3] https://www.sciencedirect.com/science/article/pii/S074756322...
[4] https://www.dailycal.org/news/campus/academics/failing-grade...
Re: My Software North Star
#139Earlier quoted context omitted.
1. Fixing memory errors wasn't the reason the project migrated to Zig, but a beef between the Bun maintainer not getting his own changes in the upstream compiler and the Bun's new employer focus on Rust. 2. You can write memory safe code in C (Redis, SQLite, OpenBSD, Git, etc), let alone in Zig which provides more tools to write memory safe code. 3. AI can write very good Zig already. This isn't 2024 anymore where "t…
> You can write memory safe code in C (Redis, SQLite, OpenBSD, Git, etc), Do you think that this is a list of software that have never had memory bugs? It really is not practically possible to completely avoid a large class of memory bugs in C in just about any kind of very large commercial or open source codebase. Redis CVE-2025-49844 ("RediShell"): use-after-free in bundled Lua parser https://github.com/redis/redis…
Re: My Software North Star
#140Earlier quoted context omitted.
It's weird to talk about "basically every" language, when you have exactly three mature systems languages: C, C++, Rust. C is from the 70s, C++ is an incoherent kludge on top of it, and Rust has a miserable DX (especially when actually used as a systems language instead of relying on pulling in 500 cargo dependencies that handle the unsafe code for you). Nothing else is used for serious systems programming. You don't…
C, C++ and Rust are the only ones that stuck, but programming languages graveyard is full of C++ killers. Rust is around because it offered something new.
Literally just D? I'm not really aware of other serious efforts to modernise C/C++. Other than Rust, the world became completely fixated on GC languages that were inherently meant for higher-level purposes. Full-fledged attempts at memory unsafe languages in this century have been few and far between.