Live data from Hacker News

Claude Code uses Bun written in Rust now

simonwillison.net

761–770 of 920 posts

Re: Claude Code uses Bun written in Rust now

#761

Earlier quoted context omitted.

It sounds like you completely missed the point I was making: that actually implementing such a highly dynamic TUI application normally requires a significant amount of state tracking and it is significantly easier to write such apps using a functional, descriptive UI framework instead of something like ncurses. Take it from someone who, in those 24 years, has written UIs in jquery, react and ncurses (and yeah I've tr…

There are fantastic TUI frameworks for Rust, like Ratatui[0] (there are a lot more options, this is an example). You can write beautiful TUIs in native languages, without ncurses or C or C++. Go has such frameworks, same with C# (which you can AOT compile) and so on. You're not stuck between javascript and C. [0]: https://ratatui.rs/

Yes I also used Bubbletea. I don’t know about ratatui but honestly I think the hate for react is very blind. It’s not like CC is shipping an embedded web browser. It’s a framework on top of an embedded language that has seen a crazy amount of optimisation.

Re: Claude Code uses Bun written in Rust now

#762
post #376

Earlier quoted context omitted.

Zig (like C) is simply not a good language to use if you're going to do many small allocations with uncorrelated lifetimes. To write robust Zig (or C) code, you must manage lifetimes yourself, for example by grouping allocations on an arena or by having fixed buffers of "things". You can just do that, and then Zig is really no less robust than Rust. But if you want to do "managed language" style allocation patterns (…

> You can just do that, and then Zig is really no less robust than Rust. That's just it, using Zig required more rigorous engineering than the Bun team were capable of.

That's like saying that they should have used assembler but they just weren't capable of it. It's personal insult dressed up as a nonsensical technical argument.

Re: Claude Code uses Bun written in Rust now

#763

Earlier quoted context omitted.

> You can just do that, and then Zig is really no less robust than Rust. That's just it, using Zig required more rigorous engineering than the Bun team were capable of.

That's like saying that they should have used assembler but they just weren't capable of it. It's personal insult dressed up as a nonsensical technical argument.

Similar in style to Zig's guy public insulting

Re: Claude Code uses Bun written in Rust now

#764
post #726

Earlier quoted context omitted.

I like your fair-mindedness but for folks who are anti-LLM-anything, your argument is not the point. Evidence: see the amount of nonsense in the postgres rewritten in Rust story - https://news.ycombinator.com/item?id=48841676 where there are two contradictory claims made: "postgres is so stable I will never trust a rewrite." "covering 100% of postgres regression suite doesn't guarantee you have replicated every behav…

> Folks who are okay with LLMs think the regression test suite is the spec and is the guarantee of stability. How else can it be? If you are depending on some behavior not covered in the regression tests, how do you know the next minor release won't break you? I think this deserves a real response. First, an analogy. I drive along a cliff with no guardrail. How do I not drive off the cliff? By knowing how to drive. S…

>> There are also performance characteristics that are part of an informal spec.

They are not informal AFAIK - https://github.com/PGPerfFarm. A lot of these heavy duty OS projects have explicit Perf testing/nighlites (see Lucene's at https://benchmarks.mikemccandless.com/)

If you are saying the PG regression suite doesn't cover these perf tests - that is fair. I consider perf to be part of the "regression framework" generally.

>> How do you know your new tests are right? That the new behavior is right?

This is a more generic question in the LLM world. Reliable verifiers is what drives LLM loops. If you don't have these, you have no idea if you are actually making progress or you just generated code that returns 42 for every question. You needs something to actually ground the LLM output against. For existing features, the reliable verification is the existing regression/perf suites. For new features, the regression/perf suites should expand to fit. There are ways to go at this that range from ad-hoc (line/branch coverage) to fully formalized (verification-aware languages like Dafny).

Re: Claude Code uses Bun written in Rust now

#765

Earlier quoted context omitted.

Show me where Anthropic claims you don't need any humans anymore to build working, production ready software.

> The "General Labor Substitute": He rejects the idea that his employment forecasts are "doom marketing". Instead, he asserts that AI will act as a general substitute for human labor, noting that most software engineering could be entirely automated within 1 to 2 years When someone says all Software engg could be automated within 1yr they don't mean 'oh use our agents and keep human in loop' They mean 'AI superior th…

Have you watched the video where that was said, as opposed to just reading interpretations of it from people with their own assumptions?

https://youtu.be/02YLwsCKUww?is=UsJrcLRgdSUd38Jt

Here's a transcript: https://gist.github.com/simonw/0050b4ce40439b97598d4ffdb273d...

Re: Claude Code uses Bun written in Rust now

#766

Earlier quoted context omitted.

Couldn't it be argued that Bun-Rust is still MIT licensed, because the old implementation was "in the first instance" authored by a human? All the machine did was translate it. I think it's the "infringing usage" question that is more interesting. If the LLM trained on GPL-derived code, what does that mean for the end result?

Yeah you could argue that, but it's a messy argument. I'm wiling to imagine that they hadn't used AI to do the rewrite to Rust. It wouldn't have been all that hard to do with plain old syntax tree transformation (my expertise). The trickier question for me is the ownership at the boundary where prompts were turned into Zig code. That is not a process that could have been done with syntax tree transformation: creative…

I feel like that's a lot of LLM use in a nutshell: sure, there's a more surgical scalpel available, but isn't it so much easier just to fling prompts at a magic box?

Re: Claude Code uses Bun written in Rust now

#768

They’re just wildly successful terrible engineers who can describe problems well and have unlimited token budgets. If they were paying for their own token use, the software would be better, they simply don’t have financial incentive to be more performant. A dirty secret of AI data centers are that they’re only getting 40-60% efficiency out of their GPU clusters and because the moneygun go brrrrr they just buy more. Y…

Describing problems well may be one of the most important skills an engineer can have.

Re: Claude Code uses Bun written in Rust now

#769
post #44

Earlier quoted context omitted.

I am getting into the frontend dev and one thing that I don't understand is why people use bun in the first place? It's not much better preforming, it's not much safer, it's still not 100% compliant. Some tests show it's actually slower than node. Why bother switching, then?

Faster package manager Faster startup Typescript support out of the box Better stdlib than node Stdlib includes yaml, sqlite etc so you need to pull in fewer deps, so you can avoid the left-pad/is-even node_modules explosion problem to a greater extent

Can't comment on others, but new Node.js also has typescript out of the box and works pretty well.

Re: Claude Code uses Bun written in Rust now

#770
post #9

Honestly, I initially thought rewriting an entire codebase with AI would be a huge mistake. After reading this, I'm starting to think I was wrong. If projects like Bun can be substantially rewritten and shipped to millions of users, it suggests we're entering a very different phase of software development. Today's AI-generated rewrites may not produce code that humans would consider high quality or maintainable. But…

> I initially thought rewriting an entire codebase with AI would be a huge mistake

Keep in mind that you are not Anthropic, and you'll likely NOT consider rewrite at all if you don't have unlimited budget

Post reply on HN