Live data from Hacker News

Ladybird adopts Rust, with help from AI

ladybird.org

261–270 of 731 posts

Re: Ladybird adopts Rust, with help from AI

#261
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?

You mean the testing suite generated by AI?

Re: Ladybird adopts Rust, with help from AI

#262

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

Yeah, I lost all interest in the ladybird project now that it is AI slop.

No one wants to work with this generated, ugly, unidiomatic ball of Rust. Other than other people using AI. So you dependency AI grows and grows. It is a vicious trap.

Re: Ladybird adopts Rust, with help from AI

#263

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.

Why not go full functional programming at that point? If the main issue with FP has been accessibility, then it should really take off now.

Re: Ladybird adopts Rust, with help from AI

#264

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

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.

They’re not equal. Humans are capable of actually understanding and looking ahead at consequences of decisions made, whereas an LLM can’t. One is a review, one is mimicking the result of a hypothetical review without any of the actual reasoning. (And prompting itself in a loop is not real reasoning)

Re: Ladybird adopts Rust, with help from AI

#265
post #224

Earlier quoted context omitted.

I don't agree. For one thing, the language directly impacts things like iteration speed, runtime performance, and portability. For another, there's a trade-off between "verbose, eats context" and "implicit, hard to reason about". IMO Rust will strike a very strong balance here for LLMs.

Formal specifications and automated testing, will beat any language specific tooling. Hardly much different than dealing with traditional offshoring projects output.

What is a programming language used for if not the most formal specification possible? Of course it doesn't matter what language you use if you perfectly describe the behavior of the program. Of course, there's also no point in using LLMs (or outsourcing!) at that point.

Re: Ladybird adopts Rust, with help from AI

#266

Earlier quoted context omitted.

> Modern C++ pretty much solves the safety issues. I always wonder how can one come to such a conclusion. Modern C++ has no way to enforce relationship between two objects in memory and the shared xor mutable rule, which means it can't even do the basic checks that are the foundation of Rust's safety features. Of course, this statement is also trivially debunked by the reality of any major C++ program with complexity…

FWIW Chrome includes third party libraries like freetype and lots of bugs are in javascript. I imagine defensive checks in javascript will be controversial since performance of javascript is controlled by webdev, not by browser.

Note that Chrome is replacing[1] FreeType with Skrifa[2], which is a Rust-based library that can handle a lot of the things FreeType is being used for in Chrome. A lot of Chrome's dependencies are being rewritten in Rust.

[1]: https://developer.chrome.com/blog/memory-safety-fonts

[2]: https://github.com/googlefonts/fontations/tree/main/skrifa

Re: Ladybird adopts Rust, with help from AI

#267
post #95

Earlier quoted context omitted.

> 10/10 - would generate tens of thousands of lines of useless code again. Me too! A couple days ago I gave claude the JMAP spec and asked it to write a JMAP based webmail client in rust from scratch. And it did! It burned a mountain of tokens, and its got more than a few bugs. But now I've got my very own email client, powered by the stalwart email server. The rust code compiles into a 2mb wasm bundle that does ever…

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

Haha glad to see someone else did something like this. A couple weeks ago I asked Claude to recommend a service that would allow me to easily view a local .xml file as an RSS feed. It instead built a .html RSS viewer.

Re: Ladybird adopts Rust, with help from AI

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

Re: Ladybird adopts Rust, with help from AI

#269
post #215
post #68

Earlier quoted context omitted.

> Coding assistants are also really great at porting from one language to the other I had a broken, one-off Perl script, a relic from the days when everyone thought Drupal was the future (long time ago). It was originally designed to migrate a site from an unmaintained internal CMS to Drupal. The CMS was ancient and it only ran in a VM for "look what we built a million years ago" purposes (I even had written permissi…

> a relic from the days when everyone thought Drupal was the future (long time ago). Drupal is the future. I never really used it properly, but if you fully buy into Drupal, it can do most everything without programming, and you can write plugins (extensions? whatever they're called...) to do the few things that do need programming. > The Epilogue: That site has since been ported to WordPress, then ProcessWire, then…

I'm not sure if you're serious or not, but while I never liked Drupal (even used to hate it once upon a time), I always liked the pragmatism surrounding it, reaching to the point of saving php code into the mysql database and executing from there.

Re: Ladybird adopts Rust, with help from AI

#270
post #263

Earlier quoted context omitted.

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.

Why not go full functional programming at that point? If the main issue with FP has been accessibility, then it should really take off now.

When you do fully value-oriented programming in Rust (i.e. no interior mutability involved) that's essentially functional programming. There's mutable, ephemeral data involved, but it's always confined to a single well-defined context and never escapes from it. You can even have most of your code base be sans-IO, which is the exact same pattern you'd use in Haskell.
Post reply on HN