Live data from Hacker News

Claude Code uses Bun written in Rust now

simonwillison.net

321–330 of 920 posts

Re: Claude Code uses Bun written in Rust now

#321
post #273

Earlier quoted context omitted.

They succeeded in spite of their tech choices. Their model outshone it, which is an extremely rare thing to happen and not something they could've counted on. In any other timeline they could've/would've been hurt by their choices. It's like "why did you go all in on buying scamcoin 3.0 as your investment strategy?" -- "I 5xed my money! End of story! It was fine!"

> They succeeded in spite of their tech choices. Or those choices just don't matter, it's fundamentally just "tabs vs spaces".

Eh, the rendering of Claude Code is genuinely such a mess. I have quit claude code over it because when used as a terminal in PHPStorm it sometimes gets so bad that it becomes hard to use.

This isn't a minor nitpick, it's a pretty major UX issue.

Not saying it's like a massive business downside because I'm just one of a few users, maybe this affects their bottom line a little bit, but probably not by much.

Regardless, switching to pi has been a nice breath of fresh air. It just renders well and smoothly and handles terminal resizes well, which is especially important when used in a terminal window in PHPStorm.

Re: Claude Code uses Bun written in Rust now

#322
post #290

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.

JavaScript is dynamic and supports live reload which means iterations are far faster than would be in a compiled language--even for LLMs. This is especially useful when you're trying to evaluate behaviors while changing state surgically.

There are several compiled languages with live reloading, including C++.

Re: Claude Code uses Bun written in Rust now

#323
post #223

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.

I never knew that running an interactive program in my terminal would absolutely rinse my CPU and battery but that's what Claude, OpenCode and Ghostty have colluded to achieve. Even when the laptop is asleep overnight it's practically melting. I'm sure there was some logical reason for shoehorning web technology into this stack given that we have a good 40 years or so of experience with interactive terminal programs…

The fundamental problem with all Js based apps is how they are very single threaded.

With js you get 1 thread at 100% utilization. Power usage and heat scale non-linearly with cpu utilization and 100% utilization on a single threaded js app means you will have ui lag. Other languages like golang would split work across 8 threads and have 8 threads at 20% utilization and this would result in less power usage. Claude Code would have been better off performance wise being an electron app because it would be offloading rendering to the browser and gpu.

Also, the architecture of Open Code is actually a lot better here than Claude Code. ClaudeCode does everything, including rendering in a single thread and it's all in js. OpenCode has a zig based tui renderer it offloads that work onto.

But I will also say these coding agent tuis do get unfairly maligned because they launch subprocesses and those subprocesses tend to be expensive. If you are using Rust analyzer with claude code, it's rust analyzer that's causing the majority of your problems.

Re: Claude Code uses Bun written in Rust now

#324

Earlier quoted context omitted.

It’s hyperbolic and intended to generalize the sentiment I perceive from others. Dario Amodei said in January that he expected software engineers to be replaced [0], so I suppose the quote should be extended to “can do anything… a software engineer can do” And I think we can all agree that SWE is on the more complex end of all white collar jobs. So, my thinking is that if SWE can hypothetically be replaced, so can ma…

So then nobody actually has ever said that and its explicitly hyperbole So then its misleading in the extreme to say “I’ve been told AI can do anything” It amplifies hype when people make claims like this by including hyperbolic statements as though they are reflective of the state of the discussion.

Alright, sure, my bad. I thought it was clear that it was meant tongue in cheek, but I’ll accept it was unclear.

That said, with respect what I clarified, I’m curious your thoughts.

Re: Claude Code uses Bun written in Rust now

#325
post #12

Earlier quoted context omitted.

I think the Zig people are really just worried that maybe Zig itself is a DOA language before it has even reached 1.0 because it doesn't offer enough over C for any serious use and their flagship project has now abandoned it.

Anyone actually using it knows it is better. The C interop is so good that there is no use-case where C is the better option IMHO

Industry standards, existing team knowledge, use after free story is the same as C already has.

Re: Claude Code uses Bun written in Rust now

#326
post #12

Earlier quoted context omitted.

I think the Zig people are really just worried that maybe Zig itself is a DOA language before it has even reached 1.0 because it doesn't offer enough over C for any serious use and their flagship project has now abandoned it.

Zig is a DOA language for other reasons though. The reason why Rust enthusiasts act so morally superior is because they are: > Rob Pike, an unsafe guy, may insist that a small language and garbage collection are enough. But the typesafe visionary Grzegorz Wielbodłąński understands the deeper truth: every invalid state permitted by a compiler is a tiny act of civilizational sabotage. https://x.com/typememetics/status/…

There is more to it even, the UNIX and C founders arrived to Go, before retirement, after a few other interactions.

AT&T was the one doing the Cyclone research.

And then we have a bunch of folks assuming they know better about C that its own authors?

Re: Claude Code uses Bun written in Rust now

#327
post #317

Earlier quoted context omitted.

It’s hyperbolic and intended to generalize the sentiment I perceive from others. Dario Amodei said in January that he expected software engineers to be replaced [0], so I suppose the quote should be extended to “can do anything… a software engineer can do” And I think we can all agree that SWE is on the more complex end of all white collar jobs. So, my thinking is that if SWE can hypothetically be replaced, so can ma…

Code is the killer app for LLMs so software developers are the easiest to replace.

Code isn’t what the majority of software engineering is.

Re: Claude Code uses Bun written in Rust now

#328
post #42

Earlier quoted context omitted.

There were very many open pull requests from the community that were all invalidated overnight for something that same community was assured was merely an experiment. The normal process would be "hey, this experiment is going well, we've made this plan, come help us shake out the new codebase for the switchover in X time." None of that happened. There wasn't even an announcement, just a silent commit that trashed har…

None of that is needed. Nobody benefits from all that time wasting bureaucracy/corpo speak. Bun is quick to deliver new features and bug fixes. With this change, the hope is that'll only get faster. All those PRs can be fed thru Claude and converted to rust and then manual polish can be added.

Bun is riddled with bugs. That's what moving fast and breaking things gets you. It gets you famously bad codebases that are nightmares to work with and slow you down over time as your sins catch up with you. Vibecoding is not enough.

Re: Claude Code uses Bun written in Rust now

#329
post #273

Earlier quoted context omitted.

> They succeeded in spite of their tech choices. Or those choices just don't matter, it's fundamentally just "tabs vs spaces".

Eh, the rendering of Claude Code is genuinely such a mess. I have quit claude code over it because when used as a terminal in PHPStorm it sometimes gets so bad that it becomes hard to use. This isn't a minor nitpick, it's a pretty major UX issue. Not saying it's like a massive business downside because I'm just one of a few users, maybe this affects their bottom line a little bit, but probably not by much. Regardless…

> when used as a terminal in PHPStorm

Truthfully, the terminal in Jetbrains IDEs just isn't that great. It's gotten a lot better with their rewrites (yes, plural) of the last years, especially on Windows, but it can still be pretty dodgy.

Post reply on HN