Live data from Hacker News

Rewrite Bun in Rust has been merged

github.com

411–420 of 822 posts

Re: Rewrite Bun in Rust has been merged

#411
post #398

Earlier quoted context omitted.

I'd be surprised if they could eliminate memory issues completely, especially considering the amount of `unsafe` the codebase seems to contain. git rev-parse HEAD && ag "unsafe" src | wc -l 19d8ade2c6c1f0eeae50bd9d7f2a4bf4a2551557 14865

On the other hand - now it should be possible to tackle some of those one by one?

Oh yes, I don't doubt they'd eventually be able to seriously reduce that number, probably to a handful of places. I don't doubt the strategy employed here, rewriting it keeping it similar, then slowly change it. I do still doubt they'd be able to completely eliminate memory issues in the end regardless.

Re: Rewrite Bun in Rust has been merged

#412

Earlier quoted context omitted.

Bun isn't a node.js wrapper. It's an alternative to node.js that sits at roughly the same spot in the stack. Node.js is a distribution of the V8 JavaScript engine (the thing that executes JavaScript in the Chrome browser), along with a bunch of standard library code written mostly in C++. Bun is a distribution of the JavaScriptCore engine (the thing that executes JavaScript in the Safari browser), along with a bunch…

Answering “who is even using this software” is unfortunately missing in your answer. I am honestly curious. I’ve never seen it “in the wild” (in job descriptions, hearing from past colleagues, meetups etc). Only place I heard about it is HN and Twitter.

It's primarily used by people who tend to sit on the cutting edge e.g. startups and developers who follow the latest tools. It's not well worn enough to be adopted by slower enterprise environments. Bun is well known within web development but if you don't work in the space and don't keep up to date with modern tooling it's unlikely you would have awareness of it.

Re: Rewrite Bun in Rust has been merged

#413
post #137
post #41

Earlier quoted context omitted.

Well it was 9 days ago, at the time they were not confident, but maybe the results were insanely good.

no matter how good the results are, this kind of rewrites deserves an experimental build to be battle tested by bleeding edge users. It takes a lot of rigorous testing automated and manual and by community before such changes are cosnidered permanent. One does not simply YOLO a full langugae rewrite without user feedback. it is insane.

>One does not simply YOLO a full langugae rewrite without user feedback. it is insane.

The whole ai thing today is pretty insane, I would say. Why not ride with it, especially if your company is one of the biggest leaders?

Re: Rewrite Bun in Rust has been merged

#414

Earlier quoted context omitted.

1. Rewrite from zig to rust in as close to zig as you can. 2. Turn into idiomatic rust.

1. Get hired into a company where you have a solid bet on making multi-century lasting generational wealth (>$50,000,000). 2. Every waking moment do everything in your power to boost the company that might give you the ability to define the direction of technology for the rest of your life. 3. Use the only thing you have (bun) to help push you in this direction and do things to help boost LLM marketing (a technology…

I’m honestly confused. What is it that you think makes these workers “more evil” than Google and Facebook workers from the early 2010s?

Re: Rewrite Bun in Rust has been merged

#416

Earlier quoted context omitted.

> Even if you are fluent in rust, it is going to require significant efforts to contribute to a new 1M LoC codebase. Of course, but this is true for any project or any language, can hardly be disrespectful of me to chose Clojure just because you don't happen to know it? That sounds crazy to me. > Contributors are the most valuable assets of an open source project You're talking about something else. Open source is li…

> Of course, but this is true for any project or any language, can hardly be disrespectful of me to chose Clojure just because you don't happen to know it? Nobody said that the problem is not knowing rust. The problem is changing the whole stack of a project overnight. This requires significant effort to get familiar with, even if a contributor have all the experience in the world with the new stack. > Don't mix conc…

I think most maintainers would rather you not contribute to their project if your contribution comes with the idea in your head that you're now a stakeholder who has some share in the project's technical direction.

Re: Rewrite Bun in Rust has been merged

#417
post #335

Wow. This is going to be interesting to follow. There's absolutely no way any of this code was reviewed, but maybe we're in a post-human world now where you can trust the models to write and review the code. This is like Gastown but on a higher profile project. Will be fascinating to see how this project is able to add new features going forward (or even _if_ it will be able to). Does anyone know how exactly Bun is u…

It passed all the tests. If you can't trust your test suite to catch an automatic language translation you shouldn't trust it at all. :)

What if we only trusted the test suite a reasonable amount, instead of pretending trust must either be blindly total or nonexistent?

Re: Rewrite Bun in Rust has been merged

#418

PR so thick, the page failed to load the first time I opened it, and the comments still continue to fail to load. Absolutely hilarious. Though that may be just GitHub having a normal one, hard to tell these days. 1 009 257 lines added 4024 lines removed 6755 commits 2188 files touched I haven't the slightest clue how anyone would even remotely hope to review this. I guess by just using even more AI? Or maybe by throw…

The maddening thing is that there's a right way to do this if you have the patience and professionalism to do so. It requires building a bit of scaffolding (feature flags, cross-language calling support, harnesses for shadow testing, etc.), then you ship-of-theseus the codebase incrementally . This is not even incompatible with LLM-assistance, plus it breaks the thing up into smaller, reviewable changes that don't br…

I mean it's definitely at least partially a PR stunt

Re: Rewrite Bun in Rust has been merged

#419
post #397

> +1009257 -4024 Bun is now over 1M lines of Rust code. This is approaching the size of the Rust compiler itself; except that BunJs is mostly a JavaScript interpreter wrapper + a reimplementation of the NodeJS library (Rust STD wrapper). I think BunJS is becoming the canary for software complexity management in the LLM era.

Bun is not a JavaScript interpreter, it's "only" a reimplementation of the NodeJS library + various other libraries. Bun uses JavaScriptCore as its JS engine. So Bun itself does (or at least should do) no JavaScript parsing, interpreting or JITing. EDIT: I misread, sorry! You said "JavaScript interpreter wrapper ", which is correct.

That’s what they said - “JavaScript interpreter wrapper”.

Re: Rewrite Bun in Rust has been merged

#420
post #18

If this goes wrong even in the slightest , the ridicule about a drug dealer getting high on their own supply will be neverending and grim.

not enough people are emotionally prepared for if it’s not going wrong even in the slightest

I expect it will be just fine. It's like bragging about getting the words right on a mental health exam. AI was given the answer, it just repeated it back in a slightly different format. Even a stupid human could have done that.
Post reply on HN