Live data from Hacker News

Rewriting Bun in Rust

bun.com

471–480 of 560 posts

Re: Rewriting Bun in Rust

#471
I got curious and had a look at some of the code (>1m .rs). I was surprised to see code for a S3 client in there?

I clearly don't get the value proposition of bun? And even if I accept that you want to bundle your run time, package manager, test runner and bundler, why do you want to include things like a custom S3 client?

Re: Rewriting Bun in Rust

#472

It's depressing seeing so little critical thinking despite clear and obvious incentives (Bun now being part of Anthropic) behind the reckless decisions that's been made here. Judging by this thread a well-formed article is all that's required for lots of people to just take everything at face value since it confirms the biases of what's currently fashionable.

[deleted]

Re: Rewriting Bun in Rust

#473
post #250

Earlier quoted context omitted.

I pay attention when someone makes a hard decision based on a hard-learned lesson. It's like, most who choose to use an ORM just heard of it or want to avoid learning SQL, everyone who removes an ORM learned firsthand horrors.

Funny you mention ORMs, I'm building a project with bun, and just using raw bun sqlite until I feel the app gets too complicated and I need it. AIs are really damn good at SQL, I can just trust them with it, and it keeps the project much lighter. A few years ago this would just sound stupid, but here we are.

That's what I always did pre LLM, it was fine

Re: Rewriting Bun in Rust

#474

Earlier quoted context omitted.

I find it curious that people who take other's people product and rewrite in their favorite programming language still name their own creation the name of the original one. Like, you have now created your own new database engine that happens to be compatible with Postgres. Wouldn't you take an absolute pride in giving it your own name? Why call it "Postgres rewrite in "?

Maybe not everyone is utterly obsessed with vanity and its delusion?

Then why use someone else's established brand for your toy project?

Re: Rewriting Bun in Rust

#475

It's depressing seeing so little critical thinking despite clear and obvious incentives (Bun now being part of Anthropic) behind the reckless decisions that's been made here. Judging by this thread a well-formed article is all that's required for lots of people to just take everything at face value since it confirms the biases of what's currently fashionable.

I'm similarly distraught by comments like this. They are a staple, and they always fail their own standards. Critical thinking would lead me to believe that your judgement is heavily clouded, and that it is way more likely you're the one who's biased; either to find other people to be generally below you, or to find people being receptive to this effort any positively to be simply wrong. I'm even wondering if this is a stock comment of sorts.

Strong subjective judgements about an inexact but large sounding fraction of people, without any actual details, is a red flag the size of a skyscraper. And to top it all off, your conclusion is extremely convenient too: you're right, people are wrong, despite the blatant facts otherwise. Not exactly the hallmark of a particularly robust position, not for me anyways.

Re: Rewriting Bun in Rust

#476
post #457

Earlier quoted context omitted.

> You are seldom compiling the world from scratch. True in Rust too though - you're normally doing incremental compiles. And even though you're compiling the world, it's still on par with C++. For example I just tried compiling a hello world Bevy project, which has 462 crate dependencies - pretty big. It took 2m20. Totally reasonable to build an entire game engine and all it's dependencies. I wish they had reported t…

Yeah but compiling full Unreal from scratch already requires going down the path of forking it for own purposes. Same applies to most commercial libraries, where code is usually provided for debugging purposes, not for building everything from scratch. Also incremental linking on Rust, or hot code reloading is still not something that works out of the box. How beefy is that machine to achieve 2m20? I started using C+…

> How beefy is that machine to achieve 2m20?

Ryzen 9 3950X (16 core). I think it was top of the line 5 or 6 years ago but it only cost me about £300 second hand for the whole PC (with 128 GB RAM - before the RAMpocalypse!) Definitely not a crazy machine.

> I started using C++ on MS-DOS, on a 20 MHz 386SX PC with 2MB RAM and 20 MB HDD

Yeah, I mean early C++ was quite a lot simpler than modern C++23! Of course it's going to compile way faster. You're not compiling UE 5 on that machine! Compilers didn't have so many slow optimisations back then either.

Re: Rewriting Bun in Rust

#477
post #400

Earlier quoted context omitted.

What specific critical thought(s) do you wish were voiced?

That this is a technological decision rather than rationalizations (e.g. fixing self-inflicted problems are now marketed as a rewrite win) that Rust is a better fit for an Anthropic-owned project.

Indeed as the developers behind Bun, it would be rather difficult for them to not be the originators of the bugs that they have now fixed with this.

Why is your unsupported speculation about the guy (or the people above him) supposedly deciding that "Rust being a better fit for an Anthrophic-owned project" a critical insight exactly? You not being convinced by the rationale presented does not mean he himself wasn't. Do you imagine critical thinking as just coming up with and preferring (to you) plausible-sounding alternative explanations?

Because respectfully, that's very much not how I understand the word, and I'd hope most people do not either. Maybe that's the issue. Post-hoc rationalization being a rather shaky gate with people (and AI) anyways.

Worse still, neither of the options you present are trustworthy summaries necessarily in the first place. From the blogpost:

> What if, instead, I spend a week testing if Anthropic's new model can rewrite Bun in Rust?

That sounds to me like something of an excited but cautious dare, not an arbitrary technological decision, nor some hyper-strictly rationale-supported one. It's the same kind of exploratory excitement anyone who used these things at all would be familiar with: you have an unlikely project idea, with some contentious details that are fair (see their blogpost), and some that would be simply annoying to justify (see your comment). Buuuut you also have heaps of corpo money, a lingering suspicion and interest, and AI tokens to burn. And so "fuck it, we ball". Not much to believe on it when it's a shared experience. And it's not because of just having read so somewhere, despite your assertions otherwise.

Re: Rewriting Bun in Rust

#478
post #431

Sounds to me like his choice of Zig was made in haste, as was his choice of Rust. If you find yourself changing a project's primary language more than once a decade (more like 15 years, but let's say a decade), the problem isn't the language but your technical decision process, and that's what you should look into first. Some of the world's more important software - from browsers to the JVM - mix high-level languages…

I should add that in the 30 years I've been a professional software developer, I've worked on and advised many projects. They all ran into serious challenges at one point or another. Not of those projects that was held in high technical regard changed their language (except for things like JS -> TS or when the project planned to change languages, starting with one suitable for prototyping and expecting to switch if and when their workload grew).

All the ones that opted to switch language after less than a decade were those with serious shortcomings in their technical decision process, and those problems, unsurprisingly, persisted after the language change. After all, the very decision to switch so soon is an admittance that they'd made a very serious misjudgment, but these projects never properly debrief why they'd made such a big mistake and how they can avoid making one again.

Re: Rewriting Bun in Rust

#479
post #421

It's very odd how quickly people fall back on emotional claims to attack this. Like we're engineers, if you can point at concrete problems with this rewrite I'd love to hear them. Obviously Jared is going to give the positive case, saying that he's doing that doesn't prove the rewrite is a bad idea. You need to point at objective problems, not your vague sense of unease. As it stands, by all available measures, this…

We also need to ask if the better is because of Rust, or just because the old was a mess and the language was good otherwise.

I don't think "better" really had to be proved. The same but aligned with your org strategy is perfectly acceptable given these sorts of technology choices are often driven by exogenous and wooly factors like licensing, your confidence in the future direction of the technology, or the ability to hire staff (or the ability for LLMs to work with the technology!)

Re: Rewriting Bun in Rust

#480

Earlier quoted context omitted.

I'm not sure individual examples is the right way to go about this. A correlation isn't a guarantee for every instance and it's easy to concoct individual examples which tell any story you'd like them to. To properly answer this you'd need to compare a large number of identical implementations written idiomatically in several languages and see if there is a correlation. If I were to throw my 2 cents in I'd say "a ver…

Sure, I did not think that one example is a full survey of all possibilities. I think that it's quite intuitive that this feels right: > it seems to me languages fine having a lot of bloat in the syntax also tend to be languages fine having a lot of bloat in the implementation or attracted to abstraction Which is why I chose an example of the exact opposite: a language not known for bloat, taking way more code to pro…

[deleted]
Post reply on HN