Hacker Newsnew | past | comments | ask | show | jobs | submit | diath's commentslogin

Wayland was designed from the point of view of theoretical purists. It's basically "how would a display server work in an ideal world", unfortunately, that design turns out to also be impractical and straight up developer/user hostile.

I would at least like to understand the idea of 'pureness' this API tries to aspire to.

It's definitely not Unix-like, since file handles and writes and epoll, and mmap for IPC are nowhere to be found. Instead you have 'objects' with these lifecycle methods that create/release resources (probably committing the design sin of having these for things which should be pure data, like descriptors).

What's with these XML headers? It's UNIX standard stuff, to have a C API for your code, that declares an API for a library, and then a makefile can just consume it. There's a standard way of supplying, finding and consuming them. Even binding generators are probably more comfortable with C headers, than this XML thing

And what's with the callbacks for everything, like screen resolution queries? In Win32, you can do it with a single synchronous API call that returns a struct that has all the info. It's not like you have to touch the disk or network to get this. In cases where you do, you usually have a call that dispatches a message to another window (which you can also dispatch yourself), and you have to listen to the response.

I did some X11 programming as part of work, and its entirely reasonable and conventional compared to this, much more like Win32 (even maybe a bit more pleasant, but I'm no expert on it).

The API sounds awful (and I've had ChatGPT generate me some example programs, and it's somehow even worse than the author describes), and not only that, the requirement of 'everything be an object', with chains and trees of objects being created introduces a huge source of bugs and bookeeping performance overhead on the application side.

Yes, you do have to do something like this with some things under Windows, but the reason for this is that these objects have duplicates in the Windows kernel.

But here it looks like this is just to satisfy the sensibilities of the designer.

Honestly this sounds like the most epic case of NIH syndrome. Like these guys wanted to write their own OS and userland and break with existing conventions.


It is a damn shame that tools like xdotool (automation) and sxhkd (global keybinds) are impossible to recreate under Wayland.

Not impossible, it just needs to be implemented at a different layer. The compositor needs to expose some API for global hotkeys. For example, I found this with ~2 minutes of Googling: https://wayland.app/protocols/hyprland-global-shortcuts-v1

> Not impossible, it just needs to be implemented at a different layer. The compositor needs to expose some API for global hotkeys.

That's a big problem. When things become an optional extension for a compositor, that means you cannot reliably deploy something that depends on it to Wayland.

At this moment, things in the wild are coupling themselves to libwayland-client and in practice ossifying its ABI as a standard no matter what the wayland orgs say about it.


xdg-shell is an optional extension for a compositor and yet you can reliably deploy things that depend on it. You're barking at the wrong tree.

OK so why wasn't this implemented in the first place? For that matter, why does our reinvented wheel have fundamental limitations?

It's not a core protocol's concern and the fact that it's being successfully implemented proves that there are no fundamental limitations there.

I'm not happy with how the collaboration and planning between various parties involved went over years and I do believe that a lot of these adoption pains are fully self-inflicted, but that has absolutely nothing to do with Wayland's technical design.


You can’t effectively dismiss a critique of something missing from the core protocol by declaring it to not be its concern.

I can, I just did. It's just not a thing that should be there at all, and it's obvious once you take a second to look at what's actually in it and why (spoiler: there's too much in it and not much can be done about it now).

Why should a display manager concern itself with routing keystrokes to every application.

Why should a display manager also have to implement window management? (I know this is a separate complaint, but I still think it's a valid one.)

And that's a problem, now instead of knowing that something just works in the WM you're using, you have to cross-reference a matrix of features for basic tasks across different WMs because the bare minimum features are not found in the core protocols. Nothing is standardized, it's just a pile of different WMs developing their own sets of custom protocols.

like the web and we saw how that went... Oh wait!

> Not impossible, it just needs to be implemented at a different layer.

Do you mean the Window Manager layer?

That sounds like a different way of saying "impossible".

In X11 I can create an automation tool that works regardless of the underlying WM, or even if there isn't an underlying WM.

Can't do that with Wayland.


Currently there isn't really a "window manager" layer. Just like the automation / global hotkeys mentioned above, if you wanted a separate "window manager" your compositor would need to implement a protocol to expose window management. It looks like river is taking a stab at it with their river-window-management-v1 protocol: https://isaacfreund.com/blog/river-window-management/ . If they're successful we might see that protocol adopted by the other compositors.

Not only that. A11y is also quite hard. Tools that are simple to implement thanks to good a11y apis - for example on macos, the tool rcmd or homerow - are super hard to do in Wayland.

Not literally impossible. You just need to write your own composer!

wdotool exists, and global hotkeys are a thing under wayland, but is desktop dependent. KDE allows it by default, Gnome can be made to do it as well with an extension.


The name is pretty similar, but looks like there is where the similarities end.

I'm using Sway right now and I have key binds. Not sure why you think that's impossible.

Th point is the decoupling. sxkhd runs irrespective of wm and means your en can optionally choose not to handle key bindings at all. With Wayland you end up depending on whether or not and how your compositor supports it.

How many keybings do you have and how often do you try new window managers? Compromising the security of the whole system just to save you a few `sed`s when writing some config files seems like a bad trade off.

There's no need to compromise the security of the whole system. A trivially safe option would have been to restrict the ability to acquire global keybindings to specific clients, and require the user to confirm either once or every time (or any other policy you'd prefer). An X server could do that without breaking anything.

This issue is typical of the thinking that went into Wayland: No consideration was made when Wayland was announced of the fact that there were far simpler ways of achieving the same level of security.


> Compromising the security of the whole system just to save you a few `sed`s when writing some config files seems like a bad trade off.

Those aren't the only two options. There's no need to compromise the entire system for everybody if the Wayland devs would agree to configuration that controls these things.

Then those of us who need stuff to work rgardless of WM would get stuff to work and the rest of the Wayland users can simply go with a WM that suits them.


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 their configuration. What's more, they can do this in response to other system events. A user might wish to change the recording configuration of OBS in response to an application opening, and it now becomes possible to write a script which opens the application and applies the change.

If your disdain for desktop isolation is so great, you needn't even use D-Bus. Registering a simple UNIX socket that accepts commands would work equally well in this case.

What's really desired here is a standard way for programs to expose user-facing commands to the system, which is clearly not within the scope of the specification for a display server. The problem with X11 is that it has for a long time exposed too much unrelated functionality like this to the user, and so many apps have become reliant on this and developers have neglected the creation of portable ways to achieve these objectives. A new specification for display servers that excludes this harmful behaviour is a clear long-term positive.


I'm not sure how any of that sidesteps the point of my comment, which was having to rely on many different wayland compositors all implementing hotkeys properly.

I don't think it's always practical or desired to move the hotkey support completely out of the program itself. Most users (especially consumer/nontechnical people such as many OBS users) are not willing to setup hotkeys through a third-party program to manually get it to control OBS externally... so I think it needs to support hotkeys internally, whether there is also control possible via an external socket/dbus/etc. or not.


What make it worse: there are multiple implementation of composer, with small different in behaviour.

The extra security meant many automation tasks need to be done as extensions on composer level making this even worse


> how would a display server work in an ideal world

When designed by committee.

With conflicting interests.

And Veto Powers.


They looked at caniuse.com and thought "I want that!"

You can see for yourself if anything is passing: https://www.marinetraffic.com/en/ais/home/centerx:57.7/cente...

A small number of ships are crossing with AIS off (and without the benefit of GPS, because it is jammed) by coordinating with Iran. For example: https://gcaptain.com/iranian-navy-guided-indian-tanker-throu.... These will not show up on Marine Traffic as they are transiting the strait.

Wonder why US doesn’t spam the strait with fake AIS signals. Do Iranians have capability to spot ships in dark at night? If they employ radar - why not geolocate radar stations? Is there other techniques Iranians have for spotting ships (EW, SAR, etc)?

If Shaheds use Starlink - how come SpaceX can’t geolocate the launch sites?


I've seen reports of ship turning off their AIS before attempting the strait, not sure if this is still valid but Marine Traffic only shows AIS signals that are turned on, which is as simple as flipping a switch.

Also something Chinese fishing ships do around the galapagos and other regions to fish illegally.


As others have mentioned, that's simply not going to tell you anything. AIS can and is often times turned off in such situations and it ships can spoof their location by sending false AIS... something that situations like could encourage, at least one could well imagine.

I find Sal Mercogliano's "What's Going on With Shipping?" to be a better source to understanding what's happening in the Strait. Here's a link to yesterday's episode "Strait of Hormuz 3-Week Recap | What is the Status of the Ships, Transits and Escort Mission?": https://www.youtube.com/watch?v=q64cOs7GN_4


https://www.bbc.com/news/articles/c4geg0eeyjeo

> Before the war, about 138 ships passed through the strait each day according to the Joint Maritime Information Centre, carrying one fifth of the global oil supply.

> The data provided by shipping analysts Kpler shows 99 vessels passing the narrow strait so far this month, an average of just 5-6 vessels a day.

I mean, it's bad, but it's factually not a minefield. The threat isn't coming from mines anyway.


> I mean, it's bad, but it's factually not a minefield.

That's not clear. Mines are generally concealed. It's the reason that mine-sweeping is slow and dangerous.

And there's no public information (AFAIK) that let's us rule out mines having been, or even currently being, laid.


The risk of being targeted by missiles or drones works just as well. There is a reason NATO has to patrol the Red Sea with warships.




That comment chain depicts perfectly my thoughts about LLMs. Yeah, they can generate a lot of code, but someone has to look at all that, and clanker code is more taxing to read than code written by another person which wasn't easy to read to begin with.


That's a horror show! The willful pushback from the author when questioned about the code is the icing on the cake.

I love these and wish they were used more by command line applications. For instance in GCC, when your terminal supports them, compiler diagnostic flags are clickable and something like "warning: address of local variable ‘a’ returned [-Wreturn-local-addr]" can be clicked to open the GCC documentation for that flag.

This is a basic copy-paste and search function. I admit that your approach is fast but counter that it highlights a failure to make basic functions like copy-paste and search efficient and introduces a whole class of complexity into software design.

Edit: the same applies to diffs generated by /bin/diff. Most of the time, diff strings are unique enough to locate them by plain text searching.


Ok but that only fetches the codes from the US, so now a non-US resident will start with their zip code and end up with random ass place on the other side of the globe. Now not only I still have to fill in the fields, but also clear them first.


Obviously put country first, then whatever the equivalent of a ZIP code is second. In the UK, a post code gets you down to around 15-16 delivery addresses on average. No-one there really _ever_ needs to type an address.


Most British websites work like this website suggests, in that they ask for the postcode first, then give you a dropdown of all the addresses at that postcode.

It works great, except my address is for some reason not in whatever databases these websites use. The building number is on the list, but not the individual flats. So I have to put in the postcode, choose something like "My address is not listed", then fill in the form manually. A few times it wasn't even offered as an option.


It sounds like your address isn't listed correctly in the UK Postcode Address File (PAF).[0] There's a form you can fill in requesting a correction.[1]

[0] https://en.wikipedia.org/wiki/Postcode_Address_File [1] https://www.royalmail.com/personal/receiving-mail/update-you...


Will do, thanks!


Yeah, there are plenty of annoying edge cases.

For instance, my postcode covers 15 houses and half of a large park. Those houses have been subdivided into 4-6 flats, and many have been redivided or renumbered multiple times. The park also contains various buildings and other places that might plausibly receive deliveries, some of which have multiple entries (an electricity substation appears 8 times, for some reason). So in total, it covers more than 200 addresses - mine is no.140-ish in a typical sorted list.

You'd be amazed by how many address checkers can't handle more than 64, 100, or 128 addresses in a postcode. Or how many scrollbars stop working, requiring you to use the arrow keys to navigate. Or how many other glitches I've seen.

The other common problems are usually down to temporary postcodes (which used to always end with an 'X' but can now be indistinguishable from 'real' codes) escaping into the wild, re-addressings and re-numberings not being picked up properly, the old problem of outdated PAFs being used, and - my personal favourite - BT/Openreach using their own separate postcode database, dating from the Post Office split in the early 1980s, which doesn't always agree with the PAF. Agh!


Somebody else mentioned the PAF. I should further clarify why your address might (might, this could just be a mistake) not be on there and why therefore almost any form should have an option to "do it the hard way"

The PAF is about what the Royal Mail calls "Delivery Points" which are places they promise to deliver physical letters to. Inside my building for example every home has a front door, with a letter box, and letters literally get posted into my flat, but down the street there's a building with a rack of boxes set into the wall and post is delivered to your numbered box, and up the street there's a townhouse converted and all the mail just goes in one piles for everybody in that building.

Many delivery points share a postcode, but because they know them all they actually all have unique numbers, and unlike a postcode they're not for humans so they get changed quite frequently as new buildings are constructed or working patterns change, if you examine your post carefully (in the UK†) there are two rows of fluorescent orange dots on the outside, these were printed by mail sorting machines shortly after the mail was received, one is an entirely arbitrary serial number and it designates that piece of mail for a very short period (say a few days) to enable statistical tracking for performance - if #213940202 entered the system in Glasgow on Monday, was in Portsmouth by Tuesday but wasn't delivered to someone's door until Friday the problem ain't in Glasgow. But the other one we're interested in here is the Delivery Point as a numeric code. If you don't have multiple addresses this row of orange dots will be identical on every item you've received for some time yet it's different on someone else's mail.

† This trick was invented in Britain but is used (licensed) in some other countries because it's a good idea, however exactly what is encoded and so what it "means" may vary.


I had a similar problem. The way it was explained to me was that in practice, there are two databases used in the UK for this commercially and they don’t always agree. I used to live in a bungalow next to a large house that had been converted into flats. In one database it was listed with the bungalow name then the street name, and in the other database it was listed as “Flat 8” using the other building’s street address. About half of British delivery forms used one place, about half used the other.

“Obviously” didn’t read the article. Not having to pick the country is literally the premise!

“I type 90210. You now know I'm in Beverly Hills, California, United States. You didn't need me to tell you that. You didn't need a dropdown. You didn't need me to scroll past Turkmenistan.”


The author seems to have either misunderstood the API they're referencing or are assuming US only addresses. The specific endpoint they're calling seems to be for US specific zip codes.

The point stands that this doesn't "just work" for global services.


"Obviously" the article is wrong, as pointed out by the grandparent of your comment (and several others in the comments). I won't violate the site guidelines by suggesting you didn't read it.


I did read it.


Great. Pretty sure jen20 did too; they are replying to a comment pointing out the article is wrong and suggesting a compromise between the web default "enter all your address, then the zipcode" and the article's "you don't ever need to touch the country, state, or city fields" that is closer to working beyond the US. In that context, I find it strange and rude that you're suggesting they didn't read the article.


You also suggested I hadn’t read it. “I won't violate the site guidelines by suggesting you didn't read it”. Only you did (saying you won’t say something and then saying it doesn’t really absolve you).

I find you rude so I won’t reply to you anymore.


They were pointing your own faulty claim back at you, in the hope that you would reconsider it.

You should not be treating it as a standalone accusation, and it's not justified for you to get mad at them without getting just as mad at yourself.


At that point, should we even show the whole form? Or should we only ask the country first and then based on the answer, decide whether to show a form? That way the form can be different for each country?

I think auto full suggestion should be just that -- a suggestion, not validation.


Yeah, I’m thinking about how the address validation databases would for years correct my house’s address to point to a house in a cul-de-sac a block away. I could tell who was auto-correcting my address by which parcels arrived there. The USPS carrier knew too and he would ignore the address on some parcels.

I eventually had to dig through a bunch of USPS documentation for their Address Element Correction database to find their helpdesk. Apparently places like Fedex use that database.

So I agree as well, and I would be pretty angry if someone forced me to pick from a list instead of just trusting that I know my own address.

Also as another aside I was a shipping clerk for a while and occasionally came across an address like “across from such-and such store halfway down the alley.” So the author is making a pretty bold assumption that there is such a thing as a standard address that can be auto-filled.


Yeah but, the article was specifically saying that you don't need to put in country because you can look it up by ZIP. That's obviously wrong, but apparently not to the author of the website.


Even in the US, once you have a zip and a name the post office can often deliver mislabeled mail. Results my vary by region though.


I have a better idea. How about we just let the users input their own addresses? These days, most browsers autofill addresses anyway.


I don't own a post code and permanent residence. It's a pain in the ass to find some local post code whole in rush etc silly idea


It's weird that the article does not show any benchmarks but crappy descriptions like "milliseconds to microseconds" and "tens of thousands to single digits". This is the kind of vague performance description LLMs like to give when you ask them about performance differences between solutions and don't explicitly ask for a benchmark suite.


I disagree. I think it's a nice discovery many might be unaware of and later spend a lot of time on tracking down the performance issue independently. I also disagree that a rigorous benchmark is needed for every single performance-related blog post because good benchmarks are difficult to write, you have to account for multiple variables. Here, the author just said - "trust me, it's much faster" and I trust them because they explained the reasoning behind the degradation.


The writing style certainly screams LLM.


> No schema changes. No new indexes. No query rewrites. Just telling Dapper the correct parameter type.


Are we automatically discarding everything that might or might not have been written or assisted by an LLM? I get it when the articles are the type of meaningless self improvement or similar kind of word soup. However, if hypothetically an author uses LLM assistance to improve their styling to their liking, I see nothing wrong with that as long as the core message stands out.


I've seen so many LLM-generated articles by this point that obviously had no human editing done beforehand — just prompt and slap it onto the Web — that it makes me wonder every time. If I read this article, will I actually learn only truth? Or are there some key parts of this article that are actually false because the LLM hallucinated them, and the human involved didn't bother to double-check the article before publishing it?

If someone was just using the LLM for style, that's fine. But if they were using it for content, I just can't trust that it's accurate. And the time cost for me to read the article just isn't worth it if there's a chance it's wrong in important ways, so when I see obvious signs of LLM use, I just skip and move on.

Now, if someone acknowledged their LLM use up front and said "only used for style, facts have been verified by a human" or whatever, then I'd have enough confidence in the article to spend the time to read it. But unacknowledged LLM use? Too great a risk of uncorrected hallucinations, in my experience, so I'll skip it.


They have 100s of millions USD, they will be fine: https://upload.wikimedia.org/wikipedia/foundation/3/3f/Wikim... (page 5-7).



There's also a middle ground - using a framework that already abstracts away things like graphics, window, audio and input handling but acts as a "bring your own engine" base. This is probably the best if you have a specific type of game in mind where generic solutions wouldn't really work. Things like Raylib, SFML, Love2D and so on are a great compromise.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: