Live data from Hacker News

Ladybird adopts Rust, with help from AI

ladybird.org

631–640 of 731 posts

Re: Ladybird adopts Rust, with help from AI

#631

Earlier quoted context omitted.

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?

I'm not OP but here's my disadvantages. Rust is the way I earn my living, and also my open source tool of choice. And my background is 25 years of SWE career: 1. build / compile times can be atrocious 2. crates.io inherits the npm philosophy, which means fairly unmoderated space of third party deps and because the Rust stdlib doesn't have a lot in it, extensive third party crate (lib) usage is strong in Rust. As a re…

First 2 are very legit, as a rust dev myself. I wish Rust had a larger stdlib and every argument against it leaves me pretty unconvinced/ feeling like the arguments could just as easily leave us to believe that "HashMap" should not be included (some people believe this), or even "time" should not be, etc.

The compile times are easily the worst part though. They couple poorly with (2).

I feel fine personally without (3), and (4)/(5) don't come up for me.

> For myself, for example... if it were my repository and my team and my hiring, and I was starting from scratch... I'd be extremely careful about third party crate adoption and have an extremely minimalistic approach there.

Same. I basically stick to a minimal `cargo-vet` and avoid new crates. I review new ones. I've chosen to take on a new crate when it's something like "the author literally wrote the spec for this format", but otherwise I'm reluctant.

Re: Ladybird adopts Rust, with help from AI

#632

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…

[flagged]

I've been writing rust for over a decade and I've been quite active in the community at times. I've barely even heard of the rust foundation, let alone seen suggestions to donate.

Re: Ladybird adopts Rust, with help from AI

#633

Earlier quoted context omitted.

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?

Thanks for your interest in this work - I do not blog(maybe I should?) but i have posted a bit more on X about this work. - A bit more on mail mode https://x.com/hsaliak/status/2020022329154420830 - on the Lua integration https://x.com/hsaliak/status/2022911468262350976 (I've since disabled the recursion, not every code file is long and it seems simpler to not do it), but the rest of it is still there - hotwords for…

I quit x so cant read beyond toplevel links. I subscribed to your tool on github, would appreciate blog-posts-in-release notes to keep up with future developments. Will try the tool. Rare to find something new among ai hype, thank you.

Re: Ladybird adopts Rust, with help from AI

#634

Lol this dude is incapable of finishing anything he starts. Always a million distractions. First he started an OS called Serenity, then abandoned that to start a programming language (Jank or something) then abandoned that to work on a web browser, now it's looking like he is looking for things to distract away from that... A shame really.

Serenity was literally a distraction for his substance addiction issues. It's pretty clear he's productive and he and his team have worked on Ladybird for several years straight now. How many web browsers or OSs have you developed from scratch?

Re: Ladybird adopts Rust, with help from AI

#635

Earlier quoted context omitted.

I actually like rust more than Haskell, but `You can even have most of your code base be sans-IO, which is the exact same pattern you'd use in Haskell.` glosses over the fact that in Haskell it's enforced at compile time.

Another argument as to why rust isn't the forever-language. My forever language should include effects! Even rust has need of this. For example, I want a nopanic effect I can put on a function which makes it a compile error for anything that function calls to panic.

Though I think it's the closest language right now, ideally you have something that is close to "zero-overhead" as your forever language.

I really like how flix.dev looks, but there's always a little nagging at the back of my head that something like rust will always produce more performant software.

Re: Ladybird adopts Rust, with help from AI

#636

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.

Yeah, main issue with Swift is that the c++ interop (which was absolutely bleeding-edge) still isn't to the point of being able to pull in parts of the Ladybird codebase.

If I recall correctly, part of this was around classes they had that replaced parts of the STL, whereas the Swift C++ interop makes assumptions about things with certain standard names.

Re: Ladybird adopts Rust, with help from AI

#638

Earlier quoted context omitted.

I’d also add: as a lover of forward progress, I really hope rust isn’t the last good idea programming language designers have. I love rust. But there are dozens of things I find a bit frustrating. Unfortunately I don’t think I’m clever & motivated enough to write a whole new language to try to improve it. But I really hope someone else is! For a taste: I wish we didn’t need lifetime annotations, somehow. I wish rust…

> For a taste: I wish we didn’t need lifetime annotations, somehow. I wish rust had first class support for self borrows, possibly via explicit syntax indicating that a variable is borrowed, and thus pinned. Unpin breaks my brain, and I wish there were ways to do pin projections without getting a PhD first. I wish for async streams. I wish async executors were in std, and didn’t take so long to compile. I could go on…

> I also think there are plenty of things we are unlikely to get to even in an edition, and that might never happen without a completely different language.

Yes, this is my feeling too. All programming languages - perhaps, all computer programs - must decide how malleable they should be. Fast moving systems are exciting, but they're very annoying to use, or build on top of. I think generally we want a very slow moving language for infrastructure software, like databases or the linux kernel. Slow moving languages are often good for users, because they don't need to learn new things or rewrite existing software. (I think thats one of the reasons python3 was so poorly received.)

It might be too late for large changes in rust. This a sign of maturity, but its also a little bit sad. I want all those features you mention too.

Some day. Maybe LLMs will help somehow. Rust is, thankfully, not the last programming language humans will invent.

Re: Ladybird adopts Rust, with help from AI

#639
post #388

Earlier quoted context omitted.

I hope, with the velocity unlocked by these tools, that more pure ports will become the norm. Before, migrations could be so costly that “improving” things “while I’m here” helped sell doing the migration at all, especially in business settings. Only to lead to more toil chasing those phantom bugs.

One of the biggest point of rewriting is you know better by then so you create something better. This is a HUUUGE reason code written in rust tended to be so much better than the original (which was probably written in c++). Human expertise is the single most important factor and is more important than language. Copy pasting from one language to another is way worse than complete rewrite with actual idiomatic and use…

I rewrote two times my personal tool, one to rust, and out of rust with LLM, I mainly "vibe code" for reasons but the tool is more complete and less buggy than most B2B and enterprise business or IT software that I have seen in 20years at different fortune 100.

I feel the effort and frustration to have parity with LLM is more than doing a full rewrite without.

Re: Ladybird adopts Rust, with help from AI

#640

Earlier quoted context omitted.

Yeah, I’m sure my Claude generated email client could be even faster if I wrote it by hand. Modern computers can retire billions of instructions per second per core. All operations that aren’t downloading or processing gigabytes of data should be instant on modern computers. Claude’s toy email client gets closer to the speed limit than Gmail does. Why is Gmail so slow? I have no idea.

I find the sweet spot is to take LLM generated code, then profile manually and heavily supervise or hand implement specific improvements.

You can also let the agent use a profiling tool. It probably cannot beat you, but does find and improve a lot of things for sure.
Post reply on HN