Live data from Hacker News

Ladybird adopts Rust, with help from AI

ladybird.org

421–430 of 731 posts

Re: Ladybird adopts Rust, with help from AI

#421

Earlier quoted context omitted.

Why would 200 contributors have to be okay with this migration? The project has a leader, the leader makes decisions.

because let's say 150 contributors might not be okay with the decision and leave. hard to lead from the front if there is nobody behind to be lead.

To be fair, any of them who didn't leave in the last few controversies probably won't leave over this.

Re: Ladybird adopts Rust, with help from AI

#422

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

Somehow they did use this as part of their approach to get to 0 regressions across 65k tests + no performance regressions though + identical output for AST and bytecode though. How much manual review was part of the hundreds of rounds of prompt steering is not stated, but I don't think it's possible to say it couldn't find any deep logical errors along the way and still achieve those results.

The part that concerns me is whether this part will actually come in time or not:

> 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 there’s a lot that can be simplified once we’re comfortable retiring the C++ pipeline. That cleanup will come in time.

Of course, it wouldn't be the first time Andreas delivered more than I expected :).

Re: Ladybird adopts Rust, with help from AI

#423

Earlier quoted context omitted.

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…

Of course there are tools focusing on this. It takes a little getting used to how prevalent it is. My editor now can anticipate the next three lines of code I intend to write complete with what values I want to feed to the function I was about to invoke. It all shows up in an autocomplete annotation for me. I just type the first two or three characters and press tab to get everything exactly how I was about to type i…

I think this could be a decent interface with one addition, a way to comment on the completion being suggested. You could ask it for a different completion or to extend the completion, do something different, do a specific thing, whatever. An active way to "explain my intent" with the AI (besides leaving comments hinting at what you want) in addition to the passive completion system.

Re: Ladybird adopts Rust, with help from AI

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

This is the way. This exact workflow is my sweet spot. In my coding agent std::slop I've optimized for this workflow https://github.com/hsaliak/std_slop/blob/main/docs/mail_mode... basically the idea is that you are the 'maintainer' and you get bisect safe, git patches that you review (or ask a code reviewer skill or another agent to review). Any change re-rolls the whole stack. Git already supports such a flow and I…

your patch queue approach is very clever. Solves a huge tech debt poblem with llm code gen. Should work with jujitsu too probably.

Would be curious to see more about how you save tokens with lua too.

Do you blog?

Re: Ladybird adopts Rust, with help from AI

#425

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.

> Soon it will do everything better and faster than me

There is no evidence of that coming from this post. The work was highly directly by an extremely skilled engineer. As he points out, it was small chunks. What chunks and in what order were his decision.

Is AI re-writing those chunks much faster than he could. Yes. Very much so. Is it doing it better? Probably not. So, it is mostly just faster when you are very specific about what it should do. In other words, it is not a competitor. It is a tool.

And the entire thing was constrained by a massive test suite. AI did not write that. It does not even understand why those tests are the way they are.

This is a long way from "AI, write me a JavaScript engine".

Re: Ladybird adopts Rust, with help from AI

#426
post #252

Earlier quoted context omitted.

They were doing their own custom language before Swift.

didn't know > The browser and libraries are all written in C++. (While our own memory-safe Jakt language is in heavy development, it’s not yet ready for use in Ladybird.) https://awesomekling.github.io/Ladybird-a-new-cross-platform... only thing I could find - has it been actually used in Ladybird after all?

No, they never completed or adopted their own language. It was back in the SerenityOS days, before the browser forked into its own project.

https://github.com/SerenityOS/jakt

Re: Ladybird adopts Rust, with help from AI

#427
post #356
post #330

Earlier quoted context omitted.

it's very odd that someone with no experience would take a big project like this and just jump to another language because he trusts the AI generated code of current models if it works it works i guess, but it seems mad to me on the surface

Why do you think the creator behind SerenityOS has no experience? I mean it’s not the most popular OS out there but he seems like a capable individual.

in case it's not glaringly obvious from the comment, he has plenty of cpp experience and little rust experience, and that's according to his own comments

the relevant bit here is that he's porting from a language in which he has plenty of experience into another one in which he doesn't, in a large project

that in itself sounds like putting a lot of faith in LLMs but maybe there are factors not mentioned here, which is why i said "on the surface"

Re: Ladybird adopts Rust, with help from AI

#428
post #355

Earlier quoted context omitted.

It's honest. If we can serialize our ideas to any language for durability, Rust is the way to go. It's not the best tool for the job for a lot of things, but if the LLMs make writing it as fast as anything else - whelp, I can't see any reason not to do it in Rust. If you get any language outputs "for free", Rust is the way to go. I've been using Claude to go ridiculously fast in Rust recently. In the pre-LLM years I…

> It's honest. It's not, nor is it well informed. People are currently developing languages specifically for use by LLMs. > It's not the best tool for the job for a lot of things Then how could it possibly be the final language? > if the LLMs make writing it as fast as anything else - whelp, I can't see any reason not to do it in Rust This has nothing to do with the claim that it's the final language.

[flagged]

Re: Ladybird adopts Rust, with help from AI

#429

Earlier quoted context omitted.

> I guess more anti-hype, where Rust was the hype Yeah that is the thing I struggle with. I am really happy for people falling in love with Rust. It is a amazing language when used for the right use case. The problem is that had my Rust adventures a few years ago and I am over the hype cycle and able to see both the advantages and disadvantages. Plus being generally older and hopefully wiser I don't tie my identity t…

I'm contemplating diving into Rust for a smallish project, a daemon with super-basic UI intended for Linux, MacOS and Windows. Do you mind expanding on what disadvantages you encountered? Or use-cases that aren't appropriate for Rust?

It's all the stuff that people always mention; they are not wrong. You spend a decent amount of time... conversing with the compiler about lifetimes and, in my experience, even more so about the type system, which is _extremely_ complicated. But you also have to keep in mind that Rust got very popular, very fast, and the tail end of something like that is always a negative reaction. The language is the same, despite the hype roller coaster.

Re: Ladybird adopts Rust, with help from AI

#430

Earlier quoted context omitted.

> It burned through a mountain of tokens, but 10/10 - would generate tens of thousands of lines of useless code again. This is the biggest bottleneck at this point. I'm looking forward to RAM production increasing, and getting to a point where every high-end PC (workstation & gaming) has a dedicated NPU next to the GPU. You'll be able to do this kind of stuff as much as you want, using any local model you want. Run a…

Wasting electricity to "generate tens of thousands of lines of useless code" at will? Why is that in any way a desirable future?

The climate change alarms have been sounding for decades and yet vehicles keep getting bigger. Even in formerly "doing it right" countries like Japan. Turns out humans will always choose vanity and status symbols over facts. Oh well
Post reply on HN