Live data from Hacker News

Zig → Rust porting guide

github.com

221–230 of 592 posts

Re: Zig → Rust porting guide

#221
post #180

Earlier quoted context omitted.

Having dabbled with both Zig and Rust, they do things so fundamentally differently, it isn’t possible to do exact lines like that.

the rust they've written (so far) is highly unidiomatic (and with a ton of unsafe). I can't speak to the zig part, but it seems plausible to me it is line-by-line, horrendous rust. Whether or not they can clean it up is an interesting question.

If anyone can do it, it's Anthropic. The question is more how long it will take and how many tokens it will burn/how much groundwater.

Re: Zig → Rust porting guide

#222

Earlier quoted context omitted.

The gp's interpretation of that tweet is such a completely incorrect reading as to make one think it's likely disingenuous.

> I expect OSS to go the opposite direction: no human contribution allowed. How is it an incorrect interpretation? Jared is indeed pitching/suggesting/predicting that human contribution will not be allowed in the near future, i.e. banned.

"Pitching" generally means that the person making the pitch is endorsing and pushing for it. (This might also be a regional word meaning/usage difference type thing.)

The person upthread should have said "predicting".

Re: Zig → Rust porting guide

#223

Earlier quoted context omitted.

Where is a source for either of these extraordinary claims?

https://x.com/jarredsumner/status/2048434628248359284

What a weird take. I do a ton of OSS, and the act of writing code is what makes it fun for me. If I were forced to use an LLM to write all my OSS code, I would just not do it anymore.

Re: Zig → Rust porting guide

#224
post #176

Earlier quoted context omitted.

It's time! https://xkcd.com/286/

Wow. That xkcd was written in 2007, and part of the dialog is "didn't that [meme] die like five years ago?" Which means All Your Base, as a meme, was already getting somewhat stale by around 2002. It's hard to believe it's been that long.

Relevant XKCDs:

* https://xkcd.com/647/

* https://xkcd.com/1477/

Re: Zig → Rust porting guide

#225
post #3

Why? Are there particular reasons that the maintainers of Bun feel the need to attempt to migrate from Zig to Rust?

Probably an experiment due to Bun's PRs to Zig being rejected (Zig does not allow AI use). If Rust works well enough, and the alternative is maintaining a fork of Zig, I'd guess they'd go with Rust.

The anti-AI policy had nothing to do with Bun's PRs being rejected. This post[0] by a core zig maintainer explains why the PRs were low quality and subsequently rejected.

[0] https://ziggit.dev/t/bun-s-zig-fork-got-4x-faster-compilatio...

Re: Zig → Rust porting guide

#227

Earlier quoted context omitted.

Makes me wonder why zig announced the strict LLM rule recently. I'm afraid one reason could be that zig doesn't want to accept code from the bun fork in the first place (because of LLM usage, deviation and other reasons)

There are other reasons why a project like Zig might not want to accept LLM generated contributions. Zig, as programming language, has a multiplier codebase. A bug may affect a significant larger portion of users than most libraries or binaries will, as it's a fundamental building block of everything that uses Zig. Just that could be worth the extra scrutiny on every individual commit. There's also the usual argument…

> has a multiplier codebase. A bug may affect a significant larger portion of users than most libraries or binaries will

Couldn't you say exactly the same about bun?

Re: Zig → Rust porting guide

#228

Interesting to see this when the current top post on HN is someone worrying about Bun as it was acquired by Anthropic. The top comment there describes “Anthropic does experiments on their own codebase, the Bun team is not gonna do the same vibe coding experiments”. Yet here we are, what looks like a massive undertaking for vibe coding. Time will tell how this will turn out. Would be nice if the Bun maintainers could…

I think itnis ok to use or build vibe coded tools if it is built by experts in the domain and they take the ownership.

Re: Zig → Rust porting guide

#229

Earlier quoted context omitted.

They recently tried to upstream an improvement to zig, but were prevented from doing so because zig has a hard and fast "no AI code" rule. Whether you think this response is trying to put pressure on zig or whether they're just moving for practical reasons is up to you. It's probably a bit of both.

Anthropic just needs to buy Zig! Problem solved.

...and rewrite it in rs.

Re: Zig → Rust porting guide

#230

Earlier quoted context omitted.

They recently tried to upstream an improvement to zig, but were prevented from doing so because zig has a hard and fast "no AI code" rule. Whether you think this response is trying to put pressure on zig or whether they're just moving for practical reasons is up to you. It's probably a bit of both.

Anthropic just needs to buy Zig! Problem solved.

Perfect A/B experiment opportunity. Fork Zig, call the fork Zag.

Lock the syntax/api together for a couple of years. Allow AI code in Zag.

Review after a few years, see which is better.

Post reply on HN