Live data from Hacker News

Ladybird browser to start using Swift language this fall

twitter.com

111–120 of 205 posts

Re: Ladybird browser to start using Swift language this fall

#111

Earlier quoted context omitted.

I strongly disagree. This is not a justified decision, they just feel like it based either on vague and speculative reasons, or because they are funded to do so, I would not be surprised if they had discussions with the Swift marketing team.

Then build your own browser in Rust, start contributing to Servo, and who cares when a volunteer writes a browser in any language? Write a browser in COBOL for all I care. If it’s open source, it’s still a gift.

Absolutely not.

I don't know Rust and I think it is worse than C++ in many ways.

This is a false dichotomy, they don't have to switch language mid-course.

Re: Ladybird browser to start using Swift language this fall

#112

For those who are worried, Andreas is a thoughtful dude. This decision was not made on a whim. Also, they’re not doing a massive rewrite: > The Swift team is also investing heavily in C++ interop, which means there's a real path to incremental adoption, not just gigantic rewrites. To me, the Tweet does a good job justifying the decision. I’m rooting for Ladybird, and I hope this decision pays off. A modern browser in…

I strongly disagree. This is not a justified decision, they just feel like it based either on vague and speculative reasons, or because they are funded to do so, I would not be surprised if they had discussions with the Swift marketing team.

I feel like the tweet explains their rationale pretty well... the main reason being memory safety. It's a constant overhead in both programming time and bug handling for them.

Re: Ladybird browser to start using Swift language this fall

#113

Earlier quoted context omitted.

> - Toxic community I think a lot of this is just rumors and maybe one or two high profile people. When I go to discord servers for rust and rust libraries, the help I get is as good as, if not better than support from companies I literally pay.

For years, whenever there was drama and shit-flinging in the OSS world, i looked up the people causing that on github and blocked them. Github has this feature that it warns you when you look at a repository where people you blocked contributed. If you keep such a list, you'll easily recognize projects you better stay away from. For me, this was one of the reasons to keep away from Rust.

That sounds flawed to me. A large block list will disproportionately warn you about projects that are more open to any external contribution in general. Guilt by association is a weird standard for FOSS contributions. I certainly don't review the external lives of contributors on my repositories.

Re: Ladybird browser to start using Swift language this fall

#114

Earlier quoted context omitted.

I strongly disagree. This is not a justified decision, they just feel like it based either on vague and speculative reasons, or because they are funded to do so, I would not be surprised if they had discussions with the Swift marketing team.

Then build your own browser in Rust, start contributing to Servo, and who cares when a volunteer writes a browser in any language? Write a browser in COBOL for all I care. If it’s open source, it’s still a gift.

> start contributing to Servo

Servo as a browser is (sort of) dead, though webrender still lives.

I remember when (back when the icon was a doge) it had an actual UI and could be used as a real web browser... that's all been stripped out now.

https://book.servo.org/:

> Work is still ongoing to make Servo consumable as a webview library, so for now, the only supported way to use Servo is via servoshell, our winit- and egui-based example browser.

A shame, really, since the Servo project was the source of some of the best macOS Cocoa/AppKit bindings for Rust.

Re: Ladybird browser to start using Swift language this fall

#115
post #89

Earlier quoted context omitted.

> Rust Evangelism Strike Force I realize this is not what people generally are referring to when they complain about the Rust community, but this is the part that annoys me. Feels like every damn day I see people preaching the Good News of Rust, pointing to things as being the unique and sole property of their preferred language. Except those things have been around for ages, in other languages. Memory safety? Invent…

> Golang Evangelism Strike Force Concurrency? Invented by Go! (quickly corrected by Elixir/Erlang strike force, but these, just like Golang, have worse throughput than a particular C family language I have a soft spot for). Apologies, could not help myself as this response is amusing if sadly accurate (I do like Rust, but blind hostile evangelism tends to create the opposite to the desired outcome).

Ahaha, yes. Amazing. Even the evangelism strike force wasn't invented by Rust :)

It's a good point. These things always annoy me. Rust just happens to have the most vocal one these days.

Re: Ladybird browser to start using Swift language this fall

#116
post #63

I know Andreas is a prolific coder, but this seems weird to have a pretty functional (but far from complete) browser written in C++ and then casually say, eh, "We are going to rewrite it in another language" in the same way one might say "We've decided to change the branding logo"? I know that is a run-on sentence, but I need to get my exercise.

Actually, moving to a memory-safe language should be a very high priority for developing a browser and the sooner they do that the better.

Swift/C++/Zig all have the exact same level of memory safety, but anyone they said they aren't porting, sounds more like writing new stuff in Swift and hoping the interop story is good enough.

Re: Ladybird browser to start using Swift language this fall

#117
post #93

Earlier quoted context omitted.

Swift is memory safe. The C++ interop thing I think is massive. But isn’t there also the problem that with Rust you can’t have the equivalent of shared pointers, so you can only have a single reference to one object (sorry I don’t really know Rust, just going from how this has been described to me) which apparently makes representing things like DOMs and abstract syntax trees an absolute nightmare?

And cannot have linked lists either. When you make a compiler in rust, basically you give everything the same lifetime and drop the memory at the very end. That allows cicular references. Or you use Rc, but that is against what purists want you to do. For longer lifetime programs with complex models the borrow checker becomes harder

You can express linked lists efficiently in Rust using the GhostCell/QCell pattern. Yes it's clunky, but this is after all an area of active research in PL theory. As it is, most ordinary "easy" implementations of linked lists do not actually prove memory safety - it's a genuinely non-trivial problem, not a case of mere incidental complexity.

Re: Ladybird browser to start using Swift language this fall

#118

Earlier quoted context omitted.

C++ is a loaded gun, strapped to your body and aimed at your foot, with infinite bullets automatically firing every second, that requires you to constantly exert 25 lbs of force to tilt the gun and avoid hitting your foot. Most of the time, you’ll be successful. However, nobody seeing your plight would be shocked if your foot eventually gets blown up. To claim this state of affairs is just fine because you’ve done it…

Well, there are indeed many ways to shoot yourself with C++, this is why having C++ experts on the team is a good thing. They are supposed to know how to avoid the traps and avoid being lured into the worst parts of C++ and OOP design style. I have seen very good C++ projects using only the minimal amount of bullshit features, Omar Cornut's Dear Imgui comes to mind as an example. As Swift beginners, they are less lik…

Perhaps, but here’s a question:

Can you really tell me, that any C++ codebase doesn’t have memory safety bugs?

The last decades have shown that almost every C++ codebase has a bug somewhere, as long as you look hard enough. That’s not a good state of affairs.

C++ is a reactionary language. The programmer assumes they are an expert who can use it safely, there’s just a few exceptions or mistakes here and there and that’s normal.

Using memory safe languages is a programmer knowing they will mistakes, that they aren’t that smart despite their best efforts, and mitigating the opportunity.

Avoid near occasions of sin.

Re: Ladybird browser to start using Swift language this fall

#119
I'm seeing a lot of doom and gloom about this mostly stemming from the state of open source swift, but I think the choice has a lot of upside for two main reasons:

1) Choosing Swift implicitly adds improving the status quo of open source swift to the tasks of ladybird. This obviously expands the already huge scope of the project but also derisks it in some ways because it means the project can have a lasting impact regardless of its goals as a competitive browser. Remember that Rust was tempered as a language through the development of Servo and Ladybird could do the same for the non-Apple Swift ecosystem.

2) It unlocks access to a huge number of Swift developers and offers them a unique open source project to work on rather than just building apps for Apple products. As far as I am aware there is no other major language with such a massive (size of developer base):(open source opportunities) ratio. Ladybird acting as the cornerstone of that community could have mutually beneficial results that improve the development of ladybird while also fostering excitement for open source, non-Apple Swift projects.

Ladybird is a wildly ambitious project. We have N=3(ish) for how long it takes to develop a competitive browser from scratch in C++ even with the support of massive companies behind you and it isn't very fast. Obviously we know it works but Ladybird is on mile 100 of a bicycle race around the globe that started 30 years ago. Staying the course on C++ to me looks like saying "We're already so far behind, we can't afford to stop and add an electric motor!" meanwhile everyone else is still pedaling and you aren't getting any closer.

Re: Ladybird browser to start using Swift language this fall

#120
post #7

============================== Andreas Kling @awesomekling · 44m My general thoughts on Rust: - Excellent for short-lived programs that transform input A to output B - Clunky for long-lived programs that maintain large complex object graphs - Really impressive ecosystem - Toxic community ==============================

I'd drop the "long-lived" and "short-lived" from the first two points. Rust is great for long lived programs, and is extremely clunky for managing any kind of object graph in general. The lifetime of the program has little to do with it, so I'm confused by those qualifiers. I've written plenty of Rust software that has run uninterrupted for years. I've seen way more people complaining about Rust evangelism and toxici…

IME in the last while on HN the Rust Evangelism(TM) debate has been brought up either unprompted or because someone argued that Rust was objectively better on some metric (like memory safety compared to another language). In the latter case someone says something that can be argued on its merits but then someone else decides to tone police about “evangelism”.

In this thread there are two Rust subthreads: someone brought up (and was downvoted) “why not Rust” out of nowhere (evangelism) and this one where we are discussing Rust Evangelism because GP quoted Kling on some separate tweet.

So yes. We mostly seem to discuss Rust Evangelism as a meta thing. Something that has supposedly definitely happened, or is happening somewhere else, just rarely right in front of us in the discussions at hand.[1] I think that qualifies as a meme.

[1] https://news.ycombinator.com/item?id=41119392

Post reply on HN