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.
Ladybird adopts Rust, with help from AI
651–660 of 731 posts
Re: Ladybird adopts Rust, with help from AI
#652Earlier 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.
Re: Ladybird adopts Rust, with help from AI
#653A 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.
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…
Re: Ladybird adopts Rust, with help from AI
#655> 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.
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
#656Earlier 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…
By this definition all basic research is hype.
Re: Ladybird adopts Rust, with help from AI
#657Earlier 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…
Re: Ladybird adopts Rust, with help from AI
#658Earlier 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.
Re: Ladybird adopts Rust, with help from AI
#659Earlier 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.
Re: Ladybird adopts Rust, with help from AI
#660Earlier 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?