Live data from Hacker News

Ladybird adopts Rust, with help from AI

ladybird.org

251–260 of 731 posts

Re: Ladybird adopts Rust, with help from AI

#252
post #33

Earlier quoted context omitted.

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.

didn't know

> The browser and libraries are all written in C++. (While our own memory-safe Jakt language is in heavy development, it’s not yet ready for use in Ladybird.)

https://awesomekling.github.io/Ladybird-a-new-cross-platform...

only thing I could find - has it been actually used in Ladybird after all?

Re: Ladybird adopts Rust, with help from AI

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

This is like the "real world" argument. Nobody uses that "in the real world", except well people that do.

Re: Ladybird adopts Rust, with help from AI

#254

Earlier quoted context omitted.

Of course there are tools focusing on this. It takes a little getting used to how prevalent it is. My editor now can anticipate the next three lines of code I intend to write complete with what values I want to feed to the function I was about to invoke. It all shows up in an autocomplete annotation for me. I just type the first two or three characters and press tab to get everything exactly how I was about to type i…

To be honest, I'm not quite sure what the ideal UX looks like yet. The AI assisted autocomplete is too little, but the idea of saying "Build X for purpose Y" is too high-level. Maintaining Markdown documents that the AI implements, also feels too high-level, but letting the human fully drive the implementation probably again too low-level. I'm guessing the direction I'd prefer, would be tooling built to accept and be…

The Markdown documents can be at any level. Just keep asking the AI to break each individual step in the plan down into substeps, then ask it to implement after you review. It's great for the opposite flow too - reverse engineering from working legacy code into mid-level and high-level designs, then proposing good refactors.

Re: Ladybird adopts Rust, with help from AI

#255

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

Unfortunately licence incompatibility may prevent that. Ladybird is BSD and Servo is MPL. This is also why there is only limited collaboration between Servo and the Rust GUI ecosystem.

Re: Ladybird adopts Rust, with help from AI

#256
post #251

Porting the JS parser to Rust and adopting Rust in other parts of the engine while continuing to use C++ heavily is unlikely to make Ladybird meaningfully more secure. Attackers are surprisingly resilient to partial security.

[flagged]

No, just saying facts

Re: Ladybird adopts Rust, with help from AI

#257

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'd argue Ladybird itself is a "hype" project.

Anything trying to break the browser monopolies in a meaningful way deserves the hype, IMO.

Re: Ladybird adopts Rust, with help from AI

#258
If it is this easy, surely the trend is Rust output being an intermediate pass of the LLM super compiler. A security subset if you will (like other kinds of optimization), it will move from Rust specs to some deeper level of analysis and output the final executable. Some brave souls will read the intermediate Rust output (just like people used to read the assembler output from compilers) but the LLM super compiler will just translate a detailed English like spec into final executables.

Re: Ladybird adopts Rust, with help from AI

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

Solving the big RAM shortage one prompt at a time.

Re: Ladybird adopts Rust, with help from AI

#260
post #137
post #18

Earlier quoted context omitted.

This is the famous trap that Joel on Software talked about in a blog post long time ago. If you do a rewrite you essentially put everything else on halt while rewriting. If you keep doing feature dev on the old while another "tiger team" is doing the rewrite port then these two teams are essentially in a race against each other and the port will likely never catch up. (Depending on relative velocities) Maybe they thi…

Nearly 26 years ago! https://www.joelonsoftware.com/2000/04/06/things-you-should-... What's different today really is the LLMs and coding agents. The reason to never rewrite in another language is that it requires you to stop everything else for months or even years. Stopping for two weeks is a lot less likely to kill your project.

He's still right if you don't have good automated testing and you lost most of the original developers (or you don't have other seniors ceva familiar with the domain).
Post reply on HN