Live data from Hacker News

Ladybird adopts Rust, with help from AI

ladybird.org

651–660 of 731 posts

Re: Ladybird adopts Rust, with help from AI

#651
Translating software that has a lot of tests is easy for LLMs. I think we'll be seeing a lot more of that in the next years. But it will take some time for people to build up more trust in these tools. Good test harnesses are a key enabler.

The inevitable cleanup that will follow this could be done the same way. Refactoring like that can be done in more bite sized chunks, which makes it easier to review what is happening and control how it is done.

Re: Ladybird adopts Rust, with help from AI

#652

Earlier quoted context omitted.

Look, it's an RSS reader, not a numeric solver for PDEs. What I clearly meant was: Every interaction is instant, no noticable delay at all, except the reader view, which makes a network request to an external site.

Hey, sorry, I just have to defuse assumptions people make when they see Rust, LLMs, and "as fast as can be" in short proximity. Your project is obviously cool, and I don't think the fact that it's likely still multiples more resource intensive than an absolutely minimal version takes away from that.

[deleted]

Re: Ladybird adopts Rust, with help from AI

#653
post #71

A lot of the previous calculus around refactoring and "rewrite the whole thing in a new language" is out the window now that AI is ubiquitous. Especially in situations where there is an extensive test suite. Testing has become 10x as important as ever.

Well, I am on the provocative side that as AI tooling matures current programming languages will slowly become irrelevant. I am already using low code tooling with agents for some projects, in iPaaS products.

There is the notion that a lot of programming language preferences are based on the notion of people using them. As soon as it's LLMs using them, a lot of what motivates their choices becomes less valid.

I've been doing a few projects that are definitely outside my comfort zone with LLMs and its fine. I can read the code but I just don't have the muscle memory to produce it.

Re: Ladybird adopts Rust, with help from AI

#654

> If you look at the code, you’ll notice it has a strong “translated from C++” vibe. That’s because it is translated from C++. The top priority for this first pass is compatibility with our C++ pipeline. The Rust code intentionally mimics things like the C++ register allocation patterns so that the two compilers produce identical bytecode. Correctness is a close second. We know the result isn’t idiomatic Rust, and th…

I think this largely depends on how much unsafe Rust they produced.

Re: Ladybird adopts Rust, with help from AI

#655
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…

A mitigating factor in this case is the C++ and Rust are both multi-paradigm languages. You can quite reasonably represent most C++ patterns in Rust, even if it might not be quite how you'd write Rust in the first place.

I disagree. You can't even create simple C++ inheritance examples because you don't have data inheritance. So basically classical OOP is out of the window.

That's the biggest difference to C++ and most mainstream languages, you simply can't do OOP (which in my books is a good thing) and it forces you more towards traits and composition.

Re: Ladybird adopts Rust, with help from AI

#656

Earlier quoted context omitted.

Fair point. What does Ladybird need to achieve in your opinion to shake the "hype" label? Honestly, I, myself, don't have a good answer!

To me, a project's "hype-ness" is the ratio of how much attention it gets over how useful it actually is to users. As a browser, Ladybird usefulness is currently quite limited for obvious reasons. This is not meant to dismiss its achievements, nor to overlook the fact that building a truly useful browser for everyday users is something few open source teams can accomplish without the backing of a billion dollar compa…

> As a browser, Ladybird usefulness is currently quite limited for obvious reasons

By this definition all basic research is hype.

Re: Ladybird adopts Rust, with help from AI

#657

Earlier quoted context omitted.

> Way too many rewrites fail because people try to "improve" things during the port I'd say that porting is a great time to "improve" many things, but like you suggest, not a great time to add new features. You can do a lot of improvements while maintaining output parity. You're in the weeds, reading the code, thinking about the routines, and you have all the hindsight of having done it already. Features are great to…

LLMs are great at producing documentation - ask one "hey can you add a TODO comment about the thing on line 847 that is probably not the best way to do this?" while you're working on the port, and it will craft a reasonably-legible comment about that thing without further thought from you, that will make things easier for the person (possibly future-you) looking at the codebase for improvements to make. Meanwhile, yo…

If I’m writing that anyway, to tell the LLM, why wouldn’t I just write the comment myself?

Re: Ladybird adopts Rust, with help from AI

#658

Earlier quoted context omitted.

To me, a project's "hype-ness" is the ratio of how much attention it gets over how useful it actually is to users. As a browser, Ladybird usefulness is currently quite limited for obvious reasons. This is not meant to dismiss its achievements, nor to overlook the fact that building a truly useful browser for everyday users is something few open source teams can accomplish without the backing of a billion dollar compa…

> As a browser, Ladybird usefulness is currently quite limited for obvious reasons By this definition all basic research is hype.

No, not necessarily. It's the ratio and for most basic research the numerator of the fraction is also approaching zero.

Re: Ladybird adopts Rust, with help from AI

#659

Earlier quoted context omitted.

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

Servo has a distinct design goal that sets it apart from its predecessor within Mozilla and has already had offsprings that has made its way directly into Firefox. Its purpose is not to reinvent everything. It’s not a hype project.

Servo's original purpose was to reinvent everything for Firefox to modernize the codebase, and make it secure and more performant (e.g. CSS styling engine, HTML parser, etc.) So it actually fits that purpose pretty well.

Re: Ladybird adopts Rust, with help from AI

#660

Earlier quoted context omitted.

LLMs are great at producing documentation - ask one "hey can you add a TODO comment about the thing on line 847 that is probably not the best way to do this?" while you're working on the port, and it will craft a reasonably-legible comment about that thing without further thought from you, that will make things easier for the person (possibly future-you) looking at the codebase for improvements to make. Meanwhile, yo…

If I’m writing that anyway, to tell the LLM, why wouldn’t I just write the comment myself?

I guess to have the LLM write a lengthy descrption of why the code is bad? Otherwise it doesn't make sense to ask an LLM instead of typing // TODO: bad coding style.
Post reply on HN