Live data from Hacker News

Claude Code uses Bun written in Rust now

simonwillison.net

561–570 of 920 posts

Re: Claude Code uses Bun written in Rust now

#561
post #407

Earlier quoted context omitted.

That’s not really a big issue. In major OS like the BSD, SMP implementation are not that old. If we can have a full OS running in single core mode, we can have an application being performant too. I’m currently running OpenBSD on 4 cores and it’s basically 99% idle. Bad coding is just bad coding.

It's basically idle because it's not doing anything. If you are streaming in markdown and code and then doing syntax highlighting on this code in real time, then rendering it on the screen you are doing actual work. It's also all cpu bound work. The majority of the stuff on your screen is being rendered by the gpu.

> If you are streaming in markdown and code and then doing syntax highlighting on this code in real time, then rendering it on the screen you are doing actual work.

You are really, really not. Not at LLM inference speeds at least. Frontier models output maybe 200 bytes per second on the fast end. I guarantee you that idle BSD box is still processing more than 200 bytes of whatever at any point in time. Streaming 200 bytes of LLM output through syntax highlighting, markdown rendering, and diff formatting, will still leave the box basically idle if done correctly. Claude Code has not done it correctly.

Re: Claude Code uses Bun written in Rust now

#562
post #547

Earlier quoted context omitted.

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!?

The new normal is there is no normal. No common sense, FOMO, YOLO, everything combined is what we're living right now :)

Re: Claude Code uses Bun written in Rust now

#563

Earlier quoted context omitted.

Maybe it's one of the cases when techies call the shots? I can understand people being more sold on Rust compared to Zig -- there are legitimate differences on the memory safety front and I can see how people will prefer one or the other. Plus I believe Jarred (Bun's main dev) went out of his way to explain why he chose Rust over Zig in his blog post. Of course the marketing angle might indeed be the explanation; not…

The rewrite makes sense, it's all their dog food at that point. It's the acquisition that doesn't make sense. Why didn't Anthropic just rewrite it themselves?

Good question. I'd guess they didn't want community split?

Re: Claude Code uses Bun written in Rust now

#564

Earlier quoted context omitted.

Maybe it's one of the cases when techies call the shots? I can understand people being more sold on Rust compared to Zig -- there are legitimate differences on the memory safety front and I can see how people will prefer one or the other. Plus I believe Jarred (Bun's main dev) went out of his way to explain why he chose Rust over Zig in his blog post. Of course the marketing angle might indeed be the explanation; not…

The rewrite makes sense, it's all their dog food at that point. It's the acquisition that doesn't make sense. Why didn't Anthropic just rewrite it themselves?

"Why didn't Anthropic just rewrite it themselves?"

they rewrite themselves, Bun team is under Antrophic umbrella

Re: Claude Code uses Bun written in Rust now

#565
post #547

Earlier quoted context omitted.

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!?

Perpetual complete rewrites. When there’s more bugs the LLM can fix, rewrite the whole codebase. Repeat ad infinitum.

Re: Claude Code uses Bun written in Rust now

#566
post #515

Maybe I'm taking crazy pills, but I swore there have been very similar comments I've seen as the current top post by weakfish: > 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. >…

Maybe because the 1st thing any experienced technical person would think about? It's like rebuilding and optimizing the racing track to make F1 run faster.

I have ~24 years of experience coding and the LAST thing I think about when opening claude code is "why is this written in react".

Tell you what I sometimes think about though: The fact it has clickable links and complex formatting rules for markdown, the most interactive and highest-quality clickable interface I've ever seen in a terminal, and somehow manages to work. That actually blows my mind.

THEN, I'm reminded that it's written in React, and I think "Huh, guess that does make it a ton easier than using ncurses or something."

And done.

Re: Claude Code uses Bun written in Rust now

#567
post #412

Earlier quoted context omitted.

No, the fundamental problem of these apps is that they are, for no reason, pretending they need a high powered game engine rendering loop. They don't. It's a text printout of history with some hotkeys for mode switches and such. "rendering in a single thread" should never be an issue because it should never be "rendering". It needs to stream text to stdout. That's been a solved problem for 50 years and now it takes 2…

Drawing to the terminal / rendering / whatever, this is all arguing semantics and very uninteresting and not insightful. > they need a high powered game engine rendering loop Don't believe the bs on twitter. Claude code source was leaked, there is no high powered game engine rendering loop. > It needs to stream text to stdout These apps are doing real work taking text that is streaming in and doing syntax highlightin…

The heck? It does all that rendering for a tiny fraction of the total amount of time that the TUI is running. The streaming is IO bound, there’s no way that it’s outputting nearly enough text to tax the CPU that much.

Re: Claude Code uses Bun written in Rust now

#568

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.

.. by hiring the right humans - which is not always a given

Re: Claude Code uses Bun written in Rust now

#569
post #285

Earlier quoted context omitted.

That does seem to be the way many use it. I'd be very surprised if they didn't have to insert a rule to prevent opus from constantly asking why they didn't just use ncurses. I just asked sonnet for design options for a tui to onteract with llms to perform sw dev tasks. After describing the tui it immediately suggested ratatui and crossterm as the tech stack. I feel like they must have ignored even the advice of their…

They decided on the tech stack for Claude Code over a year and a half ago.

ratatui was still an excellent choice over a year and a half ago.

Nobody but a JS dev would choose react-on-terminal shenanigans over it

I could see CC getting a ratatui port eventually actually

Re: Claude Code uses Bun written in Rust now

#570

Earlier quoted context omitted.

I wonder if those were fast enough nostalgia says yes but I bet it was dog slow if we tried today with 2026 lens.

My Turbo Pascal programs could calculate and print to the screen faster than could be read, on a 486. With DOS however. I picked the P90 because I remember running Linux ~1.0 and/or NT on it, with real multitasking and services etc. Those soaked up many of the cycles. Another story, around Y2k/Win2k was asked to write a C program to record all the files/sizes on the C: in to file. Then something would be installed, m…

"The most amazing achievement of the computer software industry is its continuing cancellation of the steady and staggering gains made by the computer hardware industry."

— Henry Petroski

Post reply on HN