Live data from Hacker News

Zig → Rust porting guide

github.com

101–110 of 592 posts

Re: Zig → Rust porting guide

#101

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…

> what looks like a massive undertaking for vibe coding fwiw, I suspect it's less of an undertaking than you may think. I've been playing with AI to rewrite Postgres in Rust[0] over the past couple of weeks and I found the AI to be exceptional at doing rewrites. Having an existing codebase you can reference prevents a lot of the problems you have with vibecoding. You have an existing architecture that works well and…

> I suspect it's less of an undertaking than you may think... having an existing codebase you can reference prevents a lot of the problems you have with vibecoding.

That's because it's not vibe coding - stingraycharles doesn't seem to understand what vibe coding is. Vibe coding was defined here https://x.com/karpathy/status/1886192184808149383

> There's a new kind of coding I call “vibe coding”, where you fully give in to the vibes, embrace exponentials, and forget that the code even exists.

This is very far from Anthropic's migration plans.

Re: Zig → Rust porting guide

#103
post #98
post #13

Earlier quoted context omitted.

> what looks like a massive undertaking for vibe coding It doesn’t look like that at all. Do you think that all use of AI is vibe coding?

Did you look at the branch? This is vibed, even with the most liberal definition https://github.com/oven-sh/bun/compare/claude/phase-a-port This single commit is 65k lines of additions https://github.com/oven-sh/bun/commit/ffa6ce211a0267161ae48b...

The definition is at https://x.com/karpathy/status/1886192184808149383 and no that does not match what is in the branch. Systemically migrating a code base using an LLM does not match the defintion of vibe coding.

There's a decent article by Simon Willison that talks about this: https://simonwillison.net/2025/Mar/19/vibe-coding/

> I’m seeing people apply the term “vibe coding” to all forms of code written with the assistance of AI. I think that both dilutes the term and gives a false impression of what’s possible with responsible AI-assisted programming.

Re: Zig → Rust porting guide

#104
post #86

The problem with vibe coded re-writes is that you basically sign off on understanding the generated codebase at that point. Any historical knowledge of the codebase is gone.

This prompt defines the translation as a file for file, line for line port. Seems like historical knowledge will be fine.

Re: Zig → Rust porting guide

#105

Earlier quoted context omitted.

Where is a source for either of these extraordinary claims?

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

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

Re: Zig → Rust porting guide

#106

Earlier quoted context omitted.

I imagine claude is better at Rust than Zig?

Zig is a moving target. 0.15 -> 0.16 includes some massive structural changes concerning IO and async/threading. Claude has absolutely no idea what it's doing with bleeding edge zig unless you feed it source and guide it closely (in which case it's useful for focused work) - I'm building a game engine & tcp/udp servers with it and it requires a hands-on approach and actually understanding what's being built. I imagin…

> unless you feed it source

Which isn't particularly difficult - the language docs and std source come with the installation, so all you need to do is tell Claude where those directories are in your skill/plugin/CLAUDE.md.

> and guide it closely (in which case it's useful for focused work)

It does struggle sometimes with writing code that compiles and uses the APIs correctly. My approach to that so far has been to write test blocks describing the desired interface + semantics, and asking Claude to (`zig test` -> fix errors) in a loop until all the tests pass.

Re: Zig → Rust porting guide

#107

>*No `tokio`, `rayon`, `hyper`, `async-trait`, `futures`.* No `std::fs`, I'm not a rust dev but even I kind of notice that tokio is kind of shunned in most projects. Why is that? Is it just bad or what?

Async is an anti-pattern but sometimes inexperienced developers don't realize that and will infect your codebase with it.

Please explain.

Re: Zig → Rust porting guide

#108
post #101

Earlier quoted context omitted.

> what looks like a massive undertaking for vibe coding fwiw, I suspect it's less of an undertaking than you may think. I've been playing with AI to rewrite Postgres in Rust[0] over the past couple of weeks and I found the AI to be exceptional at doing rewrites. Having an existing codebase you can reference prevents a lot of the problems you have with vibecoding. You have an existing architecture that works well and…

> I suspect it's less of an undertaking than you may think... having an existing codebase you can reference prevents a lot of the problems you have with vibecoding. That's because it's not vibe coding - stingraycharles doesn't seem to understand what vibe coding is. Vibe coding was defined here https://x.com/karpathy/status/1886192184808149383 > There's a new kind of coding I call “vibe coding”, where you fully give…

[deleted]

Re: Zig → Rust porting guide

#109
post #103
post #98

Earlier quoted context omitted.

Did you look at the branch? This is vibed, even with the most liberal definition https://github.com/oven-sh/bun/compare/claude/phase-a-port This single commit is 65k lines of additions https://github.com/oven-sh/bun/commit/ffa6ce211a0267161ae48b...

The definition is at https://x.com/karpathy/status/1886192184808149383 and no that does not match what is in the branch. Systemically migrating a code base using an LLM does not match the defintion of vibe coding. There's a decent article by Simon Willison that talks about this: https://simonwillison.net/2025/Mar/19/vibe-coding/ > I’m seeing people apply the term “vibe coding” to all forms of code written with the as…

You're right, all 750k lines of code added in a single day - definitely reviewed and completely understood.
Post reply on HN