Remix.run Logo
lunar_mycroft a day ago

I think that the bun rewrite actually supports the oppposite conclusion in a lot of ways:

1. The resulting code was of pretty low quality. Others that bothered to put it through Miri and the like found many soundness issues, but my personal favorite example is this example which is trivially and locally (meaning that someone who has the most basic understanding of unsafe in rust can see it's obviously wrong just by looking at the specific function) incorrect example [0]. This particular example was removed in an apparently unrelated refactor after spending well over a month in the code base without any of the bun maintainers or their agents detecting it, and a quick grep found hundreds of potential similar issues (although many of those are false positives).

2. More generally, it's not clear to me that there was any technical benefit to the rewrite in the first place. The stated reason was for memory safety, but replacing Zig with unsafe rust doesn't actually get you memory safety, and removing the unsafe blocks often requires more extensive refactors to fit within rust's model.

> If you can reduce a problem to a clearly verifiable end state, provide the necessary context, and equip a model with the necessary tools it can usually get to a good solution.

As others have pointed out (and you acknowledge), "reducing a problem to a clearly verifiable end state" is just "programming". What you don't seem to understand is that actually doing that is made harder by using AI, not easier. A sufficiently detailed spec is called "code" [1], the question is what language/notation is best to write it in. The answer is almost never "whatever is closest to what the computer actually executes", as assemblers and later compilers and interpreters demonstrated. But it also isn't several of the things that AI proponents have suggested to replace the latter with.

Take natural language, for example. As Dijkstra pointed out, we've been through this already with math. It used to be that all math was expressed in a way closer to what we'd now call "word problems", but this turned out to be bad. The specialized language of e.g. algebra isn't something mathematicians use to gate-keep, it's way easier to reason in the domain that way than it is in English (or other natural languages). The same is true for programming, once you actually specify what you want to do with enough rigor. It's generally easier to read and reason about code than to do so with natural language specifications.

Another proposal is to use tests and similar automatic verification to specify the program. I suspect that anyone with much experience can already tell whether it's preferable to specify a program through code or through tests, but thankfully we have empirical evidence on this for anyone who has any doubts in the form of e.g. sqlite. Sqlite is probably one of if not the closest any piece of software comes to being fully specified by it's tests. To do that takes almost 600 times as much test code as there is "regular" code. Dr. Hipp even personally weighed in on the implications this has on AI recently [3] . The reason to do testing is that it provides a second independent check for correctness, if you're using it as the *only* check that advantage disappears.

[0] https://github.com/oven-sh/bun/blob/fc865b398e51de8a95ddde4b...

[1] https://haskellforall.com/2026/03/a-sufficiently-detailed-sp...

[2] https://www.cs.utexas.edu/~EWD/transcriptions/EWD06xx/EWD667...

[3] https://youtu.be/V_qzqY1bb7I?t=2727

simonw a day ago | parent [-]

> More generally, it's not clear to me that there was any technical benefit to the rewrite in the first place.

The Bun 1.4 announcement claims: https://bun.com/blog/bun-v1.4

> It reduces idle CPU usage by 5x, reduces memory usage by up to 35%, and starts 50% faster on Linux.

lunar_mycroft a day ago | parent [-]

The announcement also makes it very clear that 1.4 isn't just a rust port of 1.3. Rust is my favorite language and it can be a bit faster than other systems languages in the right circumstances (because the compiler can make optimizations based on assumptions that wouldn't hold without the borrow checker), but numbers like those seem far more likely to be the result of other changes than the language shift.

simianwords 11 hours ago | parent [-]

> More generally, it's not clear to me that there was any technical benefit to the rewrite in the first place

> but numbers like those seem far more likely to be the result of other changes than the language shift.

Which one is it?