I’m curious how software can be created and evolve over time. I’m afraid that at some point, we’ll realize there are issues with the software we’re using that can only be remedied by massive changes or a complete rewrite.

Are there any instances of this happening? Where something is designed with a flaw that doesn’t get realized until much later, necessitating scrapping the whole thing and starting from scratch?

-4 points

Systemd. Nuke it from fucking orbit.

permalink
report
reply
3 points

Still a lot of zealotry going on judging by the votes… i say rewrite systemd in rust!

permalink
report
parent
reply
9 points

Everyone hates on it. Here I am; a simply Silverblue user and it seems fine to me. What is the issue actually?

permalink
report
parent
reply
5 points
*

Everyone doesn’t. Just a handful of loud idiots who mostly don’t work with init systems. It is objectively better. There are some things you could criticise, but any blanket statement like that is just category a.

permalink
report
parent
reply
4 points

Wayland could already do with a replacement.

permalink
report
reply
2 points

It is so much better than X

permalink
report
parent
reply
3 points

Seriously, I’m not a heavy software developer that partakes in projects of that scale nor complexity but just seeing it from the outside makes me hurt. All these protocols left-right and center, surely just an actual program would be cleaner? Like they just rewrite X from scratch implementing and supporting all modern technology and using a monolithic model.

Then small projects could still survive since making a compositor would almost be trivial, no need to rewrite Wayland from scratch cause we got “Waykit” (fictional name I just thought of for this X rewrite), just import that into your project and use the API.

permalink
report
parent
reply
-1 points

It’s what happens when you put theory over practicality.

permalink
report
parent
reply
-3 points

What we wanted: Wayland.

What we needed: X12, X13…

permalink
report
parent
reply
2 points

I agree in the sense that Wayland adoption would have definitely gone quicker if that was the case, however in the long run this approach does make sense (otherwise you will eventually just run into the same sorts of issues X11 had).

Btw what you’re describing is not that far off from the normal way of using Wayland protocols in development - you use wayland-scanner to generate C source files from the protocols, and you include those to actually “use” the protocols in your programs. Admittedly all my Wayland development experience has been “client-side”, so I really don’t know how complex it is to build a compositor, but dwl (minimalist Wayland compositor) is only around 3k lines of code (only slightly more than dwm (minimalist X wm)).

permalink
report
parent
reply
5 points

Wayland and X are very very different. The X protocol is a protocol that was designed for computer terminals that connected into a mainframe. It was never designed for advanced graphics and the result is that we have just built up a entire system that balances on a shoe box.

Wayland is a protocol that allows your desktop to talk to the display without a heavy server. The result is better battery life, simplified inputs, lower latency, better performance and so on

permalink
report
parent
reply
8 points

That would work if the only problem they wanted to solve was an outdated tech stack for X. But there are other problems that wayland addresses too, like: how to scale multiple monitors nicely, is it a good idea to give all other apps the keystrokes that you do in the one in focus (and probably a lot more)

permalink
report
parent
reply
1 point
*

It is complex to build a Wayland compositor. When none existed, you had to build your own. So it took quite a while for even big projects like GNOME and KDE to work through it.

At this stage, there are already options to build a compositor using a library where most of the hard stuff is done for you.

https://github.com/swaywm/wlroots

https://github.com/CuarzoSoftware/Louvre

There will be more. It will not be long before creating Wayland compositors is easy, even for small projects.

As more and more compositors appear, it will also become more common just to fork an existing compositor and innovate on top.

One of the longer term benefits of the Wayland approach is that the truly ambitious projects have the freedom to take on more of the stack and innovate more completely. There will almost certainly be more innovation under Wayland.

All of this ecosystem stuff takes time. We are getting there. Wayland will be the daily desktop for pretty much all Linux users ( by percentage ) by the end of this year. In terms of new and exciting stuff, things should be getting pretty interesting in the next two years.

permalink
report
parent
reply
37 points

Wayland is incomplete and unfinished, not broken and obsolete and hopelessly bad design. PulseAudio was bad design. Wayland is very well designed, just, most things haven’t been ported for it yet and some design by committee hell, but even that one is kind of a necessary tradeoff so that Wayland actually lasts a long time.

What people see: lol Firefox can’t even restore its windows to the right monitors

What the Wayland devs see: so how can we make it so Firefox will also restore its windows correctly on a possible future VR headset environment where the windows maintain their XYZ and rotation placement correctly so the YouTube window you left above the stove goes back above the stove.

The Wayland migration is painful because they took the occasion to redo everything from scratch without the baggage of what traditional X11 apps could do, so there is less likely a need for a Wayland successor when new display tech arrives and also not a single display server that’s so big its quirks are now features developers relied on for 20 years and essentially part of the standard.

There’s nothing so far that can’t be done in Wayland for technical implementation reasons. It’s all because some of the protocols aren’t ready yet, or not implemented yet.

permalink
report
parent
reply
-1 points

There’s nothing so far that can’t be done in Wayland for technical implementation reasons.

Then make it fully X11 backwards compatible. Make Wayland X12. C’mon, they already admitted NVidia was right and are switching the sync and working to finally support the card they’ve been busting a hate boner over the driver simply because they’re bigots against the licensing. Time to admit breaking the world was a mistake, too.

permalink
report
parent
reply
-1 points

I can’t up-vote this enough. The “architectural purists” have made the migration a nightmare. Always blaming everyone else for simply not seeing their genius. I’m honestly surprised it’s gotten as far as it has.

permalink
report
parent
reply
2 points

It’s slowly happening. KDE can now do global Xwayland shortcuts, they also implemented XWaylandVideoBridge and compositor restart crash recovery for apps. We’re getting proper HDR, we have proper per-monitor refresh rates and VRR, I can even hotplug GPUs. Some of that stuff works better in XWayland because we can just run multiple instances with different settings. For the particularly stubborn cases, there’s rootful XWayland. X12 would have to break things too, and I doubt an Xorg rewrite would be all that much further than Wayland is. Canonical had a go at it too with Mir which was much less ambitious.

NVIDIA was right on that one indeed, but Wayland also predates Vulkan and was designed for GLES, pretty much at the tail end of big drivers and the beginning of explicit and low level APIs like Vulkan. They could very well have been right with EGLStream too, but graphics on Linux back then was, erm, bad. But in the end they’re all still better than the kludge that is 3D in Xorg.

It’s getting a lot of momentum and a lot of things are getting fixed lately. It went from unusable to “I can’t believe it’s not Xorg!” just this year for me. It’s very nice when it works well. We’ll get there.

permalink
report
parent
reply
-6 points

Can’t even update Firefox in place. Have to download a new copy, run it from the downloads folder, make a desktop shortcut myself, which doesn’t have the Firefox icon.

Can’t remember if that was mint or Ubuntu I was fiddling with, but it’s not exactly user friendly.

permalink
report
parent
reply
14 points

This has nothing to do with Wayland, it’s just AppImages kinda sucking. Use Flatpak or the one in your distro’s repos, not the AppImage. AppImages are the equivalent of portable apps on Windows, like the single exe ones you’d put on a flash drive to carry around.

Also the AppImage developer is very against Wayland and refuses to support it, which is why Wayland support is a shitshow on AppImages.

If you pick the Flatpak it’ll get updated in the background, have a proper launcher and everything.

permalink
report
parent
reply
15 points

Do not download Firefox of the internet. Use your package manager or flatpak

permalink
report
parent
reply
4 points
*

X11 is 40 years old. I’d say it’s been rather successful in the “won’t need to be replaced for some time” category. Some credit where due.

There’s nothing so far that can’t be done in Wayland for technical implementation reasons. It’s all because some of the protocols aren’t ready yet, or not implemented yet.

I mean … It doesn’t matter why it can’t be done. Just that it can’t be done.

permalink
report
parent
reply
8 points

40 years old is also what makes it so hard to replace or even reimplement. The bugs are all decade old features, everything is written specifically for Xorg, all of which needs to be emulated correctly. It sure did serve us well, it’s impressive how long we’ve managed to make it work with technology well beyond the imagination of the engineers in the 80s.

There’s this for the protocols: https://github.com/probonopd/wayland-x11-compat-protocols

It can be done, it’s just nobody wants to do it. It’s not really worth the effort, when you can work on making it work properly in Wayland instead. That way you don’t need XWayland in the first place, but also XWayland can then implement it using the same public API everyone else does so it works on every compositor.

permalink
report
parent
reply
11 points

Agreed, Wayland has a monumental task to do: replacing a 30+ year old windowing system.

permalink
report
parent
reply
2 points

Yup, Wayland is so old it already has old concepts. But it is also changing a lot

permalink
report
parent
reply
1 point

Needs to be replaced already. They’re having to change to explicit sync, which they should have done from the start. So throw it out, start over, make X12.

permalink
report
parent
reply
53 points

There is some Rust code that needs to be rewritten in C.

permalink
report
reply
-12 points
*

Agree, call me unreasonable or whatever but I just don’t like Rust nor the community behind it. Stop trying to reinvent the wheel! Rust makes everything complicated.

On the other hand… Zig 😘

permalink
report
parent
reply
2 points

Zig!!

permalink
report
parent
reply
1 point

Zig!!

permalink
report
parent
reply
4 points

Also look into Hare, Odin and Vale. They’re all neat ideas.

permalink
report
parent
reply
40 points
*

Bold

permalink
report
parent
reply
27 points

Italics

permalink
report
parent
reply
12 points

I feel tracked… Better strike this all through

permalink
report
parent
reply
19 points

Strange. I’m not exactly keeping track. But isn’t the current going in just the opposite direction? Seems like tons of utilities are being rewritten in Rust to avoid memory safety bugs

permalink
report
parent
reply
-2 points

The more the code is used, the faster it ought to be. A function for an OS kernel shouldn’t be written in Python, but a calculator doesn’t need to be written in assembly, that kind of thing.

I can’t really speak for Rust myself but to explain the comment, the performance gains of a language closer to assembly can be worth the headache of dealing with unsafe and harder to debug languages.

Linux, for instance, uses some assembly for the parts of it that need to be blazing fast. Confirming assembly code as bug-free, no leaks, all that, is just worth the performance sometimes.

But yeah I dunno in what cases rust is faster than C/C++.

permalink
report
parent
reply
1 point

But yeah I dunno in what cases rust is faster than C/C++.

First of all C and C++ are very different, C is faster than C++. Rust is not intrinsically faster than C in the same way that C is faster than C++, however there’s a huge difference, safety.

Imagine the following C function:

void do_something(Person* person);

Are you sure that you can pass NULL? Or that it won’t delete your object? Or delete later? Or anything, you need to know what the function does to be sure and/or perform lots of tests, e.g. the proper use of that function might be something like:

if( person ) {
  person_uses++;
  do_something(person);
}

...

if( --person_uses == 0 )
  free( person )

That’s a lot more calls than just calling the function, but it’s also a lot more secure.

In C++ this is somewhat solved by using smart pointers, e.g.

void do_something(std::unique_ptr<Person> person);
void something_else(std::shared_ptr<Person> person);

That’s a lot more secure and readable, but also a lot slower. Rust achieves the C++ level of security and readability using only the equivalent of a single C call by performing pre-compile analysis and making the assembly both fast and secure.

Can the same thing be done on C? Absolutely, you could use macros instead of ifs and counters and have a very fast and safe code but not easy to read at all. The thing is Rust makes it easy to write fast and safe code, C is faster but safe C is slower, and since you always want safe code Rust ends up being faster for most applications.

permalink
report
parent
reply
13 points
*

C/C++ isn’t really faster than Rust. That’s the attraction of Rust; safety AND speed.

Of course it also depends on the job.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html

permalink
report
parent
reply
1 point

Rust is faster than C. Iterators and mutable noalias can be optimized better. There’s still FORTRAN code in use because it’s noalias and therefore faster

permalink
report
parent
reply
9 points

You got it right, the person you replied to made a joke.

permalink
report
parent
reply
9 points

Join the hive mind. Rust is life.

permalink
report
reply
3 points

This is going to make my bicycle workshop much easier to run.

permalink
report
parent
reply
5 points

My only two concerns are one, Rust is controlled by a single entity, and two, it is young enough we don’t know about all of its flaws.

permalink
report
parent
reply
15 points

Third concern: dependencies.

I installed a fairly small rust program recently (post-XZ drama), and was a bit concerned when it pulled in literally hundreds of crates as dependencies. And I wasn’t planning on evaluating all of them to see if they were secure/trustworthy - who knows if one of them had a backdoor like XZ? Rust can claim to be as secure as Fort Xnox, but it means nothing if you have hundreds of randoms constantly going in and out of the building, and we don’t know who’s doing the auditing and holding them accountable.

permalink
report
parent
reply
-2 points

Wayland, Pipewire, systemd, btrfs/zfs, just to name a few.

permalink
report
reply
10 points

Wayland is THE replacement to broken, hack-driven, insecure and unmaintainable Xorg.

Pipewire is THE replacement to the messy and problematic audio stack on Linux to replace Pulseaudio, Alsa etc.

SystemD is THE replacement to SysVinit (and is an entire suite of software)

permalink
report
parent
reply
3 points

Like many, I am not a fan of SystemD and hope something better comes along.

permalink
report
parent
reply
1 point
*

The only thing I personally dislike about systemd is the “waiting for service to stop 5mins/1h30mins” stuff during shutdowns and reboots. I know I can limit them to 10s or something but how about just making systemd force-stop these services like, say, runit.

When I’m using my bemenu script to shutdown and feel like a hackerman, don’t take that way from me by being an annoyance, systemd!!!

Edit: Yes, I’m considering switching to Void, how could you tell?

permalink
report
parent
reply
2 points

Yes, I know. I was answering the question of if there were instances of this happening.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 9.5K

    Monthly active users

  • 6.1K

    Posts

  • 170K

    Comments