|
|
Subscribe / Log in / New account

You must be joking

You must be joking

Posted Nov 7, 2010 4:06 UTC (Sun) by dlang (guest, #313)
In reply to: You must be joking by zander76
Parent article: LPC: Life after X

this sounds like it would be a perfect article for lwn, how a problem can see so simple and when you dig down it gets to be so hard.

the person up thread who took his class through the process of trying to specify (not even implement) the correct behavior in all conditions probably has a lot of info that would be very interesting and educational if he could take the time to write it up (especially if the writeup can talk about a lot of the dead-ends that seem so attractive)


to post comments

You must be joking

Posted Nov 7, 2010 4:30 UTC (Sun) by zander76 (guest, #6889) [Link]

Someone once asked me "What is a camel?". The answer was "An over designed mouse created by a committee!". It take a lot of *what ifs* to get from a mouse to a camel.

Students tend to under or over design things. To loosely quote Linus "It's simple to make things complex and complex to make things simple". It does take a fair amount of experience to hit that middle ground.

It is very easy to make a complicated mess especially when you are trying to make everybody in the world happy and address every problem before you start. You will never get passed the design phase.

Now don't get me wrong I am not stating that this is the case. I am simply stating that I could see how this could get way out of control. This is especially true when with students trying to account for every problem. In the working world you tend to spend less time on use cases and more time on getting the job done so you can go home :)

You must be joking

Posted Nov 7, 2010 4:55 UTC (Sun) by PO8 (guest, #41661) [Link] (11 responses)

I've put some initial notes [on my blog](http://fob.po8.org/node/512). I'm not sure how many of the "dead-ends" I've covered, but I've at least tried to describe some reasons why the problem is so hard.

Hope this helps.

You must be joking

Posted Nov 7, 2010 7:53 UTC (Sun) by dlang (guest, #313) [Link] (7 responses)

from my naive point of view, the obvious answer to some of the problems on X would be to merge the two existing mechanisms, not eliminating either of them, but just having them both use the same clipboard storage so no matter how you copy something, either approach to pasting will produce the same result.

I've only been using linux as my primary desktop for 13 years or so, so I'm abit of a novice in understanding all the nuances of why the two are separate in the first place or how to know when each is being used :-)

You must be joking

Posted Nov 8, 2010 6:08 UTC (Mon) by mfedyk (guest, #55303) [Link] (4 responses)

if you merged the two clipboards, you would have the problem of overwriting the current clipboard contents by accidentally selecting something with the mouse.

I like being able to copy and paste with just the mouse and not having to go through any menus to do so. I end up cursing the lack of that feature whenever I'm on another platform

You must be joking

Posted Nov 8, 2010 7:16 UTC (Mon) by dlang (guest, #313) [Link]

the question is would that be worse than the confusion of having two clipboards and the inconsistent way that applications use one or the other?

You must be joking

Posted Nov 8, 2010 15:43 UTC (Mon) by foom (subscriber, #14868) [Link] (2 responses)

If you're using the menus to copy&paste on other platforms, you're doing it wrong. Use the keyboard shortcuts...

You must be joking

Posted Nov 8, 2010 21:39 UTC (Mon) by mfedyk (guest, #55303) [Link] (1 responses)

> If you're using the menus to copy&paste on other platforms, you're doing it wrong. Use the keyboard shortcuts...

Note the "with just the mouse" part...

I use the CLI all the time, but sometimes I don't have a free hand to reach for the keyboard (using screwdriver, using someone else's computer to instruct them, etc.) and just want to do something quickly with the mouse only.

Mouse selection and middle click paste

Posted Nov 11, 2010 16:10 UTC (Thu) by cdmiller (guest, #2813) [Link]

I too use the mouse selection/paste extensively day to day. In fact it is seen as a "killer feature" by many folks when I'm convincing them to try a Linux desktop. Occasionally an application intentionally break this functionality. I remove those from my desktop and our computer labs whenever possible...

You must be joking

Posted Nov 8, 2010 13:32 UTC (Mon) by tialaramex (subscriber, #21167) [Link] (1 responses)

There aren't two clipboards.

X has these things called selections. How they are used is defined outside X, you could run an X server and a suite of apps that had no selections, or had a dozen all named after capital cities. X does not care.

For interoperability you need to agree how to use them. The ICCCM provided a good enough description for its day, but apparently in the late 1990s reading comprehension among software developers declined, and Qt managed to screw it up repeatedly, so there is also a FD.O document which spells it out.

So, this names selections including PRIMARY and CLIPBOARD. The PRIMARY selection is to be set to whatever the user last explicitly selected. By convention apps ask for the contents of this selection and insert it when you press middle-button.

The CLIPBOARD selection is maintained separately by explicit cut or copy operations. Most apps ask for the contents of this selection when you use their paste operation.

Selections are also used in drag-and-drop functionality. They have several features that the average My First Clipboard idea doesn't handle

• Low overhead. Rather than storing whatever you select or cut into some OS-provided "clipboard" where it will mysteriously waste a lot of RAM*, the selections exist only in the source application until needed. X just tracks a window ID and a timestamp.
• Content-negotiated. Rather than forcing everything into a lowest common denominator like plain text, the source app can offer various formats and the recipient chooses
• Network transparent. So long as you actually do it with X (rather than sending a filename as per some suggestions in this thread) you get network transparency. Copy from the remote xterm, paste into the local web browser.

Really the worst problem is that application developers don't care. They refuse to "pay their taxes" as it has been called, by implementing features that require some work on their part to deliver a better experience for the end user across all applications. This isn't just about the clipboard, it's a widespread problem. They may hard-code a date format that annoys non-Americans, or misbehave when multiple monitors are used, or any number of things. And it's not just on X, this is a problem on every platform, only the specifics vary.

I really mean it about them not caring. For a while I filed bugs against apps that got this stuff wrong. But the response was almost always hostile.

* A lot of designs don't consider this. Users expect that somehow the computer "knows" that they intended to just throw away the 50MB of charts they just cut from a document, but they needed to keep the 15MB image they cut the next day. There are no ultimate solutions here, like window focus it's a matter of best effort.

You must be joking

Posted Nov 18, 2010 9:45 UTC (Thu) by renox (guest, #23785) [Link]

>> Really the worst problem is that application developers don't care. They refuse to "pay their taxes" as it has been called, by implementing features that require some work on their part to deliver a better experience for the end user across all applications <<

Which is why, I always look at propositions which want to replace things done by a common server by things done by all the applications with a lot of skepticism..

One of the example is XCB which AFAIK is still not implemented by Qt or GTK even though it was supposed to allow better threading.

You must be joking

Posted Nov 7, 2010 11:20 UTC (Sun) by quotemstr (subscriber, #45331) [Link]

Thanks for taking the time to write that up. It's a great summary of the issues that make the problem an involved one.

You must be joking

Posted Nov 7, 2010 13:58 UTC (Sun) by foom (subscriber, #14868) [Link] (1 responses)

You wrote:

> The best means we have for identifying media type right now is MIME-types. Unfortunately, they are really too incomplete and disorganized for CCP purposes. Their ontology is only two levels deep and highly incomplete.

You might be interested to check out Apple's solution to that problem, Uniform Type Identifiers (first introduced in OSX 10.4, it's been slowly introduced into more and more data transfer APIs). They are multi-level hierarchical, where the hierarchy is defined outside of the type-name.

http://developer.apple.com/library/mac/documentation/File...

Also see the "Pasteboard Concepts" article.

http://developer.apple.com/library/mac/documentation/Coco...

Apple Pasteboard and UTIs

Posted Nov 8, 2010 7:52 UTC (Mon) by PO8 (guest, #41661) [Link]

Interesting! Thanks much for the pointers.

You must be joking

Posted Nov 7, 2010 7:02 UTC (Sun) by mfedyk (guest, #55303) [Link]

+ 1

yes, very much looking forward to this article.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds