914 karma · joined Sep 12, 2010 (16y ago) · 607 submissions
comment 13y ago · link · parent
NeWS had "synchronous event handlers" that when triggered would block the distribution of all other events (i.e. taking them off of the global event queue, figuring out their target, and putting them on a local event queue), until the synchronous event was handled (typically very quickly by code running in the window server, without any context switches -- but potentially it could send synchronos events to asynchronous network clients and continue to block the distribution of events until the client replied, which is what X11 window managers have to do all the time).
So if a mouse click would remove a window from the screen, the following keyboard events would not get distributed (to the wrong window, and lost) until after the window was removed.
Anything you do that changes the distribution of events (like moving the cursor in or out of a window changes the input focus, manipulating the window hierarchy changes the mapping from event position to window target, etc) needs to have its handler executed BEFORE any other events are distributed.
X11 has always suffered from flakey keyboard input focus tracking, just for this very reason. Of course now that computers are 1.0e+6 times faster than they were when it was developed, it's not as noticeable, and people have been trained (browbeaten) to let things "settle down" before expecting their keyboard events to go to the right window.
But believe me, on a 4 meg diskless Sun 3/50 running X11, Emacs and a C compiler, with expensive context switching and paging over the network, it took a very perceptible (in fact terribly dreadful) amount of time for events to be delivered when you clicked, typed, and moved windows around, and it was a big issue.
Strict guarantees on synchronous event distribution are necessary to implement reliable "mouse ahead", for gestural user interfaces like pie menus, and reliable window management and keyboard input focus tracking.
Having the window manager running as an outboard process, communicating via an asynchronous protocol, is a terrible idea, but is baked into X11 at a very low level -- with the ICCCM thrown in as a kludgy afterthought. The X11 protocol has hacks and band-aids like "mouse button grabs" and "server grabs" to mitigate the problems, but they cause a lot of other problems, complexity and inefficiencies on their own.
From http://en.wikipedia.org/wiki/NeWS:
Like the view system in most GUIs, NeWS included the concept of a tree of embedded views along which events were passed. For instance, a mouse click would generate an event that would be passed to the object directly under the mouse pointer, say a button. If this object did not respond to the event, the object "under" the button would then receive the message, and so on. NeWS included a complete model for these events, including timers and other automatic events, input queues for devices such as mice and keyboards, and other functionality required for full interaction. The input handling system was designed to provide strong event synchronization guarantees that were not possible with asynchronous protocols like X.
From the OLPC mailing list, http://lists.sugarlabs.org/archive/sugar-devel/2007-February...
[sugar] Re: Zoomable tracking protocol for non-windowed Cairo based objects.
The ScriptX tracking service was based on The NeWS Toolkit 2.0's tracking service (written in PostScript), which I adapted for ScriptX. Credit for the design goes to Don Woods, Owen Densmore, Brian Raymor, and other people on the NeWS team, whose goal was to redesign the old NeWS tracking service and toolkit to be smaller and faster.
TNT 2.0 tried to minimize the number of objects, inter-object sends, event manager threads, coordinate transformations, share event interests (patterns to receive events), and centralize event processing in the global event manager.
It also had "safe" input handling, because NeWS threads (like the global event manager) could use synchronous event handlers (when appropriate, but not always), which were guaranteed to block the input queue and run the event handler before any more events were delivered. Synchronous event handlers enabled the window manager to perfectly track and synchronize mouse clicks, input focus and key distribution changes, without losing any events that slip between the cracks from changes in the window hierarchy, event handler registrations, and delays due to paging and network response. Safe input handling is especially important for slow networked computers (like a diskless Sun 3/50 or an OLPC) that need to respond quickly and reliably to user input!
Here is James Gosling's original paper about what was eventually called NeWS: SunDew - A Distributed and Extensible Window System, from Methodology of Window Management (extremely interesting and required reading for anyone interested in window management and the history of user interface management system architecture): http://www.chilton-computing.org.uk/inf/literature/books/wm/...
This idea has very powerful implications within the context of window systems: it provides a graceful way to make the system much more flexible, and it provides some interesting solutions to performance and synchronization problems. SunDew contains a complete implementation of PostScript. The messages that client programs send to SunDew are really PostScript programs. [...]
5.3.3 User Interaction - Input
The key word in the design of the user interaction facilities is flexibility. Almost anything done by the window system preempts a decision about user interaction that a client might want to decide differently. The window system therefore defines almost nothing concrete. It is just a loose collection of facilities bound together by the extension mechanism.
Each possible input action is an event. Events are a general notion that includes buttons going up and down (where buttons can be on keyboards, mice, tablets, or whatever else) and locator motion.
Events are distinguished by where they occur, what happened, and to what. The objects spoken about here are physical, they are the things that a person can manipulate. An example of an event is the E key going down while window 3 is current. This might trigger the transmission of the ASCII code for E to the process that created the window. These bindings between events and actions are very loose, they are easy to change.
The actions to be executed when an event occurs can be specified in a general way, via PostScript. The triggering of an action by the striking of the E key in the previous example invokes a PostScript routine which is responsible for deciding what to do with it. It can do something as simple as sending it in a message to a Unix process, or as complicated as inserting it into a locally maintained document. PostScript procedures control much more than just the interpretation of keystrokes: they can be involved in cursor tracking, constructing the borders around windows, doing window layout, and implementing menus.
Synchronization of input events: we believe that it is necessary to synchronize input events within a user process, and to a certain extent across user processes. For example, the user ought to be able to invoke an operation that causes a window on top to disappear, then begin typing, and be confident about the identity of the recipient of the keystrokes. By having a centralized arbitration point, many of these problems disappear. [...]
Hopgood [Bob Hopgood, Rutherford Appleton Laboratory]: How do you handle input?
Gosling [James Gosling, CMU (Andrew, X10), Sun (SunDew/NeWS, Java)]: Input is also handled completely within PostScript. There are data objects which can provide you with connections to the input devices and what comes along are streams of events and these events can be sent to PostScript processes. A PostScript process can register its interest in an event and specify which canvas (a data object on which a client can draw) and what the region within the canvas is (and that region is specified by a path which is one of these arbitrarily curve-bounded regions) so you can grab events that just cover one circle, for example. In the registration of interest is the event that you are interested in and also a magic tag which is passed in and not interpreted by PostScript, but can be used by the application that handles the event. So you can have processes all over the place handling input events for different windows. There are strong synchronization guarantees for the delivery of events even among multiple processes. There is nothing at all specified about what the protocol is that the client program sees. The idea being that these PostScript processes are responsible for providing whatever the application wants to see. So one set of protocol conversion procedures that you can provide are ones that simply emulate the keyboard and all you will ever get is keyboard events and you will never see the mouse. Quite often mouse events can be handled within PostScript processes for things like moving a window. [...]
Teitelman [Warren Teitelman, Xerox PARC (Smalltalk, DLisp (Interlisp), Interlisp-D, Tajo (Mesa Development Environment), Docs (Cedar), Viewers), Sun (SunView, SunDew/NeWS)]: The innovation here is not that we are using PostScript. The reason we chose PostScript is due to a lot of historical connections and proximity to the people who are doing it. The interesting thing is that all these processes look as though they are executing in one of those old single address environments. It is a single user process that James has been able to implement lightweight processes in. You don't have lightweight processes in Unix systems, which you really need to implement realistic user interfaces.
Gosling: There is really nothing new here. It's just putting it together in a different way.
Rosenthal [David S. H. Rosenthal, CMU (Andrew, X10), Sun (one of the architects of NeWS, and developers of X10 and X11, who wrote the ICCCM)]:
It is worth bringing out a number of points about this style of window manager. There are some real limitations, though I think this is the way we should go.
Some help from the kernel is needed. This is easy in 4.2 which has a sensible IPC. It could be done in System V through shared resources etc.
A reliable signal mechanism is essential. The window manager has to stay up. It is the only routine for talking to the system and hence must stay alive. We have 100 systems running and only experience 1 - 2 crashes per week. This is good by Unix standards!
Applications cannot read pixels back - this is just too slow.
There must be a way to make the client think it has a real terminal, such as the 4.2BSD PTY device, otherwise all old programs misbehave.
There must be a mechanism for downloading application code into the window manager process, for example, rubber band line mouse tracking is done by a user level process. There must be off-screen space in the window manager.
Examples of systems built in this way are:
BLIT [50];
Andrew (CMU)(see Chapter 13);
VGTS (Stanford) [36];
X (MIT).
The BLIT system is successful - people wrote programs for it. I believe it is the only successful window manager for a Unix system.
Myers [Brad Myers, University of Toronto (Peridot), CMU (Garnet, Amulet)]: Maybe that is because BLIT doesn't run a Unix operating system.
Rosenthal: Overall, it is a Unix software environment.
Williams [Tony Williams, Rutherford Appleton Laboratory]: We should bear in mind that Rob Pike says that to do anything sensible using the BLIT, you need to write two processes which communicate: one running in the Unix host and one running in the BUT, and this must be harder to do than, say, writing two programs which don't communicate.
comment 13y ago · link · parent
comment 13y ago · link · parent
The homophobic self loathing repressed closet cases always try to define "gay" as "acting on being gay" so that they can rationalize their feelings that they have to work so hard to repress.
The actual definition of "being gay" revolves around having those feelings, not acting on them. Otherwise there would be no such thing as a gay virgin, or a straight virgin for that matter. If "being gay" or "being straight" had to do with behavior, not feelings, then you couldn't be straight without first having had straight sex.
comment 13y ago · link · parent
May homophobes strongly believe "sexual preference is a choice" because they have first hand daily experience with choosing not to act on their own self-loathing repressed homosexual urges, so there is no way you can convince them otherwise, because they are extremely invested in homosexuality being a choice, otherwise they must confront their own homosexual tendencies.
The argument that it should not matter if it's a choice or not should appeal to any true conservatives or libertarians who truly believe in freedom and don't think the government should be legislating personal choice. But those people are extremely rare, just like true Christians who have actually read the bible and believe what it says, instead of cherry picking the convenient parts and characterizing what they learned by going to Sunday School and watching animated christmas specials, and know what the dogma of their religious institutions actually dictates that they should believe.
For example, many "true" Catholics will patronizingly explain to you that the idea of eating Christ's flesh and drinking his blood is only a metaphor, when it most certainly is NOT: http://en.wikipedia.org/wiki/Transsubstantiation
The "it should not matter if sexual preference is a choice" argument allows you to question if they are a true conservative / libertarian or not, in a way that you can't get through to repressed self loathing repressed homosexuals with the "homosexuality is a choice" argument.
Of course anyone who thinks they're an expert in the answer to the question of whether or not sexual preference is a choice, whose own personal opinion overrides the scientific consensus, is obviously speaking from the personal experience of choosing to suppress and not act on their own homosexual feelings, so there is no way to get through to them with that logical argument.
That's why it's important to use both approaches together.
comment 13y ago · link · parent
Here's something I wrote about MaxScript: Automating The Sims Character Animation Pipeline with MaxScript http://www.donhopkins.com/drupal/node/30
comment 13y ago · link · parent
comment 13y ago · link · parent
But don't lose any sleep over it: computer networks and storage devices are fast and large enough these days that it's not going to cause any meltdowns, so it's more important to save people time, than to conserve the bandwidth and disk space consumed by a few lines of text. Sorry to have wasted YOUR time that it took you to post a complaint.
comment 13y ago · link · parent
comment 13y ago · link · parent
I attended the first X11 conference, and used X10 to develop pie menus and a window manager (based on UWM) that was extensible in Forth. http://donhopkins.com/home/movies/X10PieMenuWM.mov http://donhopkins.com/home/archive/piemenu/uwm/fuwm-main.f
comment 13y ago · link · parent
comment 13y ago · link · parent
I've written several window managers / user interface toolkits / tabbed window frames / menu system in PostScript for NeWS. We even wrote an X11 window manager in PostScript, complete with rooms, scrolling virtual desktop, tabbed windows, pie menus, and seamless integration of X11 and NeWS windows.
comment 13y ago · link · parent
XRotateProperties() XCirculateWindow() XRotateBuffers() XStoreBytes() XStoreBuffer() XFetchBytes() XFetchBuffer() and everything to do about window borders, including how they metastasized into the Shapes extension.
http://www.art.net/~hopkins/Don/unix-haters/x-windows/disast...
Ice Cube: The Lethal Weapon
One of the fundamental design goals of X was to separate the window manager from the window server. "Mechanism, not policy" was the mantra. That is, the X server provided a mechanism for drawing on the screen and managing windows, but did not implement a particular policy for human-computer interaction. While this might have seemed like a good idea at the time (especially if you are in a research community, experimenting with different approaches for solving the human-computer interaction problem), it can create a veritable user interface Tower of Babel.
If you sit down at a friend's Macintosh, with its single mouse button, you can use it with no problems. If you sit down at a friend's Windows box, with two buttons, you can use it, again with no problems. But just try making sense of a friend's X terminal: three buttons, each one programmed a different way to perform a different function on each different day of the week -- and that's before you consider combinations like control-left-button, shift-right-button, control-shift-meta-middle-button, and so on. Things are not much better from the programmer's point of view.
As a result, one of the most amazing pieces of literature to come out of the X Consortium is the "Inter Client Communication Conventions Manual," more fondly known as the "ICCCM", "Ice Cubed," or "I39L" (short for "I, 39 letters, L"). It describes protocols that X clients ust use to communicate with each other via the X server, including diverse topics like window management, selections, keyboard and colormap focus, and session management. In short, it tries to cover everything the X designers forgot and tries to fix everything they got wrong. But it was too late -- by the time ICCCM was published, people were already writing window managers and toolkits, so each new version of the ICCCM was forced to bend over backwards to be backward compatible with the mistakes of the past.
The ICCCM is unbelievably dense, it must be followed to the last letter, and it still doesn't work. ICCCM compliance is one of the most complex ordeals of implementing X toolkits, window managers, and even simple applications. It's so difficult, that many of the benefits just aren't worth the hassle of compliance. And when one program doesn't comply, it screws up other programs. This is the reason cut-and-paste never works properly with X (unless you are cutting and pasting straight ASCII text), drag-and-drop locks up the system, colormaps flash wildly and are never installed at the right time, keyboard focus lags behind the cursor, keys go to the wrong window, and deleting a popup window can quit the whole application. If you want to write an interoperable ICCCM compliant application, you have to crossbar test it with every other application, and with all possible window managers, and then plead with the vendors to fix their problems in the next release.
In summary, ICCCM is a technological disaster: a toxic waste dump of broken protocols, backward compatibility nightmares, complex nonsolutions to obsolete nonproblems, a twisted mass of scabs and scar tissue intended to cover up the moral and intellectual depravity of the industry's standard naked emperor.
Using these toolkits is like trying to make a bookshelf out of mashed potatoes. - Jamie Zawinski
comment 13y ago · link · parent
comment 13y ago · link · parent
comment 13y ago · link · parent
And Creative Computing was a great computer magazine, too!
comment 13y ago · link · parent
As a practical matter, you need JavaScript to achieve the best usability, reusability, flexibility, etc. But it should serve as an example to JavaScript widget designers how much you can do in CSS.
It's an interesting and difficult problem designing a JavaScript pie menu component that let you easily and deeply customize it in CSS.
comment 13y ago · link · parent
The tradeoff of using pure CSS and very little JavaScript is that it's not a flexible, reusable, data driven component, that lets you plug in your own graphics, content and behavior.
I think it's a great idea to offload as much of the graphics and feedback to CSS as possible, but I don't see any practical reason for avoiding JavaScript and using pure CSS.
Anyway, as a rule of thumb, people who use modern browsers with JavaScript turned off do it because they like to whine about how persecuted they are, and I would never presume to begrudge them that opportunity.
The nature of user interface design is that when the rubber hits the road, there will always be millions of specific little tweaks you have to do to make things easier for the user and integrate with the application, and you can only do so much in CSS before you hit a wall and have to use JavaScript.
Of course it's great for the JavaScript code to leverage CSS as much as possible to make the menus graphically rich and easily customizable, and many of the CSS techniques of this particular example with a fixed menu could be applied to a more general purpose JavaScript widget.
But what it boils down to is that you really need the power and generality of JavaScript to support more sophisticated tracking, feedback, data driven menus with dynamic layout, application specific presentation and tracking feedback, etc.
Then you can get on to the harder problem like making it easy to design, build and measure pie menus that are most efficient and easy for users to remember, learn and use. And that depends a lot on the environment and the tools that you are using.
For example, these pie menus for Unity3D leverage the Unity editor and 3D object manipulation tools, and they have ways to tightly integrate your own application, content, graphics, animation and feedback: http://www.youtube.com/watch?v=sMN1LQ7qx9g
comment 13y ago · link · parent
The Design and Implementation of Pie Menus
There're Fast, Easy, and Self-Revealing.
Copyright (C) 1991 by Don Hopkins.
Originally published in Dr. Dobb's Journal, Dec. 1991, lead cover story, user interface issue.
http://www.donhopkins.com/drupal/node/98
More stuff at:
Home > topics > Software > Pie Menus http://www.donhopkins.com/drupal/taxonomy_menu/4/49/14
And here are some pie menus for Unity3D: http://www.youtube.com/watch?v=sMN1LQ7qx9g
And this explains the pie menus and visual programming in The Sims: http://www.DonHopkins.com/home/movies/TheSimsPieMenus.mov
comment 13y ago · link · parent
We performed a controlled experiment in 1988 that compared eight item pie menus to linear menus, which showed that pie menus were significantly faster and had lower error rates than linear menus.
Users didn't have a problem with them in 1988, and probably won't now: "The most mouse naive users, while finding linear menus easier, tended to be better at pie menus and commented that with practice, they would probably be superior and in fact prefer the pie menus because of their speed and minimization of hand movement with the mouse. Not surprisingly, therefore, most of those preferring linear menus did not have a strong preference on the scaled subjective questionnaire."
An Empirical Comparison of Pie vs. Linear Menus
Jack Callahan, Don Hopkins, Mark Weiser () and Ben Shneiderman.
Computer Science Department University of Maryland College Park, Maryland 20742
(
) Computer Science Laboratory, Xerox PARC, Palo Alto, Calif. 94303.Presented at ACM CHI'88 Conference, Washington DC, 1988.
http://www.donhopkins.com/drupal/node/100
The Design and Implementation of Pie Menus -- Dr. Dobb's Journal, Dec. 1991
There're Fast, Easy, and Self-Revealing.
Copyright (C) 1991 by Don Hopkins.
Originally published in Dr. Dobb's Journal, Dec. 1991, lead cover story, user interface issue.
comment 13y ago · link · parent
Pie menus can support "click up" tracking compatibly with "press/drag/release" tracking, even allowing users to switch between both modes when browsing submenus.
This is important for supporting both novice and expert users, learnability, rehearsal and muscle memory.
You can divide the pie menu learning curve into three stages:
1) The first stage is how a new user typically uses it when they don't know the directions: click it up, look at the menu items, decide what you want, point at it, click it down. It requires lots of time, visual feedback, and mental attention, but it transparently trains you for later stages.
2) Then there's an intermediate state where the user knows the direction, presses down, moves, then looks at the screen, waits for the menu to draw and give some feedback that they've selected the right item, then finally releases the button to conform, or moves to correct the selection. It requires much less time, but still requires some visual attention and waiting for feedback before confirming the selection. But it reinforces previous learning, and builds muscle memory and confidence.
3) The final stage is when the user remembers the direction both mentally in "neural memory" and physically in "muscle memory", so they can just quickly flick in the correct direction and go on to their next task immediately, without looking at the menu or waiting for feedback. This requires the least amount of time and is the most fluid and satisfying way to use pie menus.
Carefully designed pie menus can seamlessly support all three stages, and both modes of interaction (click up, or press/drag/release). That enables users to smoothly escalate from one stage to the next.
There are several properties that dovetail together to make pie menus easier to learn:
1) Pie menus bridge between menus and gestures with a smooth learning curve.
Features that support expert users shouldn't get in the way of novice users: If you don't use pie menus very often, you can still use them easily without spending time or memory to learn your way around them. But using them in "novice mode" is rehearsal for using them in "expert mode", while they aren't any harder for novices to use because of that.
Features that support inexperienced users and learning, like fancy graphics to present menu on the screen, animate theatrical feedback and help illustrate and explain the selection, should not get in the way of the more efficient ways of using them as gestures.
To contrast: Drop down menus that display keyboard shortcuts suffer from increased size and cluttering, and using drop down menus with the mouse is not rehearsal for using drop down menus via keyboard shortcuts.
2) Pie menus are "self revealing": they show users the available options and their corresponding direction, so they are easy for new users to discover, use and learn.
To contrast: Normal invisible gesture recognition is not "self revealing", since they usually do not have a way for the user to discover what gestures are available and how to make them. Some gesture recognition systems have "help dialogs" that show and explain each available gesture, but stopping what you're doing to look at a help dialog to discover and learn the gestures is not the same thing as just using the gestures to get your work done, learning them while you're using them, without spending extra time on training.
3) Pie menus seamlessly support rehearsal. Stage 1 gestures are rehearsal for stage 2 gestures are rehearsal for stage 3 gestures.
Clicking up menus at stage 1 is rehearsal for stage 2, because it shows you the options and their directions, and lets your leisurely browse the menu at your own pace without stressfully holding down the mouse button.
At stage 1, it can incrementally reveal more information about the menu and items, while previewing and explaining the effects of the selection. Once you mentally remember the directions of the items you want, you smoothly advance to stage 2 without even noticing it.
Gesturing into menus and waiting for confirmation at stage 2 is rehearsal for stage 3, once you have enough physical muscle memory and confidence to quickly use gestures without looking at the screen or waiting for feedback.
Showing live in-world feedback, like previewing the effects of the current selection in real time during menu tracking, is an effective form of direct transparent feedback that reduces the need for indirect cluttered feedback with words and icons. This works well when using the distance as a parameter to the selection, so you can "pull out" sub-items (like colors) or linear parameters (like font size), and release the button when you're happy with what you see.
Both novice and expert users benefit from that kind of "direct manipulation" feedback, since it's better to keep your attention focused on the thing you're interacting with, not the menu.
Pie menus can be carefully designed to make learning the item directions easier, by exploiting the natural directional, opposite, orthogonal, linear relationships between items. For example: twelve items for a clock face of hours, astrological signs, months, etc; or eight items for compass directions, orthogonal pairs of opposite pairs that can be combined along diagonals (like good/evil, lawful/chaotic), etc.
A humaine user interface will explain why any menu items are disabled, and make it easy for you to do whatever is required to enabled them, instead of just graying them out and not telling you what's wrong when you try to select them.
Here's a demo of pie menus for Unity3D, that shows some of these ideas: http://www.youtube.com/watch?v=sMN1LQ7qx9g