Live data from Hacker News

Ladybird adopts Rust, with help from AI

ladybird.org

111–120 of 731 posts

Re: Ladybird adopts Rust, with help from AI

#112

> We previously explored Swift, but the C++ interop never quite got there, and platform support outside the Apple ecosystem was limited. Why was there ever any expectation for Swift having good platform support outside Apple? This should have been (and was to me) already obvious when they originally announced moving to Swift.

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.

Re: Ladybird adopts Rust, with help from AI

#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

Re: Ladybird adopts Rust, with help from AI

#115

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.

> Go is a better Rust. Rust is an ugly version of C++ with longer compile times and a band of zealous missionaries.

Eh. There's a lot I like about Go. I adore its compilation speed and the focus on language simplicity. But its got plenty of drawbacks too. Default nullability is a huge mistake. And result types (zig, swift, rust) are way better than go's error handling. Sum types in general are missing from Go, and once you start using them its so hard to go back. Go also doesn't have anywhere near as good interop with native code. Mixing C (or any other LLVM langauge) with rust is easy and feels great. You even get LTO across the language barrier.

The big thing I'm growing to dislike about rust is how many transitive dependencies a lot of projects end up pulling in. Its very easy to end up with projects that take a million years to compile & produce huge binaries. Not because they do a lot but simply because everything depends on everything, and the dependency tree takes a long time to bottom out. I don't know what the right answer is. It feels more like a cultural problem than a language / ecosystem problem. But I wish rust projects felt as lightweight and small as most C projects I've worked with. I'm doing some work with the stalwart email server at the moment (written in rust). Stalwart is a relatively new, well written email server. But it somehow pulls in 893 transitive dependencies! I'm not even joking. Compiling stalwart takes about 20 minutes, and the compilation process generates several gigabytes of intermediate build assets. What a mess.

Re: Ladybird adopts Rust, with help from AI

#116
post #33
post #26

i rememebr seeing interviews saying rust is not suited for this project because of recursion and dom tree. how they tested multiple languages and settled on swift. then they abandon swift and now they shift towards rust. this entire project starts to look like "how am i feeling today?" rather than a serious project.

So Swift didn't turned out like they imagined and Rust is just the next best alternative to that failed vision using Swift. So far this is the first and only shift

They were doing their own custom language before Swift.

Re: Ladybird adopts Rust, with help from AI

#117

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.

> Modern C++ pretty much solves the safety issues

The data says otherwise, three overflows and two UAFs this month in Chrome alone: https://www.cvedetails.com/vulnerability-list/vendor_id-1224...

Re: Ladybird adopts Rust, with help from AI

#118
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 had a script in another language. It was node, took up >200MB of RAM that I wanted back. "claude, rewrite this in rust". 192MB of memory returned to me.

Re: Ladybird adopts Rust, with help from AI

#119
post #95
post #68

Earlier quoted context omitted.

> Coding assistants are also really great at porting from one language to the other I had a broken, one-off Perl script, a relic from the days when everyone thought Drupal was the future (long time ago). It was originally designed to migrate a site from an unmaintained internal CMS to Drupal. The CMS was ancient and it only ran in a VM for "look what we built a million years ago" purposes (I even had written permissi…

> 10/10 - would generate tens of thousands of lines of useless code again. Me too! A couple days ago I gave claude the JMAP spec and asked it to write a JMAP based webmail client in rust from scratch. And it did! It burned a mountain of tokens, and its got more than a few bugs. But now I've got my very own email client, powered by the stalwart email server. The rust code compiles into a 2mb wasm bundle that does ever…

Please post this. I'd love to play with it and, especially, see how fast it is.

Re: Ladybird adopts Rust, with help from AI

#120
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

And? Does it work? Because it does. It's a lot closer to C++ and you literally need like a week to start being productive and it's insanely flexible as a language. Nobody uses Swift also, but the additional problem with Swift was that it's entirely Apple-centric.
Post reply on HN