Live data from Hacker News

Phoenix: A modern X server written from scratch in Zig

git.dec05eba.com

231–240 of 462 posts

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

#231

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…

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

Read this including my response.

A lot of X features are actually Xorg features and they only work because there is a single implementation that everyone tried to integrate with.

Turns out the moment there are two implementations, which is hard on X and easy on Wayland, you can no longer rely on targeting a single implementation for direct integration anymore.

This means a lot of non-X but Xorg features need a protocol extension in Wayland, because things are being standardized that previously were exclusive to Xorg.

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

#232
post #209

Earlier quoted context omitted.

If the issues are trivially resolved, why did the authors of X decided to abandon X? If the issues could be resolved, why were they not resolved? I am using wayland for more than 5 years now, it just works. X did not. Xscreensaver/lock screens on Qubes are still broken. What features is Wayland the protocol missing to allow supporting Xfce?

> 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 notebook builtin "anti-theft" system, Intel Management Engine ("intel" is very good name for a CPU ;-), bugs in NVidia firmware (fonts, OpenGL, etc), bugs in hardware (create a second display to mirror image from primary display to, even when physical display is not attached, for example), etc.

However, I saw that my Firefox window was spied by Chromium window few years ago (I recorded it on Youtube), so this problem in X11 is real.

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

#233
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.

Tangentially related... Is it just me, but is Wayland still lagging behind X11? From things like window placement, night light, etc. Things seem to work just out of the box in X11, and there are always issues in Wayland. (For me this is specifically on Fedora, and I always switch back to X11 from Wayland.)

At this point it is just you.

I run two different distributions myself, I know a bunch o people on even more different distributions, set of configuration and based on empirical analysis I can assure you that no one has problem with windows placement.

Out of the box I used have more problem with X11 (tearing and font rendering being the most annoyingly common ones) than I have with Wayland.

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

#234
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.

Long term? Perhaps, if successful. I am hopeful.

But, right now, XLibre[0] is available, ready for use and very active.

0. https://github.com/X11Libre/xserver

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

#235

Earlier quoted context omitted.

Accessibility? Sure. Everything else? Nah, I'm sorry. There are countless ways to do remoting with Wayland. There are countless ways to do kb+mouse sharing.

>There are countless ways to do kb+mouse sharing. You realize that's worse, right? And to be clearer: core Wayland protocol does not have countless ways. It has zero. Instead of a single protocol with the strong X11 reference X server the wayland compositors pick and choose between libinput, or libei, or libportal with the InputCapture PR, xdg-desktop-portal with the InputCapture interface, some I've probably missed,…

The point of the protocol spec being minimal is that it enables a wide variety of implementations, something it definitely succeeded at.

I still don't know how people twist this obvious success into a failure.

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

#236
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.

> 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 as Wayland is receiving.

You think this is an indictment to the second implementation and that they shouldn't bother by saying an "analysis was incomplete" but in my opinion it's exactly backwards. This is an argument that eternally perpetuates X11 not because of technical capability but rather because it was there first.

After all, the moment there is any implementation that is second it might miss a single feature that nobody actually uses, but theoretically could be used when combining an old binary with a new X implementation.

But this argument misses the obvious fact that X11/Xorg is already dead since any code change will break existing applications. Meaning X11 has become an unsalvageable fossil.

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

#237
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.

I WANT to use X11, its simply better than wayland

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

#238
post #51

Earlier quoted context omitted.

Python 3 was actively antagonistic to Python 2 code for no reason other than to lecture us about how we were doing things wrong, writing code to support 2 and 3 to help transition was dumb etc etc. For example, in python 2 you could explicitly mark unicode text with u"...". That was actively BLOCKED with python 3.0 which supposedly was about unicode support! The irony was insane, they could of just no-oped the u"". I…

> Python 3 was actively antagonistic to Python 2 code for no reason other than to lecture us about how we were doing things wrong, writing code to support 2 and 3 to help transition was dumb etc etc. > [...] > By 3.6 we got back to reasonable path handling on windows and the 3 benefits started to come without antagonistic approaches / regressions from 2. But that was about 8 years? So that burnt a lot of the initial…

Uhm no? As I mentioned, Wayland is simple because it was designed with the idea that there will be many implementations. It turns out that once you have many implementations, you can't just implement screen recording in one implementation and directly integrate with that implementation, because someone might use a different implementation. This then necessitates extensions for features that go beyond displaying things.

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

#239
post #176

Earlier quoted context omitted.

> there's not much you can do. You could fork it. X11 hasn't shipped a major release since 2005, the likelihood of a complete overhaul making it upstream was slim to none even in 2009. X11 developers were better-off focusing on stability, and the Wayland devs moved on. There was no conspiracy to kill either project.

Forking a project when the issue is that half of the staff left the project does nothing to alleviate the staffing issue, does it?

Isn't that the greatness of FOSS over commercial software that keeps being spoken about?

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

#240
post #45

Earlier quoted context omitted.

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

What's the simple way for a bash script to get the title of the currently focused window? In X this is easy and the bash script will work with every DE. In Wayland you have to write a different solution for each compositor/DE.. Prove me wrong, please. It shouldn't be hard, all I want to do is fuzzy match window titles to named audio streams in pipewire, but "Oohh noo that's a security flaw!" say the patronizing Wayla…

> all I want to do is fuzzy match window titles to named audio streams in pipewire,

> basic desktop functionality

I feel your pain, but find your idea of "basic" functionality amusing.

That said, `pw-dump` / `pactl` will give you client names, which often match the window titles.

Post reply on HN