Xplain – Explaining X11 for the rest of us
magcius.github.io
magcius.github.io
"A truly portable X application is required to act like the persistent customer in Monty Python’s “Cheese Shop” sketch, or a grail seeker in “Monty Python and the Holy Grail.” Even the simplest applications must answer many difficult questions"
Read the original for the hilariously accurate dialog that follows…
For quick access, put page 177 in pdf reader to get to printed page 139.
http://web.mit.edu/~simsong/www/ugh.pdf#page177
or
http://web.mit.edu/~simsong/www/ugh.pdf#page=177
For pdf.js (used by Firefox), refer to https://github.com/mozilla/pdf.js/wiki/Viewer-options
If using Adobe Reader, refer https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pd...
(The second variant mentioned by you that works in Firefox using pdf.js appears to be a undocumented feature!)
"Unlike X11, where the graphics primitives were rather low-level and all input event handling involved round-trips to the client, NeWS was advanced enough that simple widgets, such as scroll bars and sliders, could be implemented entirely server-side, only sending high-level state changes to the client, more along the lines of “slider value is now set to 15” than “mouse button 2 released”. Similarly, the client could ask the server to render a widget in a given state, rather than repeatedly transmitting sequences of graphics primitives."
The kernel side component does even somewhat less than X server, as all drawing is done either by direct writing to frame buffer from userspace or thru DRI-like direct rendering mechanism. Kernel side "display server" then only handles message queues and input and tracks which screen region belongs to which window (and set's up the shared memory accordingly, in theory).
For 16 bit windows, one might say that the userspace libraries are somehow part of the kernel (as there is no user/kernel split in win16 and one of the libraries is even called kernel.dll), but in win32 case these libraries are userspace.
On the other hand, NeWS principle is that server implements turing-complete virtual machine (based on postscript) that executes arbitrary code uploaded from clients (which then can define behavior of widgets, specify new ones or even create windows whose complete behavior is server-side).
Before Windows 10, though, GDI was in kernel space, so it was a bit higher level than that, no? Old-style GDI apps would send state-of-the-1980s-style graphics primitives to the server, while newer apps would just write directly to the framebuffer, right?
You should probably also add Vulkan + WSI to the list.
UPDATE: I just realized, this article is from 2013.
Best i can understand, wayland is a protocol spec rather than a set of code like X. Each compositor/wm is individually responsible for implementing said protocol and thus take over the job of X (input handling et al).
Meaning that there will no longer be an X server to act as a independent arbiter of behavior. Whatever the devs of whatever DE you are logged into will have the final word.
The more i learn of Wayland, the more i expect it to turn into a hairball to match X. Only now without a network option ("too insecure"), and with GPU acceleration.
BTW, why are we so bent out of shape about this seats concept? Why oh why are we continually trying to turn a single user piece of hardware into a desktop mainframe?!
There's some quite beautiful Ruby code in there, e.g.:
module X11
k = Keysymdef = {}
c = Cursorfont = {}
[k,c].each {|x| x.extend X11::MAssignForHash }
k[%w| space exclam quotedbl numbersign dollar percent ampersand |]=32..38
k[%w| quoteright parenleft parenright asterisk plus comma minus |]=39..45
[...]
[1] http://artengine.ca/matju/RubyX11/> If you have any questions or comments, _or just want to thank me_, feel free to email me....
Had he asked for money, I probably would not have sent any. But he asked for something that I can provide with ease, so I did. And I enjoyed it.
Is that really what this is about? Is it wrong to do good if it might benefit the do-gooder in some way? Can we all take a collective moment to think critically about that? :)
(anyway, you're wrong(ish?). Posting an issue does not appear to have added my name to https://github.com/magcius/xplain/graphs/contributors . Though I could have sworn that I've seen what you are talking about happen before. \shrug\, that's github's fault.)
On your last paragraph, yes, github used to show who reports issues as contributed to the project to which they reported. I recall at one point having reported an embarassing silly issue (a very stupid config mistake I made that I don't recall) to Pelican blogware and it went there among the contributed projects as a badge of dishonour. :) But now I checked, that section seems to be gone from the profile page on gihtub.
https://github.com/magcius/xplain/commit/91fde0e87116ec834f1...
[0]: http://comments.gmane.org/gmane.os.apple.xquartz.devel/912
I don't know much about front-end dev and made something that looked decent on my laptop. PRs are most appreciated if you want to make it presentable on mobile devices.
Basically, I emulate what an X server would do, semantically, without implementing any of the actual wire protocol. The codebase is, I hope, pretty well commented and designed as something to learn from.
https://github.com/magcius/xplain/blob/gh-pages/src/server/s...