Live data from Hacker News

Claude Code uses Bun written in Rust now

simonwillison.net

541–550 of 920 posts

Re: Claude Code uses Bun written in Rust now

#541
post #355

Ok, so let me wrap this for everyone: While everyone here in this forum kept arguing (and fighting and yelling at each other) whether tis moral/right/secure/cheap for ppl to rewrite and ship a major software package with LLMs/agents, one of the main drivers behind AI actually did it, without consulting your opinion, and most same everyone actually slurped this decision without paying a a notice. Boring is good, but t…

[deleted]

Re: Claude Code uses Bun written in Rust now

#542
post #512

Earlier quoted context omitted.

As a counter argument - I assume that Anthropic is using AI to write Claude Code. I've read and heard in videos that Javascript is a pretty good language for AI to write code in. Apparently this is because there is so much training data out there. Also Javascript avoids problems of multi threading and memory management that can mess up the AI in other "more performant" languages. So maybe Javascript is not the worst…

I feel like a year ago JavaScript and Python were the best languages for coding agents to use because of their heavier presence in the training data, but I'm not sure that's true any more now. The latest frontier models are competent at Rust and Swift and all manner of other less widely used languages. The more important factor is how good they language's compiler is at kicking out actionable error messages, since on…

Sometimes I think that if we are willing to burn tokens and rely on compilers in a loop we should be using languages that can catch as many errors as possible at compile time.

Like Ada or Ocaml or Haskell or something.

Or even require like MC / DC testing or MISRA C verification.

Or even some of the languages that apply Hoare checks, like Ada SPARK or FRAMA-C or VALE or whatever.

I don't have the budget to test how that would work but it seems interesting.

Re: Claude Code uses Bun written in Rust now

#543
post #535
post #477

Earlier quoted context omitted.

Which was completely bonkers -- it happened completely in the open, people were just outraged that something like this happens without asking them and not on a schedule they perceive as adequate. Most of them haven't really grasped what was happening and why. Many still don't.

It wasn't out in the open. It was never announced or discussed ahead of time. It was just done because the company who purchased Bun wanted it done, and they only communicated it was happening once they started. I don't consider the following comment to be good, honest, and open communication: https://news.ycombinator.com/item?id=48016880#48019226

What was dishonest about that comment?

> There’s a very high chance all this code gets thrown out completely.

... and a few days later he decided that the code wouldn't get thrown out. That doesn't make the comment itself dishonest, he didn't have a crystal ball.

You can absolutely argue that the rewrite was not communicated clearly once they committed to it, but I don't think the comment you linked to there stands as evidence of poor communication at the time it was written.

Re: Claude Code uses Bun written in Rust now

#544
post #252

Earlier quoted context omitted.

Of course I have. If I see ghostty constantly consuming the most energy and helping reduce my battery life to barely 2 or 3 hours, the first thing I'm going to do is switch terminal to see if I can improve that situation. The built in terminal and WezTerm have been fine and I've had much more reasonable battery life since. This does not even speak to it pegging my CPU and keeping the fans running on full blast even w…

If you're looking for a non-ghostty recommendation (not that I have anything against ghostty) I use alacritty + zellij and it works fantastic. It doesn't seem to impact battery, I certainly get good battery usage on both my work and home laptops.

I've messed around with pretty much all the fancy new terms to varying extents. Ghostty, wezterm, alacritty, etc. And I'm all in favour of people innovating in this space again. But at the end of the day, I always end up back with xterm. It's reasonably lightweight, runs and is packaged absolutely everywhere, I never have to muck about with termcap files and/or $TERM on remote hosts, and I've never had it break, crash, or exhibit any kind of bug or strange behaviour in over a decade of using it. The only TUI that has some quirks in xterm is Emacs, but Emacs has weird quirks in every term I've tried to run it in, and different quirks in every case somehow, so I just chalk that up to Emacs being weird. I'm sure xterm has some bugs buried in it still, but I bet all of them are in codepaths that are almost never reached nowadays, or at least are extremely niche. It does lack some features like ligature fonts(I just decided not to care), sixels and similar graphics things(again, don't really care) and panes/tabs/yadda yadda(tmux or screen or whatever you like can do all of that anyway).

Never had to dig through the xterm bug tracker to figure something out. I don't even know what version I'm running, or even what the versioning scheme looks like. I haven't changed the configuration since the first time I set it up. It just works.

Re: Claude Code uses Bun written in Rust now

#545
post #491

Earlier quoted context omitted.

The argument is that doing it all on a single thread will result in high cpu utilization and that is what makes the power usage spike and the pc feel hot. Thats it. A lot of people go “js is bad” reflexively and they are right for the wrong reasons. Its not because js (specifically v8) is slow. I have many websites and web based apps open and none fuck up my laptop as hard as claude code.

Yeah I don't get it we had terminals on single core machines. In early 2000s I am sure they could handle the UI of Claude (probably IO too).

Early 2000s tech could absolutely handle LLM agents as a client. They output like 1-2kbps and even dial up modems would have plenty of capacity for other traffic.

The UI itself requires laughably simple tech. The idea that a markdown renderer that can produce HTML at 50MB/s would use much CPU to process incoming hundreds of bytes per second is insane. CPU should be idle even if doing that constantly. Nevermind that between turns it has nothing to do whatsoever and should use zero CPU at all.

Re: Claude Code uses Bun written in Rust now

#546
post #233

Maybe I’m taking crazy pills, but I’m still stuck on “why the hell does a TUI need to run in terminal React by way of JavaScript” The fact that Anthropic felt the need to buy a runtime so they could make their TUI better speaks more to the quality of engineering than anything else IMO. If rewrites are so easy, why not rewrite CC in a native language? Would’ve been a hell of a lot cheaper.

Why would rewriting Claude code, an app which probably has 30-40 (I might be significantly underestimating) extremely active contributors be easier than rewriting Bun, which has fewer contributors and almost certainly also less lines of code?

I don't think people are saying it's easier, they're saying the results would be better.

Re: Claude Code uses Bun written in Rust now

#547

Earlier quoted context omitted.

> $168k Billions of dollars of annual revenue go through Claude Code, and the people who work on it must be a lot of millions in headcount. The time matters a fair bit, it's probably time someone can't spend breaking things in the name of new features, but if rewriting the stack had even a tiny impact on retention or driving higher usage, it would pay back that $168k.

If only paying the $168k was some sort of a guarantee. Vibing doesn't give you that. You might get more maintainable code for $168k by hiring humans, but if its something bespoke it isn't going to get you far (or far quickly). Vibing is straight out gambling right now, the thing is, I don't know who the house is any more.

It's going to take an order of magnitude longer though, delaying any of that revenue significantly. I'm sorry, but we're talking 11 days here. What does "maintainable" even mean with impossible time-scales like this now!?

Re: Claude Code uses Bun written in Rust now

#548
post #543
post #535

Earlier quoted context omitted.

It wasn't out in the open. It was never announced or discussed ahead of time. It was just done because the company who purchased Bun wanted it done, and they only communicated it was happening once they started. I don't consider the following comment to be good, honest, and open communication: https://news.ycombinator.com/item?id=48016880#48019226

What was dishonest about that comment? > There’s a very high chance all this code gets thrown out completely. ... and a few days later he decided that the code wouldn't get thrown out. That doesn't make the comment itself dishonest, he didn't have a crystal ball. You can absolutely argue that the rewrite was not communicated clearly once they committed to it, but I don't think the comment you linked to there stands a…

He knew he wasn't going to throw out the code when he made that comment.

Re: Claude Code uses Bun written in Rust now

#549
post #453

Earlier quoted context omitted.

How much extra money do you think they would make if Claude Code wasn’t JavaScript?

Right now? Zero. In 2 years? A well-engineered TUI could be the difference between the Blackberry and the iPhone for all we know.

Claude is better at Javascript than those other languages though so maybe it would be worse in a better language.

Re: Claude Code uses Bun written in Rust now

#550
post #535
post #477

Earlier quoted context omitted.

Which was completely bonkers -- it happened completely in the open, people were just outraged that something like this happens without asking them and not on a schedule they perceive as adequate. Most of them haven't really grasped what was happening and why. Many still don't.

It wasn't out in the open. It was never announced or discussed ahead of time. It was just done because the company who purchased Bun wanted it done, and they only communicated it was happening once they started. I don't consider the following comment to be good, honest, and open communication: https://news.ycombinator.com/item?id=48016880#48019226

[deleted]
Post reply on HN