Live data from Hacker News

Phoenix: A modern X server written from scratch in Zig

git.dec05eba.com

211–220 of 462 posts

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

#211

Does this mean we can finally be done with the farce of pretending that Wayland is a serious contender for replacing X11?

Why is it not? I get the impression Wayland has been built by former X devs

The issue (to my understanding) is that it is a very different protocol, which makes it quite onerous for application and desktop environment developers to transition to. Also, since some desktop environments have really grown opposed to Wayland (e.g. XFCE) it puts the application developer in the position of having to wait.

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

#212

Earlier quoted context omitted.

A lot of people would have preferred this to Wayland if it had come much earlier. If it also runs Wayland apps, many may prefer it actually.

wondering who those people are given that Wayland was done by xorg devs

Users? Obviously xorg devs want to work on something that isn't ancient and crufty. But users want something that actually works and it has taken almost 2 decades to get to that point.

Actually I still have more issues on Wayland than X. Although it is at least starting to swing in the other direction - e.g. KDE's screen recording feature doesn't work on X. The button's still there but if you click it nothing happens.

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

#213
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 is really one of the worst designed languages. It always baffles me that people recommend it to beginners.

I dunno there's a lot to pick from when it comes to "worst designed"!

It's definitely not well designed though.

And I agree about recommending it to beginners. Sure, a for-loop and a simple function look very friendly and easy, but good luck explaining to them why they can't import from a file in a different directory...

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

#214
post #193

Earlier quoted context omitted.

Current status: > 2025-08-16: dwl IS CURRENTLY UN-MAINTAINED. AT THE PRESENT TIME, I (@fauxmight) DO NOT HAVE THE TIME OR CAPACITY TO KEEP UP WITH wlroots CHANGES. https://codeberg.org/dwl/dwl

I said build on top of wlroots, not DWL. And I only brought it up as an example of a small Wayland compositor/window manager because the poster I was replying to wants to build their own anyway. DWL is more interesting as a learning exercise than something to use.

The -IMO- important part of that quote is "NOT HAVE THE TIME OR CAPACITY TO KEEP UP WITH wlroots CHANGES".

X11 is backwards compatible, you do not have to "keep up" with its changes.

wlroots seemingly isn't. This is a significant issue when it comes to relying on most 3rd party libraries.

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

#215
post #22

Earlier quoted context omitted.

(tangent) This is true, although entertainingly, the "server" part has always been easily confused. In X11, the "server" runs on your local machine, and the "client" frequently runs on a remote system.

Yes, it’s simultaneously logical if you look at how it works and immensely strange if you don’t understand the architecture. (As has been noted all the way back to the UNIX-HATERS Handbook [1], although, pace 'DonHopkins, the NeWS Book uses the same terminology—possibly because it was written late enough to contain promises of X11/NeWS.) [1] https://www.donhopkins.com/home/catalog/unix-haters/x-window...

There is nothing at all strange about the terminology. Go run ps on macOS and marvel at the "WindowServer" process. The generic architectural term is "display server".

https://en.wikipedia.org/wiki/Windowing_system#Display_serve...

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

#216
post #132

Earlier quoted context omitted.

Which one? The Gnome Wayland, the KDE Wayland, the xroots wayland, Weston, or one of the others? Each one is an independent implementation of a Wayland compositor, with a differing, incompatible set of extensions. X11 was a single, pretty janky implementation. Wayland is the worst of both worlds -- it's cleaned up a little, but it's still kinda janky. In exchange for a little bit of cleanup, mainly around bitmap font…

Sure, but I don't see a world where keeping X11 alive, in addition to all of this, makes anything better or easier, for anyone in the medium to long term.

If, as an application developer, you target X11, you have a program that will work on Linux and BSD with all desktop environments. It'd even work on Wayland via Xwayland. If you want to use it on other OSes, it's less smooth, but also working on MacOS via Xquartz, and Windows via Xming. There's even an X11 compatibility layer for Haiku (Xlibe).

With Wayland, you don't even get compatibility with Gnome and KDE. You need conditional compilation to get mouse events if you port to FreeBSD Wayland.

For the medium term, if your goal is to reduce fragmentation, X11 is the portable target, even if you use Wayland.

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

#218
post #181

Earlier quoted context omitted.

It's not technically behind on window positioning. Rather, it was a deliberate choice not to support it. You can very reasonably object to that, but it is sorta a necessary measure to prevent clickjacking.

Did such an attack with crazy moving windows happen in the past?

It does on Android

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

#219

The name Phoenix is overused. There is an Elixir framework called Phoenix. I think I also heard of other projects with that same name before. It's a bit like the name 'Apollo'; besides the moon landing project, I know like 2 dev projects called that and also there is a sales SaaS platform with that name. Surely people should run a search first before choosing a name...

How many X servers named Pheonix are there? Surely it doesn't matter if there are frameworks and libraries of the same name in other areas. It's inevitable to have collisions like this.

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

#220
post #29

Earlier quoted context omitted.

The server runs on the machine that allows clients to connect to it. What is the confusing part about this?

X has the terminology the other way around compared to all other consumer facing software. This is because of its mainframe style history and technically it does make sense, it's just that everybody else does things the other way around. For the people who weren't around in the ancient mainframe times who end up messing with Linux for the first time, this is confusing for a while.

Xhost and xapps
Post reply on HN