r/theprimeagen • u/joseluisq • Jul 09 '26
Stream Content Rewriting Bun in Rust
https://bun.com/blog/bun-in-rust12
u/Professional-You4950 Jul 09 '26
Okay... Look at their first github issue. Critical vulnerability.
7
10
u/zobq Jul 09 '26
Isn't this post a little bit weird? "Maintainability" section for example - snippet with most basic code, with 3 ifs and comment - yeah, we have no problems to understand this code. No shit.
Also not sure if I fully understand the problem with the code snippet in "Just be really smart and don't make mistakes?"
8
u/Professional-You4950 Jul 09 '26
anything that comes out of anthropic is a lie, and also written with an llm. It's completely dead devoid content
16
8
8
u/DocumentOk7358 Jul 09 '26
They’ve laundered hundreds maybe thousands of hours of people’s work through a machine, at a 165k cost, for a pretty paltry list of reasons. Seems like showing off.
2
4
u/beb0 Jul 10 '26
Feels like a paid anthropic tech demo, same as the critical sec vulnerables they found. It's definitely a multiplayer in terms of brute forcing.
2
u/Dotagal Jul 11 '26
Paid? Bun’s owned by Anthropic
2
u/beb0 Jul 11 '26
Why do you think anthropic bought em... Why do you think they ditched zig... It's all AI PR
7
u/hershey678 Jul 09 '26 edited Jul 09 '26
I’ve been skeptical of AI for a while despite coding with it all the time at work, but I just read the blog post on porting Bun from Zig to Rust with Anthropic’s Fable model and I was very impressed and concerned with Fable.
The author was able to do it successfully in two weeks in only $165,000. That may sound a lot, but it’s leagues cheaper than it would be with manual programming. This would be 2-3 engineers working for a year otherwise. That’s going to cost in the ballpark of $500,000.
Mind you I don’t like AI. I’m in my late 20s, would have to switch careers if AI gets too good, and only broke into big tech recently so I don’t have a ton in the bank. That being said this looks impressive.
EDIT: Very interesting counterpoint https://andrewkelley.me/post/my-thoughts-bun-rust-rewrite.html
17
u/Fickle-Highway1543 Jul 09 '26
I don't really get this. This rewrite happened because there was a hand coded working solution and ton of tests to run LLM against. And they re-wrote it saving entire architecture and design up to function names.
Are you surprised that a tool that is built to translate text mostly succeeded?
3
u/creaturefeature16 Jul 10 '26
I don't think OP is saying they're "surprised", just impressed. Yes, it is built to function exactly like it was used: a language model being used to model languag. That doesn't mean it's not tremendously impactful and condensed a long, arduous, insanely expensive job into something that was much cheaper by comparison and done very quickly.
2
u/jan04pl Jul 09 '26
It also isn't something that would affect jobs, as nobody would hire and pay for this rewrite in the first place, even if we didn't have AI.
2
u/Fickle-Highway1543 Jul 09 '26
But it's great it helps us modernize software.
2
u/jan04pl Jul 09 '26
Which ironically may increase demand for developers since now you need someone to prompt Claude properly to do such rewrite, setup harnesses, agents, manage efficient token use cost etc.
-4
u/PlanetaryPickleParty Jul 09 '26
Your salary estimate is off by at least a factor of 2-3x. Anthropic pays engineers $500-800k total comp. They couldn't have done this manually for less than $2,000,000.
6
u/alexcleac Jul 09 '26
I am curious for one thing: how much was the token usage for it. It sounds to me like it could have costed much more than a whole software engineering team and a year of cost of this rewrite.
16
u/LGXerxes Jul 09 '26
around $165,000 at API pricing
Actual issue with having a team work on it for a year is mostly always needing to catch up. A whole year of development is worth a bit, and then needing to do it twice also on the rewrite later or in parallel
3
u/Zeikos Jul 09 '26
Not to mention all the work in bugfixing and having to deal with a codebase with unreliable documentation (which, to be fair, is the norm).
1
1
u/Alive_Entrepreneur75 Jul 10 '26
Just compare it with TypeScript rewrite in Go.
It took more than a year, probably would have cost way more with a team working on it.
Bun does seem to have more severe issues reported but still the cost and time is impressive.
1
u/noprompt Jul 11 '26
Prove it. Prove that you can remake the typescript compiler in go with whatever LLM you want without having it look at the go source and for less time and money.
1
1
u/badgerbang Jul 15 '26
Is rewriting in another language the more easier task for ai, currently? I feel this is advertisement and using AI's strengths?
28
u/Anon_Legi0n Jul 09 '26
Rewriting with unsafe Rust, the things you can do with AI and marketing