5 ms·
Everything in the X11 ecosystem seems to be a pile of hacks on top of hacks on top of hacks. It sometimes works pretty well and that's amazing! It's kind of bea
by etaioinshrdlu 7y ago
Everything in the X11 ecosystem seems to be a pile of hacks on top of hacks on top of hacks. It sometimes works pretty well and that's amazing! It's kind of beautiful in a silly way to realize how many layers of hacks are used to build the desktop experience on Linux.
I don't think terminals are much better. Fun fact about terminal escape sequences: some of them are timing-dependent. If a byte arrives too slowly, it will do something different.
The web is also a pile of hacks but at least we have multiple independent implementations and some standards.
The mess is beautiful. Keep adding layers.
- jcranmer 7y agoThe fun thing about terminals is that many terminals pretend to be xterm, but in fact fail to implement some of the many, many terminal escape sequences xterm supports. So complex terminal applications pretty much need to double-check if terminals are actually xterm or if they're something broken pretending to be xterm.
- throwaheyy 7y agoSounds like a standard configure.sh script.
- AstralStorm 7y agoNo, you have to do it at runtime, which is why curses exist. (Ncurses and pdcurses especially.)
- throwaheyy 7y agoWasn’t referring to terminal compatibility as much as the “stuff that doesn’t necessarily do what it says it does”. A big portion of most configure.sh scripts is logic that doesn’t just check for something, but that it can be trusted to do what the compiler will be expecting.
- jdblair 7y agoLinux is pretty much hacks all the way down. It's the other Unix philosophy.
- pcwalton 7y ago> The mess is beautiful. Keep adding layers. No, it's really not. In many ways X11 is behind what the other operating systems offer, and the emphasis on backwards compatibility above all else is the reason. For example, Windows has the notion of window privilege, in which lower-privilege windows are isolated from higher-privilege windows. X11 technically has the XSECURITY extension, but nobody uses it as it breaks everything, so in practice every X11 app can keylog your browser. It's really unfortunate that the Linux community is so divided over Wayland, as from a technical perspective Wayland is sorely needed.
- etaioinshrdlu 7y agoI mean this kind of in jest. It's obviously just garbage engineering, but I think the mess is kind of pretty.
- roenxi 7y ago> ... and the emphasis on backwards compatibility above all else is the reason ... Not entirely; from memory the entire X11 development team are also heavily invested in Wayland. There was a long period of time where graphics drivers lived in userspace, in X11, and nobody could use an alternative window system. That was the way things were up until 2010-2012 era. Even then the graphics drivers in the kernel weren't in a great way. Now the drivers in the kernel work well and the graphics stack is slowly migrating away from X11. They are moving as fast as they can without breaking things.
- pcwalton 7y agoThe folks who work on Xorg are perfectly fine. The problem is the segment of the Linux community that wants to keep X11 around forever.
- etaioinshrdlu 7y agoI think the way forward is to adopt Wayland and use compatibility layers to allow old apps to work forever. And to not feel bad about that.
- nineteen999 7y ago> Fun fact about terminal escape sequences: some of them are timing-dependent. If a byte arrives too slowly, it will do something different As someone working on a couple of different VT100 emulations, can you provide an example of this? I'm curious now, as none of the specifications I've seen mention this that I can think of off the top of my head.
- IcePic 7y agoIsn't cursor keys like that? If you get stalls when it sends the 4-5 byte sequence, you get to see ]^A instead of cursor moving. Having dog slow links and tcp set to send each char instead of waiting for a whole line or packet probably helps to see it, but I'm somewhat certain the whole code for a cursor movement needs to arrive within a certain time in order for it to actually be a movement and not the individual chars.
- nineteen999 7y agoSounds like you might be dealing with a particular implementation quirk, or perhaps with SSH or some other network transport issue. In general terminal emulators tend to implement control character processing with a state machine: https://vt100.net/emu/dec_ansi_parser https://vt100.net/emu/dec_ansi_parser In theory that shouldn't be affected by latency or delay in processing characters or groups of characters, and should be independent of the line speed, after all, the VT100 was able to operate at speeds between 50bits/second and 19,200 bits/second. https://en.wikipedia.org/wiki/VT100 https://en.wikipedia.org/wiki/VT100 That said, there are so many terminal emulators out there (xterm, gnome-terminal, linux console, just to name a few) and so many potential transport protocols (telnet, SSH, serial etc) and modern pty layers to deal with as well, so there are bound to be differences/quirks with different combinations.
- 6c696e7578 7y ago> realize how many layers of hacks are used to build the desktop experience on Linux. Still a better experience than Windows. > Keep adding layers. Coup is full. Instructions misunderstood.
- pjmlp 7y agoOnly when all one expects from X is to manage xterms and position Windows, with some kind of 2D acceleration.
- 6c696e7578 7y agoSorry, I'm an adult, I don't need distracting bells and whistles, quite the opposite. Windows is a poor desktop IMO. There is too much horizontal waste planting the user into a short and wide letter box that is nothing more than a portal into a malware universe.
- pjmlp 7y agoYeah, as if ChromeOS and Android distributions had less distracting bells, or were malware free. In fact the first malware was designed for UNIX, and the mechanisms exploited are still pretty much available.
- pmarin 7y ago>Everything in the X11 ecosystem seems to be a pile of hacks on top of hacks on top of hacks. You can say the same thing about any legacy system. X11 is 36 years old, but it was designed in a way that can be extended forever.
- mar77i 7y ago> don't think terminals are much better Terminal, as in "Causing, ending in, or approaching death; fatal". It's not an accident.