Live data from Hacker News

I hate: Programming Wayland applications

p4m.dev

161–170 of 184 posts

Re: I hate: Programming Wayland applications

#161

Earlier quoted context omitted.

Imagine you wrote an application that supports global, unfocused keybinds (OBS is one popular example). Instead of implementing it one way that works forever with any WM/DE (X11), now you must rely on each individual wayland compositor to implement one or more optional extensions correctly, and constantly deal with bug reports of people that are using unsupported or broken compositors.

Or you could write portable software that doesn't rely on reading global input. OBS you give as an example, and it is a good one. They could simply register a D-Bus handler and provide a second binary that sends messages to the running instance. The software is more general in this way as it allows full programmatic control. A Sway user, for instance, could add bindsym $mod+r exec obs-control toggle-recording to thei…

This is an excellent description of why this is an awful situation.

It's extremely user hostile.

> The problem with X11 is that it has for a long time exposed too much unrelated functionality like this to the user

It's not "unrelated functionality". It's an entirely generic ability to listen to events that is available with Wayland as well, just with an added restriction.

Re: I hate: Programming Wayland applications

#162
post #90

Earlier quoted context omitted.

Yeah Wayland I get. It's still kind of janky even after almost 20 years. Complaining about Systemd makes no sense though. It works very reliably, switching to it caused no issues, and it has fixed a number of problems with the Linux desktop. Some people just want to live in the 80s forever.

"Some people just want to live in the 80s forever." I think this shaming of free software users that want to make other choices is rather terrible.

Most of systemd's critics are not people that just want to use another init system. They object to it on stupid philosophical grounds for which they should be shamed.

Re: I hate: Programming Wayland applications

#163

Callbacks are bad?

I wouldn't call wayland-client a callback hell. All callbacks are called at expected time when you call wl_display_dispatch() (and its variants) or during wl_display_roundtrip(). GLFW also works with callbacks and nobody complains about that.

There is no async involved so function coloring argument doesn't really apply here.

I don't share author's hate for them, but they are definitely more verbose than popping form event queue and switch statement on event type ala SDL loop. Plenty of callbacks just set parameters in some state struct and do not propagate further. And you need to fill the vtable structs, and register that as listener. This boilerplate is probably the reason why basic window examples have ~200 lines instead of 40. But in larger project this is barely a problem.

Re: I hate: Programming Wayland applications

#164
post #64

Earlier quoted context omitted.

There are ~three groups in the systemd debate. People who grew up on sysvinit based service management and can't handle change (the partially straw man group you are complaining about). People who only know about sysvinit based service management and systemd and formed their opinions of systemd based on "sysvinit == terrible confusing shell scripts; systemd == config files" (you - as a first impression). And people w…

The ancient Linux sysvinit-based service management is a strawman, because the scripts available in various distributions were very heterogeneous and many were quite bad. There are other ancient service management systems that were much more coherent and which did not show any disadvantage in comparison with systemd, e.g. even the sysvinit-based service management of FreeBSD or other *BSD, which were and are much bet…

The word was "declarative" not descriptive.

There is nothing descriptive about `Wants`, `Before`, `After`, `Requires`, `Requisite`, `BindsTo`, `PartOf`, `Upholds`, `Conflicts`, ... we could go on. And we can stop there. (To clarify, _I_ know what these all mean, but certainly I didn't have a clue what they meant until I read the docs about and didn't fully understand the nuances of these until I re-read those docs many times and read the source code.)

But the "declarative"-ness of systemd's configuration files can also be put into question when it's incredibly common to find an `ExecStartPre` containing a shell oneliner.

That being said, my goal was not to start a discussion about systemd here. My goal was to call out the completely unproductive strawmanning of systemd critics by the person I was replying to.

Re: I hate: Programming Wayland applications

#165
post #90

Earlier quoted context omitted.

"Some people just want to live in the 80s forever." I think this shaming of free software users that want to make other choices is rather terrible.

Most of systemd's critics are not people that just want to use another init system. They object to it on stupid philosophical grounds for which they should be shamed.

Most of systemd's proponents are not people that care about what service management system they use. They defend systemd despite their ignorance of both systemd and the proposed alternatives solely to feel part of the "in group" of people who moan about people who moan about systemd.

Re: I hate: Programming Wayland applications

#166

Earlier quoted context omitted.

Having some kind of access control list or other method of enforcing access rights for windows and clipboards is definitely a good thing. However, such a thing could be relatively easily added to X11 without changing the X protocol, so this does not appear as a sufficient motivation for the existence of Wayland. I have not tried Wayland yet, because I have never heard anyone describing an important enough advantage o…

Having a medium understanding of graphics hardware and software stack, and being an everyday desktop Linux user recently, it's hard to square these kinds of complaints with the actual technical situation. Like, people say X11 is network transparent but that's not in practice true. People argue the same problems could be solved in X11, but in practice despite a decade + of complaining about Wayland nobody did the work…

> Like, people say X11 is network transparent but that's not in practice true

Not done it for a while, but ssh into remote machine and start a GUI app used to work for me. It needs one setting in ssh config AFAIK.

> subjectively as a user most or all of my Linux GUI machines are using Wayland and there's no noticeable difference.

Not anymore. There used to be though, and i think it may have got a bad name by being rolled out by distros (especially as the default) before it was ready for most users. I can remember several issues, the worst was with screenshots.

I can accept that as I use a rolling release distro as a daily driver, so you expect some issues, but its not OK if those rough edges hit people using more mainstream distros (which I think they did)

Re: I hate: Programming Wayland applications

#167
post #82

Earlier quoted context omitted.

I mean specifically things that using using Wayland will improve.

The commenter above appeared to reference Wayland preventing apps from having unrestricted access to screen contents and clipboard, so those.

> preventing apps from having unrestricted access to screen contents and clipboard

My question was "How often has that been a problem. Is it a vulnerability that has been, or or likely to be, exploited in practice?

I would have thought that filesystem access is the biggest issue, followed by network access. There are solutions for these, of course, but in most cases the default is either unrestricted or what the app asked for.

Re: I hate: Programming Wayland applications

#168
I'd like to see some code to understand what it takes to write a functioning Wayland application, a bit like David Rosenthal did in his paper "A Simple X11 Client Program -or- How hard can it really be to write ‘Hello, World’?" (USENIX 1988 Winter Proceedings).

Anyway, if I was persuaded that Wayland has a rather backwards design (here my reasons: https://news.ycombinator.com/item?id=47477083), now I have the confirmation that its philosophy is something like "put surfaces on the screen and distribute events to the clients, all the other stuff is not my business", and that exploring alternative approaches to window management is still worth it. Having applications that manage all their resources (canvases, events, decorations) is not bad per se (for example video games), but not all of them need to.

Re: I hate: Programming Wayland applications

#169

Earlier quoted context omitted.

Most of systemd's critics are not people that just want to use another init system. They object to it on stupid philosophical grounds for which they should be shamed.

Most of systemd's proponents are not people that care about what service management system they use. They defend systemd despite their ignorance of both systemd and the proposed alternatives solely to feel part of the "in group" of people who moan about people who moan about systemd.

People who defend systemd do so because they want their system to work reliably and quickly. It does that. Before you say "so does sysvinit", no it does not. It was janky-but-workable on servers and desktops in the 90s, that basically never did anything except startup and shutdown. Most modern computers aren't like that.

Re: I hate: Programming Wayland applications

#170

Earlier quoted context omitted.

Most of systemd's proponents are not people that care about what service management system they use. They defend systemd despite their ignorance of both systemd and the proposed alternatives solely to feel part of the "in group" of people who moan about people who moan about systemd.

People who defend systemd do so because they want their system to work reliably and quickly. It does that. Before you say "so does sysvinit", no it does not. It was janky-but-workable on servers and desktops in the 90s, that basically never did anything except startup and shutdown. Most modern computers aren't like that.

More straw man arguments. You have just confirmed that you have _no idea_ what alternatives exist, that you have _no idea_ what systemd actually does, and you have _no idea_ what my actual stance is in this discussion.

Please don't insult me by insinuating that I think that sysvinit is anything other than a weird esoteric init program which has, in the past and on linux distros, been the supporting piece of a garbage heap of poorly written shell scripts (and which is currently on BSDs the supporting piece of a relatively okay designed heap of shell scripts which implement a silly service management model that I also don't like).

Post reply on HN