Live data from Hacker News

My Software North Star

kristoff.it

131–140 of 166 posts

Re: My Software North Star

#131
post #71
post #35

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.

No. Rust is excellent for beginner programmers dipping their toes into systems programming for the first time. Imagine you have a million-line C codebase, and a brand-new junior hire. Are you going to unleash them on the codebase unsupervised? Hell no, you're going to need to watch them like a hawk and regularly slap their fingers in order to teach them what not to do. But I would gladly unleash a junior on a million-line Rust codebase, as long as I have a CI rule that flags any PRs that touches files containing the `unsafe` keyword. This frees up the junior to spend more time learning the business domain and less time worrying about bizarre memory errors.

Re: My Software North Star

#132

Earlier 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.

Arena allocators are great for certain use cases, but they don't provide any solutions to memory unsafety; they don't do anything for use-after-free, they don't do anything for buffer overruns, they don't address any sources of undefined behavior, and they don't do anything for thread-safety, which is a requirement for memory safety.

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…

>There is no meaningful way of distinguishing features from bugs.

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

#134

Earlier 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…

[deleted]

Re: My Software North Star

#135
post #26

Earlier 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)

Yeah my take is they wanted a language more resilient to slop-cannon code. Last I looked they had 900kLOC of Rust just after the Rust PR - I have no doubt there's a lot of garbage in those LOC, and Rust gives more safety guardrails for that.

Re: My Software North Star

#136

Earlier 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…

I did not mention 'formal statement checkable by proof checker' anywhere. Correctness requires some criterion external to the implementation. Write it down and it's a spec. If you do not write it down and the behaviour is not one of the already-standard failure classes like crashing, corrupting data, losing work, then there is no principled way to classify it as a bug rather than an intended feature or tradeoff.

Re: My Software North Star

#137
post #111

Earlier 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…

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.

Re: My Software North Star

#138
post #128
post #41

Earlier 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".

I definitely did not mean using it as a prescription drug for a known condition. I meant using it without any medical indication, like many of us do. We know that amphetamines can lead to cognitive impairment [1] [2]. We know much less about reliance (over-reliance?) on AI, but what we know doesn't look good either [3] [4]. Of course, if you already live with a condition that makes it hard to concentrate, the benefits can outweigh the risks. But for most people they don't.

(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

#139

Earlier 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…

[flagged]

Re: My Software North Star

#140
post #137

Earlier 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.

> but programming languages graveyard is full of C++ killers.

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.

Post reply on HN