this post was submitted on 01 Jul 2024
180 points (94.1% liked)

Linux

5364 readers
256 users here now

A community for everything relating to the linux operating system

Also check out [email protected]

Original icon base courtesy of [email protected] and The GIMP

founded 1 year ago
MODERATORS
180
submitted 4 months ago* (last edited 4 months ago) by [email protected] to c/linux
 

Video announcement by Chris Wanstrath (GitHub co-founder) of the 501(c) non-profit and $1,000,000 donation: https://www.youtube.com/watch?v=k9edTqPMX_k

you are viewing a single comment's thread
view the rest of the comments
[–] onlinepersona 38 points 4 months ago (7 children)

I will never understand why people name stuff just by opening an English dictionary and simply picking a word.

Also why start a browser with C++? Google and Mozilla don't employ nincompoops to work on their browsers and still say 70% of their CVEs are due to memory management errors from C++. Instead of learning from that, they start yet another browser in C++.

In theory it great that this org wants to make an alternative, and probably being funded by a millionaire (billionaire?) can't hurt, but C++ man? Come on...

Anti Commercial-AI license

[–] [email protected] 83 points 4 months ago* (last edited 4 months ago) (2 children)

From.the FAQ

Why build a new browser in C++ when safer and more modern languages are available? Ladybird started as a component of the SerenityOS hobby project, which only allows C++. The choice of language was not so much a technical decision, but more one of personal convenience. Andreas was most comfortable with C++ when creating SerenityOS, and now we have almost half a million lines of modern C++ to maintain.

However, now that Ladybird has forked and become its own independent project, all constraints previously imposed by SerenityOS are no longer in effect. We are actively evaluating a number of alternatives and will be adding a mature successor language to the project in the near future. This process is already quite far along, and prototypes exist in multiple languages.

[–] [email protected] 18 points 4 months ago

It's crazy that SerenityOS decided to re-write their everything from scratch, to suit them. I wish I coukd do that too, but I don't have the resources.

[–] onlinepersona 6 points 4 months ago

I hadn't seen that, thanks! That gives me a little hope.

Anti Commercial-AI license

[–] [email protected] 17 points 4 months ago* (last edited 4 months ago) (1 children)

I will never understand why people name stuff just by opening an English dictionary and simply picking a word

Naming stuff is hard.

[–] LeFantome 9 points 4 months ago

For anybody else with the same question…

The Ladybird browser started as a part of the SerenityOS Project. SerenityOS had adopted Ladybug imagery before the browser was conceived. “Ladybird” seemed like a perfectly reasonable name for a core component of the OS given its existing iconography.

It was ( and is ) as good name in context.

Ladybird has decided to split with its SerenityOS roots. I have pretty mixed feelings on that. Regardless, it would be silly to change the name at this point.

The same history applies to C++. SerenityOS is written in C++. Until the split, the OS and browser were maintained in a mono repo with extremely deep code integration and coordination. They share the same custom C++ standard library and coding conventions for example.

SerenityOS was started as a very personal project and the original author is ( or was ) a fan of C++. While I am personally not a fan, it seems like a perfectly reasonable language choice to write an OS in.

[–] QuadriLiteral 2 points 4 months ago

Cross-platform and performant, are there options besides C++ and rust?

[–] [email protected] 2 points 4 months ago (1 children)

I’ve seen C++ code written by Microsoft and I’ve got to say, they aren’t the brightest candles on the cake either.

[–] onlinepersona 1 points 4 months ago

I've seen C++ code holding up a Fortune 500 company with people actually sitting on the board of C++ and being part of the decision making process on what goes into C++. Even had an advanced course on it given by some of the people. Let me tell you, it doesn't trickle down.

You can add all the macros and idioms you like, there will always be somebody loading an entire table from SQL into memory and dereferencing the each row+column with a double for-loop to find the correct row, then hand parsing the resulting row into the "right" in-memory data structure. Once you hit a column with variable length storing binary data (don't ask) and the length is in a column with that doesn't make it into the Row object, there is fun to be had.

My favorite is when you have a macro that hides what kind of pointer it is (shared, unique), but is only used when creating the variable, and someone uses a reinterpret_cast to solve some problem. Took a while to track that down. Bro, I fucking love the language.

Best of all is when code only has to pass some regression testing and has no code review. Absolute genius.

Anti Commercial-AI license