Live data from Hacker News

Phoenix: A modern X server written from scratch in Zig

git.dec05eba.com

251–260 of 462 posts

Re: Phoenix: A modern X server written from scratch in Zig

#251
post #45
post #41

Earlier quoted context omitted.

I don't "actually want Wayland" because I want the simplicity of X and the ability to run my own wm, but I have no need for legacy X11 requests, for some values of "legacy". Whether this will become viable for me remains to be seen, but I need very little from my X11 server.

Fair! Though I'm actually not sure I understand what you mean with simplicity. X11 is so vastly more complicated than Wayland.

Afaik Xorg is 'only' like ~500k lines of code, which is not huge by the standards of large porjects. In fact, one of the major counter arguments against Wayland, is that the compositor + a few core libs, like wlroots necessary to provide a similar set of functionalities, is already larger that the equivalent X11 code (which has a ton of unused cruft).

Re: Phoenix: A modern X server written from scratch in Zig

#252

Earlier quoted context omitted.

Wayland made writing WMs needlessly hard, and the benefits of Wayland were frankly not real - most of the reasons given in 2011 were patched in to X11 later. All the Wayland rewrite got us was a situation where Wayland is both bleeding-edge and obsolete simultaneously. Say what you like about X11, but by the time people unironically pushed for mass Wayland adoption, X11 was stable and boringly so. The future of WMs i…

I think the problem is that people wanting to build that and being in position to (being paid for by their employer), are fed up with X11. It learned no lessons from X11. It made most things harder to write and pushed more things that really every WM needs and doesn't care much to implement differently to WMs making them harder. For example, stuff like "WM need to manage raw inputs, so they can have more power over t…

Tech is full of examples of 'successor' technologies, that were aiming to provide a clean rewrite without legacy, which then got bogged down with supporting a bunch of corner cases and accumulated their own share of cruft and could be no longer be considered a cleaner alternative. All the while the majority of the userbase being stuck on the old platform because the new one is buggy and doesn't offer anything tangibly better.

Vulkan, various node replacements come to mind.

Wayland at this point has existed almost as long as X11, longer if you only count the Linux years, yet its still not quite there.

Re: Phoenix: A modern X server written from scratch in Zig

#253
post #21
post #11

Pretty interesting approach to make an X server that is essentially "Wayland-like" (merging display server/compositor by default, isolated apps by default, no remoting of GLX, dropping legacy protocol features to the point of breaking compat with the core protocol, etc.). Not sure who this is for, but by itself it looks like a fairly reasonable set of choices.

For people who absolutely have to have X11 this looks like a better plan than XLibre.

Well there is XWayland then.

Re: Phoenix: A modern X server written from scratch in Zig

#254
post #76

Earlier quoted context omitted.

I disagree. The choices in the Linux ecosystem lead to unnecessary fragmentation and development/packaging nightmares. I say let X11 die, bury it, and never let it rise again. Then we can all focus on making just one display server as good as possible.

> The choices in the Linux ecosystem lead to unnecessary fragmentation and development/packaging nightmares. You cannot possibly use this as an argument in Wayland's favor. X11 sucked because it baked everything, including multiple outdated kitchen sinks, into a single Xorg monolith. Wayland sucks because it factors out everything, including really important features, into optional extensions, ensuring that anything…

Completed in 2007.

https://www.x.org/wiki/ModularizationProposal/

Re: Phoenix: A modern X server written from scratch in Zig

#255

Earlier quoted context omitted.

Per-display DPI settings. No snooping on input without permission. Awareness of the lock screen (the compositor can know that the lock screen is active and provide alternate keybindings instead of having to configure the lock application as well). Locking is not blocked by context menus being open. I ran XMonad for 15 years, but recently switched to river and am loving it.

HDR something that can't be brought to X11 without breaking backwards compatibility.

https://github.com/reaperx7/HDR10-X11

Re: Phoenix: A modern X server written from scratch in Zig

#256
post #164

Earlier quoted context omitted.

Per-display DPI settings. No snooping on input without permission. Awareness of the lock screen (the compositor can know that the lock screen is active and provide alternate keybindings instead of having to configure the lock application as well). Locking is not blocked by context menus being open. I ran XMonad for 15 years, but recently switched to river and am loving it.

You can do per-display DPI just fine on X11 (through xrandr), it's just the major toolkits don't support it. GTK, for example, reads a single global DPI value from XSETTINGS; there's no reason why it has to be that way. The annoying thing about the other things you mention is that they honestly are not that difficult to fix. The X server can throw an error (or just silently ignore it) when one client passes the windo…

>You can do per-display DPI just fine on X11 (through xrandr), it's just the major toolkits don't support it. GTK, for example, reads a single global DPI value from XSETTINGS; there's no reason why it has to be that way.

I remember people complaining about the GTK file picker not having a preview for more than a decade, and at some point it sort of became a meme.

When it finally got added, the PR was like a 2-300 lines.

Re: Phoenix: A modern X server written from scratch in Zig

#257
post #209

Earlier quoted context omitted.

> If the issues are trivially resolved, why did the authors of X decided to abandon X? They convinced their employers Wayland would be better? > Xscreensaver/lock screens on Qubes are still broken. Most people aren't nation-state-level targets and don't worry about security to that degree. But they do like global hotkeys.

Even when you are national-state-level target, there are easier ways to grab the screen. For local state, it's easier to just install a wireless camera and watch your screen from behind: it leaves no trace on your computer (you may spot it wireless connection, if you lucky). Moreover, they are more interested in your communication devices (your smartphone) than in your desktop. Foreign states may exploit your noteboo…

I am not sure what you saw, but on regular Linux processes of the user can spy on each other anyway. In any case, X had the concept of untrusted clients basically forever but nobody cared to invest even the small amount of work necessary to make it work well because nobody thought it would make a different. That this was later used as a major argument against X convinced me that this is not at all about technology.

Re: Phoenix: A modern X server written from scratch in Zig

#258
post #146
post #21

Earlier quoted context omitted.

For people who absolutely have to have X11 this looks like a better plan than XLibre.

Until Wayland actually has an accesibility story, X is really the only choice. Don't think most grassroots projects will have that.

Isn't accessibility outside of the scope of Wayland, whose purpose is to composite application buffers, and deliver input events?

Something like a screen reader needs to talk to an app and query the toolkit for the contents of a window in a semantic way - that's a toolkit feature not a compositor one.

Re: Phoenix: A modern X server written from scratch in Zig

#259

Earlier quoted context omitted.

> by itself it looks like a fairly reasonable set of choices. I have not tried this myself, so I can not speak from experience, but if they have removed features that people used, then they are in a similar situation as wayland. So I don't see what the difference then would be. Perhaps your analysis was also incomplete?

The thing is, X11/Xorg is a huge monolith. There is simply no way to implement every single feature in one go and then release the competing implementation. The very thing that makes people biased towards X11/Xorg both negatively and positively is that it is a huge monolith and the only X implementation on Linux. The moment you have two implementations, you're gonna get the same complaints against the second X server…

The Linux kernel is also a monolith yet has worked forever without a rewrite.

I think there is a reasonably agreed on set of things that can be removed from X, like server-side drawing primitives, and GLX

Re: Phoenix: A modern X server written from scratch in Zig

#260
post #11

Pretty interesting approach to make an X server that is essentially "Wayland-like" (merging display server/compositor by default, isolated apps by default, no remoting of GLX, dropping legacy protocol features to the point of breaking compat with the core protocol, etc.). Not sure who this is for, but by itself it looks like a fairly reasonable set of choices.

[deleted]
Post reply on HN