Live data from Hacker News

Ladybird adopts Rust, with help from AI

ladybird.org

41–50 of 731 posts

Re: Ladybird adopts Rust, with help from AI

#41

Sigh agents keep killing all the passion I have for programming. It can do things way faster than me, and better than me in some cases. Soon it will do everything better and faster than me.

Is a migration from language X to Y or refactoring from pattern A to B really the kind of task that makes you look forward to your day when you wake up? Personally my sweet spot for LLM usage is for such tasks, and they can do a much better job unpacking the prompt and getting it done quickly. In fact, there's a few codebases at my workplace that are quite shit, and I'm looking forward to make my proposal to refactor…

Right. I had a 100% manual hobby project that did a load of parametric CAD in Python. The problem with sharing this was either actively running a server, trying to port the stack to emscripten including OCCT, or rewriting in JS, something I am only vaguely experienced in.

In ~5 hours of prompting, coding, testing, tweaking, the STL outputs are 1:1 (having the original is essential for this) and it runs entirely locally once the browser has loaded.

I don’t pretend that I’m a frontend developer now but it’s the sort of thing that would have taken me at least days, probably longer if I took the time to learn how each piece worked/fitted together.

Re: Ladybird adopts Rust, with help from AI

#42

Sigh agents keep killing all the passion I have for programming. It can do things way faster than me, and better than me in some cases. Soon it will do everything better and faster than me.

I'm not sure 25,000 lines translated in 2 weeks is "fast", for a naive translation between languages as similar as C++ and Rust (and Ladybird does modern RAII smart-pointer-y C++ which is VERY similar to Rust). You should easily be able to do 2000+ lines/day chunks.

Re: Ladybird adopts Rust, with help from AI

#43

> We previously explored Swift, but the C++ interop never quite got there But Rust doesn't have C++ interop at all?

>But Rust doesn't have C++ interop at all? It also doesn't have the disadvantages of Swift. Once the promise of Swift/C++ interop is gone there isn't enough left to recommend it.

I’m curious what issues people were running into with Swift’s built in C++ interop? I haven’t had the chance to use it myself, but it seemed reasonable to me at a surface level.

Re: Ladybird adopts Rust, with help from AI

#44
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.…

Agree, and it's also such a shame that none of the AI companies actually focus on that way of using AI. All of them are moving into the direction of "less human involved and agents do more", while what I really want is better tooling for me to work closer with AI and be better at reviewing/steering it, and be more involved. I don't want "Fire one prompt and get somewhat working code", I want a UX tailored for long se…

Is it any surprise that the cocaine cartels really want you to buy more cocaine, so they don't focus on its usefulness in pain relief and they refine it and cut it with the cheapest substances that will work rather than medical-grade reagents?

Same thing.

Re: Ladybird adopts Rust, with help from AI

#45
post #7

> We know the result isn’t idiomatic Rust, and there’s a lot that can be simplified once we’re comfortable retiring the C++ pipeline. That cleanup will come in time. Correct me if I’m wrong since I don’t know these two languages, but like some other languages, doing things the idiomatic way could be dramatically different. Is “cleanup” doing a lot of heavy lifting here? Could that also mean another complete rewrite f…

Exactly my thought! I guess I'll keep Firefox for the foreseeable future...

Re: Ladybird adopts Rust, with help from AI

#46
post #18
post #7

> We know the result isn’t idiomatic Rust, and there’s a lot that can be simplified once we’re comfortable retiring the C++ pipeline. That cleanup will come in time. Correct me if I’m wrong since I don’t know these two languages, but like some other languages, doing things the idiomatic way could be dramatically different. Is “cleanup” doing a lot of heavy lifting here? Could that also mean another complete rewrite f…

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…

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 disruptor as essentially a team that did a from-scratch rewrite of their competitors and won because the rewrite was better.

Re: Ladybird adopts Rust, with help from AI

#48
post #6

developers with good taste like Andreas Kling will be able to design entire OSes with coding agents

> design entire OSes with coding agents

They ported an existing project from CPP to Rust using AI because the porting would've been too tedious. I don't think they're planning on vibe coding PRs the way you're imagining.

Post reply on HN