Live data from Hacker News

Ladybird adopts Rust, with help from AI

ladybird.org

291–300 of 731 posts

Re: Ladybird adopts Rust, with help from AI

#291
post #224

Earlier quoted context omitted.

I don't agree. For one thing, the language directly impacts things like iteration speed, runtime performance, and portability. For another, there's a trade-off between "verbose, eats context" and "implicit, hard to reason about". IMO Rust will strike a very strong balance here for LLMs.

Formal specifications and automated testing, will beat any language specific tooling. Hardly much different than dealing with traditional offshoring projects output.

> Formal specifications and automated testing, will beat any language specific tooling.

I don't understand what you mean. Beat any language at what? Correctness? I don't think that's true at all, but I also don't see how that's relevant, it definitely doesn't address the fact that Rust will virtually always produce faster code than the majority of other languages.

> Hardly much different than dealing with traditional offshoring projects output.

I don't know what you mean here either.

Re: Ladybird adopts Rust, with help from AI

#292

I'm a long-time Rust fan and have no idea how to respond. I think I need a lot more info about this migration, especially since Ladybird devs have been very vocal about being "anti-rust" (I guess more anti-hype, where Rust was the hype). I don't know if it's a good fit. Not because they're writing a browser engine in Rust (good), but because Ladybird praises CPP/Swift currently and have no idea what the contributor's…

I am somewhat concerned about the volatility. All three languages have their merits and each has a stable foundation that has been developed and established over many years. The fact that the programming language has been “changed” within a short period of time, or rather that the direction has been altered, does not inspire confidence in the overall continuity of Ladybird's design decisions.

> I am somewhat concerned about the volatility.

Not just volatility but also flip-flopping. Rust was explicitly a contender when they decided to go with Swift 18 months ago, and they've already done a 180 on it despite the language being more or less the same as it was.

Re: Ladybird adopts Rust, with help from AI

#293
post #34
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 am learning rust myself and one of the things I definetly didn't want to do was let Claude write all the code. But I needed guidance. I decided to create a Claude skill called "teach". When I enable it, Claude never writes any code. It just gives me hints - progressively more detailed if I am stuck. Then it reviews what I write. I am finding it very satisfying to work this way - Rust in particular is a language whe…

FYI: Claude has output styles, one of them is called `learning`. Instead of writing the code itself, it will add `TODO(human)` and comments to explain how to. Also adds `Insights` explaining concepts to you in its output.

This link also has a comparison to Skills further down.

https://code.claude.com/docs/en/output-styles#built-in-outpu...

Re: Ladybird adopts Rust, with help from AI

#294

Earlier quoted context omitted.

I am somewhat concerned about the volatility. All three languages have their merits and each has a stable foundation that has been developed and established over many years. The fact that the programming language has been “changed” within a short period of time, or rather that the direction has been altered, does not inspire confidence in the overall continuity of Ladybird's design decisions.

> I am somewhat concerned about the volatility. Not just volatility but also flip-flopping. Rust was explicitly a contender when they decided to go with Swift 18 months ago, and they've already done a 180 on it despite the language being more or less the same as it was.

It's not that they are loving Rust, but they realized going all-in on Swift means becoming sharecroppers on massa Tim Apple's plantation.

Re: Ladybird adopts Rust, with help from AI

#295

Earlier quoted context omitted.

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.

Doesn’t sound like a bad thing to evaluate the most obvious alternative to build confidence before officially pulling the plug.

The most obvious alternative would be Zig. I don't see any Swift adoption outside the Apple ecosystem.

Re: Ladybird adopts Rust, with help from AI

#296
post #230

I hope that this opens the door for collaboration between Ladybird and Servo, no need to reinvent the wheel for core components.

I thought the entire point of Ladybird was precisely to reinvent the wheel?

This is also the case for Servo, so it makes sense to collaborate.

Re: Ladybird adopts Rust, with help from AI

#297
post #224

Earlier quoted context omitted.

Formal specifications and automated testing, will beat any language specific tooling. Hardly much different than dealing with traditional offshoring projects output.

> Formal specifications and automated testing, will beat any language specific tooling. I don't understand what you mean. Beat any language at what? Correctness? I don't think that's true at all, but I also don't see how that's relevant, it definitely doesn't address the fact that Rust will virtually always produce faster code than the majority of other languages. > Hardly much different than dealing with traditional…

Any tool that can plug into MLIR and use LLVM, can potentically produce fast code.

Also there is the alternative path to execute code via agents workestration, just like low code tooling work.

I see you never had the fortune to review code provided by cheap offshoring teams.

Re: Ladybird adopts Rust, with help from AI

#298

From their post on Twitter in 2024 when they adopted Swift, with a comment on Rust. My general thoughts on Rust: - Excellent for short-lived programs that transform input A to output B - Clunky for long-lived programs that maintain large complex object graphs - Really impressive ecosystem - Toxic community https://xcancel.com/awesomekling/status/1822241531501162806

Mayhaps he had a Damascene conversion? Not that I ever understood the need to change from C++ in the first place though.

Re: Ladybird adopts Rust, with help from AI

#299

> 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.

> 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™

Re: Ladybird adopts Rust, with help from AI

#300
The byte-for-byte identical output requirement is the smartest part of this whole thing. You basically get to run the old and new pipelines side by side and diff them, which means any bug in the translation is immediately caught. Way too many rewrites fail because people try to "improve" things during the port and end up chasing phantom bugs that might be in the old code, the new code, or just behavioral differences.

Also worth noting that "translated from C++" Rust is totally fine as a starting point. You can incrementally make it more idiomatic later once the C++ side is retired. The Rust compiler will still catch whole classes of memory bugs even if the code reads a bit weird. That's the whole point.

Post reply on HN