5 ms·
I hate the X11 ICCCM selection system
- deleted 7y ago[deleted]
- dsr_ 7y agoWell, it's certainly a rant. Honestly, I can see why you might want two kinds of objects to pass via selection: strings, and blobs. But two is an odd number; it ought to be zero, one, or infinite. Zero doesn't help, and one would be hijacked by incompatible systems that would have to guess "are they going to want a JSON representation of this, or a MIME type followed by base64 encoded data?", so I guess that an updatable registry of types would be ok, just really unwieldy, and ... nightmares to follow.
- saghm 7y ago> But two is an odd number This is very tangential, but I was very confused when I read this at first due to the arithmetic meaning of "odd".
- mlyle 7y agoHorses have an even number of legs. Behind they have two legs, and in front they have fore-legs. This makes six legs, which is certainly an odd number of legs for a horse. But the only number that is both even and odd is infinity. Therefore, horses have an infinite number of legs. (from fortune).
- saagarjha 7y agoI use a program with multiple selection every day: my text editor. And not only does it have that, it has multiple cursors, too!
- hyperman1 7y agoThe icccm uses selection for what we call clipboard. A lot of x11 software used to put what you selected on the clipboard automatically.
- etaioinshrdlu 7y agoEverything 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.
- emmelaich 7y ago(2001) Aside, why the few X11 related articles recently? Has something happened? Is there a debate? Correction - the author is Conrad Parker aka kfish. Dunno why that is elided in this version. Conrad has some good rants. Complete version at https://raw.githubusercontent.com/kfish/xsel/1a1c5edf0dc129055f7764c666da2dd468df6016/rant.txt https://raw.githubusercontent.com/kfish/xsel/1a1c5edf0dc1290... Trivia, JW here is jdub and was an early Canonical/Ubuntu employee and their evangelist. https://en.wikipedia.org/wiki/Jeff_Waugh https://en.wikipedia.org/wiki/Jeff_Waugh