logoalt Hacker News

Philpaxyesterday at 10:30 PM11 repliesview on HN

Without commenting on Bun itself as a project, or the nature of the rewrite, it can't be good for Zig that a naive rewrite away from it fixed memory leaks, improved stability, shrunk binary size by 20%, and improved performance by 5%.


Replies

simonwtoday at 12:09 AM

I don't think it's care to categorize this as "a naive rewrite away from [Zig]" - Jarred has been immersed in this project for five years, got to benefit from everything he learned along the way and spent $165,000 of tokens on the most advanced coding LLM anyone has access to.

I expect if he'd spent $165,000 running Fable against the Zig version he could have got a 5% performance improvement, too.

show 3 replies
bielokyesterday at 10:40 PM

I would guess that people looking to use Zig understand that those are project concerns and not language concerns.

show 1 reply
throwaway27448yesterday at 11:13 PM

True, but rewrites often allow for this sort of benefit in themselves. It's possible rewriting it in zig would have yielded some of the same improvements.

show 2 replies
h14htoday at 12:43 AM

While it's easy to look at it that way on the surface, from reading the blog post, it sounds like a big part of it may just be the nature of Bun as a project.

frollogastontoday at 12:04 AM

I pay attention when someone makes a hard decision based on a hard-learned lesson. It's like, most who choose to use an ORM just heard of it or want to avoid learning SQL, everyone who removes an ORM learned firsthand horrors.

lifthrasiiryesterday at 11:16 PM

The same concern applies to every GC language, so it's not necessarily bad for Zig. Bun can have been grown too large for Zig to be effective, while moderately sized projects may still greatly benefit from Zig.

show 1 reply
geonyesterday at 11:17 PM

Wouldn't the same improvements have been made in zig if they instructed the agents to improve instead of rewrite?

show 2 replies
pyrolisticalyesterday at 11:08 PM

Yeah but they turned it into something unreadable. Call it a skill issue if you wish.

I just haven’t found another language that just makes sense. Zig doesn’t hide anything from you

show 3 replies
linzhangruntoday at 1:13 AM

zig has been developing too slowly. it still cannot reach a stable 1.0 (to the point that even vsc autocomplete gets its Hello World wrong), and then it ran headfirst into AI.

rq1yesterday at 11:13 PM

From a PL Theory perspective, Zig is vibe-coded.

Not sure why people use it.

bencedtoday at 1:20 AM

The scary thing is the zig project prohibits LLM contributions - the world is going to move faster than them.

show 1 reply