I'm a long-time Rust fan and have no idea how to respond. I think I need a lot more info about this migration, especially since Ladybird devs have been very vocal about being "anti-rust" (I guess more anti-hype, where Rust was the hype).

I don't know if it's a good fit. Not because they're writing a browser engine in Rust (good), but because Ladybird praises CPP/Swift currently and have no idea what the contributor's stance is.

At least contributing will be a lot nicer from my end, because my PR's to Ladybird have been bad due to having no CPP experience. I had no idea what I was doing.

> 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 towards any specific programming language that much.

So sometimes when some Junior dev discovers Rust and they get really obnoxious with their evangelicalism it can be very off putting. Really not sure how to solve it. It is good when people get excited about a language. It just can be very annoying for everyone else sometimes.

> So sometimes when some Junior dev discovers Rust and they get really obnoxious with their evangelicalism it can be very off putting. Really not sure how to solve it. It is good when people get excited about a language. It just can be very annoying for everyone else sometimes.

This rings very true, and I've actually disadvantaged myself somewhat here. I was involved in projects that made very dubious decisions to rewrite large systems in Rust. This caused me to actively stay away from the language, and stick to C++, investing lots of time in overcoming its shortcomings.

Now years later, I started with Rust in a new project. And I must say, I like the language, I really like the tools, and I like the ecosystem. On some dimension I wish I would have done this sooner (but on the other hand, I think I have a better justification of "why Rust" now).

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.

I find Rust's complexity freeing, in that there are often at least a few ways to express what I want, and I can choose the one I feel best fits the use-case and my desired ergonomics. (I also like that there are often ways to express exactly a very precise want, owing well to the Rust principle of "zero-cost abstractions.") However of course, that very same complexity can make it unclear which approach may best serve a given objective, and lead to false starts, wacky implementations, or even giving up entirely.

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 result most Rust projects have rather sprawling dependency trees, often with duplicated functionality (multiple Base64, rand, sha256, etc crates). I personally have a problem with this (auditability, accountability, security, complexity etc). Others don't.

3. Despite being nominally runtime agnostic, Rust async basically is tokio and it's almost impossible to use another runtime once you factor in third party deps. In many ways Rust is the language that tokio ate. In fact even if you opt out of async entirely, you often end up with tokio as a dependency simply because the community just seems to expect it.

4. Despite advertising itself as a "systems" language, some basic systems programming facilities I expect from my C++ background are still fundamentally not there. In particular, per-container/struct pluggable allocators still isn't a thing and the feature to add it (allocator-api) has sat unmerged in nightly for almost ten years at this point and it doesn't look good for it landing any time soon.

5. If you're working in the embedded space, there's still plenty of devices that will not have a workable Rust toolchain option yet.

I still choose it for new projects instead of its competitors C++ or Zig. But I think it's important to recognize there are compromises like any other tool.

As much as people might insist otherwise, there will in fact come a day when there are "multiple Rusts" by which I mean multiple styles and ways of doing things -- just like C++. 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. And I don't use tokio. Though my paying jobs do.

> often with duplicated functionality (multiple Base64, rand, sha256, etc crates)

I don’t think this is true unless they differ in major versions no? Cargo will apply semantic versioning and pick the best available given the cargo.toml version constraints.

I don't think they mean multiple versions of the same crate (although can certainly happen too), but rather multiple different crates that cover the same functionality.

So many great and balanced comments in this thread.

Sure, and I'm available to provide balance commentary for hire, too ;-)

I'm pretty sure you wouldn't like to work on what I'm working on right now though!

> So sometimes when some Junior dev discovers Rust and they get really obnoxious with their evangelicalism it can be very off putting.

And experience doesn't equal correct decision making. People just get traumatized in different ways.

It’s a pretty good language and ecosystem. Downside was always the community which every ten seconds someone will start asking to tax everyone to fund Rust Software Foundation or constantly argue that you have to donate a percentage of income to it. Now with LLM I don’t have to talk to community. Huge improvement.

Problem with community is it has experts and groupies mixed in. Ideally experts can talk somewhere and groupies can go somewhere else and talk about funding RSF etc. but now is unnecessary. Expert is available on demand via chatbot.

Its possible to dislike Rust but pragmatically use it. Personally, I do not like Rust, but it is the best available choice for some work and personal stuff.

I think this is a good, realistic point of view.

Personally I think most programming languages have really ... huge problems. And the languages that are more fun to use, ruby or python, are slow. I wonder if we could have a great, effective, elegant language that is also slow. All that try end up with e. g. with a C++ like language.

Honestly I find writing Rust more fun than writing Python. Python just doesn't scale, any non-trivial quantity of it has a habit of turning into spaghetti however hard I try to be disciplined.

Rust, although annoying at a micro scale, does at least enforce some structure on your code, although like Kling I miss OO.

AI has made Rust approachable to a new audience of programmers who didn't want to dedicate their life to learning the ins and outs of the language. Especially for C++ developers who already learned the ins and outs of a hyper complex programming language and don't want to go through that a second time.

Before AI, writing Rust was frustrating experience that involved spending 90% of your time reading documentation and grumbling that "I could do this in 5 minutes in C++"

Now I can write Rust in a way that makes sense to my C++ addled brain and let the AI do the important job of turning it into an idiomatic Rust program that compiles.

[deleted]

So what don't you like about it?

Its for the time being is stuck with LLVM, so I can't currently LTO with GCC objects. Its got a lot higher complexity than I perfer in a language. A lot of features I find important seem perma-unstable. Pin is unnessesarily confusing. No easy way to define multiple compilation units for use with linker object selection and attribute constructor. The easy path is downloading binary toolchains with rustup and not using your disto package manager. You can't use unstable features without the bootstrap env var on distro rust toolchains. Cargo leads to dependency bloat. The std/core crates are prebuilt binaries and bloat binary sizes. Bindgen doesn't translate static inline code. The language has a ton of stuff it exposes just to std and not user code. Unsafe code is unergonomic. No easy way to model a cleanup function that needs more args. No support for returns_twice. No ability to use newer stuff like preserve_none. Can't go-to-definition from a bindgen binding to original header file. Macros pollute global namespace. Can't account for platforms where size_t and uintptr_t are different. Traits can only be relied on if marked unsafe. Can't implement something like defer since it holds a borrow. no_std code still can pull in core::fmt. Can't enforce dependencies are also no_std. Panics are considered safe. No way to add non-function fields to dyn vtables. No way to declare code separately from definition. No way to have duplicate type definitions that merge, making interop between different bindgen generated modules annoying.

> Ladybird praises CPP/Swift currently

Not anymore.

https://news.ycombinator.com/item?id=47067678

They are moving fast.

Next month it will be yet-another-language.

Eventually they come full circle and settle for either C or C++.

They've been stuck with swift adoption for a long time, abandoning that was the reasonable decision. That only leaves Rust as the second language to C++

I guess I missed this, thanks!

I'd argue Ladybird itself is a "hype" project.

Anything trying to break the browser monopolies in a meaningful way deserves the hype, IMO.

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 company. Still, in its present state, its practical utility remains limited.

Good verdict. I agree.

Ladybird will have to deliver eventually - on this part I think many people agree with.

> What does Ladybird need to achieve in your opinion to shake the "hype" label?

A release (?)

Somehow people manage to run it without this magical release

[deleted]

I am somewhat concerned about the volatility. All three languages have their merits and each has a stable foundation that has been developed and established over many years. The fact that the programming language has been “changed” within a short period of time, or rather that the direction has been altered, does not inspire confidence in the overall continuity of Ladybird's design decisions.

Ladybird as a project is not that old, and it's still in pre-alpha, if they are going to make important changes then it's better now than later.

> I am somewhat concerned about the volatility.

Not just volatility but also flip-flopping. Rust was explicitly a contender when they decided to go with Swift 18 months ago, and they've already done a 180 on it despite the language being more or less the same as it was.

they tried swift, it didn't work, and they figured rust was the best remaining option. that's not "flip-flopping" (by which I assume you mean random indecisiveness that leads to them changing their mind for no reason)

Yup, this was not flip-flopping, it was willingness to be open to options, even if it means going back on a decision branch made earlier in the process.

For the Ladybird project, now is the best time to be making a big decision like this, and it's commendable that the project lead was honest to recognize when an earlier attempt was not working, to be able to re-think and come to a better decision. I'm no fan of Rust, but for this project I think most of us would agree it's a better language than Swift for their purpose.

They made a very pragmatic and sensible decision after reviewing Swift that it wouldn't be suitable for their purposes, so they shifted to the next best alternative. I think they reasoned it very well and made a great decision.

I guess they bet on Swift being more than Apple's blessed way of writing UI software.

It's not that they are loving Rust, but they realized going all-in on Swift means becoming sharecroppers on massa Tim Apple's plantation.

There's been some fun volatility with the author over the years. I told him once that he might want to consider another language to which he replied slightly insultingly. Then he tried to write another language. Then he tried to switch from C++ to Swift, and now to Rust :P

Upside: he's learning?

Indeed, and as a school those 18 months are well worth it, but it is in many ways also 18 months wasted. There is a strong sense of NIH with the Ladybird dev(s), and I wonder if that isn't their whole reason for doing this.

I've seen another team doing something similar, they went through endless rewrite cycles of a major package but never shipped, and eventually the project was axed when they proposed to do it all over again, but this time even better.

The sense of NIH is from Serenity, and that was probably the reason for Jakt's existence too. Now it's spun off into its own project there is a lot more pragmatism.

Well, here's to hoping because we really need a stand-in for FF. I realize the irony here in terms of that being the ultimate 'NIH' project but that one I can get behind because the browser landscape is much too fragile. Of course they might end up taking users away from FF rather than from Chrome, Edge or Safari.

In case you didn't know they're using a lot of third-party libraries now for pretty major things: libcurl for http, Skia/Harfbuzz for rendering, libxml, OpenSSL, ffmpeg, etc:

https://github.com/LadybirdBrowser/ladybird/tree/8017f8a7ed3...

The core browser engine, JS/CSS/layout etc will always be original.

> I think I need a lot more info about this migration

Doesn't sound like it's some Fish-style, full migration to Rust of everything. Seems like they are just moving a couple parts over for evaluation, and then, going forward, making it an official project language that folks are free to use. They note that basically every browser already does that, so this isn't a huge shakeup.

This makes sense because GUI wise Rust isn't really here yet (but it's close).

TFA mentions "the contributor's" stance on Swift.

But not the stance on Rust, which is something I'm wondering. I understand there's a core team assigned, but are the ~200 contributors okay with this migration?

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.

"I can excuse foaming over pronouns and master branch, but I draw a line at using rust" Would not be surprised by that opinion.

They abandoned Swift recently.

The public announcement was less then a week ago. Meanwhile in TFA:

> ... the entire port took about two weeks.

So he was ~halfway in when he made the Swift announcement.

Doesn’t sound like a bad thing to evaluate the most obvious alternative to build confidence before officially pulling the plug.

The most obvious alternative would be Zig. I don't see any Swift adoption outside the Apple ecosystem.

The key requirement is memory safety, which would rule out Zig.

Last time I checked, Zig was breaking it's stdlib, so it's not an alternative imo

Swift adoption had been dead long before the actual announcement. It's likely Rust was being considered long before this two week experiment with LLMs.

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"

Indeed, the hard part won't the port, but the maintenance of that which got ported. To be fair though, he's probably going to be able to use the same techniques for that.

It's hard to articulate, but as someone who knows first hand, I just want to say that manic productivity is not the same as solid engineering.

Did you read the OP? No trust, only thorough verification.

I did, and the point stands because reading someone else's code is not the same as writing it, esp. when you're not able to do so to the same standard

Non sequitur. Again, no trust was involved, only verification through extreme testing.

Also, as others have pointed out, "someone with no experience" simply isn't true.

the trust element to me is jumping into a port, not specific code although code you didn't write in a language you're not an expert with, will ALWAYS introduce an added risk of falling into pitfalls you can only avoid with experience, the more the merrier

you're banking in the LLMs quite strongly when you do that, which may just work but i would be very worried about myself if i were in his boots

> code you didn't write

He did write it.

> you're banking in the LLMs quite strongly when you do that, which may just work but i would be very worried about myself if i were in his boots

I too would worry if it were you doing it.

> especially since Ladybird devs have been very vocal about being "anti-rust" (I guess more anti-hype, where Rust was the hype).

I mean, they seem mostly to be against anything that isn't C++'s peculiar brand of Object Oriented Programming?

(also against women and immigrants, but that's a different story)