*The Rustification of Bun#
Rewriting 500,000 lines of Zig into another language would be a gargantuan undertaking if done by hand. “A rewrite in another language would take a small team of engineers a full year. It would mean freezing bugfixes, security fixes or feature development for that time,” Sumner wrote.
Instead, Sumner went with Claude. He spun up about 50 dynamic Claude Code workflows, reaching a peak of about 1,300 lines of code per minute and generating over a million lines of Rust code. The job took 11 days and cost about $165,000 at API pricing. Claude Fable did most of the heavy lifting.
68 Comments
uuj8za@piefed.social · 94 pts · 38d
They also moved to Codeberg: https://codeberg.org/ziglang ❤️
talkingpumpkin@lemmy.world · 79 pts · 37d
I, for one, am glad they are volunteering as guinea pigs in an experiment to see how long a popular project can survive LLM slop.
And if they harm javascript's popularity in the process and projects start to look elsewhere... that's an added benefit ;-)
thedeadwalking4242@lemmy.world · 23 pts · 37d
The market can remain irrational longer then you can remain liquid as they say
MonkeMischief@lemmy.today · 6 pts · 37d
I miss "We can remain stupid longer than you can remain solvent." and "Ape together strong."
draco_aeneus@mander.xyz · 5 pts · 36d
Bun is not nearly popular enough to have a measurable impact on the JavaScript community, no matter what happens with it.
vext01@feddit.uk · 78 pts · 38d
There's no way a million lines of code were reviewed in 11 days. Not by a human at least.
locuester@lemmy.zip · 61 pts · 38d
Ew. Reviewing code is so 2024
Baizey@feddit.dk · 51 pts · 37d
It took the llm 11 days to generate the code
It doesn't seem to say anywhere anyone reviewed it in any time
BiteSizedZeitGeist@lemmy.world · 5 pts · 37d
They code review in prod, like REAL PROGRAMMERS HOO RAH
vext01@feddit.uk · 2 pts · 37d
Exactly
justastranger@sh.itjust.works · 1 pts · 36d
11 days and $165,000
alphabethunter@lemmy.world · 8 pts · 36d
No need, you just ask the AI to "make no mistakes", then you spawn a second AI to review the first AI's output, and then you ask
a turdthird AI to review the output of the second AI. Easy peazy. No need for pesky engineers and their stupid human inefficiency. /sNon-ironically though, I think that's exactly what they did. I have watched Prime's video about this, and, although I was second-screening his video, I believe he mentioned that they used this "technique".
BB_C@programming.dev · 1 pts · 36d
They didn't use that technique. Some vibers do ask Codex to review Claude and vice versa. But since this is Anthropic-owned, they did use "parallel agents", but they were all Claude.
statelesz@slrpnk.net · 53 pts · 38d
What a waste of resources for an unreviewed and unmaintainable pile of junk.
HaraldvonBlauzahn@feddit.org · 32 pts · 38d
How much is one million lines of code?
If a senior engineer works in a well-defined, well-architected greenfield project, and does extensive tests, 10,000 lines of code written in one year are very productive. The amount of new code per person-year will be much less in larger projects - a good indicator is the line count and the estimated value of the Linux kernel (40 million lines in 2025, redeveloping it in 2011 would have already cost 2200 million Euros, which would pay e.g. 36000 person-years for mid-level German software developers, that would mean 1111 lines per person-year{actually about half of that because of the interim growth of line count in the meantime }- and most software projects can only dream about so much actual value.)
So, you can say 1,000,000 lines of code generated in 11 days are probably 100 person-years of technical debt.
One caveat: It is relatively simple to auto-translate code in restricted languages like Java, Python, or Rust to unrestricted languages like C or C++. In that case, enforced invariants (like "no use of freed memory" or "sharing data across threads xor mutation") become implicit, but verbatim translation is often possible.
The other direction will require a re-design..
HelloRoot@lemy.lol · 5 pts · 37d
not sure if I understand correctly, but this sounds off
HaraldvonBlauzahn@feddit.org · 0 pts · 37d
More like 500 lines per person-year.
You can do the math yourself:
how many lines of code does the linux kernel have?
what is the estimated value of the kernel, which is the hypothetical cost to re-create it?
what do you think the seniority of a linux kernel developer is?
what annual salary do they make in the country which uses Linux most - the US?
now divide kernel value by annual salary to get man-years, and lines of code by man-years to get average lines of code per year
Result: Typing in code that somehow compiles was never the bottleneck
eager_eagle@lemmy.world · 3 pts · 37d
you can't compare the tech debt because it's essentially a line by line translation from an existing codebase, not 1M brand new lines of code
ReptilianCleric@lemmy.zip · 2 pts · 37d
That's...irrelevant.
Really. The specific details of the task doesn't change that this was automated. Until it's reviewed, it's basically a pile of Schrödinger's bugs and security holes. That's the technical debt.
eager_eagle@lemmy.world · 2 pts · 36d
It really isn't. A line by line translation doesn't introduce new logic and doesn't change the system architecture. Saying it carries the same tech debt as brand new code is just not true.
anomnom@sh.itjust.works · 2 pts · 36d
Assuming the llm did it line by line without changing anything during an arbitrary hallucination.
eager_eagle@lemmy.world · 1 pts · 36d
and that's a different problem entirely
droopy4096@lemmy.ca · 25 pts · 38d
Kelley is artisan, Sumner is a factory manager. Indeed they cannot be using same tools or work on the same floor or within the same building. Blind trust in AI (even with guardrails) is a recipe for disaster. They have jumped to Rust to add more guardrails to their AI lunacy but it won't hold for long. At this point there's no single human who actually knows or understands the code and AI code is proven to have durability issues at scale. So direct rewrite gives a quick boost as code is ported from somewhat reviewed base onto new platform, but as new code gets added this will dissipate. It sounds like Bun issue is systemic Zig Rust or Pixie dust won't fix it.
BiteSizedZeitGeist@lemmy.world · 9 pts · 37d
My modest career in software development has shown me that the real value of a developer isn't how much code they can write, it's how well they understand the existing code base. LLMs can't understand because that requires memory larger than an LLM's context window, by orders of magnitude.
Scrollone@feddit.it · 19 pts · 37d
I'll never update Bun again. And maybe I'll just revert back to Npm.
What a shit show.
bitfucker@programming.dev · 8 pts · 37d
Please save yourself from lunacy by using pnpm. You can always use shamefullyHoist to get the npm compatibility
liuther9@lemmy.world · 14 pts · 37d
Since we introduced claude enterprise, number of unexpected bugs skyrocketed tremendously
cornshark@lemmy.world · 9 pts · 37d
Because devs are adding more features faster than before? Or because the quality of each feature is low?
badmin@lemmy.today · 5 pts · 37d
bookmeat@fedinsfw.app · 11 pts · 37d
https://andrewkelley.me/post/my-thoughts-bun-rust-rewrite.html
This original post is also very informative.
abc@suppo.fi · -23 pts · 37d
What makes him think it's unreviewed? Any AI process worth its salt has several review steps.
greasewizard@slrpnk.net · 19 pts · 37d
You really think one person reviewed over a million lines of code in 11 days?
AzuraTheSpellkissed@lemmy.blahaj.zone · 17 pts · 37d
I think they mean "reviewed by AI"
abc@suppo.fi · -4 pts · 37d
Yes.
BiteSizedZeitGeist@lemmy.world · 8 pts · 37d
AI code reviews can assert good patterns that's baked into the training data, but it's impossible for an LLM to understand the whole project. LLM code reviews can't match a senior dev's code reviews (unless VRAM becomes astronomically cheaper).
HaraldvonBlauzahn@feddit.org · 4 pts · 37d
You should stop using words that clearly mean human cognitive activity, like "to review", to describe what LLMs do.
FishFace@piefed.social · -36 pts · 37d
Regardless of the truth of the matter, the Zig creator is being an unprofessional bell-end, and should let Bun fail on its own.
cecilkorik@lemmy.ca · 24 pts · 37d
No, AI psychosis has done so much damage to open source and software engineering as whole already, the professional thing to do is to start to call it out for what it is. And sometimes that means intentionally making people mad, like that project that instructed the AI to put self-disparaging remarks into the author's PR to both mock the author and make it obvious they used AI. He may not be the hero we deserve, but he's the hero we need right now.
Maybe you do get more flies with honey than with vinegar, but vinegar is useful too. Fuck AI (at least in many of the forms it is currently being used and pushed in)
FishFace@piefed.social · -9 pts · 37d
If it's doing "so much damage" - let them crash and burn. That's all the vinegar you need.
It's different when it's people coming and fucking up your project and breaking your rules - then they deserve to be dealt with robustly. But if all they're doing is fucking up their own product then being a wretched little gossip doesn't help anyone.
ugo@feddit.it · 12 pts · 37d
HaraldvonBlauzahn@feddit.org · 6 pts · 37d
By that logic, we would not need regulation for financial institutions because "the free market will sort it out".
Except that capitalism or the free market does not care about people. Only people, we ourselves, care about people. We need rules shielding off harm like the guests of a hotel need a fire safety system.
FishFace@piefed.social · -2 pts · 36d
You should enter for long jump with those leaps
HereIAm@lemmy.world · 5 pts · 37d
But they are fucking up other people's projects. Badly enough that some are ending paid bug hunting programs or just eating so much of maintainers time looking through bogus bug reports that development stalls.
expr@programming.dev · 17 pts · 37d
Nope, he's based as fuck. And I don't even like Zig that much.
MyNameIsRichard@lemmy.ml · 11 pts · 37d
He's allowed to express his opinion.
FishFace@piefed.social · -6 pts · 37d
And I didn't say he wasn't, so good day to you.
magic_smoke@lemmy.blahaj.zone · 4 pts · 37d
The only good use of "professionalism" as a concept is to get bigots and sex-pests fired.
FishFace@piefed.social · -2 pts · 37d
I'm gonna guess you routinely behave in a way that is off-putting to colleagues then.
magic_smoke@lemmy.blahaj.zone · 6 pts · 37d
Nah the malicious compliance mostly just pisses off my boss, and no ones ever complained about me hitting the pen on the clock.
You don't have to be "professional" to not be insufferable.
FishFace@piefed.social · -5 pts · 37d
So weird of you to admit your shitty behaviour in this conversation, but fair play to you.
My work here is done.
magic_smoke@lemmy.blahaj.zone · 4 pts · 37d
I write powershell based .MSI wrappers for a company that's actively building the apacolypse.
Working slower is arguably taking the moral high-ground.
vanillama@programming.dev · 2 pts · 37d
Thank you for your service
magic_smoke@lemmy.blahaj.zone · 3 pts · 37d
o7
BiteSizedZeitGeist@lemmy.world · 3 pts · 37d
Your Reddit is showing lol
FishFace@piefed.social · -2 pts · 37d
You here to leap to the defence to the pissrag vaping in the office?
Dunno what that shows but let's hear it.
BiteSizedZeitGeist@lemmy.world · 3 pts · 37d
PiSsRaG?!?! You don't even KNOW this person and you're willing to make such an EXTREME INSULT??? Why, I never!!!! The state of modern discourse is simply AtRoCiOuS!!!
magic_smoke@lemmy.blahaj.zone · 3 pts · 37d
I go out to my car to hit the pen, thank you very much.
Who the fuck rips a weed pen in the middle of a working office building?
Like there's not giving a shit about my company, then there's not giving a shit about the people around me, or if nothing else, not giving a shit about making rent next month.
Do you just spend your time making up ridiculous scenarios to get pissed about? Or is it only when you get to make it an appeal to authority?
Sibbo@sopuli.xyz · -40 pts · 38d
Ah, the old "blame the programmer" defense of low-level languages. By the same argument, why would anyone use Zig and not C? Do all Zig developers have bad programming practices?
rimu@piefed.social · 41 pts · 38d
Apparently Bun was always an especially bad example of how to use Zig.
From https://andrewkelley.me/post/my-thoughts-bun-rust-rewrite.html
abbadon420@sh.itjust.works · 11 pts · 38d
Oh my, that's a proper bitchfight
Glitchvid@lemmy.world · 14 pts · 37d
Double sucks because it's also being used as a proxy flamewar between Zig and Rust enthusiasts.
Which is awful because there are good conversations and teachings to be had between those languages; but instead all of the circumstance is just blood in the water and completely unproductive.
vanillama@programming.dev · 2 pts · 37d
Let's hope after this is done we can have more productive conversations. There's so much potential for all of us to learn, or at least definitely for me.
ISO@lemmy.zip · 0 pts · 37d
Zig is too irrelevant, both technically and adoption wise, for anyone actually relevant to be fighting over it. The number of notable Zig projects went from 3.5 to 2.5 recently 😉. Hell, Zig probably has more adoption as a build tool, than as an actual implementation language (I would take it over CMake any day of the month tbf).
Hell, WIP languages experimenting with effect systems and/or similar next-gen concepts will probably hit v1.0 before Andrew thinks Zig is ready for a v1.0, which is in his forte, but no one should be holding their breath if they are not aware of some history and personality details. Since Andrew tagged Zig v0.1, the Rust project designed the edition mechanism, introduced three inter-compatible editions (four if you include 2015), and managed on-schedule ~66 1.n minor releases, and in the process grew into a semi-popular language impacting almost every corner of the industry.
hirihit640@sh.itjust.works · 0 pts · 37d
This sounds like Kelly is giving the "you're holding it wrong" argument.
Languages like Rust make it hard to run into memory bugs. C and Zig don't protect you. Here is a good article about Zig vs Rust memory safety. If your language allows you to easily write memory unsafe code, then your language is partially to blame.
It's like why we have type systems. Sure, you could write bug-free code using untyped python. And you can blame somebody for "coding too fast" if they end up with a lot of bugs. But a well designed language with a well designed type system, could have prevented many of those bugs from being written in the first place
vanillama@programming.dev · 5 pts · 37d
To a degree, sure, but going out of your way to go against convention even for the language itself is also to blame if Kelly is right. It's less about whether you add type annotations to python, and more about following conventions and writing python in a way that a random developer with enough python experience would be able to understand and contribute to the codebase. I've seen anti patterns in a handful of languages I know well enough and it's easy to tell the other person didn't bother practicing enough and learning basic conventions.
hirihit640@sh.itjust.works · -1 pts · 36d
Coding conventions are fine but generally the language should enforce them by design. This is the difference between Rust and Zig. In Zig, you can ignore memory safety. In Rust you can't (or rather, it's hard to). Type systems are the same, you generally can't just ignore the rules. The compiler will complain.
badmin@lemmy.today · -2 pts · 37d
kek
okwhateverdude@lemmy.world · 19 pts · 37d
Kelley does indeed blame Sumner's poor engineering and lays out a series of events where he describes a transformation into VC-backed startup and the changes in engagement with Zig, and also the effect this has on Bun's source. I'm inclined to believe Kelley's accounting. Let's not forget that it was Sumner/Anthropic that decided to throw Zig under the bus first.