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?
I dont know if this even makes sense but damn if bluetooth/ audio could get to a point of “It just works”.
It does for me. What issue are you having?
What’s your latest disfavor?
Mine is the priorisation of devices. If someone turns on the flatshare BT box and I’m listening to Death Metal over my headphones, suddenly everyone except me is listening to Death Metal.
Just being… crappy?
Not connecting automatically. Bad quality. Some glitchy artifacts. It gets horrible The only work around I’ve found is stupid but running
apt reinstall --purge bluez gnome-bluetooth
and it works fine. So annoying but I have to do this almost every day.Reinstalling should change nothing. If its getting corrupted check your drive and Ram.
I don’t know why this works, but if im having issues, i do this, and it fixes all of them across the board. Even just restarting the service is not as effective as this. That some times works, sometimes doesn’t.
I’m confident its not a drive or ram issue. Its a blue tooth issue/ audio. But I also can’t explain why it is so consistent.
Have you checked the logs?
That really sounds like shitty firmware at one end or the other
It’s been a while (few years actually) since I even tried, but bluetooth headsets just won’t play nicely. You either get the audio quality from a bottom of the barrel or somewhat decent quality without microphone. And the different protocol/whatever isn’t selected automatically, headset randomly disconnects and nothing really works like it does with my cellphone/windows-machines.
YMMV, but that’s been my experience with my headsets. I’ve understood that there’s some propietary stuff going on with audio codecs, but it’s just so frustrating.
Not to mention bluez aggressive conne ts to devices. It would be nice if my laptop in the other room didn’t interrupt my phones connection to my earbuds.
Then again, we also have wired for a reason. Hate all you want but it works and is predicable
Bluetooth in general is just a mess and it’s sad that there’s no cross-platform sdk written in C for using it.
Omg nobody has mentioned FHS?!
What that?
Amended my post 😉
Happens all the time on Linux. The current instance would be the shift from X11 to Wayland.
And then from ALSA to PulseAudio haha
They’re at different layers of the audio stack though so not really replacing.
And then ALSA to all those barely functional audio daemons to PulseAudio, and then again to PipeWire. That sure one took a few tries to figure out right.
And the strangest thing about that is that neither PulseAudio nor Pipewire are replacing anything. ALSA and PulseAudio are still there while I handle my audio through Pipewire.
How is PulseAudio still there? I mean, sure the protocol is still there, but it’s handled by
pipewire-pulse
on most systems nowadays (KDE specifically requires PipeWire).Also, PulseAudio was never designed to replace ALSA, it’s sitting on top of ALSA to abstract some complexity from the programs, that would arise if they were to use ALSA directly.
Pulse itself is not there but its functionality is (and they even preserved its interface and pactl). PipeWire is a superset of audio features from Pulse and Jack combined with video.
For anyone wondering: Alsa does sound card detection and basic IO at the kernel level, Pulse takes ALSA devices and does audio mixing at the user/system level. Pipe does what Pulse does but more and even includes video devices
Join the hive mind. Rust is life.
This is going to make my bicycle workshop much easier to run.
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.
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.
lol that someone already said Wayland.
Your welcome. :)
His welcome?
That’ll teach me to type when I’m mad. “You’re”. There a go.
Actually, it won’t teach me. Wayland’s mere existence will bother me till the day I die, I’m sure. Especially once it’s working well enough for me to have to adopt it. The resentment will grow.
Wayland could already do with a replacement.
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.
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.
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.
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.
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.
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.
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.
Do not download Firefox of the internet. Use your package manager or flatpak
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.
Agreed, Wayland has a monumental task to do: replacing a 30+ year old windowing system.
Yup, Wayland is so old it already has old concepts. But it is also changing a lot
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.
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.
It’s what happens when you put theory over practicality.
What we wanted: Wayland.
What we needed: X12, X13…
What was stopping X just undergoing some gutting? I get it’s old and covered in dust and cobwebs but look, those can be cleaned off.
“Scoop out the tumors, and put some science stuff in ya”, the company that produced that quote went on to develop the most advanced AGI in the world and macro-scale portable on-demand indestructible teleportation.
Because we no longer have mainframes in computer labs. Each person now has there own machine.
And yet I play modern games on modern hardware with X just fine. It’s been extended a little bit since the 80s.
Yes it works but it everything is glued together with duct tape
X12 it’s got 15% less X11!
I would rather X didn’t get access to deadly neurotoxin, thanks
I dunno, sounds kinda cool.
No body wanted Wayland except the mad scientists and anti nvidia bigots that made it.
Imagine calling developers who have a cold relationship with Nvidia due to Nvidia doing the bare minimum for Linux development “bigots” lol
I think you must be a fanboy.
I’m no fanboy of any video card. I just have ton of laptops with NVidia in them, and the bigots making Wayland never gave a darn about our plight… and then they started pushing distros to switch before they did anything to fix it. Their callous attitude toward the largest desktop linux userbase is insulting and pushing the distros before they fix the problem should be criminal. Every one of them should be put away for trying to ruin Linux by abandoning it’s largest desktop user base. We dislike them, dislike them so much.
Now, will it keep us from using that crap when it finally works? No. We don’t have much choice. They’ve seen to that. x11 will go the way of the dodo. But can we dislike them forever for dragging us through the mud until they were finally forced to fix the darn thing? Yeah. Wish them nothing but the worst.
The X standard is a really big mess
That’s kind of what I was trying to imply.
We needed a new X with some of the archaic crap removed. I.e. no one needs X primitives anymore, everything is its own raster now (or whatever it’s called).
Evolving X would have given us incremental improvements over time… Eventually resulting in something like Wayland.
You can’t evolve something that old.
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)
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)).
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
It is so much better than X
Wayland, Pipewire, systemd, btrfs/zfs, just to name a few.
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)
Yes, I know. I was answering the question of if there were instances of this happening.
Like many, I am not a fan of SystemD and hope something better comes along.
Not really software but, personally I think the FHS could do with replacing. It feels like its got a lot of historical baggage tacked on that could really do with shedding.
Fault handling system?
Filesystem Hierarchy Standard
/bin
,/dev
,/home
and all that stuffWould be a crazy expensive migration though
Definitely. As nice as it would be, I don’t think it will significantly change any time soon, for several reasons. Not least of which is because several programs would likely just flatly refuse to implement such a change, judging by some of them refusing to even consider patches to implement the XDG Base Directory Specification.
What’s wrong with it?
$PATH
shouldn’t even be a thing, as today disk space is cheap so there is no need to scatter binaries all over the place.Historically,
/usr
was created so that you could mount a new disk here and have more binaries installed on your system when the disk with/bin
was full.And there are just so many other stuff like that which doesn’t make sense anymore (
/var/tmp
comes to mind,/opt
,/home
which was supposed to be/usr
but name was already taken, etc …).How would virtual environment software, like conda, work without $PATH?
$PATH shouldn’t even be a thing, as today disk space is cheap so there is no need to scatter binaries all over the place.
$PATH is very useful for wrapper scripts, without it there wouldn’t be an easy way to for fix the mess that steam does in my homedir that places a bunch of useless dotfiles in it. The trick is simply have a script with the same name as the steam binary in a location that is first in $PATH therefore it will always be called first before steam can start and murder my home again.
About /var/tmp, I just have it symlinked to /tmp, technically /var/tmp still has a reason to exist, as that location is use for temporary files that you don’t want to lose on power loss, but I actually went over the list possible issues and iirc it was mostly some cache files of vim.
EDIT: Also today several distros symlink /bin and /sbin to /usr/bin.
You missed my point. The reason $PATH exists in the first place is because binaries were too large to fit on a single disk, so they were scattered around multiple partitions (
/bin
,/sbin
,/usr/bin
, etc…). Now, all your binaries can easily fit on a single partition (weirdly enough,/usr/bin
was chosen as the “best candidate” for it), but we still have all the other locations, symlinked there. It just makes no sense.As for the override mechanism you mention, there are much better tools nowadays to do that (overlayfs for example).
This is what plan9 does for example. There is no need for
$PATH
because all binaries are in/bin
anyways. And to override a binary, you simply “mount” it over the existing one in place.but we still have all the other locations, symlinked there. It just makes no sense.
Because a lot of shit would break if that wasn’t the case, starting with every shell script that has the typical
or
shebang.
This is what plan9 does for example. There is no need for $PATH because all binaries are in /bin anyways. And to override a binary, you simply “mount” it over the existing one in place.
Does that need elevated privileges? Because with PATH what you do is export this environment variable with the order you want, like this:
export PATH="$HOME/.local/bin:$PATH"
(And this location is part of the xdg base dir spec btw).This means that my home bin directory will always be first in PATH, and for the steam example it means that I don’t have to worry about having to add/change the script every time the system updates, etc.
Also what do you mean by mounting a binary over? I cannot replace the steam binary in this example. What I’m doing is using a wrapper script that launches steam on a different location instead (and also passes some flags that makes steam launch silently).
So much of that is PDP-11 baggage or derived from it.
Or more generally Very Small Disk baggage.
- TPM encryption or LUKS in general
- general distro architecture like ostree
Libxz
One might exist already: lzlib.
I admit I haven’t done a great deal of research, so maybe there are problems, but I’ve found that
lzip
tends to do better at compression thanxz
/lzma
and, to paraphrase its manual, it’s designed to be a drop-in replacement forgzip
andbzip2
. It’s been around since at least 2009 according to the copyright messages.That said,
xz
is going to receive a lot of scrutiny from now on, so maybe it doesn’t need replacing. Likewise, anything else that allows random binary blobs into the source repository is going to have the same sort of scrutiny. Is that data really random? Can it be generated by non-obfuscated plain text source code instead? etc. etc.Personally I quite like
zstd
, I find it has a pretty decent balance of speed to ratio at each of its levels.
There are many instances like that. Systemd vs system V in it, x vs Wayland, ed vs vim, Tex vs latex vs lyx vs context, OpenOffice vs liber office.
Usually someone identifies a problem or a new way of doing things… then a lot of people adapt and some people don’t. Sometimes the new improvement is worse, sometimes it inspires a revival of the old system for the better…
It’s almost never catastrophic for anyone involved.
Some of those are not rewrites but extensions/forks
I’d say only open/libreoffice fits that.
Edit: maybe Tex/latex/lyx too, but context is not.
LaTeX and ConTeXt are both macros for TeX. LyX is a graphical editor which outputs LaTeX.
Yes… I’d classify context as a reboot of latex.
In reality this happens all the time. When you develop a codebase it’s based on your understanding of the problem. Over time you gain new insights into the environment in which that problem exists and you reach a point where you are bending over backwards to implement a fix when you decide to start again.
It’s tricky because if you start too early with the rewrite, you don’t have a full understanding, start too late and you don’t have enough arms and legs to satisfy the customers who are wanting bugs fixed in the current system while you are building the next one.
… or you hire a new person who knows everything and wants to rewrite it all in BASIC, or some other random language …
It’s actually a classic programmer move to start over again. I’ve read the book “Clean Code” and it talks about a little bit.
Appereantly it would not be the first time that the new start turns into the same mess as the old codebase it’s supposed to replace. While starting over can be tempting, refactoring is in my opinion better.
If you refactor a lot, you start thinking the same way about the new code you write. So any new code you write will probably be better and you’ll be cleaning up the old code too. If you know you have to clean up the mess anyways, better do it right the first time …
However it is not hard to imagine that some programming languages simply get too old and the application has to be rewritten in a new language to ensure continuity. So I think that happens sometimes.
Yeah, this was something I recognized about myself in the first few years out of school. My brain always wanted to say “all of this is a mess, let’s just delete it all and start from scratch” as though that was some kind of bold/smart move.
But I now understand that it’s the mark of a talented engineer to see where we are as point A, where we want to be as point B, and be able to navigate from A to B before some deadline (and maybe you have points/deadlines C, D, E, etc.). The person who has that vision is who you want in charge.
Chesterton’s Fence is the relevant analogy: “you should never destroy a fence until you understand why it’s there in the first place.”
“you should never destroy a fence until you understand why it’s there in the first place.”
I like that; really makes me think about my time in building-games.
I’d counter that with monolithic, legacy apps without any testing trying to refactor can be a real pain.
I much prefer starting from scratch, while trying to avoid past mistakes and still maintaining the old app until new up is ready. Then management starts managing and new app becomes old app. Rinse and repeat.
The difference between the idiot and the expert, is the expert knows why the fences are there, and can do the rewrite without having to relearn lessons. But if you’re supporting a package you didn’t originally write, a rewrite is much harder.
Which is something I always try to explain to juniors: writing code is cool, but for your sake learn how to READ code.
Not just understanding what it does, but what was it all meant to do. Even reading your own code is a skill that needs some focus.
Side note: I hate it to my core when people copy code mindlessly. Sometimes it’s not even a bug, or a performance issue, but something utterly stupid and much harder to read. But because they didn’t understand it, and didn’t even try, they just copy-pasted it and went on. Ugh.
The gatekeeping community
Can I keep a gate too and join the community?
Cough, wayland, cough (X is just old and wayland is better)
Alt text: Thomas Jefferson thought that every law and every constitution should be torn down and rewritten from scratch every nineteen years–which means X is overdue.
Your alt text doesn’t describe what is mentioned in the image though?
In this case “alt text” refers to Randall Munroe’s bonus punchlines he hides in the alt text on xkcd.org.
I’m not sure what people do there who need actual alt text.xkcd.com uses
title
text, notalt
text.Probably go to explainxkcd.com