Live data from Hacker News

Rewriting Bun in Rust

bun.com

391–400 of 560 posts

Re: Rewriting Bun in Rust

#391
post #104

Earlier quoted context omitted.

> Ironically, Zig is a programming language that's probably best written by LLMs, since they can tolerate actually tolerate the verbosity. Rust in my opinion feels the same.

I have found LLMs struggle with Rust's constraints - they are optimized to produce code that passes the tests, not necessarily good code. So instead of working out lifetimes and borrowing, it will be happy to copy a buffer many times without thought. This means I have to still go through line by line to review and often rewrite either by hand or with another LLM iteration. There may be some prompting that can help wi…

> There may be some prompting that can help

Sounds like a good time to tell Claude to create a system wide memory of how to implement lifetimes and borrowing and what to NEVER do.

Claude will then make the memory file. Usually memories help a lot. I see it think about it when it reasons through code.

Re: Rewriting Bun in Rust

#392

Earlier quoted context omitted.

Curious why you'd move from C# to Rust. C# has you covered mostly for memory safety so I would guess performance or lots of shared memory across threads?

Not the author but I also moved from C# to Rust. In the first place I did not consider Rust for C# works like REST API but after I proficient with Rust I no longer want to work with C# for the following reasons: 1. Microsoft don't want to open source .NET Core debugger. 2. I tired of keeping upgrade .NET on my projects. 3. Result type in Rust make me more productive than exception in .NET. 4. async/await in Rust is l…

Only thing I am not a fan of with Rust is how insanely massive a debug output build folder can get (tens of GBs) and if you have enough Rust projects it can eat away a ton of storage.

Re: Rewriting Bun in Rust

#393
post #383

Earlier quoted context omitted.

the elastic demand will be consumed by ai jevon's paradox just says people will consume more software as software gets cheaper, which is likely true, not that there will be more high paid jobs for programmers. as programmers are not the resource, the program is the resource, programmers were the means of production of said resource. stated differently: in a world where you dont need programmers to make programs, ther…

You are assuming an infinite productivity boost, i.e. that no programmers at all are needed to make programs. A more realistic scenario is that programmers are still needed in the foreseeable future (for some definition a what a programmer is, even if it's "understands software enough to be able to write good prompts and judge the results"). So the question is how the productivity boost compares to the increase in th…

yes, I assume we will have the 'replicator' from Star Trek, and programs will just appear as you want them.

experiencing the gpt3->4o->sonnet4->opus4.6->fable trajectory I am fairly confident what we call programmer today will not exist, in the same time regular people will finally be able to tell computers what to do and this will unlock the next stage of complexity in manufacturing/material science/medicine and so on.

of course I am likely wrong, people say: its never as good or as bad as you think.

Re: Rewriting Bun in Rust

#394
post #367

Earlier quoted context omitted.

Its not even that, its one of the most overdone jokes as your link suggests.

In your "opinion". So are you going to stop people from making "overdone" jokes on this site or others using variations of it from now on? Or is it only mine? My link suggests that is it just a joke and it is fine if you do not get it.

Nobody is actually stopping you, It's okay to receive feedback it didn't go over well though. You're welcome to like that or not just as everyone else is welcome to see it as a well made joke or not.

Pulling off humor is possible on HN if you really want to, just not usually by making the same joke the article already chided or blaming others for not seeing it as a joke. Humor is also usually better received here if it leans towards the explicitly obvious side (e.g. quotes, a laugh expression, a /s, or the like) or ties into a following seriously stated point in a way that is still meaningful without the joke. These kinds of things don't always need to be done all of the time, but it helps greatly since the default assumption starts as a serious post.

All of that aside, sometimes you can very obviously crack a real roller and have it downvoted or the discussion steered back to a serious one about the post. That's okay too, it's intentional the site isn't humor first and it's not reasonable to blame a reader for seeing it as such.

Re: Rewriting Bun in Rust

#395
For Bun to not have torched its reputation among its users, it would have had to publish this blog post _before_ pressing merge on that PR.

That's what underlies most of the vitriolic reaction to the events, it was done really in a really rash way.

All they had to do was a)not gaslight people about your intentions when they found the branch b)publicly post the intent to do this, and then c)publish a doc like this one right before merging, ideally leaving the branch open for like a week in case anyone in the "community" finds things to fix.

Then those UB/Miri issues others found would have been "yay collaboration" boosts instead of negative issues that prove that the approach was risky/unthoughtful.

If you're going to cross a rubicon, maybe tell people a)that you actually want to do it, b)why you want to do it and c)what it looks like after you've done the rewrite.

Re: Rewriting Bun in Rust

#396

To add more context around lifetime errors and TigerBeetle's particular style guide: >Many projects opt to answer these kinds of questions through a style guide. TigerBeetle's TigerStyle is an example in Zig and Google's 31,000 word C++ style guide is another. The challenge with style guides is enforcement. TigerStyle[1] is a bit more than just a style guide. The key rule for this discussion, uplifted straight from o…

By all accounts, TigerBeetle has been a tremendous success, congratulations! My understanding is that it has a deliberately fixed scope, which makes me wonder: how applicable would TigerStyle be in more general-purpose applications? If the system needs to, say, ingest arbitrary JSON documents ranging from 100 bytes to 100 GB, how would TigerStyle fare?

Re: Rewriting Bun in Rust

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

Re: Rewriting Bun in Rust

#398

Earlier quoted context omitted.

It's far less obvious how choosing Bun results in more revenue for Anthropic. Unlike Claude Code, Bun doesn't require you to pay for tokens to use it

Bun powers Claude Code. If the rewrite introduced catastrophic bugs, it would cause catastrophic bugs in Claude Code and therefore without exaggeration could cause $billions of lost revenue.

There clearly aren't catastrophic bugs. The question is whether the artifact is maintainable over time, since clearly there's a massive amount of net new code that was not thoroughly reviewed. Give it a year or so and we'll know. I claim either way, it doesn't really matter to Anthropic--if it's a disaster they might be able to keep it limping along well enough by just throwing tons of tokens at it. The value in this is not the lasting software artifact, it's the marketing of the rewrite. If over time it turns out to be a great success, all the better!

Re: Rewriting Bun in Rust

#399
An extremely interesting blog post for me on a few fronts:

I'm very glad to see a holidtic approach to the memory errors and segfaults. I was tinkering on a static webpage just this this weekend, using Bun as the transpiler+bundler since it's so turnkey, and I ran into a few segfaults. E.g. when Bun saw I used an empty data uri for the favicon (avoids the browser trying to ask for one) it'd just crash. It reminded me of my own tinkering with Zig in its current pre-release state where it's usually a good mix of my poor memory management and working around bugs in Zig itself.

This post is also the best ad for AI I've seen yet. Not just comments saying they have 10xed themselves, a small personal project or thing which can (and likely will) be abandoned next month, or a one off dump of unusable code for the world's buggiest C compiler (come on Anthropic?). Instead this is a well thought out way of leveraging LLMs to do something which would otherwise probably not be deemed a reasonable enough effort.

I'm glad they included the rough cost as well. Crazy high, more than I can afford to be throwing at the wall to see what sticks, but still low enough to make sense over trying to hire developers for (even ignoring the timeline).

But it also highlights 2 really key things about current LLMs: the scaffolding can be just as valuable as the model & they still need someone able to figure out the right way to instruct and orchestrate them. Without the scaffolding the current models could never get close to handling something of this scale & quality. With the scaffolding you could probably get this to work okay enough even with a weaker model. On the orchestration side, Claude could help answer what good porting practices would be but it doesn't just get there itself, it requires hours of someone who understands the context of the project from bottom up and a clear understanding of what will/won't work to get the right scaffolding to do the job well.

Finally, it was an interesting dichotomy on presenting the port. On one hand it has been a bit opaque up until now. People saw the repo and there were some comments about testing the waters but then it suddenly shipped into production. On one hand that's awesome and I'm sure the reception here would be very different if there wasn't the "it's already been boringly shipped in Claude Code" shining result. On the other... I think I'll stick to using Bun as a personal tinkering tool for now. The velocity is so high I'm just not sure it'll land in a place I can rely on it st the speed of my org. Of course, that velocity is what has made Bun's success story and they should probably continue with it - I'm just looking forward to an LTS release :).

Re: Rewriting Bun in Rust

#400

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.

What specific critical thought(s) do you wish were voiced?
Post reply on HN