HNHacker News
TopNewBestAskShowJobs

afdbcreid

1,212 karma · joined November 10, 2020

submissionscomments
afdbcreid··on 2026 is an exciting year for the Rust compiler (and me)
It is slow. Nobody would deny that. It also requires work to avoid disastrous compile times, that's also true.

But 15 minutes? Even rustc doesn't take that long (on a powerful computer), and that's a very large program that is compiled at least twice (bootstrapping)! That's just poor engineering, not knowing how to write fast-to-compile Rust code.

afdbcreid··on 2026 is an exciting year for the Rust compiler (and me)
> That isn't "Rust compiles are fast"

And neither the original example is "Rust compiles extremely slowly" (it does compile slowly), it's another example of "vibecoded software is of poor quality".

afdbcreid··on 2026 is an exciting year for the Rust compiler (and me)
You only clean the build directory once every Rust update? Unless you use nightly, I don't see how that's feasible. Having a 1TB (and pretty free) disk, I still need to clean regularly (not that commonly, but more than once a release).
afdbcreid··on 2026 is an exciting year for the Rust compiler (and me)
More precisely: it wasn't known to be blocked on the new solver (unlike some other features), because nobody dared to touch it until recently... (more seriously, there wasn't enough investment).
afdbcreid··on Tsrs: A Port of TypeScript to Rust
With sanitizers (https://github.com/oxc-project/tsrs/blob/main/notes/mem-recy...). We're back to C I guess. I hate this project now.
afdbcreid··on Tsrs: A Port of TypeScript to Rust
It appears they're using a unique memory model (https://github.com/oxc-project/tsrs/blob/main/docs/PORTING.m...) to overcome the challenge that prevented the TypeScript team from choosing Rust to begin with: Rust has no GC and porting from a GC language to it often requires restructure of data.

Essentially, they fake a GC via never-freed arenas for long-living objects. It's interesting that Rust can do that (hopefully soundly)!

afdbcreid··on Java sealed classes and exhaustive pattern matching
> A sharp edge is writing meta typesystem code infolving covariance, invariance etc

Like in Java? C# has its own sharp edges (like most or all languages), but it's almost disingenuous to bring a feature that is much more complex and weird in Java as an example.

afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
Perhaps. We don't know for sure. We also don't know for sure about Rust, but the odds here are greater.
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
There is no such thing as "informally sound". Soundness is a mathematical property and needs to be proven mathematically. For that, you first need a mathematical definition.
afdbcreid··on Problems with the Rust Language
The first and last points are basically nonsense. The others are valid, more or less.

(1) The Rust Foundation was very carefully engineered to not have any influence on the technical direction of the language. Yes, corporations are backing it, someone needs to pay the bills. Yes, they expect to benefit from it. It's pretty clear how - they want to ensure Rust, which they heavily rely on, is continued to be developed.

(2) The Rust compiler does not contain a trusting trust backdoor. It's possible to bootstrap rustc from zero (the original OCaml compiler) or short-circuit with mrustc. This was done and the binaries were identical (yes, not every version was checked). The GCCRS compiler might not be useless, but it is far from being useful enough that the Rust community should shift resources towards it.

afdbcreid··on AOSP Source Releases Are So Late Developers Disassemble Libraries to Report Bugs
Why will they care what HN says about them? The people here don't like them anyway. They care what customers think, not developers.
afdbcreid··on A plea not to use uv-build
> they do request nicely, but they also present the drawbacks for them as if they are absolute, and even claim that "its benefits don’t outweigh the drawbacks".
afdbcreid··on A plea not to use uv-build
By a search, Gentoo accounts for less than 1% of all developers. If uv-build is more conformant to people, probably volunteers (and if they're using it, it probably is), I don't think the Gentoo people have any right to want them not to use it because it makes their lives harder. They can request, and they do request nicely, but they also present the drawbacks for them as if they are absolute, and even claim that "its benefits don’t outweigh the drawbacks".
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
Indeed. Proving the implementation will likely never be done, it's just way too hard. But proving Rust abstract semantics are sound will by itself be a major leap forward (RustBelt did that for a subset of Rust).
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
Which is why I said to ignore RustBelt. Because we don't have formal semantics today, we only have the actual implementation which is not composable.
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
I explicitly did not ignore the option that there are possible sound semantics:

> but not necessarily for this one specifically

> Maybe, maybe not.

But "the Rust semantics" are not defined, formally. The closest we have is what Rust implements currently, and that was shown here to not be sound. Other than that, we maybe have vague ideas in the brains of some T-types members, which are not detailed enough to determine soundness (source: those type system people want to formalize the semantics so they will be).

And for the record, we know of other soundness issues where the likely resolution path will involve rejecting valid programs we accept now, and the only question is how many.

afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
It does apply, of course (even if not to this case specifically). The implemented Rust semantics are not sound, as evidenced by this issue. We need to find (or adjust) sound semantics. Which, mathematically, is equivalent to designing Rust from scratch (ignoring things like RustBelt because they did not formalize the entire system). Due to Rice's theorem we know we need to give up some sound programs. Can we give up exactly the programs we already gave up for the previous Rust? Maybe, maybe not.
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
This edit is newer than my comment (and its writer is an experienced T-types member, so I take back my words).
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
Compared to, for example, 5 million Rust lines in Android, I'd say.
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
Nobody writes variance at hand in Rust because it's impossible (since before 1.0). You sometimes need to enforce stricter variance than the default (can cause unsoundness and is very subtle but actual unsoundness here is rare) or give more permissive variance (harder and also cannot cause unsoundness, just annoyance).

When implementing the type system, however, variance does have to be treated with care. Historically it wasn't much, now it is.

afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
That's not how it works. rustc doesn't "check" for specific cases explicitly, the borrow checker (apparently at fault here by reports) has a set of rules that should reject invalid programs. So either one of the fundamental rules was broken (unlikely here from what I've heard), or some optimization caused the rules to not be implemented correctly.
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
I can't tell if you are sarcastic, but in case you are not:

By Rice's theorem you cannot be sound and complete, i.e. accept all valid programs and reject all invalid ones. Most languages choose to be sound but not complete, i.e. reject all invalid programs but also some valid ones (C and C++ are the notable exception, although most languages have escape hatches). GP was saying that the fix might reject valid programs that compile today. This is true for some existing soundness bugs, but not necessarily for this one specifically.

afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
And are also woefully insufficient as proven in most sanitized & linted & fuzz-tested programs in existence (browsers and operating systems).
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
The eventual goal is verification of the full system. Not the implementation, yes, that's infeasible. But this will mean all soundness bugs will be either found and fixed or we'll know how to fix them once they're found. In any way they won't be fundamental (which is believed to be the case today, but not proven).
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
That's a misunderstanding. This is not a security vulnerability and Rust explicitly does not defend from malicious programs, only from mistakes. This bug however is quite dangerous, because unlike many soundness bugs it seems plausible to hit by mistake.
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
Also unlike C, it should be possible to formalize all of Rust, not just a subset. For two reasons: Rust evolution (not initially but today) is strongly tied with formalizing it and the language team consults with formalization experts (which are part of the Rust project themselves) all the time (and formalization or semi-formalization projects are ongoing), and also the mathematical understanding of system languages itself has advanced.
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
There is a severe misunderstanding here. Beside being only a subset, CompCert definitely has UB. It just formalizes codegen for codebases not containing UB, which obviously won't be enough for Rust.
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
Not to talk about Go, which has intentional unchecked-at-runtime UB (data races) yet many argue to consider it memory safe (and I have a feeling that the same people arguing Rust isn't memory safe are also there. Just a feeling though).
afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
While true, there are two important differences:

1) Unsoundnesses in Java's type system are checked at runtime.

2) They (or at least some) are intentional or at least won't-fix bugs.

Both are not true for Rust.

afdbcreid··on 11 year old unsoundness bugs found in Rust borrow checker
But bugfixes are also allowed. So the fair conclusion is that the implementation is broken, but the language is not - because it's possible to fix, and it's possible for all known soundness issues (including the cve-rs one). For this one specifically, I've heard people are already working on a fix.
← PreviousPage 3 of 15Next →