logoalt Hacker News

Jarredyesterday at 7:47 PM10 repliesview on HN

cargo check reported over 16,000 compiler errors when I wrote that message. It could not print a version number or run JavaScript. I didn’t expect it to work this quickly and I also didn’t expect the performance to be as competitive. There’ll be a blog post with more details.


Replies

gobdovanyesterday at 9:39 PM

If this experiment ends up resulting in a real migration path, I think that would be completely awesome. Maybe it means we have a chance to revive older projects such as ngspice [0], but with modern affordances and better safety properties.

From your post, though, it sounds like Bun may have been a pretty direct rewrite, without too many hard choices along the way. Is that fair?

[0] https://ngspice.sourceforge.io/

show 3 replies
folderquestiontoday at 9:05 AM

Just an aside, is there any way to know how many of those 16,000 compiler errors are independent. I mean, could it be that just by changing say 500 lines of code all those errors disappear?

Perhaps 16,000 could just measure cascade breakage, for example one lifetime mismatch can cause errors in every function that tries to use that reference.

Rust reference lifetime bookkeeping is a difficult task for LLMs. The LLM has to maintain, across multiple functions and structs, which references outlive which. Furthermore compiler messages are highly contextual and lifetime patterns are sparse in the training set.

ingloryesterday at 8:05 PM

Rust is really fun to work with and the compiler is great, just make sure the rewrite takes compile times into account since larger projects often have to be organized in a way that makes compilation reasonably fast.

show 3 replies
cpetersotoday at 1:28 AM

What coding model are you using for the rewrite? Opus for everything? A prerelease model like Mythos?

Aeoluntoday at 12:51 AM

This does not surprise me in the least. Several Claudes are very good at splitting up and working through them all.

nhatcheryesterday at 8:59 PM

That's a post I am eagerly waiting to read.

Basically we are seeing now an "inverse Hofstadter's Law" where doing something with an LLM takes less time thanexpected even when you take into account this law.

I am a Rust developper myself but I really love Zig and Bun. I am just overly curious of all this.

show 1 reply
sysguestyesterday at 7:57 PM

> I am so tired of worrying about & spending lots of time fixing memory leaks and crashes and stability issues. it would be so nice if the language provided more powerful tools for preventing these things.

haven't used zig...(only used rust)

but zig doesn't solve those problems?

show 5 replies
lelanthranyesterday at 8:11 PM

Peter Naur: Programming as Theory Building

Bun: Hold my beer

Eufratyesterday at 10:14 PM

I think given the current mood of things, it would be prudent to not make such strong assertions on anything. Trust is in increasingly short supply these days.

show 1 reply