HNHacker News
TopNewBestAskShowJobs

LeFantome

2,162 karma · joined August 14, 2020

submissionscomments
LeFantome··on Closing this as we are no longer pursuing Swift adoption
> What is this mythical subset of C++

Ladybird inherits its C++ from SerenityOS. Ladybird has an almost completely homegrown standard library including their own pointer classes and a couple of different string classes that do some interesting things with memory. But perhaps the most novel stuff are things like TRY and MUST: https://github.com/SerenityOS/serenity/blob/master/Documenta...

You see this reflected all the way back to the main function. Here is the main entry function for the entire browser:

ErrorOr<int> ladybird_main(Main::Arguments arguments).

https://github.com/LadybirdBrowser/ladybird/blob/master/UI/Q...

If Ladybird is successful, I would not be surprised to see its standard library take off with other projects. Again, it is really the SerenityOS standard library but the SerenityOS founder left the project to focus on Ladybird. So, that is where this stuff evolves now.

LeFantome··on Closing this as we are no longer pursuing Swift adoption
> From what I can tell they're pretty laser focused on making a browser

I agree with you. I also agree that this decision is an example of that.

SerenityOS had an "everything from scratch in one giant mono-repo" rule. It was, explicitly a hobby project and one rooted in enjoyment and 'idealism from the get go. It was founded by a man looking for something productive to focus on instead of drugs. It was therapy. Hence the name.

Ladybird, as an independent project, was founded with the goal of being the only truly independent web browser (independent from corporate control generally and Google specifically).

They have been very focussed on that, have not had any sacred cows, and have shed A LOT of the home-grown infrastructure they inherited from being part of SerenityOS. Sometimes that saddens me a little but there is no denying that it has sped them up.

Their progress has been incredible. This comment is being written in Ladybird. I have managed GitHub projects in Ladybird. I have sent Gmail messages in Ladybird. It is not "ready" but it blows my mind how close it is.

I think Ladybid will be a "usable" browser before we enter 2027. That is just plain amazing.

LeFantome··on Closing this as we are no longer pursuing Swift adoption
The Ladybird founder was one of the original KHTML devs and worked on Safari at Apple.
LeFantome··on Closing this as we are no longer pursuing Swift adoption
> Rust designed specifically for being a language for developing a rendering engine

Rust was born at Mozilla, sort of. It was created by a Mozilla employee. The first "real" project to put it into action was Servo of which parts were adopted into Firefox. While Rust may not have been developed "specifically" to create a browser, it is a fair comment.

That said, Ladybird was started as part of the SerenityOS project. That entire project was built using C++. If the original goal of Serenity was to build an opeerating system, C++ would have felt like a reasonable choice at the time.

By the time Ladybird was looking for "better" languages than C++, Ladybird was already a large project and was making very heavy use of traditional OOP. Rust was evaluated but rejected because it did not support OOP well. Or, at least, it did not support integration into a large, C++ based, OOP project.

Perhaps, if Ladybird had first selected a languge to write a browser from scratch, they would have gone with Rust. We will never know,

We do know that Mozilla, despite being the de facto stewards of Rust at the time, and having a prototype web browser written in Rust (Servo), decided to drop both Rust and Servo. So, perhaps using Rust for browsers is not as open and shut as you imply.

LeFantome··on Closing this as we are no longer pursuing Swift adoption
What projects are trying something similar to Ladybird? Well, mobody really. But Servo is pretty close though they are not writing their own Javascript engine or anything.

But you should perhaps give your attention to Servo. They were founded as a project to write a modern browser in Rust. So, no hand-waving there.

No hand-waving on the Ladybird team either in my opinion. They have very strong technical leadership. The idea that building a massive application designed to process untrusted user input at scale might need a better language than C++ seems like a pretty solid technical suggestion. Making incedible progress month after month using the language you started with seems pretty good too. And deciding, given the progress buidling and the lack of progress exploring the new language, that perhaps it would be best to formally abandon the idea of a language switch...well, that seems like a pretty solid decision as well.

At least, that is my view.

Oh, and I was a massive Servo fan before the Ladybird project even began. But, given how much further Ladybird has gotten than Servo has, despite being at it for less time and taking on a larger scope...well, I am giving my attention to Ladybird these days.

This comment was written in Ladybird.

LeFantome··on Closing this as we are no longer pursuing Swift adoption
I do not have enough knowledge to say anything bad about LLVM. As an "amateur" compiler writer, it did confuse me a bit though.

What I will say is that it seem popular to start with LLVM and then move away from it. Zig is doign that. Rust is heading in the direction perhaps with Cranelift. It feels that, if LLVM had completely nailed its mission, these kinds of projects would be less common.

It is also notable that the Dragonegg project to bring GCC languages to LLVM died but we have multiple projects porting Rust to GCC.

LeFantome··on Closing this as we are no longer pursuing Swift adoption
> switching language in the middle of an herculean work is suicide

My read is that that this is the main thing that happened here.

The Ladybird team is quite pragmatic. Or, at least their founder is. I think they understood the scale of buidling a browser. They understood that it was a massive undertaking. They also understood the security challenge of building an application so big that processes untrusted input as its main job. So, they thought that perhaps they needed a better language than C++ for these reasons. They evaluated a few options and came away thinking that Swift was the best, so they announced that they expected to move towards Swift in the future.

But the other side of being pragamatic is that, as time passed, they also realized how hard it would be to chagne horses. And they are quite productivity driven. They produce a YouTube video every month detailing their progress including charts and numbers.

Making no progress on the "real" job of building a browser to make progress on the somewhat artificial job of moving to a new programming language just never made sense I guess.

And the final part of being pragmatic is that, after months of not really making any progress on the switch, the founder posted this patch essentially admitting the reality and suggesting they just formalize the lack of progress and move on.

The lack of progress on Swift that is. Their progress on making a browser has been absolutely mind-blowing. This comment is being written in Ladybird.

LeFantome··on Closing this as we are no longer pursuing Swift adoption
> Objective-C was created because using standards is contrary to the company culture

Objective-C was actually created by a company called Stepstone that wanted what they saw as the productivity benefits of Smalltalk (OOP) with the performance and portability of C. Originally, Objective-C was seen as a C "pre-compiler".

One of the companies that licensed Objective-C was NeXT. They also saw pervasive OOP as a more productive way to build GUI applications. That was the core value proposition of NeXT.

NeXT ended up basically taking over Objective-C and then it became of a core part of Apple when Apple bought NeXT to create the next-generation of macOS (the one we have now).

So, Objective-C was actually born attempting to "use standards" (C instead of Smalltalk) and really has nothing to do with Apple culture. Of course, Apple and NeXT were brought into the world by Steve Jobs

LeFantome··on Closing this as we are no longer pursuing Swift adoption
>It’s truly remarkable they made something with such staying power

What has had the staying power is the API because that API is for an operating system that has had that staying power. As you hint, the macOS of today is simply the evolution of NeXTSTEP (released in 1989). And iOS is just a light version of it.

But 1989 is not all that remarkable. The Linux API (POSIX) was introduced in 1988 but started in 1984 and based on an API that emerged in the 70s. And the Windows API goes back to 1985. Apple is the newest API of the three.

As far as languages go, the Ladybird team is abandoning Swift to stick with C++ which was released back in 1979. And of course C++ is just an evolution of C which goes back to 1972 and which almost all of Linux is still written in.

And what is Ladybird even? It is an HTML interpretter. HTML was introduced in 1993. Guess what operating system HTML and the first web browser was created on. That is right...NeXTSTEP.

LeFantome··on LT6502: A 6502-based homebrew laptop
Ya, what is crazy is that we were “serving” web pages over those kinds of lines.
LeFantome··on LT6502: A 6502-based homebrew laptop
As you say, the trade-off is developer productivity vs resources.

If resources are limited, that changes the calculus. But it can still make sense to spend a lot on hardware instead of development.

LeFantome··on LT6502: A 6502-based homebrew laptop
Ya, but that means no high-res GUI. And pretty annoying limits on data set size.
LeFantome··on LT6502: A 6502-based homebrew laptop
Half my Linux machines are Macs “retired” for exactly this reason.
LeFantome··on LT6502: A 6502-based homebrew laptop
The really cool thing about RISC-V is that you can design your own core and get full access to a massive software ecosystem.

All you need is RV32I.

LeFantome··on Arm wants a bigger slice of the chip business
The problem is they go from being at the center of everything outside x86-64 to just another RISC-V provider. And there will be dozens. And the market will not care so much as they succeed and fail as the ecosystem will not depend on the suppliers specifically. How does ARM stay at the top of that dog fight? It is a much bigger challenge than they have faced so far.
LeFantome··on Arm wants a bigger slice of the chip business
The problem for ARM is that there are a dozen RISC-V companies implementing their business model.

You license ARM cores because you want a “custom” chip but do not want to start from scratch. You especially do not want to have to bootstrap a software ecosystem. When ARM had no competition, it is just a question of which ARM core you want.

Now, you can get the same thing from any RISC-V design house. Which means having real choice over the features you want. If ARM is just one of those RISC-V shops, how does ARM compete? By being the best? Not likely.

And, in the past, you could not totally outgrow ARM as they own the ISA. The Qualcomm lawsuit was an attempt to maintain tight control over this. With RISC-V, you can pack up and move your whole ecosystem elsewhere including taking it entirely in-house. This includes the ISA to an extent since anybody can add extensions.

Today, we are seeing RISC-V succeed where this flexibility matters most: in microcontrollers and in AI.

But as performance equalizes, volumes go up and costs come down, the use cases where ARM makes more sense dwindle.

That makes backwards compatibility the last real reason to use ARM. But does this matter on mobile where devices download the apps that match their arch? Not really. Does it matter in most embedded cases? Not really. Does it even matter in the server? More, but even there not as much as it used to. Does it matter for anything mostly GPU or NPU driven? No. So that leaves desktop and laptop. And, outside of Apple, ARM has not really built up anything to stay compatible with. RISC-V may have time to grow into that niche before being blocked.

We are going to exit 2026 with RISC-V chips that are fast enough. How fast will the costs come down? Perhaps a year or two?

What markets is ARM well positioned to continue its dominance in?

LeFantome··on Can my SPARC server host a website?
I do not mind retro computing stuff. The most interesting part was installing up-to-date OpenBSD. But of course it can serve a static website.
LeFantome··on Can my SPARC server host a website?
Agreed. The Netscape IPO was over 30 years ago. What do people think the web was running on back then?

And why do you think that machine is called a Netra?

LeFantome··on Rust Coreutils v0.6.0 Release: 96.28% GNU compatibility and safety improvements
But this wingnut YouTube “journal”ist told me that this was going to be a total disaster.

How could he have been so wrong?

LeFantome··on Don't rent the cloud, own instead
This is a good summary and my take as well.

The cloud is great when you just need to start and when you do not know what scale you will need. Minimal initial cost and no wasted time over planning things you do not know enough about.

The cloud is horrible for steady-state demand. You are over-paying for your base load. If your demand does not scale that much, you do not benefit from the flexibility. Distance from the edge can cause performance problems. In an effort to “save money” you will chase complexity and bake in total reliance on your cloud provider. AAA l

Starting with the cloud makes sense. Just make sure not to engineer a solution you cannot take somewhere else.

As you scale and demand becomes known, you can start to migrate some stuff on premises or to other managed providers.

The great thing about “cloud architecture” is that you can use a hybrid model. You can selectively move parts of the stack. You can host your baseline demand and still rely on the cloud for scalability.

Where you need to spend the money and gain the expertise is in design. Not a giant features waterfall but rather knowing how to build an application and infrastructure that is adaptable and portable as you scale.

Keep it simple but also keep it modular.

At least, that had been my experience.

LeFantome··on Rust in the NetBSD Kernel, and other odd decisions
I just noticed that rustc_codegen_gcc has been accepted into the mainline Rust compiler, or at least the nightly builds.

https://github.com/rust-lang/rust/pull/151156

This means that you will be able to use either GCC or LLVM to build your Rust code with rustc (the main Rust compiler). That means you can compile your Rust for any platform that GCC supports.

This only addresses the first point in the blog post (architecture support) but it is an interesting development.

LeFantome··on Rust in the NetBSD Kernel, and other odd decisions
gccrs, the Rust compiler for GCC, is written in C++. If you can compile GCC, it will build the Rust compiler for you.

Presumably the NetBSD project can bootstrap to GCC.

LeFantome··on Rust in the NetBSD Kernel, and other odd decisions
https://github.com/felixmaker/thunk
LeFantome··on Rust in the NetBSD Kernel, and other odd decisions
> There are many architectures that NetBSD supports where Rust is not available

Are there many architectures that NetBSD supports where GCC is not available?

The rustc_codegen_gcc project allows using the rustc compiler to target any architecture that GCC supports. I think it is pretty far along.

https://github.com/rust-lang/rustc_codegen_gcc

> getting a Rust compiler running in the first place is hard

> bootstrap relies on a binary package

> the compiler would also have to be part of the base system

The gccrs project aims to make Rust a fully supported language in GCC. It is fully self-hosting and can be built from source. Once accepted, it will be one of the languages you get when you build GCC.

https://github.com/Rust-GCC/gccrs

When gccrs is ready, it will address all the above objections.

Linux faces the same issues. Today, Rust is optional in Linux and can be skipped on any platform not supported in LLVM and rustc. For Rust to become mandatory in Linux, gccrs is going to be required (for some platforms).

> the release cycles of Rust are not compatible with the NetBSD ones

I do not fully grasp the objection here. Obviously NetBSD would not be forced to use any Rust features they cannot compile. And using gccrs for the NetBSD kernel would not prevent them from bundling LLVM and rustc as well if they want.

Anyway, I am not advocating the use of Rust in NetBSD. I am merely pointing out that solutions to the issues raised are being worked on.

LeFantome··on Rust in the NetBSD Kernel, and other odd decisions
> the Rust for Linux project wants to use the newly prototyped features right away > they depend on not-yet-released features from unstable nightly versions of Rust

This is not true. Since kernel 6.11 they have specified a minimum version that is already stable. The strategy for the Rust kernel is to use the version of Rust that ships with Debian Stable. That is very far from using "the newly prototyped features right away".

https://rust-for-linux.com/rust-version-policy

Of course, the kernel continues to inform Rust evolution. But you do not need an unstable version of Rust to compile Linux.

LeFantome··on xAI joins SpaceX
I am no Elon fan but the biggest obstacle to AI is definitely power and then cooling. Space solves both.

Hard to argue with the basic idea here.

LeFantome··on Linux From Scratch ends SysVinit support
Just call it the Red Hat Linux Platform. Both GNU (glibc, binutils, GNU utils, GCC, etc) and Systemd are primarily maintainted by them. Same with Wayland and GNOME.

Red Hat defines what "Linux" is these days.

LeFantome··on Linux From Scratch ends SysVinit support
The whole GNU / Red Hat platform is this way. Try switching out Glibc. You get the same "you have to use all our stuff" dependencies.
LeFantome··on Linux From Scratch ends SysVinit support
This one bothers me too.

Systemd and Xorg are very similar in many ways. I do not know how you hate Systemd and love Xorg unless your real problem is just change.

And, while I like Wayland, I think that liking the Wayland architecture should have you disliking Systemd. But that is just me.

LeFantome··on Linux From Scratch ends SysVinit support
> I’m sure there’s more to the story than just ABI compatibility

The number one goal for the Xwayland / Xorg devs is stability. Breaking ABI compatibility is a pretty big problem if stability is your goal.

← PreviousPage 9 of 32Next →