I hate the X11 ICCCM selection system
(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/1a1c5edf0dc1290...
Trivia, JW here is jdub and was an early Canonical/Ubuntu employee and their evangelist.
Well, 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.
I use a program with multiple selection every day: my text editor. And not only does it have that, it has multiple cursors, too!
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.