Live data from Hacker News

Claude Code uses Bun written in Rust now

simonwillison.net

521–530 of 920 posts

Re: Claude Code uses Bun written in Rust now

#521
post #236

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.

It largely works and it's a massive business success. This is the classic engineer asking the 'why this technology?' to what amounts to a business question. They chose it early on, it works, and it makes obscene amounts of revenue. End of story. That doesn't mean it was the "greatest" choice, or has a perfect technical architecture. Rewrites are never easy, even the bun rewrite. But a non-UI developer tool with a rig…

This is far less so in this case because this is thier hot path. Everything runs through it and tens of billions in revenue depends on it. It needs to be as fast and solid as possible

Re: Claude Code uses Bun written in Rust now

#522

Earlier quoted context omitted.

> It largely works and it's a massive business success. This is the classic engineer asking the 'why this technology?' to what amounts to a business question. Your counter argument would be valid for a 2000 or a 2020 business decision about some tech stack. But the whole point of their product is that it supposedly nullifies such "business" concerns around the use of technology, by making it cheap and fast to build w…

> But the whole point of their product is that it supposedly nullifies such "business" concerns around the use of technology, by making it cheap and fast to build whatever you like automatically. This is a spectrum, it's not just 0% vs 100%. Even Fable frakked up a few things really badly in my professional work (though to its credit after a very detailed 2h chat it self-corrected and fixed all the blunders). I would…

can't imagine rewriting a runtime to be easier than a coding harness

Re: Claude Code uses Bun written in Rust now

#523
post #175

Anecdotal, but I’ve been getting segfaults in Claude Code. I run inside Kitty tabs, and the entire tab becomes unusable when this happens. No response to inputs at all from that point. When this happens, a link shows up to report the issue. It’s not clickable (likely due to the segfault), and perhaps more important: it’s encoded, so you can’t see what you would be sending in your report. Hope it gets better.

Same experience I have with bun in general. As an idea, it's the absolute best js runtime by a very large margin, but in terms of stability it's terrible and segfaults 20x as much as node (I base that number on newrelic telemetry)

> but in terms of stability it's terrible and segfaults 20x as much as node (I base that number on newrelic telemetry)

In Chrome or Firefox, a segfault is usually automatic CVE and in most cases a bounty of thousands of dollars…

Re: Claude Code uses Bun written in Rust now

#524

Earlier quoted context omitted.

> But the whole point of their product is that it supposedly nullifies such "business" concerns around the use of technology, by making it cheap and fast to build whatever you like automatically. This is a spectrum, it's not just 0% vs 100%. Even Fable frakked up a few things really badly in my professional work (though to its credit after a very detailed 2h chat it self-corrected and fixed all the blunders). I would…

can't imagine rewriting a runtime to be easier than a coding harness

It's really not about a PL runtime vs. an agent harness, it's about how spaghetti and complex the code is. I do get your point though.

Re: Claude Code uses Bun written in Rust now

#526

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.

And the TUI fights the terminal on basic things like copy/paste. I end up telling Claude to write all outputs to a tmp file.

Re: Claude Code uses Bun written in Rust now

#527
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.

Perhaps. The thing I was trying to highlight more is comments (particularly disapproving ones) about the intersection of JavaScript (especially React, apparently), TUIs, and LLMs.

I just thought it was interesting. I'm a fan of TUIs, both positive and negative about JavaScript (the modern language is quite nice, given you avoid the historical warts, in my opinion - the ecosystem is unfortunate), and I think the best description for how I feel about LLMs is that I'm bearish. Also Simon is a fantastically prolific and intelligent person though, even though LLMs are not my cup of tea.

https://news.ycombinator.com/item?id=48960912 is a recent comment by someone I also respect related to how LLMs recreate human-like content (Widgets, really), making actual human-created content feel fake.

Sometimes it sure does feel like ELIZA is the main news source these days.

Re: Claude Code uses Bun written in Rust now

#528
post #481

Earlier quoted context omitted.

I asked this in a thread with a CC author a few months ago (I felt — and hope — very politely, with similar background.) No reply. https://news.ycombinator.com/item?id=46716974

At a guess it's because Boris literally wrote a book on TypeScript: https://www.oreilly.com/library/view/programming-typescript/...

I don’t doubt his expertise, I just am not convinced it’s the right tool.

To me it comes back to the premise I hear a lot from AI hype men (of which I do not subscribe but it’s worth clarifying that I find great value in using it for code) that the code doesn’t matter anymore. I just don’t know how to square that claim with the idea that we’re limited still by JS/TS being easier to use or approachable despite inferior TUI toolsets.

Re: Claude Code uses Bun written in Rust now

#530

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 recently saw a blog post [1] about a famous Haskel shop moving away from Haskell to Python because the iteration speed with LLMs was just that much better. There is so much React in training data, TS compile times are minimal compared to Rust and similar. I suspect user facing/fast moving code (UX layer) will move to dynamic systems with fast iteration times. Infra layer will move towards safe systems level environ…

Python was faster to iterate on than Haskell even before LLMs
Post reply on HN