Live data from Hacker News

Rewriting Bun in Rust

bun.com

171–180 of 560 posts

Re: Rewriting Bun in Rust

#171
post #165

Earlier quoted context omitted.

that you understand and think dropping down to C++ is what you need to do when you "need the best performance" is quite enough of a tell to invalidate the rest of your opinion here. if you "need the best performance", you need to ditch OOP and RAII, and you're probably reaching for C. Zig wants to be the better choice there. that's a perfectly reasonable niche for a language to exist in. if you read the article caref…

the point of c++ when you need max perf is to be able to maintain the compile-time abstractions you need w/ templates instead of macros and undocumented optimizer behavior, not oop or raii

you're right that that is a weak argument against C++ in that use case (biased by my own dislike of the language); but it is also a niche that Zig fits into quite well. so it's weird for the OP to claim it's ok to drop down to C++ when needed while kind of suggesting they don't get why anyone would use Zig

Re: Rewriting Bun in Rust

#172

Earlier quoted context omitted.

> what say you now? I think that when you have a $165,000 hammer, all of your problems begin to look a lot like nails.

I've done rewrites like this, maybe it wasn't Zig to Rust, but I have been able to rewrite sizable projects, from C# to Rust before. I incorporated a similar strategy, have Claude Opus review the codebase, write a spec, then have Claude implement it, while reviewing the spec, and using the codebase as fallback and gospel over the spec. That said, it's not the entire story here as I said, there was a lot of thought pu…

Curious why you'd move from C# to Rust. C# has you covered mostly for memory safety so I would guess performance or lots of shared memory across threads?

Re: Rewriting Bun in Rust

#173

> This Rust rewrite would've taken a team of engineers with full-context on the codebase a year of work. With 1 engineer using Fable & closely monitoring Claude Code, we went from start to 100% of the test suite passing on all platforms in 11 days. This is impressive from a technological standpoint, but it does gloss over the fact that it would have cost $165k in tokens were Bun not part of Anthropic. The comparison…

Your example of using 50 people for this reminded me of the classic “Nine women can’t make a baby in one month.”

HINT: those 50 people must be coordinated...

Re: Rewriting Bun in Rust

#174
Something that seems to have flown under the radar is that bun was originally a rewrite of Evan Wallace’s work (for those that don’t know, he’s a co founder of figma). What I’d love to know is if Evan’s implementation is largely independent and, if so, says a lot about his skill (even more so than the rest of his impressive catalog) to have a reference-able implementation for what it turned into. Super cool to learn the original implementation motivation for Jarred though.

Re: Rewriting Bun in Rust

#175

> Historically, rewrites are a terrible idea. This changed for me over the last 5 years. The first scenario was joining a company where a software product barely worked. We did the traditional incremental refactoring / rewriting, but eventually learned how rotten the core was that rewriting from first principles was the best path forward. The lesson learned here is that the conventional wisdom probably only applies t…

I think the same, it's possible our job will morph into "coding agent herders". In this case I guess the test harnesses, linters, workflows, etc will be our herding dogs.

Re: Rewriting Bun in Rust

#177
post #139

I'm so jaded at this point. The AI translation from Bun to Rust doesn't bother me, I think it's interesting, but that this blog was so clearly written by LLM's is offputting for some reason. I think after having to interact with LLM's for much of the day, it's exhausting to read LLM speak in so many things I see online. It feels almost disrespectful to the reader. It's written from a first person perspective, but Jar…

We need to coin a new term for the paranoic feeling that every text on the internet is written by LLMs.

I propose GPTSD (GPT + PTSD)

EDIT: Another one, AIdar (like gaydar but for AI text). EDIT2: GPTSD has prior art (literally) https://ryanthompson.name/project-gptsd.html

Re: Rewriting Bun in Rust

#178
post #118

Earlier quoted context omitted.

Doesn't look like vibecoding to me. It does look like a Claude ad, but they do have a vested interest in not screwing up Bun now that they own it.

What would be the consequence to them if they did screw it up? Screwing up the maintainability of a project, especially a big one, doesn't necessarily have immediate consequences. The fallout could be delayed by a year or more. Also, they have effectively limitless tokens to burn on keeping everything looking OK, and a vested interest in doing so. I'm not trying to spin up some kind of conspiracy theory here, but I'm…

Claude Code is the main reason their revenue (ARR) grew from $9bn to ~$47bn in the first half of this year.

That's a very big reason not to screw this up.

Re: Rewriting Bun in Rust

#179
post #80

Article did a decent job of showing discipline and care and human involvement to assert the automated rewrite was done diligently, as best as it can be when using AI for it. I does make me feel a bit more comfortable about it. As an aside, I don't know why anyone would not want to use a memory-safe (and possibly race-safe) language in 2026. Rust gives you that in a performant package, so if you are turned off by GCs…

I've observed that dumber models are able to vibecode in safe languages a lot easier since the compiler errors can self correct the models hallucinations, while they end up marking a task as complete in dynamic languages despite it not actually working.

If I'm vibe coding something I'm always just going to do it in Rust.

Re: Rewriting Bun in Rust

#180
post #143
post #109

Earlier quoted context omitted.

$165k won't get you far on salaried engineers. There's every chance that 1 engineer, assuming Anthropic employs them, is on $500k or more. Assuming average of $336k in that pool of 50 engineers, then for 11 days for 50 engineers you've spent $710k[0]. Salary info: https://www.levels.fyi/companies/anthropic/salaries/software... [0]The maths I used (posting because I'm tired and prone to mistakes): $336,000 / 260 (work…

You don't need top engineers to port a program from one language to the other. Outsource it to India. Of course, then you can also ask, could it have been done with a cheaper model. Probably yes. But then you wouldn't get free marketing.

Have you seen the "rewrite by outsourcing to India" thing work?
Post reply on HN