Live data from Hacker News

Ladybird adopts Rust, with help from AI

ladybird.org

311–320 of 731 posts

Re: Ladybird adopts Rust, with help from AI

#311
post #113

This will be another bad decision just like with Swift. From what I heard, Rust is notoriously bad at letting people define their own structure and instead beats you up until you satisfy the borrow checker. I think it'll make development slow and unpleasant. There are people out there who enjoy that, but it's not a fit for when you need to deliver a really huge codebase in reasonable time. I remember Andreas mentioni…

Nobody uses D

Well, I do!?!! It's even faster than zoomer langs like Odin. You should try it.

Re: Ladybird adopts Rust, with help from AI

#312

Earlier quoted context omitted.

They abandoned Swift recently.

The public announcement was less then a week ago. Meanwhile in TFA: > ... the entire port took about two weeks. So he was ~halfway in when he made the Swift announcement.

Swift adoption had been dead long before the actual announcement. It's likely Rust was being considered long before this two week experiment with LLMs.

Re: Ladybird adopts Rust, with help from AI

#315

Earlier quoted context omitted.

I’ve been part of at least 2 successful rewrites. I think that Joel’s post is too often taken as gospel. Sometimes a rewrite is the best way forward. Moving Ladybird from C++ to a safer more modern language is a real differentiator vs other browsers, and will probably pay dividends. Doing it now is better than doing it once ladybird is fully established. One last point about rewrites: you can look at any industry dis…

I still don’t buy this “safer more modern” mentality. Modern C++ pretty much solves the safety issues. People need to learn how to use tools properly. If you ask me, Go is a better Rust. Rust is an ugly version of C++ with longer compile times and a band of zealous missionaries. I mean the keywords mut and fn very annoying to read just get rid of them or spell the f*n thing function.

If C++ died for services under Unix and medium sized indie games (such as I2PD, or Cataclysm DDA and its forks) and these where rewritten in Go the maintenance would be far greater in these projects. A GC, a much better cross compatibility and your code for sure could probably be compiled in 10 years.

Also CDDA:Bn wouldn't damn need a > 40h long build using 1.5 GB of RAM under an n270 netbook. Ditto with Nchat, FFS, which is worse. A Golang counterpart for nchat as a TG client (and tdlib rewritten in Go) would weight far less while compiling and maybe even the binary itself, and performance wise it would be similar.

I still remember tons of C++ projects from 2005-2009 impossible to compile today but with GCC 4.3 or GCC 4.9, can't remember. Not because of the size, but because C++ incompatible changes over the years. At least tons of C code will compile it today as is modulo some POSIX changes from C code pre 1996. C++ it's something that should died long ago, among stuff like locales under Unix. UTF8 everywhere, use your own currency and the like.

Yeah, I know, game engines, and tons of physics engines and libraries even FLOSS ones such as OGRE, gdal and the like are C++ domain. Still, most of these could be ported to C.

Re: Ladybird adopts Rust, with help from AI

#317

Earlier quoted context omitted.

Apple’s own marketing speak has Swift as a cross platform language. Just like, I suppose, C# is a cross platform language. Apple puts zero resources into making that claim reality, however.

> Just like, I suppose, C# Have you actually used .NET on Linux/macOS? I have (both at home and work) and there isn't anything that made me think it was neglected on those platforms. Everything just works™

It didn't use to be that way, for a very long time.

Re: Ladybird adopts Rust, with help from AI

#318
post #15

> I used Claude Code and Codex for the translation. This was human-directed, not autonomous code generation. I decided what to port, in what order, and what the Rust code should look like. It was hundreds of small prompts, steering the agents where things needed to go. After the initial translation, I ran multiple passes of adversarial review, asking different models to analyze the code for mistakes and bad patterns.…

I haven’t done a ton of porting. And when I did, it was more like a reimplementation.

> We’ve verified that every AST produced by the Rust parser is identical to the C++ one, and all bytecode generated by the Rust compiler is identical to the C++ compiler’s output.

Is this a conventional goal? It seems like quite an achievement.

Re: Ladybird adopts Rust, with help from AI

#320
I feel similar about the potential of this technique and have heard this from other C++ developers too.

Rust syntax is a PITA and investing a lot of effort in the language doesn’t seem worth the trouble for an experienced C++ developer, but with AI learning, porting and maintenance all become more accessible. It’s possible to integrate Rust in an existing codebase or write subparts of larger C++ projects in Rust where it makes sense.

I was recently involved in an AI porting effort, but using different languages and the results were fine. Validating and reviewing the code took longer than writing it.

Post reply on HN