Live data from Hacker News

Phoenix: A modern X server written from scratch in Zig

git.dec05eba.com

51–60 of 462 posts

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

#51
post #35

Earlier quoted context omitted.

I thought this too and originally thought that’s what Wayland was going to do but it went off and did its own thing. I’m all for an X12.

An X12 was briefly considered by the community before adopting Wayland: https://www.x.org/wiki/Development/X12/ If you take the time to read through that (very partial) list of cruft and footguns in X11 it probably makes it a little easier to understand why a clean-slate approach was able to attract momentum and why many hands-on involved developers were relatively tired of X11. Critics would of course respond that b…

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 got totally sick of the "expert" language designers with no real world code shipping responsibilities lecturing me. Every post about this stuff was met by comments from pedantic idiots. So every string had to have a helper function around it. Total and absolute garbage. They still haven't explained to my satisifaction why not support u"..." to allow a transition more easily to 3.

Luckily sanity started prevailing around 3.5 and we started to see a progression - whoever was behind this should be thanked. The clueless unicode everything was walked back and we got % for bytes so you could work with network protocols again (where unicode would be STUPID to force given the installed base). We got u"" back.

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 excitement.

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

#52
Bit of an observation, but I've noticed that there's been quite a few pragmatic projects started in Zig. Bun vs Deno comes to mind (one focused on DX, the other on security), and now this vs Wayland. Not to say that designing something properly is wrong, just that it tends to throw away a lot of important interoperability.

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

#53
post #42

Earlier quoted context omitted.

I think the confusion is obvious, given a little empathy for the range of people who use computers. The server is usually a remote machine, especially back in the time when "client-server" architecture was emerging in mainstream (business) vernacular.

The server is not usually a remote machine. The server is the app accepting remote connections. This has been true for decades. https://en.wikipedia.org/wiki/Server_(computing)

Please don't imagine that I don't fully understand this.

Nevertheless, X11 "server" and "client" have confused very smart and highly technical people. I have had the entertainment of explaining it dozens of times, though rarely recently.

And honestly, still, a server is usually a remote machine in all common usage. When "the server's down", it is usually not a problem on your local machine.

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

#54
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 if x11 starts having issues then probably https://gitlab.freedesktop.org/wayback/wayback will be it

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

#55

First my mind went to Phoenix (elixir framework), then to X (twitter) before it clicked what this was actually about. Some very overloaded names

Programmers aren't good at checking if the name is taken. We've done this particular one before. Phoenix (Firefox) had to change names because of Phoenix Technologies, then again because of the Borland Firebird Database.

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

#56
post #29
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.

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.

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

#57
post #29
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.

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

The part that is counterintuitive to most people when it comes to the "server" terminology is that, with X, your end-user workstation (which may be an incredibly dumb X terminal) is the "display server", which means you remote into a server (in the traditional sense) elsewhere, which then acts as an X client by making requests to your local machine to display windows.

The way most people think about it, "client" is your local machine and "server" is the remote machine that has lots of applications and is potentially multi-user, but X turns that backwards. The big iron is the client and the relatively dumb terminal is the server.

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

#60
post #5

Complements XLibre[0], an active fork of the X11 server from Xorg. XLibre is trying to advance the existing implementation which Xorg abandoned, whereas Phoenix is writing a new, compatible server from scratch. 0. https://github.com/X11Libre/xserver

XLibre is a joke. They're making changes for the sake of changes: for example, commit aefde9 strips out vendoring in an ad-hoc, incomplete fashion (introducing a minor spacing bug in the process); and commit aafd986 replaces `int` with `unsigned int` (instead of `size_t`), failing to properly fix the bug that the compiler warnings identified (albeit, also removing an unrelated C footgun along the way, so this does look like a bug fix). The main author has a history of cowboy commits: 533c45e (which made it into mainline Xorg before he got kicked out) straight-up prevents ‎hw/xfree86/os-support/bsd/arm_video.c from compiling, so it's clear there's no actual testing taking place.

I doubt the XLibre authors understand the X security model, either – they never do, in forks like this – and they've alienated most of the security researchers who might otherwise clean up after them.

Phoenix and Wayback are much more interesting projects, in my book. Wayback's designed to actually work, and I expect it to be production-ready much sooner; but I expect Phoenix to be the more technically interesting project, since it's deliberately breaking from the X11 spec.

Post reply on HN