Live data from Hacker News

Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

twitter.com

611–620 of 754 posts

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#611
post #528

Earlier quoted context omitted.

> If it's doing a drop in the hot loop that may be an unexpected performance regression that could be carefully lifted. Yeah, I've heard of people being surprised that when they make massive collections of Box'ed entries, then get surprised that it takes a long time to Drop the whole thing. But this would be the same in C or Zig too. Malloc and free are really complex functions. Reducing heap allocations is an essent…

In zig the solution is to use an arena allocator. That’s about as easy as it gets. Maybe Rust also allows doing that, I don’t know.

You can use arenas in Rust, it's just not as trivial to swap allocators generally. But there are plenty of crates for it.

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#612
post #603

Earlier quoted context omitted.

Ah, yes, the "you're holding it wrong" defense. If one tool has a higher safety rating than another, significantly so, preventing entire classes of mistakes from happening that the other does not, in a kind of superset manner - even the most skilled craftsman will inevitably make mistakes that would have been prevented by the safer tool.

[flagged]

Yes, but you really have to go out of your way to segfault/ run afoul of memory safety issues, which are a pain in the ass to debug.

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#613
post #604
post #548

Earlier quoted context omitted.

I think the main problem with Bun is that they are trying to move very quickly. Tigebeetle devs spend 90% time working on stability, safety, tests and so on. They don't need new features, they need reliable software. Their database is pretty simple in terms of features and their goal was always stability and speed. Bun devs spend the majority of the time adding new features.

Maybe they should put more consideration towards quality if they have a ton of memory issues.

That's what they're doing.

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#614
post #298

Earlier quoted context omitted.

[flagged]

As an amateur in the space: I download on Mac, run `ngspice`, "Error: Can't open display: :0". I look in the code - hardcoded X11-era assumptions. Not exactly modern affordances... Then I try to understand and extract the actual formulas, and there isn't a clean formula layer anywhere. All is procedural, e.g. in `b4v6temp.c` formulas are tangled with branching, caching, model-state mutation. Extracting the computatio…

This explains a lot. But you merely need to look into the family of spice forks to realise, given the way that they're strangely limited to certain operating systems and embedded inside certain proprietary IDEs, that's there's something very wrong with the code architecture.

So, that would be an awesome project!

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#615

Earlier quoted context omitted.

It's been repeated many times that the rejection of the Bun PR was unrelated to their AI-policy. It's also not clear they've "fumbled the ball" given how many projects are complaining about slop PRs.

I think it would help if Zig put out a statement on their actual AI policy, regardless of whether they’d be repeating something that should already be known. As often happens, the online discourse has, for some reason, decided that this was an anti-AI stance, while - as far as I understand - the problem was simply that the PR had problems, which lead to Bun forking Zig.

They did: https://kristoff.it/blog/contributor-poker-and-ai/

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#616

Earlier quoted context omitted.

Running an experiment, the experiment being more successful than you thought, and then deciding to put more effort into a bigger experiment is not hypocrisy. It’s engineering. If you think some of the objective facts they’re putting out (like test coverage and performance) are lies, go and prove it instead of appealing to emotion.

Running an experiment and deciding based on the results is not hypocrisy, it's engineering, 100%. Saying you have no intention of doing something then doing it is not engineering, it's being dishonest. He could have said "well decide when we see the results", why didn't he?

Maybe he didn't think it would work. Maybe even if it does "work" they'll keep the zig version anyway. Maybe further study is needed beyond existing compiling/test-suite. Intentions and perspectives change over time, even only a few days, without dishonesty.

I'm guessing that if I said it ... that we have no intention of re-writing in rust ... that what I mean is "we have no intention of spending the extreme cost it would take to rewrite". When I discover the cost model is completely different that changes things.

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#617

I'm a full time Zig developer, and I see this as an absolute win. I know Jarred has said in the past he feels Zig makes him more productive, but I also think it's fair to say Bun was programmed in a way that's quite cavalier towards buffer overruns. I think Jarred and the Oven team will have significantly better luck with Rust. Some commenters have remarked they only heard of Zig because of Bun, therefore this is bad…

I remember looking into the nodejs alternatives some years ago, one way to compare them is to look at the open issues. bun had so many hits for 'segfault' and deno has basically none. Even now: bun (zig) [1] 119 open / 885 closed deno (rust) [2] 0 open / 1 closed I don't think this has that much to do with Zig's anti-AI stance. More about using the right tool for the job. [1] https://github.com/oven-sh/bun/issues?q=i…

You misspelled segfault as segfaut on your Deno search:

https://github.com/denoland/deno/issues?q=is%3Aissue%20state...

There 10 open and 40 closed on Deno.

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#618

Earlier quoted context omitted.

> It's the whole damn point. Believe it or not, for some of us it’s not “the whole damn point”.

Why else would one create software, if not to do something that a human does/did?

To do things that a human could have done in theory, but did not do because it would have been too expensive.

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#619
post #606

Earlier quoted context omitted.

Zig is a love letter to C. It does not do much of anything to address memory management. Doesn't even have any concept of ownership like C++ does (ergo, no equivalent of unique_ptr / shared_ptr). All you get over C is the addition of defer, and even that isn't really that different if you're using GCC or Clang and thus have __attribute__((cleanup)).

Zig does in fact do some stuff to address memory management like making allocations more explicit using allocators and shipping with arenas.

C also has only explicit memory allocators...

Re: Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

#620

If this goes through, it feels like it will stoke rust on zig violence

I really don't think so. Bun was using their own language, that forked from Zig 0.14. It's not like the communities interacted much. All of Bun's code was their own internal code, it was not part of the Zig ecosystem. I don't see how this could have any impact in the Zig community at all.
Post reply on HN