points by DonHopkins 7 years ago

Oh, come on. I'm all into retrocomputing, and think there's a place for riced-out Apple ][ emulators, but X-Windows was terrible in comparison to other window systems 20 years ago, and it still is.

microM8 Apple II Emulator: https://paleotronic.com/software/microm8/

The X-Windows Disaster: https://medium.com/@donhopkins/the-x-windows-disaster-128d39...

X window managers are as complex and dug into a pit of pointless complexity as the Space Shuttle: https://news.ycombinator.com/item?id=5861229

The fundamental problem with X is that it ignored the brilliant idea behind "AJAX", that you should send not a fixed protocol but executable code (like PostScript or JavaScript) to the server to be interpreted in a sandbox.

Plus the fact that it has a terrible antique-device-dependent imaging model that views every device like a MicroVAX framebuffer on acid.

At the time of the transition from X10 to X11, all these problems and solutions were well and widely known and debated, but X11 chose to ignore those ideas.

But other competing window systems like NeWS didn't have those problems, and used much better solutions, which were only later re-discovered, re-implemented and re-branded in yet another layer with the advent of web servers, browsers, HTML, JavaScript, canvas, and "AJAX".

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

NeWS was architecturally similar to what is now called AJAX, except that NeWS coherently:

- used PostScript code instead of JavaScript for programming.

- used PostScript graphics instead of DHTML and CSS for rendering.

- used PostScript data instead of XML and JSON for data representation.

But now that there's another Web Browser layer slapped on top of X-Windows (and the terms "client" and "server" switched places), you're stuck with two competing mutually incompatible window managers nested inside of each other, one for the outside frames around apps, and one for the inside tabs around web pages, that don't cooperate with each other, and operate uncannily differently.

So none of your desktop apps benefit from any of the features of the web browser (unless they include their own web browser like Electron).

And you can't write lightweight apps in a couple pages of script like "Big Brother Eyes" that run in the shared window server, without requiring their own separate external app with a huge runtime like Electron.

https://www.donhopkins.com/home/archive/news-tape/fun/eye/ey...

Nor can you easily integrate desktop applications and widgets and web pages together with scripts, the way HyperCard, OpenDoc, CyberDog and HyperLook enabled.

https://medium.com/@donhopkins/hyperlook-nee-hypernews-nee-g...

Here's how the web browser and window manager should work together seamlessly:

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

And this is why a modern window manager should be written in JavaScript, leverage HTML, Canvas and WebGL, and support Accessibility APIs, as well as screen scraping, pattern recognition, screen casting, virtual desktops, overlays, drawing and image composition, input event synthesis, journaling, macros, runtime user customization and scripting, programming by demonstration, tabbed windows, pie menus, etc:

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

Think of it like augmented reality for virtualizing desktop user interfaces and web pages.

stelonix 7 years ago

Brother, I'm sorry, but your post was very hard to understand, because you touched on many different subjects and linked several different comments from different times.

I'd like to point out my like of X11 over Wayland is not based on "retrocomputing". I'll try to clarify what I meant.

I know of X11's shortcomings, I have my own pet peeves with it, yet my issues with X are very different from the usual complaints you see in the wild. Although I agree X11 is pretty bad, when compared to Wayland it's like comparing a modern smartphone to a Symbian. I have issues with:

- the async way X11 operates; many, many times I've had clicks that lag a few milliseconds and end up pointing to the wrong window

- the whole event propagation model is awful, making it either an insecure system or a pretty cumbersome system to hook into events

- the over-using of the UNIX philosophy everywhere makes X11 feel like a bunch of brittle parts stuck together with cheap glue; none of the systems know much about each other

- the fact the client needs to be trusted on most of the properties it sets is simply stupid; some clients, to this day, still do not set, for example, _NET_WM_PID and for some reason Xorg developers decided it was a good idea to allow such important Atoms to be OPTIONAL. There are MANY simple tasks that are next to impossible under X11, like figuring out which window has the focus. This is RIDICULOUS

- some of its' internals must be so heavily intertwined together that I still get occasional crashes for reasons completely unrelated to window management or the GUI system

- toolkits; here is probably the number one reason there won't be a year of desktop on Linux: no one coming from any other OS understands why widgets look different, be it an user or a programmer who just wants to make a simple GUI app.

With all that said, the issue with Wayland is that it does not fix any of that. Worse, for some of those issues, it makes it even more difficult to work with.

I come from WINAPI/GDI, and before starting with X11 coding, I loathed it. I now see Windows GDI + WINAPI as the best designed GUI system I've coded for. Even with ALL OF ITS' SHORTCOMINGS, I can do everything I could imagine with windows objects: move windows, focus, unfocus, get keyboard input, change colors, change fonts, change text captions, completely hook into how client AND non-client area is drawn, override event procedures... The list goes on, WINAPI+GDI is a complete, consistent system; and because of politics, X11 devs time and time again refuse to make a solid system like it.

And Wayland comes from all those caveats and does not fix them: it maintains the same stupid politics and makes things EVEN HARDER to work with. It's akin to developing for an Android-like OS on a desktop computer. And the REASONS used to explain why Wayland exists are simply propaganda: they say X11 is old and unmaintainable, the code is awful, yadda, yadda. Those people must have never looked into the X11 codebase, because it's one of the most well-written and well commented pieces of code I've seen in my whole life. Here, take a look:

https://github.com/mirror/xserver/blob/master/dix/events.c

So, in conclusion, we do not need Wayland, we need X12, to fix the caveats, quit the over-engineered UNIX-everywhere design decisions, have a standard toolkit and event model, have a standard way for IPC and inter-window communication, sane defaults etc. Wayland is not the answer; Wayland is akin to shooting your only cow because it was infested with ticks! You don't kill the cow, you give her medicine so it gets better, because if you kill her, you'll also lose your daily milk supply! That is not smart.