back

by uecker·2y ago·view on hn ↗
It works perfectly for me. Inefficiencies could easily be fixed by extensions if necessary. The main thing which is missing in practice is latency hiding. But this is supported by the X protocol just fine, only toolkits were never changed to support it.

Design-wise it is exactly right: A generic remote buffer management protocol.

2 comments
> Design-wise it is exactly right: A generic remote buffer management protocol.

That's probably a better description of VNC (aka. RFB, "remote framebuffer"). X11 is far from generic; it has a bunch of baked-in concepts for things like windows, named colors, bitmap fonts, selections, a screensaver, and an entire drawing subsystem that's only used by a few legacy apps nowadays. A glance through the protocol, with a particular eye to the "Requests" section, may be enlightening:

https://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.ht...

For comparison, here's VNC. There's some extensions for more efficient ways to send bitmaps over the wire, but the essential concepts of the protocol are unchanged.

https://datatracker.ietf.org/doc/html/rfc6143

The non-generic special parts that were needed in the past can easily be ignored. At its core it is a generic buffer management protocol and it obviously has all the parts for generic buffer management.
The buffer management at X-Windows' core is anything but generic or well designed. See John Steinhart's comments below, estimating it has around 20 different databases, and could have been much better done with just a dozen API calls.

X-Windows is a dozen layers of poorly-designed, less-than-useful, leaky abstractions, systematic race conditions, and complex non-solutions to obsolete non-problems. To the core, and its extensions. Most of which nobody even uses any more. So much useless junk is still required to be there, and the essential stuff nailed on the side as an afterthought that you're still required to use (like ICCCM for example) is terribly designed. And yes, X-Windows is also extremely bad for remote applications, in spite of the fact that's exactly what it was designed for.

"X: The First Fully Modular Software Disaster (Even your dog won't like it.)"

https://donhopkins.medium.com/the-x-windows-disaster-128d398...

John Steinhart thought X-Windows could have been a hell of a lot more modular and less complex, and could have been much more simply and modularly designed and better implemented with "less than a dozen API calls":

https://news.ycombinator.com/item?id=17056516

DonHopkins on May 12, 2018 | parent | context | favorite | on: Build your own X: project-based programming tutori...

Hasn't somebody reimplemented X11 in JavaScript/canvas/websockets yet?

There was an X11 server for Lisp Machines! Not sure who wrote it, but it was probably written inside or at least nearby the X Consortium, and I remember Robert Scheifler used it regularly.

https://news.ycombinator.com/item?id=6864364

"For example the TI Explorer Lisp Machine came with an X11 server written in Lisp. On my Symbolics Lisp Machine I used the usual MIT X11 server written in C - this was possible because the Symbolics Lisp machine had a C compiler." -lispm

John Steinhart wrote XTool, a nice snappy reimplementation of X11 on top of SunView! ;)

https://web.archive.org/web/20171008204348/https://minnie.tu...

https://news.ycombinator.com/item?id=15325226

https://web.archive.org/web/20171028110659/https://minnie.tu...

>XTool was very small and fast compared to the X sample server because I wrote the server from scratch. I think that I'm the only person to write an X server outside of the X Consortium. One of the things that I learned by doing it was that the X Consortium folks were wrong when they said that the documentation was the standard, not the sample server. There were significant differences between the two.

>The only really worthwhile thing about X was the distributed extension registration mechanism. All of the input, graphics and other crap should be moved to extension #1. That way, it won't be mandatory in conforming implementations once that stuff was obsolete. As you probably know, that's where we are today; nobody uses that stuff but it's like the corner of an Intel chip that implements the original instruction set. As an aside, I upset many when working on OpenDoc for Apple and saying the same thing there.

>The atom/property mechanism allows clients to allocate memory in the server that can never be freed. Some way to free memory needs to be added.

>The bit encodings should be part of a separate language binding, not part of the functional description.

>X suffers from the same problems as the original Mac API. Scheifler et. al. didn't really do any system level design and modelling. I know this because I discussed it with Scheifler at an ANSI meeting in Tulsa, the only place that I have travelled to on business that had no redeeming qualities. He said "I don't believe in models because they predispose the implementation."

>Had he done some real design work and looked at what others were doing he might have realized that at its core, X was a distributed database system in which operations on some of the databases have visual side-effects. I forget the exact number, but X includes around 20 different databases: atoms, properties, contexts, selections, keymaps, etc. each with their own set of API calls. As a result, the X API is wide and shallow like the Mac, and full of interesting race conditions to boot. The whole thing could have been done with less than a dozen API calls.

[...]

> But this is supported by the X protocol just fine, only toolkits were never changed to support it.

When we've had toolkits for 30+ years and this hasn't happened, that's called a hint.

Nobody* cares.

Right, it works well even without it.