Live data from Hacker News

Ladybird adopts Rust, with help from AI

ladybird.org

271–280 of 731 posts

Re: Ladybird adopts Rust, with help from AI

#271
post #244

> After the initial translation, I ran multiple passes of adversarial review, asking different models to analyze the code for mistakes and bad patterns. I feel like you just know it’s doomed. What this is saying is “I didn’t want to and cannot review the code it generated” asking models to find mistakes never works for me. It’ll find obvious patterns, a tendency towards security mistakes, but not deep logical errors.

That is what the testing suite is there to check, no?

No. Testing generally can only falsify, not verify. It’s complementary to code review, not a substitute for it.

Re: Ladybird adopts Rust, with help from AI

#272
Completely ignoring the Rust aspect, I’m disappointed that two weeks were spent on something that isn’t getting Ladybird to a state where it can be used as a daily driver. Ladybird isn’t usable right now, and if it was usable, improving the memory safety would be a commendable goal. Right now I just feel like this is premature.

Re: Ladybird adopts Rust, with help from AI

#273
post #191

Earlier quoted context omitted.

I personally think that people might've framed it as use Ada/D over rust comment which might have the HN people who prefer rust to respond with downvotes. I agree that, this might be wrong behaviour and I don't think its any fault of rust itself which itself could be a blanket statement imo. There's nuance in both sides of discussions. Coming to the main point, I feel like the real reason could be that rust is this s…

> which might have the HN people who prefer rust to respond with downvotes. This completely misses the purpose of the downvoting feature, which is not surprising, since upvoting seems no longer to indicate quality or truth of the comment neither. > rust is this sort of equilibra that the world has reached for, especially security related projects Which is amazing, since Rust only covers a fraction of safety/security…

> This completely misses the purpose of the downvoting feature

"Downvote for disagree" has been canonicalized on HN since (nearly) the beginning, by pg himself, back when he used his real-name account to comment. :)

I agree that it has undesirable consequences, but it is fully established.

Re: Ladybird adopts Rust, with help from AI

#274
post #69

All the best to them, however this feels like yah shaving instead of focusing into delivering a browser than can become an alternative to Safari/Chrome duopoly.

Maybe it is my cynicism, but I always suspect such projects to be endless rabbit chasing. It is not about catching it.

Re: Ladybird adopts Rust, with help from AI

#275

Earlier quoted context omitted.

Same here. I had Claude write me a web based RSS feed reader in Rust. It has some minor glitches I still need to iron out, but it works great, is fast as can be, and is easy on the eyes. https://github.com/AdrianVollmer/FluxFeed

Rust is the final language. Defect free. Immaculate types. Safe. Ergonomic. Beautiful to read. AI is going to be writing a lot of Rust. The final arguments of "rust is hard to write" are going to quiet down. This makes it even more accessible.

[flagged]

Re: Ladybird adopts Rust, with help from AI

#276

Earlier quoted context omitted.

I still don’t buy this “safer more modern” mentality. Modern C++ pretty much solves the safety issues. People need to learn how to use tools properly. If you ask me, Go is a better Rust. Rust is an ugly version of C++ with longer compile times and a band of zealous missionaries. I mean the keywords mut and fn very annoying to read just get rid of them or spell the f*n thing function.

> Go is a better Rust. Rust is an ugly version of C++ with longer compile times and a band of zealous missionaries. Eh. There's a lot I like about Go. I adore its compilation speed and the focus on language simplicity. But its got plenty of drawbacks too. Default nullability is a huge mistake. And result types (zig, swift, rust) are way better than go's error handling. Sum types in general are missing from Go, and on…

> Sum types in general are missing from Go

Not quite. It doesn't have tagged unions, which is what I expect you are thinking of, but it does have sum types.

Re: Ladybird adopts Rust, with help from AI

#277

Earlier quoted context omitted.

Your argument is just as applicable on human code reviewers. Obviously having others review the code will catch issues you would never have thought of. This includes agents as well.

With humans though, I wouldn't have to review 20k lines of code at once.

So ask the AI to just translate one little chunk at a time, right?

Re: Ladybird adopts Rust, with help from AI

#278

> This is not becoming the main focus of the project. We will continue developing the engine in C++, and porting subsystems to Rust will be a sidetrack that runs for a long time. I don't like this bit. Wouldn't it be better to decide on a memory-safe language, and then commit to it by writing all new code in Rust, or whatever. This looks like doing double the work.

It doesn't have to all-or-nothing. Firefox has been a mixed C++ and Rust codebase for years now. It isn't like the code is written twice. The C++ components are written in C++, and the Rust components are written in Rust.

I suspect that'll also be what happens here. And if the use of Rust is successful, then over time more components may switch over to Rust. But each component will only ever be in one language at a time.

Re: Ladybird adopts Rust, with help from AI

#279

Looks like Andreas is a mighty fine engineer, but he's even better entrepreneur. Doesn't matter if intentional or not, but he managed to create and lead a rather visible passion project, attract many contributors and use that project's momentum to detach Ladybird into a separate endeavor with much more concrete financial prospects. The Jakt -> Swift -> Rust pivots look like the same thing on a different level. The in…

Eh, he's given an interview where he talks about the Swift decision. He and several maintainers tried building some features in Swift, Rust, and C++, spending about two weeks on each one IIRC. And all the maintainers liked the experience of Swift better. That might have ended up wrong, but it's a pretty reasonable way to make a decision.

Re: Ladybird adopts Rust, with help from AI

#280
post #70

I must admit to being somewhat confused by the article's claim that Rust and C++ emit bytecode. To my knowledge, neither do (unless they're both targeting WASM?) - is there something I'm missing or is the author just using the wrong words? EDIT: bramhaag pointed out the error of my ways. Thanks bramhaag!

By 'Rust compiler' and 'C++ compiler', they refer to the LibJS bytecode generator implemented in those languages. This is about the generated JS bytecode.

Thanks! I was confused about this as well.
Post reply on HN