HNHacker News
TopNewBestAskShowJobs

delta_p_delta_x

5,063 karma · joined July 15, 2021

submissionscomments
delta_p_delta_x··on Microsoft forced me to switch to Linux
> macOS handles things on a per-section-of-window, per-application, per-display basis.

No, it does not. If you have two displays with different physical pixel densities, and especially if they are sufficiently different that Apple will consider one 'Retina' and 'not Retina' (this is usually the case if, for instance, you have your MacBook's display—which probably is 'Retina'—beneath a 2560 × 1440, 336 × 597 mm monitor, which is 'not Retina'), then the part of the window on the non-Retina display will be raster-scaled to account for the difference. This is how KDE Plasma on Wayland handles it, too.

In my opinion, any raster-scaling of vector/text UI is a deal-breaker.

delta_p_delta_x··on Microsoft forced me to switch to Linux
> I think Windows is the only other one which really does this properly

Windows is the only one that does this properly.

Windows handles high pixel density on a per-application, per-display basis. This is the most fine-grained. It's pretty easy to opt in on reasonably modern frameworks, too; just add in the necessary key in the resource manifest; done. [1]

Linux + Xorg has a global pixel density scale factor. KDE/Qt handles this OK; GNOME/GTK break when the scaling factor is not an integer multiple of 96 and cause raster scaling.

Linux + Wayland has per-display scaling factors, but Chromium, GNOME, and GTK break the same way as the Xorg setup. KDE/Qt are a bit better, but I'm quite certain the taskbar icons are sharper on Xorg than they are on Wayland. I think this boils down to subpixel rendering not being enabled.

And of course, every application on Linux in theory can handle high pixel density, but there is a zoo of environment variables and command-line arguments that need to be passed for the ideal result.

On macOS, if the pixel density of the target display is at least some Apple-blessed number that they consider 'Retina', then the 'Retina' resolutions are enabled. At resolutions that are not integer multiples of the physical resolution, the framebuffer is four times the resolution of the displayed values (twice in each dimension), and then the final result is raster-scaled with some sinc/Lanczos algorithm back down to the physical resolution. This shows up as ringing artifacts, which are very obvious with high-contrast, thin regions like text.

On non-retina resolutions, there is zero concept of 'scaling factor' whatsoever; you can choose another resolution, but it will be raster-scaled (usually up) with some bi/trilinear filtering, and the entire screen is blurry. The last time Windows had such brute-force rendering was in Windows XP, 25 years ago.

[1]: https://learn.microsoft.com/en-gb/windows/win32/hidpi/settin...

delta_p_delta_x··on Director Gore Verbinski: Unreal Engine is the greatest slip backwards for movie
> At the end, movies are about the stories, not just pretty graphics.

The great people at Pixar and DreamWorks would be a bit offended. Over the past three or so decades they have pushed every aspect of rendering to its very limits: from water, hair, atmospheric effects, reflections, subsurface scattering, and more. Watching a modern Pixar film is a visual feast. Sure, the stories are also good, but the graphics are mind-bendingly good.

delta_p_delta_x··on LG UltraFine Evo 6K 32-inch Monitor Review
> It amazes me it’s so hard to find monitors around 210+ PPI.

You're in luck; several 5120 × 2880, 600 mm × 340 mm monitors at high refresh rates were announced at CES a couple weeks ago.

  MSI MPG 271KRAW16
  LG 27GM950B 
  Acer Nitro XV270X
  HKC M9 Pro
  Hisense 27GX-Pro
And many more.
delta_p_delta_x··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
> Your worries about blurry text go away when you use nearest neighbor upscaling (this is configurable in the MacOS zoom settings). Nice crisp text, at the right size.

macOS does not do nearest-neighbour when doing pixel density scaling. It especially does not do nearest-neighbour when the 'looks like' resolution of any display is not a nice divisor of the physical resolution. As the grandparent commenter said, macOS renders to a fixed framebuffer. The size of this framebuffer depends on the pixel density of the physical display; at Apple-blessed densities of ≥ 79 px/cm, this framebuffer is four times the 'looks like' resolution (twice in each dimension); below this, it is the same resolution.

After this rendering macOS applies filtered scaling to fit the framebuffer to the physical resolution. If upscaled, this leads to blurry text and UI; when downscaled, this causes ringing artifacts[1].

[1]: https://www.reddit.com/r/mac/comments/12j14ud/macos_vs_windo...

I concede that Windows' implementation is simpler, but I will argue that practically it doesn't matter because basically no one I know uses an application window across multiple displays.

My very strong opinion: text/vector UI should never be raster-scaled to fit varying pixel densities.

delta_p_delta_x··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
It also makes non-zero money from selling and maintaining Windows.
delta_p_delta_x··on High-speed train collision in Spain kills at least 39
The basics of mutual exclusion algorithms were developed for railway timetabling and track signalling.
delta_p_delta_x··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
> Since you like pixel-perfect rendering even at very high resolutions, perhaps you have superhuman vision.

I'm just annoyingly particular about this. It's why I accept a framerate hit in video games and don't use upscalers like DLSS, and why I intend to swap my 3840 × 2160 600 × 340 mm monitor for a 5120 × 2880 one of the same physical size. Some really nice ones were demonstrated at CES a fortnight ago.

> if I dragged the window in the example photo upwards to sit entirely on the top display, it would stay huge, whereas if I dragged it downwards to sit entirely on the bottom display, it would stay small.

This is not the behaviour I see. The window upon occupying the larger percentage of a display, 'snaps' to the DIP of that display.

delta_p_delta_x··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
I have a long blog post stewing here. I'll give you the gist.

Moving windows between monitors of different pixel densities is a rather difficult problem. Windows handles pixel density per-application, not globally, and it uses something called device-independent pixels (DIPs) for scaling. macOS and every desktop environment I've tried on Linux does scaling globally, or at least globally per-display.

On Windows, when a window is moved across two displays with different scaling factors, a simple algorithm is used. It will choose the display that the greater fraction of the window is in to select the DIP, render, compose and rasterise, and hence and one part of the window may appear too small or too large on the other display.

On the other hand, macOS, GNOME, and KDE take the easy (but IMO very lazy) way out by rasterising the entire application window to the pixel density of whichever display that the greater fraction of the window is in, copying that framebuffer to the viewport of the other displays, scaling with some filtering algorithm, and then composing, leading to blurring on at least one display. I am happy to bet that you're just not noticing the early rasterisation and filtered scaling going on. Having used all 3 OSs across a variety of monitors, I am extremely particular about blurry text; enough that I will stop using a certain setup if it doesn't satisfy me (it's why I stopped using Linux on my personal system).

I'll concede neither is good enough. The real solution here is:

  1. Render the application to as many viewports as there are displays that the application window is in, with the appropriate DIP for each display's scale factor
  2. Compose the application viewports into each display's viewport depending on the apparent window position
  3. The above will automatically clip away the fraction of the window that is outside each display
  4. Rasterise the composed viewport for each display
Another concession: I personally prefer pixel-perfect rendering rather than having the same visual size, and hardly ever use windows spanning multiple displays (especially of different pixel density), so Windows' behaviour is less of a problem to me.

My bigger issue is other desktop environments not supporting subpixel anti-aliasing, not supporting 'fractional' scaling (macOS is by far the biggest offender), and edge artifacts that result from bad clipping. I have a few photos I took of KDE, where random pixels are lit up at the bottom of my secondary display, with my laptop below it.

delta_p_delta_x··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
My point was that the article is logically flawed. The user mode of the OS sucks, so let's run the same user mode with a different kernel? What?

I don't care about configuration. I've had to do plenty of configuration on Linux as well; it's just different (text files instead of GPO/registry). I'm not sure I can list all the Arch Linux wiki articles I've read trying to get one driver or another feature working.

I am not here to convince anyone to stop using one platform or another. They're different tools that solve different problems, and I run all of them. I have a Linux laptop for work, a Windows laptop/desktop for personal use, a Proxmox hypervisor on my homelab running a variety of LXC containers, Linux and Windows Server guests.

delta_p_delta_x··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
> WinNT drivers are not things of beauty. The dev experience is cranky, and validation is a nightmare

I think one could say the same for any platform; in general, developing drivers is just difficult, full stop. That driver quality for peripherals can be bad is not the fault of the platform. I'm sure I could find dodgy drivers in the Linux tree that were merged in only because 'shrug it makes PineappleCorp's device work, who cares if it is littered with UB'.

delta_p_delta_x··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
> Windows Vista walked so Windows 7 could run, essentially.

Good point. Although I personally have a soft spot for the all the Longhorn castles in the sky that MS were building, and for Vista in general.

delta_p_delta_x··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
This is probably the hypervisor that Azure VMs run on, or perhaps Windows Server. Unlike Linux, (most) legacy apps (if they target NT) don't need VMs or containers; they run natively. You can compile for Windows 2000 on Windows 11 25H2 and run it natively on the host to test.
delta_p_delta_x··on Prediction: Microsoft will eventually ship a Windows-themed Linux distro
As a Windows system and user-mode dev, I absolutely never understand these sorts of drive-by posts with nearly zero technical depth.

If there is one thing about Windows that is really good, it is its kernel and driver architecture, and absolute plethora of user-mode libraries that come with the OS, that can be programmed against with a variety of languages from ancient to brand-new, all maintained by the vendor. Doing the same thing on a given distro of Linux is a headache at best, and impossible at worst (which is partly why game developers don't target native Linux).

The problems with Windows have always been in the user-mode (with the notable exception of Vista, and I still maintain that Vista was OK; its problems were due to Intel strong-arming MS into certifying a broken version of Vista for its sub-par integrated GPUs of the time). Windows 11 control panel sort-of gone? There's still the god-mode menu introduced in Vista. Right-click menu gone, or too much Copilot? Go to Group Policy editor, switch off what you don't need; revert what you can. People complain you 'cannot create local user accounts any more'. Also not true, that feature is a fundamental part of Windows and probably won't ever be removed. There are workarounds. Any Windows user or sysadmin worth their salt will have a GPE fleet-wide policy, and registry settings.

Everything one sees on Windows can be stripped out and reverted to Windows 2000 mode. That grey boxy UI is literally still there. Compile a program for 32-bit, set the compatibility mode to Windows 2000, and bam, there you go. If you add in the manifests for UTF-8 and high pixel density, the UI is scaled pixel-perfect by the system.

Speaking of high pixel density, Windows is the only OS that does scaling properly. macOS just pretends non-'retina' displays don't exist, Linux distros are a minefield of Xorg, Wayland, a million different conf.d files, command-line arguments, and env variables.

Why would anyone want to replace their core product with something that a) they cannot control, and b) does not satisfy their business and customer needs?

delta_p_delta_x··on Canada slashes 100% tariffs on Chinese EVs to 6%
> How many IPs have they stolen

Oh no, the poor trillion-dollar multinationals and multi-billionaires, whatever would they do?

delta_p_delta_x··on I spent a year on Linux and forgot to miss Windows
> WinRT writing Bluetooth drivers

This is a bit suspect. WinRT is an entirely user-mode library meant for writing user-mode applications; why would you be writing Bluetooth drivers in that? It's like writing Linux drivers with GTK. Why aren't you writing the driver with UMDF2[1]? I have so many questions.

[1]: https://learn.microsoft.com/en-gb/windows-hardware/drivers/w...

delta_p_delta_x··on Photos capture the breathtaking scale of China's wind and solar buildout
> but starting 2029 America will resume having its pick of the best

Your current government seems determined to make sure this won't happen.

delta_p_delta_x··on Photos capture the breathtaking scale of China's wind and solar buildout
Okay... and? I'm not saying 'let's only do nuclear, and not bother about wind/solar/tidal'. I'm saying there is plenty of money to go around, and it doesn't hurt to spend some of that to diversify our power generation and have some reliable, non-polluting, highly power-dense, high-tech base load (nuclear) that can be quickly throttled to meet demand, and is generally resistant to most environmental conditions.

The Chinese, Indian, Indonesian, French, British, and even Singaporean[1] (of all places, one might expect a tiny equatorial city-state to be the last place to think about nuclear, but it is all the same, because nuclear is ridiculously power-dense) governments seem to agree with me.

[1]: https://www.world-nuclear-news.org/articles/singapore-seriou...

delta_p_delta_x··on Photos capture the breathtaking scale of China's wind and solar buildout
> And since renewable + batteries is now cheaper than nuclear, we should spend our money and time wisely.

Eggs in one basket. Renewables are good, but it gets cloudy, it becomes night, it might not be windy. Nuclear will output power come rain or shine, and like I said, it's not like China isn't investing in advanced fission. They're throwing money at everything to see what sticks. They're working on SMRs, molten salt, thorium, and more.

delta_p_delta_x··on San Remo Pasta Measurer
I'm all for jumping on the Americans-can't-use-sane-systems-of-measure bandwagon, but in this case San Remo is an Australian brand.
delta_p_delta_x··on Photos capture the breathtaking scale of China's wind and solar buildout
I was just about to make precisely the same comment. The fear, uncertainty, and doubt about renewables here is ridiculous, and I expected better. I suppose everyone watched too much Landman.

China is rocketing ahead in every domain possible, from resource and financial independence, to infrastructure in terms of high-speed rail, bridges, roads, advanced fission reactors and bleeding-edge fusion research. Heavy industry like mining and processing, chemicals, ship-building.

Let's not even get into semiconductors. I fully expect them to achieve parity with TSMC before 2030 and surpass them shortly after.

Meanwhile, Western countries will say 'clean coal' or have a million different stakeholders squabble about where and how to build nuke power plants.

delta_p_delta_x··on A Couple 3D AABB Tricks
Indeed. This is classic array-of-structs versus struct-of-arrays.
delta_p_delta_x··on Himalayas bare and rocky after reduced winter snowfall, scientists warn
If you know languages, the 'phrase Himalayas bare and rocky' is particularly sad, because himālaya/हिमालय in Sanskrit literally means 'house of snow'.
delta_p_delta_x··on Is beef tallow making a comeback?
> Avoiding UPF

> Bread grows on trees, apparently

delta_p_delta_x··on 2026 will be my year of the Linux desktop
> Virtually all of the younger system developers are already working in Rust

I'd love to know where you get your statistics from.

FYI, as an anecdote, I am 'younger', in the sense of 'only recently joined the workforce', and I write 100+ lines of C and C++ a day, both at work and in side projects. Haven't touched Rust once, although I would like to get into it.

And funnily, the one UI framework I did use at work is Avalonia, which is strongly inspired by Windows Presentation Foundation.

delta_p_delta_x··on Loss32: Let's Build a Win32/Linux
> it is entirely an OS in an academic sense - in scientific literature OS == kernel, nothing else

No, the academic literature makes the difference between the kernel and the OS as a whole. The OS is meant to provide hardware abstractions to both developers and the user. The Linux world shrugged and said 'okay, this is just the kernel for us, everyone else be damned'. In this view Linux is the complete outlier, because every other commercial OS comes with a full suite of user-mode libraries and applications.

delta_p_delta_x··on Swapping SIM cards used to be easy, and then came eSIM
Nothing. But I want the SD card, dual sim plus eSIM, a headphone jack, a rectangular screen with a decent aspect ratio ideal for wide-format films and scrolling. I will fully concede that Sony's software quality has taken a hit in recent years; they used to be much better in 2016 or so.
delta_p_delta_x··on Swapping SIM cards used to be easy, and then came eSIM
> the used market for them is almost non-existent

Perhaps, but phones have become appliances. All my friends and family have held on to their smartphones for at least 5 years now.

delta_p_delta_x··on Flame Graphs vs Tree Maps vs Sunburst (2017)
Windows equivalent: WizTree[1].

https://diskanalyzer.com/download

delta_p_delta_x··on Swapping SIM cards used to be easy, and then came eSIM
I own an Xperia 5iii (so about four-and-a-half years old now), and I also own a Pixel 10.

The Pixel 10's camera is unequivocally better. The JPEG outputs are processed, 'Instagram-ready'. The output from the Sony camera even in JPEG mode is considerably more muted, neutral, and has less contrast. Note that this is not representative of newer Xperias' camera quality; I've heard they have improved considerably. I'm not too concerned because I hardly use my phone to take photos; I have a Nikon mirrorless for that.

← PreviousPage 9 of 34Next →