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

You can do a lot of horrible things with setjmp and friends. I actually implemented some exception throw/catch macros using them (which did work) for a compiler that didn't support real C++ exceptions. Thank god we never used them in production code.

This would be about 32 years ago - I don't like thinking about that ...


GCC still uses sj/lj by default on some targets to implement exceptions.

Whoo, has anyone actually got a working Lisa? Or is this emulation?

If I recall it's been done on both (emulator and real hardware).

The original version of GEMDOS (the replacement for DOS or CP/M when running on 68k) was in fact developed on the Lisa as a 68k dev machine [also some Motorola VME dev boards I think?) before actual Atari HW was available. So it's a full circle thing.


There are a lot of working Lisas out there.

But there weren't too many Lisas (working or otherwise) when the thing came out!

Well OK, "a lot" can mean a lot of different things depending on context ;)

In the vintage computer collector/enthusiast scene, there are probably dozens of working Lisas. How's that?


Yep, I know about all that - I had big cupboard full of the damn things in my flat in london [various ataris (6502 and 68k based ones), dragon 32 (coco lookalike), peculiar IBM pc clones, and other stuff]

A few years ago I got my nephew to do up the flat for sale, and he junked the lot - at some point you have to get rid of things.

I will never buy anything except a laptop again.


I remember using a Z80 assembler on a CP/M 1.x machine, way back when. If it wasn't by DRI could it possibly have been (shock, horror) Microsoft??? We did have a Microsoft Fortran compiler, which was crap, but that was mostly down to being floppy disk based.

Not trying to be funny, I used the assembler a lot, but I really can't remember who supplied it.

Oh, just had a thought - this was on Research Machines 380Zs, so perhaps it was Research Machines home-grown one?


Yes, there were one or two third party assemblers available. From memory, the issue was with the downstream tools - so for instance on CP/M 3.0, I think you had to use the DR one to be able to build an RSX (equivalent of a TSR under DOS. You could count the number of 8080 CP/M 3.0 machines on the fingers of one foot.

You've reminded me that I have a 380Z or 480Z in the loft - I must get it going again.


> But the bigger problem was software piracy. Piracy was common on the ST, and that made developers less enthusiastic to continue ST development

Not so sure about this. The Atari/GEM combination was very popular with musicians for MIDI, and I don't think there was so much piracy, or at least not compared with other platforms of the time.

The reasons I didn't develop anything much for Gem - a) It was quite difficult b) Not well documented c) I was too busy playing Dungeon Master.

I think many others may have similar thoughts.


> Not so sure about this.

WordPerfect and Spectrum Holobyte explicitly cited software piracy as being worse on ST than on other platforms.


I think WP was just too late to the party honestly by the time they got around to actually seriously considering/doing what they said they would do, there were already established good word processors on the ST.

WP did eventually come to the ST and if I recall it was panned as a horrible port. I think there was talk of MS Word, too, and also a flop?

Mine came with 1st Word Plus, and it was excellent for the time.


> I think there was talk of MS Word, too, and also a flop?

There was a port of MS Word, and it worked well. For some strange historical reasons I can't recall now, though, it was called and marketed as MS Write instead.

Write was the extremely basic free wordprocessor in Windows 3.x -- and so the name did the ST version a grave disservice.

https://www.atarimagazines.com/startv3n1/microsoftwrite.html


>I think WP was just too late to the party honestly

Nothing with the power of WordPerfect.

Hundreds of word processors were developed for DOS. Hundreds. Word, WordStar, and MultiMate, all developed by very large companies, were only the best known.

WordPerfect beat them all.

Feel free to claim that the ST or Amiga word processor developed by two guys somewhere in the UK has more features c. 1989.


My favourite was Protext (Arnor) which was an old school mostly keyboard-centric word processor, rather than anything like DTP. Crazy powerful. It was originally Amstrad CPC, but later released on Atari ST, MS-DOS, Amiga, Archimedes and even more bespoke hardware like the Amstrad NC.

Did you know Protext is freeware now?

https://www.aptanet.org/protext/

I do a bootable DOS system on a live USB key and it includes Protext. :-)

https://github.com/lproven/usb-dos


> WordPerfect beat them all.

It was certainly popular, but I hated all the function keys (I still hate function keys) and my favourite was WordStar (not for Windows), for both word processing and as a programming editor, up until I switched to Word and Windows vi clones.

I remember the CP/M version of WordStar gave you a patching tool that allowed you to insert screen and keyboard handlers in machine code, for your specific hardware (to speed things up), into the WS code. I can still remember how clever I thought I was when I got this to work!


It's not that, it's that when WP did arrive on the ST it was a zero effort bad offering, two years late.

https://www.atarimagazines.com/startv2n6/wordperfect.php


Yes, the first ST version in 1987 had bugs. But WordPerfect fixed bugs for the next four years, and by 1988 was in good shape <https://www.atarimagazines.com/v7n1/wordperfectst.html> despite, as I said, the huge problem with piracy (See, for example, the author of the 1987 review you cited writing at <https://archive.org/details/ST_Log_Magazine_Issue_21/page/n8...>. If the ST version were so useless why would he have bothered to appeal to the community?). As I said, the odds of a random no-name ST or Amiga word processor coming anywhere close to WordPerfect's power c. 1989 are zero.

Piracy always exists. The question is to what degree. On the PC the bulk of the market is business customers, where piracy is relatively minor compared to legitimate sales, and corporate customers have a lot of power when they complain to vendors; this is why copy protection more or less disappeared for PC business software after the mid-1980s, with Lotus being probably the last to comply by getting rid of the universally detested key-disk system. On the ST and Amiga the business market more or less didn't exist (no, musicians on ST, or small-town TV stations using Video Toaster for Amiga, aren't meaningful in number or percentage by comparison), so potential sales are limited by a) the far smaller size of the overall market and b) the far smaller percentage of customers within said smaller market paying for the product.


Hmm, just looked up WP on Wikipedia - I didn't realise it was ported around so much. Particularly to the ST, who's keyboard was frankly Not Very Good, which is not what you want for word processing. But it did have a nice mono display, for the time.

> Particularly to the ST, who's keyboard was frankly Not Very Good

The same rubber domes and plastic plungers were Totally Unacceptable on the Sinclair ZX Spectrum+ and QL, Not Very Good on the Atari ST and Commodore Amiga, and just what everyone uses on PCs today.


> who's keyboard was frankly Not Very Good

I dunno man. I came from a ZX Spectrum (via several other machines, it's true) and compared to that, the ST keyboard was great.


Dongles were a thing, certainly the expensive MIDI programs used them. Cubase, Steinberg and C-LAB Creator were the big ones.

As I recall, there were tons of books about GEM for the Atari ST, at least in Europe.


> As I recall, there were tons of books about GEM for the Atari ST, at least in Europe.

Yes, there were, but compared with the Windows textbooks and Microsoft-supplied documentation for Windows, they were really not good. In the UK, they were translated (not well) from German. At least all the ones I owned were almost completely lacking in examples, and examples are really what you want when learning to use something.


Man I spent hours and hours just last month trying to reverse engineer the original Notator/Creator dongle and get Notator to launch in emulation by patching Hatari to emulate the dongle.

Codex & Gemini & I had something almost working. That dongle was evil and crazy complex. Fairly complex CPLD that depended on system timing and in the end the emulator just can't fulfill whatever contract the software expects from the bus + the emulated dongle.


The dongle has already been reverse engineered in the last couple of years and replicas are for sale.

Yes I am aware of this, and read the HDL to understand what they did. But they are hardware only. The point is to run in emulation.

Is the software still attractive to use, after all those years, or why are you going to these extremes? Sounds it's somehow intimately intertwined with the dongle, if the check routines can't simply be patched.

Going down this rabbit hole, I realize that ST hardware for musicians is still huge. And the dongles as still working as intended, apparently.

And then this blew my mind:

https://re-falcon.com

Quite the underground scene:

https://indyclassic.org


I have two Falcons here they're a compelling machine and still fun to play with.

But if I were to ask for a machine repro, a new motherboard, it would be in a different PCB form factor to get it into an ITX or m-ITX case. Because it's the cases and keyboards that go, not the machine.


We almost had something like that with the Medusa and Hades Atari clones.

People attempted to patch the routines decades ago and it never produced a stable result.

GEM was in TOS on the later Atari ST models. TOS was named after Jack Tramiel, Tramiel Operating System.

Not Jack, his son, Sam.

None of these are true. It's "The Operating System" according to era documentation.

Norman Cook (Fatboy Slim) was on the Retro Hour talking about the Atari ST at the start of the year

https://www.youtube.com/watch?v=1-UOBjJjGuM


I got all the GEM docs through Archie at umich.edu. You could get everything there including the entire GNU toolchain and MiNT so you could have a real development environment.

Between DM sessions, of course. Or Time Bandits.


I got the full set of GEM documentation when I attended the launch of it, can't remember how you could get it later. It was good enough for me to write bindings to DR C and Lisp then several applications.

There was a lot of piracy with MIDI software, at least in Europe.

Even though dongles were a popular copy protection.

Then again, software like Cubase didn't use much of GEM IIRC and did their own graphics.


> There was a lot of piracy with MIDI software, at least in Europe.

Hence why Gerhard Lengeling put at least as much time into the design of the dongle as he did Creator/Notator itself.


I remember these things for all the dongles. I think C-Lab had something similar, not sure anymore though (was using Cubase at the time).

https://axelhartmanndesign.com/steinberg-midex/


Oh, I thought this was going to be about the old trackball arcade game. Or perhaps it is? Same sort of rules? The maths is going so far over my head I can't hear the whoosh.

I expected that too, but it's about the inspiration for the game, I guess. I was trying to figure out how you encode computation in the game.

> injected advertisements into the Windows 11 Start menu's "Recommended" section. These showed up labeled "Promoted" and pushed apps like Opera browser and some password manager nobody asked for. And the Start menu was just one surface, they also placed ads on the lock screen, in the Settings homepage hawking Game Pass subscriptions

sorry, I have never seen these supposed ads in win11. the lock screen does display icons for things like local events and weather, but i consider them useful at best, and innocuous at worst - it's not like i spend much time in the lock screen. i have never seen an ad in the start menu or settings.

am i specially blessed, or is there a bit of (wrong) groupthink going on here?

as for microsoft accounts, i find having one (i have 365 subscription) more useful than not. day to day it doesn't irritate me at all, because i never see it.

mostly, i find win11 pretty good - its fast, smooth and the UI is about as good as UIs get.


>sorry, I have never seen these supposed ads in win11

It's a setting called "Get fun facts, tips, tricks, and more on your lock screen", and it's checked by default.


Not only is it enabled hy default ... it magically gets enabled by default after some days, desktop spotlight feature that pushes some lock screen wallpapers and trivia overriding my personal wallpaper, Edge trying to do the same thing to homepage, edge trying to steal browser favourites and extensions from other installed browsers once every few weeks, edge stealing default app linkage for PDF viewing, copilot in various flavours appearing on taskbar, start menu, edge, ...it's mayhem out there.

Death by a thousand cuts. So many micro abuses by the OS that keeps reminding you who has the power.


I do get lockscreen wallpapers, but in general I find them quite pretty and interesting. I've never tried changing to a fixed lockscreen wallpaper, though I I do have a fixed, custom desktop one. I can't think that people are obsessing about the lockscreen???

I don't see any of the other things you do. I use Edge as my default browser, with uBlock installed and it all seems to work. There is a Copilot icon, but I think I could remove it if it irritated me, which it doesn't. My Asus Zenbook has a Copilot key which irritates me much less than other aspects of the keyboard layout which have nothing to do with Microsoft.

All in all, I like Windows 11. I don't see how it has made things worse than any of the other NT versions.


Ah, it's available only if you pick a specific wallpaper image, that's why not everyone sees it.

> pick a specific wallpaper image

you interest me strangely - which one?


Oh I didn't mean a specific file. Lock screen wallpaper has three options, custom image, custom slideshow, and Spotlight. The former two have the "Get tips (...)" checkable, the latter doesn't.

For some people the threshold for "ad" is an uninterruptible segment that they are forced to watch, or a typical banner ad placed on screen. For others it's the visual presence of any set of pixels that can be connected to a business entity or revenue stream.

Oh I’ve definitely seen all those things… in the short minutes after a fresh install, before I wipe them out.

I have the same experience. I'm on a Windows Surfuace 7 Arm laptop right now. There's no Copilot icon next to the start menu. I press the start icon and I don't see a single ad anywhere. There are no ads on my screen. I use Edge and I don't see anything odd while I shop. Granted, I run "Pro." Maybe the home edition has more of this?

I pay for a 365/OneDrive subscription and it works well. I get the apps on desktop/laptop/phone and 1 TB storage for a decent yearly rate. I log into the PC and laptop on the same account and useful things sync.

I've done mild tweaking to turn a few things off, like the icons in the "search" bar, but nothing's been "hacked". On Macs you're pretty much have to make an Apple account too, but somehow that's not evil?


Macs don't need Apple accounts at all. I just set up three Macs with no Apple accounts, not needed for intended use. They all work fine. Apple accounts are only needed if access to Apple services is desired.

> On Macs you're pretty much have to make an Apple account too, but somehow that's not evil?

Really? Isn't this only for App Store and other Apple services? You can still do your everyday basic things, including downloading and installing software from internet.


Same for me - I find Windows 11 pretty good and I've never seen an ad in the Start menu. It might be specific to some editions or regions?

I used to work in the Netherlands (i'm from the UK) and I could never understand how the Dutch put up with so much froth on their beer, even really enjoying being ripped off by it.

there is a calibration marker on the glass and the liquid has to be filled up to that line, the froth on top is extra. so on the continent we get more, not less. so from where we stand it looks rather like the islanders are ripped off ;-)

cheers


I'm not denying this, but I do remember a jug of beer being ordered and me being asked to pour it into several glasses without noticeable markings, and me trying to end up with about a 1/4 inch of head as I would in the UK and my Dutch friends yelling "more head" or something even less than polite.

Mostly in the NL I drink bottled beer. And I'm a Yorkshire man, at least by birth.


Yeah, in the Netherlands 2 finger widths is the norm. But if it's more than that, people will get upset that you're pouring them milk.

I really liked working in the NL, but their food and drink I could not get used to. I did a bit of consultancy at KLM, and what was offered for lunch in the cafeteria turned my stomach - artificial meat, artificial bread. I complained about this to one of the KLM staffers I was working with - "We know, We know, and of course the bosses never eat here"

Also, the Dutch idea of Chinese food is very strange (basically some sort of Indonesian thing - and I like Indonesian, but not that).

Anyway you in no way requested a critique of Dutch cuisine, but I'm glad I got it off my chest. So, apologies.


Somewhat OT:

It is actually amazing how far with a couple of tin cans, greaseproof paper taped around one end, and string attached to the paper. You are not going to do VOIP, but 50 yards is possible.

Even more OT:

One Xmas my Dad (unredeemable gadget freak, early adopter of the TRS80) gave me and my little bro two wired handsets with batteries and a ringer. We wired up brother's bedroom to living room, but soon realised our horrible mistake:

[ring, ring]

"Can I have a glass of water?"

[ring, ring]

"Can I have a glass of water?"

It lasted less than a day.

We also had a similar setup that did morse code, that was much less intrusive, not least because me and my little bro did not know morse, except for SOS.


You mirrored my kid communication tech experience, except mine was with my neighbor next door. My brother and I were 13 and 12 respectively. The neighbors were two girls: 14 and 12. Bedroom windows about 22 feet apart.

Our list of experiments included: Written signs Tin cans Morse code circuit Wired handset Walkie-talkies

The fun lasted a couple years until puberty struck.


bad vietnam war pun

Seems like complaining about how difficult to use Win32 and COM are. And they are if you use them directly! You don't do that - you use libraries that others have sweated over, as you did with raylib.

Exactly my impression. And honestly, X11 isn't exactly beautiful like the author is implying. A lot of the same wayland complaints they are putting here apply to X11. The main difference is that wayland is apparently handling the event loop for you while X11 expects you to set that up yourself.

Win32 has exactly the same setup of problems here as wayland does. Moreso because Win32 just gives you back opaque handles which you are expected to keep track of and use the Win32 API to do any meaningful interactions.

The only understandable complaint is that wayland makes it hard for different windows to interact with one another for security. IMO, that's a silly goal to chase after, but that's just me.


A big complaint in TFA is that Win32 is much much easier to use than Wayland is:

>Getting any example application to work is so incredibly ridiculous, that every second I program on Wayland, I yarn for the times I did Win32 programming.

And that comes from the core of how Wayland is designed.

In Win32, the stable interface / ABI is the set of C functions provided by the operating system through DLLs. These are always dynamically loaded, so Microsoft is free to change the internal interface used for controlling windows at any time. Because of this, decades-old .exes still run fine on Windows 11.

In Wayland, the stable interface is the binary protocol to the compositor, in addition to the libwayland-client library plus extensions. Instead of that socket being an "implementation detail", it's now something that all programs that just want to make a window have to deal with. You also can't just use the socket and ignore the libwayland libraries, because mesa uses libwayland-client and you probably want hardware acceleration.

The other big issue is the core Wayland protocol is useless; you have to use a bunch of protocol extensions to do anything, and different compositors may implement different versions of them. On Win32, Microsoft can just add another C function to user32.dll and you don't have to think about protocol how that gets transformed into messages on the socket layer, or compatibility issues with different sets of extensions being supported by different compositors.


I was going to point out that wayland is a protocol & surely there must be other ways to do this. But your point about mesa expecting wayland-client is a very tight binding here.

Anyone know of exceptions? People who get mesa working anyhow, some way?

It also doesn't preclude people from making nicer experiences on top of libwayland. Again I'd be curious to see what material is out there. It feels like a library that materializes the current state of things into a local view would go a long way to dispel the rage of people such as the author here, who seem to detest callbacks with firey rage.

The idea of the wayland registry seem unifying & grand to me. Ok yes it's async & doesn't hide it? Lot of ink spilled to be upset about that, and doesn't feel like an immutable fact that must govern life, if that for some reason makes you as mad as this dude.


> But your point about mesa expecting wayland-client is a very tight binding here.

You don't have to use Mesa's wayland-egl to make EGL work with Wayland, you can easily pass dmabufs by yourself - though this will theoretically be less portable as dmabufs are Linux specific (but practically they're also implemented by various BSDs).


Having done some mobile development where app sandboxes have been prevalent for years, it's annoying to deal with but necessary. Given the bad behavior some devs attempt, often ad SDKs trying to perma-cookie users, stealing clipboards, etc, having a platform that can support app isolation seems necessary for normal desktop usage.

How often has that been a problem for desktop OSes?

Constantly. Phishing, tech support scams, supply chain attacks on e.g. NPM, problems have been rampant since we connected desktops to the internet.

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.

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 of Wayland, while it definitely has disadvantages, like not being network transparent, which is an X11 feature that I use.

Therefore, I do not know which is the truth, but from the complaints that I have heard the problem seems to be that in Wayland it is not simple to control the access rights to windows and clipboards.

Yes, access to those must be restricted, but it must be very easy for users to specify when to share windows with someone else or between their own applications. The complaints about Wayland indicate that this mechanism of how to allow sharing has not been thought well. It should have been something as easy as clicking a set of windows to specify something like the first being allowed to access the others, or like each of them being able to access all the others.

This should have been a major consideration when designing access control and it appears that a lot of such essential requirements have been overlooked when Wayland was designed and they had to be patched somehow later, which does not inspire confidence in the quality of the design.


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 make the improvements to X. Unlike say the systemd situation Wayland just seems like a better and necessary design?

At a higher level, I've never found someone who is deeply familiar with the Linux GUI software stack who also thinks Wayland is the wrong path, while subjectively as a user most or all of my Linux GUI machines are using Wayland and there's no noticeable difference.

From an app dev perspective, I have a small app I maintain that runs on Mac and Linux with GPU acceleration and at no point did I need to a make any choices related to Wayland vs X.

So, overall, the case that Wayland has some grave technical or strategic flaws just don't pass the smell test. Maybe I'm missing something?


X11 is in practice network transparent.

That means that I can run a program, e.g. Firefox, either on my PC or on one of my servers, and I see the same Firefox windows on my display and I am able to use Firefox in the same way, regardless if I run it locally or on a server.

The same with any other program. I cannot do the same with Wayland, which can display only the output of programs that are running on my PC.

This an example of a feature that is irrelevant for those who have a single computer, but there are enough users with multiple computers, for which Wayland is not good enough.

Wayland was designed to satisfy only the needs of a subset of the Linux users. This would have been completely fine, except that now many Linux distributions evolve in a direction where they attempt to force Wayland on everybody, both on those for which Wayland is good enough and on those for which Wayland is not good enough.

I have already passed through a traumatic experience when a gang of incompetents have captured an essential open-source project and they have removed all the features that made that project useful and then they have forced their ideas of what the application should do upon the users. That happened when KDE 3.5 was replaced by KDE 4.

After a disastrous testing of KDE 4 (disastrous not due to bugs but due to intentional design choices incompatible with my needs), I reverted to KDE 3.5 for a couple of years, until the friction needed to keep it has become so great that I was forced to switch to XFCE. At least at that time there was an alternative.

Now, Wayland does not have an alternative, despite not being adequate for everybody. For now, X11 works fine, but since it seems unlikely that Wayland will ever be suitable for me, I am evaluating whether I should maintain a fork of X11 for myself or write a replacement containing only the functionality that I need. That would not be so complex as there are many features of X11 or Wayland that I do not use, so implementing only what I really need might be simple enough. The main application that I do not control would be an Internet browser, like Firefox or Chromium, but that I could run in a VM with Wayland, which would be preferable for security anyway.


In practice for some applications, for my purposes X11 forwarding never really worked (due to GLX and bandwidth among other issues). So that's 50/50 anecdote. I just checked and it appears Wayland adoption has helped push apps to adopt EGL which helps. There are tradeoffs both ways but let's not pretend X11 is adequate for everyone or every application. Subjectively, when I use Gnome now it's by far better than any version of desktop Linux I used a decade or two ago.

I use X over SSH all the time. And as a fun aside, i can run an ancient Linux distro on my 386, and it can use a modern machine as its X display! Not useful, but cool. I've actually done this with modern SBCs as well, and i don't think there's any way to replicate this on Wayland.

Window positioning API seems like the biggest oversight to me, as someone developing a multi window desktop app at work. That and global hotkeys and accessibility.

Due to my reliance on X over SSH i only run Wayland where i strictly need it (my HDR display, namely)


> 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)


In the same sense windows are not network transparent when in fact RDP works perfectly, certainly much better that X11 over WAN.

Actually for wayland there is wprs for remote display of apps so here it goes the network transparency argument...


I have used X11 over WAN and it worked fine. Even connecting to a different country, which a significantly slower connection than I have now.

I do not know the current state of RDP etc., but does it allow you to open a single application rather than an entire desktop on Linux, and does it display correctly for the device you are using rather than the one the app is running on?


Only certain Linux RDP clients support per-app windows and I'm not sure how to actually set that up on Linux (only used WinBoat which is a Windows host and does all the Linux config automatically)

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


I used to program pure Xlib when I was 13 or so. I don't think the then-13-year-old me would manage pure Wayland.

The point of wayland, though, is that back then 13-year-old you would get an application that "works" but to support myriad things (like HiDPI) you'd have to DIY it. Whereas now, sure a 13 year old perhaps won't write directly to wayland's APIs, but you'll use a library and have a much more globally usable result. And honestly probably have a better time - less effort for the same result, and with a more maintainable project in the long run.

HiDPI has always been perfectly supported by X11.

The only problem that has existed is that originally there was a single DPI value, not a different DPI value for each monitor.

This has never created any problem for the people using multiple monitors with the same resolution, but only for the people who have used multiple monitors having different resolutions and who might have not liked the changes in windows size when moving a window from a monitor to another monitor.

That was indeed a problem, but it really affected a rather niche use case and it was also trivial to solve without any change in the X11 design, by just making DPI a per monitor variable, which was done long ago.

So criticizing X11 about a supposed problem with HiDPI is incorrect. I have used only multiple 4k monitors with my PCs, with X11, for more than a dozen years and I never had any problem with HiDPI, with the exception of many Java programs written by morons, which ignore the system settings and which also do not allow the user to change the font used by them. I do not know which is the problem with the Java programmers, but I never encountered programs with such a behavior, except those written in Java. Moreover, the Java programs are also the only that had problems with monitors using 10-bit per color component.

While X11 itself never had problems with supporting HiDPI, at least not in the XFCE that I am using, I heard that other desktop environments have created problems with HiDPI that have nothing to do with X11, by not exposing the X11 DPI settings but providing instead some "window scaling" settings, which is something that I do not know how it is implemented, but there are good chances that it is implemented in a wrong way, judging from the complaints that I have seen. I cannot imagine how one could use correctly a "window scaling" factor, because the font rendering program must know the true DPI value when rendering for instance a 12-point font. If rendering is done at a wrong DPI and then the image is scaled, the result is garbage, so in that case it would not be surprising that people claimed that HiDPI works badly in X11, when in fact it was Gnome or whatever desktop environment was used who was guilty for bad support, not X11. I never had to fight with those desktop environments, but I assume that even those would have worked correctly with HiDPI, when using xrandr to configure X11, instead of using the settings of the desktop environment.


There is nothing "niche" about plugging in a modern (e.g. made within last 5 years) laptop into an external display.

These kind of posts just show how disconnected from reality some of y'all are from what most Linux desktop users nowadays actually need from the desktop platform.


I always plug my laptop into one or two external displays.

Even without configuring distinct DPIs per monitor that was not a problem for me, because on the small screen of the laptop I kept only some less important application, like the e-mail program, while working on the bigger external displays, so I had no reason to move windows between the small screen of the laptop and the bigger external displays.

But like I said, setting a different DPI value for each monitor has been added to X11 many years ago, I do not remember how many.

I do not see why one would want to move windows between the external displays and the laptop, when you have connected external displays, so I consider this a niche use case, i.e. moving windows between small screens and big screens. I agree with you that having simultaneously big screens and small screens is not niche, so I was not referring to this.

Without a per-screen DPI value you cannot control the ratio between the sizes of a window when is moved between the big screen and the small screen, but even when you control the ratio, moving windows between screens of different sizes does not work well because you must choose some compromise, e.g. if you keep the same physical size some windows from the big screen will not fit on the small screen and if you make the windows occupy the same fraction of the screen size they will change their sizes during moving and they will be more difficult to use on the small screen.

But like I have said, this no longer matters as the problem has been solved even for this niche use case. I do not even remember if this problem still existed by the time when Wayland became usable.


Asymmetric laptop+monitor setups are very popular, people buy stands to prop their laptop up next to their monitor and just use both as normal displays. When i only had one monitor at my desk, i did this a lot, but i see people at work propping up their MBP next to two other monitors and using all 3. The idea that people wouldn't regularly go back and forth between both screens is sadly completely wrong.

You underestimate youself as a 13 year old... if you had to, you'd do it (given time).

Win32 isn't that hard actually.

To create a simple window, no it isn't. To create a rather complex application, then yes it is, compared with using a higher-level framework.

This article is complaining about the complexity of creating a simple window in Wayland, which is much easier in Win32. Wayland doesn't make creating "a rather complex application" any easier either. In both cases you would use a framework. Even more so in Wayland, which doesn't provide widgets or standard dialogs at all, while Win32 does.

Creating a simple window in Wayland isn't much harder than in Win32. You get a wl_surface, attach a wl_buffer to it, wrap it with xdg_toplevel and handle some callbacks for resizing etc. There's some boilerplate that allows all this to be extensible in backwards-compatible ways, but nothing complex, really. simple-touch example in Weston repository has about 400 lines.

Some compositor's insistence on CSD can make it a bit more complex since you get that in Win32 for free, but on the sane ones you just add xdg-decoration and you're done.

Also, this is all apples-to-oranges anyway, as Win32 is a toolkit, while wayland-client is just a protocol (de)serializer.


> Creating a simple window in Wayland isn't much harder than in Win32. You get a wl_surface, attach a wl_buffer to it, wrap it with xdg_toplevel and handle some callbacks for resizing etc. There's some boilerplate that allows all this to be extensible in backwards-compatible ways, but nothing complex, really. simple-touch example in Weston repository has about 400 lines.

I believe the youth nowadays calls what you wrote "copium". Because creating a simple window in Win32 (a whole program, in fact) looks like this:

    #ifndef UNICODE
    #define UNICODE
    #endif 
    
    #include <windows.h>
    
    LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
    
    int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
    {
        const wchar_t CLASS_NAME[]  = L"Sample Window Class";
        
        WNDCLASS wc = { };
    
        wc.lpfnWndProc   = WindowProc;
        wc.hInstance     = hInstance;
        wc.lpszClassName = CLASS_NAME;
    
        RegisterClass(&wc);
    
        HWND hwnd = CreateWindowEx(0, CLASS_NAME, L"Hello World! Program",
            WS_OVERLAPPEDWINDOW,
            CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
            NULL, NULL, hInstance, NULL);
    
        if (hwnd == NULL)
        {
            return 0;
        }
    
        ShowWindow(hwnd, nCmdShow);
    
        MSG msg = { };
        while (GetMessage(&msg, NULL, 0, 0) > 0)
        {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
    
        return 0;
    }
    
    LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    {
        switch (uMsg)
        {
        case WM_DESTROY:
            PostQuitMessage(0);
            return 0;
        default:
            return DefWindowProc(hwnd, uMsg, wParam, lParam);
        }
    }
That's significantly less than 400 lines, and requires essentially just two function calls, RegisterClass and CreateWindowEx, the rest is the message loop and its callback.

Yes, this isn't much easier than doing it yourself with libwayland-client, even despite of it being a whole layer of abstraction higher (which is obviously why it's shorter, duh). There's more to type when you go lower level, but fundamentally it's still just "get me a window, here's my content, have some callbacks". Toolkits that provide similar (or even simpler) APIs on top of Wayland exist too.

Here is how to get Win32 up and running: https://learn.microsoft.com/en-us/windows/win32/learnwin32/y...

It's absolutely trivial in comparison. Same thing with Xlib; < 100 lines of C code is enough for a simple app.


I have written some OpenGL applications in X11, so they did not use much of X11 besides setting up windows for the OpenGL contexts, after which the rest of the programs were written using the OpenGL API.

Those applications seemed quite simple to write in comparison with what is described in the parent article, despite doing animation in real time based on the mouse and keyboard inputs.


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

Search: