Hacker News new | ask | show | jobs
by simonw 195 days ago
No, they're clearly acquiring the technology. They're betting Claude Code on Bun, they have an invested interest in the health of Bun.
2 comments

Why would they want to bet on nascent technology whereas Node.js bas existed for a god 15 years?
Because they needed something that could produce a single binary that works on every platform. They started shipping Claude Code with Bun back in July: https://x.com/jarredsumner/status/1943492457506697482
Every time I see people mention things like this in node vs bun or deno conversations I wonder if they even tried them.

>The single executable application feature currently only supports running a single embedded script using the CommonJS module system.

>Users can include assets by adding a key-path dictionary to the configuration as the assets field. At build time, Node.js would read the assets from the specified paths and bundle them into the preparation blob. In the generated executable, users can retrieve the assets using the sea.getAsset() and sea.getAssetAsBlob() APIs.

Meanwhile, here's all I need to do to get an exe out of my project right now with, assets and all:

> bun build ./bin/start.ts --compile --outfile dist/myprogram.exe

> [32ms] bundle 60 modules

> [439ms] compile dist/myprogram.exe

it detects my dynamic imports of jsons assets (language files, default configuration) and bundles them accordingly in the executable. I don't need a separate file to declare assets, declare imports, or do anything other than just run this command line. I don't need to look at the various bundlers and find one that works fine with my CLI tool and converts its ESM/TypeScript to CJS, Bun just knows what to do.

Node is death through thousand cuts compared to the various experiences offered by Bun.

Node adds quite the startup latency over Bun too and is just not too pleasant for making CLI scripts.

I agree, they seem to have never tried it at all! Bun DX is the best, and Bun is the trend setter. Others are just catching up!
Yeah, just switch to a non-NPM compatible and inexistant ecosystem just because you need to specify a few parameters in a config.

Anthropic is trying to IPO at a valuation of $300B so if their engineers nor their AI can be bothered to do this then maybe they're not as good as they think they are.

They evidently evaluated Node.js in comparison to Bun (and Deno) earlier this year and came to a technical decision about which one worked best for their product.
I highly doubt that the JS ecosystem is driven mostly by hype so I highly doubt the nodejs solution even put on a table in an internal issue tracker.
Claude Code shipped on top of Node.js for the first four months of its existence.

Why wouldn't they consider their options for bundling that version into a single binary using Node.js tooling before adopting Bun?

Because Microsoft already owns that.
Are you referring to node? MS doesn't own that. It's maintained by Joyent, who in turn is owned by Samsung.
Joyent handed Node.js over to a foundation in 2015, and that foundation merged into the JS Foundation to become the OpenJS Foundation in 2019.

I'm not sure if Joyent have any significant role in Node.js maintenance any more.

Oops, thank you :)

regardless, it's certainly not MS.

Microsoft owns npm outright and controls every aspect of the infrastructure that node.js relies on. It also sits on the board (and is one of the few platinum members) of the Linux Foundation, which controls openjs. It is certainly MS.
it starts fast and does better job than nodejs for their product
That was my thinking is, this would be useful for Claude Code.