Hacker News new | ask | show | jobs
by pizza234 19 days ago
> Anthropic is not in the programming language market; their post about rewriting Bun in Rust is full of technical details that led to improving the end product for their users

Anthropic absolutely is in the programming language market. If/since AI makes rewrites to certain languages relatively easy, a success story will tie the given language(s) to the given AI company.

Rust may have a tremendous success in the future, because it's much easier to write it with AI (ignoring for a moment whether that's really a good thing). The implication is that Anthropic has a stake in Rust's success.

Also, to be kept in mind that devs advertising successfull rewrites often hide some aspects that are unfavorable to the narrative; typically, how bad was the code before the rewrite), although there are other (significant) aspects that have been omitted.

> Zig's response is a sour opinion piece full of personal attacks.

I take you haven't read Andrew Kelley's article (here: https://andrewkelley.me/post/my-thoughts-bun-rust-rewrite.ht...).

Summary:

- Jarred has written Bun with very bad engineering standards

- Jarred has managed public relations very poorly (e.g. ghosting the Zig foundation)

- When they rewrote the project to Rust, and described Zig as poor choice, there has been a negative fallout for Zig

- The ZSF is obviously upset because of the poor publicity

This is summarized at the end of the post:

> Zig users who knew next to none of these facts and have only the surface level understanding that an ex-Zig-user is getting trashed by the language creator. Such people might reasonably worry that might happen to them

As a matter of fact, I also believed the same after reading's Bun's post. This is undeserved though, and that's what Kelley explains.

There's definitely a personal attack somewhat, and this is addressed in the last (added later) section.

8 comments

> I also believed the same after reading's Bun's post.

This doesn't even make any sense. The part that you're quoting[0], is Andrew commenting on the fallout from the blog post he made. How could you have thought something about a blog post that hadn't come out yet?

Also, if you are talkinga bout the post Jarred made, it was extremely charitable about zig: "Zig made Bun possible. I would never have been able to build this much in 1 year if it wasn't for Zig."

[0] "The other critical mistake I made with this post was failing to consider the rather obvious and important point that this might affect Zig users who knew next to none of these facts and have only the surface level understanding that an ex-Zig-user is getting trashed by the language creator."

- When they rewrote the project to Rust, and described Zig as poor choice, there has been a negative fallout for Zig

- The ZSF is obviously upset because of the poor publicity

No where did they describe zig as poor choice, and there were zero evidence ZSF was getting poor publicity.

Had whole of HN, Reddit and Twitter all laughing at Zig this would have make more sense. But that was not the case. As a matter of fact I don't even record a single comment about it. If anything a lot of these "poor publicity" and "Zig as poor choice" were completely fabricated.

Had the internet turned against Zig, the response may have deserve a lot more weight.

I mean, does it even matter?

It's not Bun's or anyone else job to care about Zig's or the ZSF's feelings or publicity.

A project who switches programming languages or frameworks or whatever doesn't need to be afraid of offend anyone.

>I mean, does it even matter?

It doesn't and didn't matter until Zig and ZSF blows it out of proportion.

> I take you haven't read Andrew Kelley's article

Yes, that's the sour opinion piece full of personal attacks.

>Jarred has written Bun with very bad engineering standards

"You're holding it wrong."

>Jarred has managed public relations very poorly (e.g. ghosting the Zig foundation)

What obligation do you think he has here? Which direction should these good relations flow?

I'm also an outsider here, and reading this post was kind of shocking. Can't believe someone would attack your open source code. It's everything normies hate about ornery IT people.

I'm basically of the opinion that if agents can't write your programming language, that's a problem with your programming language.
That is an absolutely foolish position to take. Basically, when given proof that agents need improvement you're sticking your fingers in your ears and going "nuh uh, it's not their fault".
So, no new programming languages until the end of time?
> since AI makes rewrites to certain languages relatively easy

This premise makes no sense. AI makes rewrites to any language easy.

That's absolutely not true. Differently languages have greater or lesser representation in the training sets. You see a similar bias toward specific libraries within a given ecosystem, so much so that I worry about AI created technical monocultures as AI generated code converges to specific languages, packages, etc.

The LLM companies have truly astounding power to now steer the direction of the entire industry. It should worry all of us.

Rust does not have a bigger training set than say Python/JS/TypeScript/C++ .
Yes but it goes deeper than just corpus, because not all programming languages are created equal. More statically enforced language perform better with AI because the tooling catches more bugs earlier. Highly dynamic languages like JS are very poor rewrite targets, despite being popular, because you essentially have to live in the debugger and employ maximum TDD to make it work reliably. And AI doesn't do that.

Consider just having a typechecker. That alone eliminates a whole class of bugs and unit tests, which means your remaining unit tests check more logic. I've seen JS projects with high test coverage that cover essentially zero logic, only type checking class things. And nobody even knows it, really. But when your tests are just "okay pass an empty array. Now an empty string. This should fail, great. Now pass an array with the wrong elements..." you're not testing anything. You're probing the type system, which many languages do automatically and perfectly.

Meta for example is spending a lot of effort and money into creating new curated programming training sets.

That means at least from their POV what's already available is not enough or not good enough, and if they're correct then the companies making the models can "artificially" inflate a language's representation.

I never said it did.

My comment shouldn't be read as an explanation for why Anthropic chose Rust in this case.

I was simply disputing the claim that LLMs are good at all languages, and that their biases--both intentional and otherwise--will swing the entire industry.

That's not all there is to it, to be fair. Rust seems to work particularly well for LLMs in part because it's better at catching their errors.
IMO there is no reason to believe llms create equal quality code in all languages.
They really don't. Even per-project it can be a shitshow. For instance, while I use LLMs to write some typescript, when I'm writing code for Unreal Engine in C++ & Blueprint I pretty much do it by hand because it absolutely can't do blueprint in any meaningful sense. Even the most basic requests result in an absolute mess. (I imagine it's also very hard to train on since its stored as binary data). Even the C++ code it generates is pretty rough -- regular linker errors etc.
This isn't true. AI couldn't rewrite Firefox in Brainfuck.
easy or good?
Both!
>Jarred has managed public relations very poorly (e.g. ghosting the Zig foundation)

I actually love the use of ghosting in this post. It is almost a Freudian slip about how Zig looks like from the view of outsiders. Zig moves exactly like how toxic exes do. They point fingers, make passive-aggressive statements, unnecessarily air out dirty laundry, and downplay all of the good their partner has done during the relationship.

> Rust may have a tremendous success in the future, because it's much easier to write it with AI (ignoring for a moment whether that's really a good thing).

It’s interesting that Rust could become the most deployed but the least written (by humans) programming language if the dreams of AI bros come true.

If AI gets good enough to competently translate other languages to Rust then there is no point writing in Rust (a language with a steep learning curve and is high friction in use), you can just write in a low friction language like C, C++, Odin, Zig, … etc. and have AI translate it to Rust catching all the memory bugs in the process.

C/C++ is low friction compared to Rust? Wow. We have very different experiences.
If your objective is just to hack something together quickly to test an idea, and doesn't care if the application segfault 6 hours later (eg. a prototype game engine), C++ is definitely the superior choice to Rust.

Rust is like the instructor demanding that you build your house up to the national code, down to the choice of nail for your floor board. Your house will be perfect, but building it is extremely difficult and high-friction. In many cases this is unnecessary.

I can get cross platform rust up and building and running with 5 minutes. It’s probably half a day at least for c++ and a more significant maintenance burden.

Also, I think the “quick to prototype” only is beneficial if you know c++ and don’t know rust. I know both and I can say that Rust is much faster to prototype in precisely because

a) tests are trivial to add meaning it’s trivial to add test coverage vs in c++ you have to integrate gtest and bother to set that up which no one does B) many initial startup bugs are prevented. It’s not segfault after 6 hours but spend hours getting it to work correctly after it compiles vs it runs mostly correctly from the first build.

Even if Rust is slower to write (which is only true if you don’t know Rust and don’t have AI) it’s still overall faster to develop in. I can’t recall if MS or Google have written up their experience on that side or focused only on impact to vulnerabilities.

You can hack things together pretty effectively in rust if you put your mind to it (so many things that bog people down in rust are due to focusing too hard on premature optimization of either performance or correctness), and the easier to use tooling really helps with that kind of thing. I use Rust for small one-off projects frequently just because it's easier to work with.
> doesn't care if the application segfault 6 hours later (eg. a prototype game engine), C++ is definitely the superior choice to Rust.

I wouldn't say "definitely", given Rust deps management is way more streamlined.

> translate it to Rust catching all the memory bugs in the process

That's not possible. If it were, you'd just fix the memory bugs directly in the original language.

Your best bet is to have a translation littered with unsafe blocks, so you still have to do the work of nailing down the specifics to make them safe. There's no magic "unsafe language" -> "safe Rust" pipeline, even with GenAI.

You really think AI can't convert unsafe blocks to safe code?

The reason AI can't fix memory unsafety in the original language is the same reason humans can't do it. There isn't enogh feedback from the compiler.

I imagine it could, eventually, if not now. The Bun translation used Anthropic's best model, cost hundreds of thousands of dollars, and still contained a large number of unsafe blocks. Maybe if they left the agent running for longer, using Miri for verification?
i’d rather have a run time than this way of working.
We've read the andrew blog. It is a personal attack a very petty one, you're clearly a biased fan of his and of zig probably if you cannot see the obvious, but we're telling you as outsiders how poorly it reflects on andrew and the future of zig, and this is coming from someone who originally had a very good opinion of zig and andrew, now not so much. You can choose to ignore that and engage in the massive circlejerk zig fans are engaging in during this or maybe take a second and reconsider