News for hackers. Stuff that matters.
Re:A macOS-like operating system based on FreeBSD by Aloha on Friday August 06, 2021 @12:16PM (#28089223)
Why is avoiding X11 better? Like X11 is mostly just an abstraction layer for drawing objects to the screen.
Re:A macOS-like operating system based on FreeBSD by whywhywhywhy on Friday August 06, 2021 @01:11PM (#28090092)
The extreme modular approach, while a strength in some situations is also the reason why you will never be able to build something like MacOS on any of that infrastructure.

It will always have little bits of jank, always have inconsistencies and although all it does is draw objects on a screen it just doesn't do it to the level of quality as in tear and flicker free that MacOS can manage.

Re:A macOS-like operating system based on FreeBSD by pxc on Friday August 06, 2021 @02:46PM (#28091309)
And yet actual window management on macOS is bizarre (wtf is with the maximization behavior, that it seems each app can decide on its own) and inflexible. Tiling, snapping, alt-drag, and shading are all missing. Automation, used to emulate those features, is cumbersome, slow, and, yes— janky. (It's way more work to customize or automate window behavior on macOS than on Plasma, for example.)

Pretty much every actual window management feature on macOS aside from dragging windows by the titlebar is janky as hell. :-\

(It is neat that display server crashes/restarts on macOS don't cause you to lose your graphical session, though. Idk if any F/OSS WMs have that.)

Re:A macOS-like operating system based on FreeBSD by machinevision on Friday August 06, 2021 @03:28PM (#28091743)
Couldn't agree more. It used to be much better. I remember on Mac OS 8, the window manager made intuitive sense and got out of the way in most cases.

I don't know when it deteriorated on Mac OS X, but I've recently started to use Rectangle a lot (https://rectangleapp.com/). This has been really useful.

Re:A macOS-like operating system based on FreeBSD by jen20 on Friday August 06, 2021 @03:12PM (#28091608)
> wtf is with the maximization behavior

There isn't a maximise behaviour. Per the interface guidance, that button is called "zoom" [1], not maximise, and it therefore makes sense that apps do something different depending on what they need to zoom in a way that makes sense for them.

[1]: https://developer.apple.com/design/human-interface-guideline...

Re:A macOS-like operating system based on FreeBSD by wmf on Friday August 06, 2021 @04:11PM (#28092197)
Zoom was replaced with maximize in Lion in 2011.
Re:A macOS-like operating system based on FreeBSD by jen20 on Friday August 06, 2021 @05:03PM (#28092715)
Someone should probably tell the team that writes the docs then...

The button now serves dual purpose as "full screen" and "zoom" (with option). It's not "maximise" though.

Re:A macOS-like operating system based on FreeBSD by irae on Friday August 06, 2021 @03:03PM (#28091506)
The UX discussion is not directly related to the technical discussion. Apple has its own history and more than one mode is supported. Feels to me somewhat of a legacy problem.

That said, their stability and flexibility is unmatched. Windows got a lot better recently, and they have a harder surface to deal with (orders of magnitude more hardware to support). But from an outsiders perspective Apple's feel like the best balance right now.

Re:A macOS-like operating system based on FreeBSD by whywhywhywhy on Friday August 06, 2021 @06:11PM (#28093352)
I almost never maximize windows and if you're someone who uses their desktop spatially like me MacOS is the only OS that manages to offer a usable and jank free version of that.

Windows and Linux just can't come close. I get why Linux never will for good reasons but Windows has absolutely no excuse.

Re:A macOS-like operating system based on FreeBSD by AshamedCaptain on Friday August 06, 2021 @01:28PM (#28090324)
Ridiculous, specially considering OS X's display server is actually rooted on Display PostScript of all things.
Re:A macOS-like operating system based on FreeBSD by huxley on Friday August 06, 2021 @03:10PM (#28091589)
Display Postscript got dropped after Rhapsody/MacOS X Server 1.x.

None of the 10.0+ releases of macOS used DP, instead it used Quartz2D, eventually added OpenGL to the mix, and now uses a combo of Quartz and Metal.

Re:A macOS-like operating system based on FreeBSD by AshamedCaptain on Friday August 06, 2021 @03:43PM (#28091894)
And you forget the (Quartz/Display) PDF era. The point is, the window server on OS X is about an order of magnitude more historical than that of X, so the argument above is ridiculous.
Re:A macOS-like operating system based on FreeBSD by whywhywhywhy on Friday August 06, 2021 @06:15PM (#28093384)
Just because it's older doesn't mean it's worse. Next had designers and a product person CEO working on it, X11 did not.

End of the day one can drag windows around smoothly and resize them without flickering and have consistent drag and drop etc and the other does not.

Re:A macOS-like operating system based on FreeBSD by AshamedCaptain on Friday August 06, 2021 @06:16PM (#28093395)
> Just because it's older doesn't mean it's worse.

No, it doesn't. But means one cannot claim "it will always have little bits of jank, always have inconsistencies although all it does is draw objects on a screen" just because it is old, since it turns out it actually isn't. X11 does have a lot of cruft, but so does WindowServer.

> End of the day one can drag windows around smoothly and resize them without flickering and have consistent drag and drop etc and the other does not.

That is just a lie. I can easily make Firefox flicker on OS X while resizing and I can easily resize say Gtk+3 windows on X without flickering. And I have almost 3 4k displays...

Re:A macOS-like operating system based on FreeBSD by pxc on Saturday August 07, 2021 @01:17PM (#28100187)
Drag and drop isn't really a window management feature, right? It's a kind of uniform IPC for GUI apps, mostly a way to talk about files and clipboard contents (temporary files, I guess). At any rate, it has nothing to do with the display server.

That said, I do agree that I would generally expect even older Apple codebases to be less crufty than stuff like Xorg. Apple rips out legacy APIs and rewrites things pretty ruthlessly on basically every macOS release.

Re:A macOS-like operating system based on FreeBSD by agumonkey on Friday August 06, 2021 @03:03PM (#28091511)
is Display Postscript bad ?
Re:A macOS-like operating system based on FreeBSD by huxley on Friday August 06, 2021 @03:12PM (#28091604)
For it's time it was actually pretty amazing but it hasn't been used by Apple in over 20 years.
Re:A macOS-like operating system based on FreeBSD by wmf on Friday August 06, 2021 @04:14PM (#28092232)
Serializing drawing commands into text, sending them over a socket, then parsing them seems wasteful. Also I think NeXT had to pay Adobe.
Re:A macOS-like operating system based on FreeBSD by wmf on Friday August 06, 2021 @12:18PM (#28089255)
It's a bad abstraction layer. Wayland is much better.
Re:A macOS-like operating system based on FreeBSD by amrcnimgrnt on Friday August 06, 2021 @12:20PM (#28089294)
until you need to forward X, which I sometimes find very useful (on a LAN it's not too bad)
Re:A macOS-like operating system based on FreeBSD by tokamak-teapot on Friday August 06, 2021 @12:24PM (#28089348)
I used to use it over the internet in 1995. It worked nicely then.
Re:A macOS-like operating system based on FreeBSD by handrous on Friday August 06, 2021 @12:43PM (#28089650)
AFAIK it worked a lot better back then because X programs sent basic drawing instructions, so messages were tiny. I'm pretty sure most of them send images over the wire now for the whole window, like VNC or what have you, thanks to all the fancy eye-candy and extra layers we've added.
Re:A macOS-like operating system based on FreeBSD by bitwize on Friday August 06, 2021 @02:02PM (#28090797)
That's still a stupid way of doing it. What they should be doing is caching pixmap atlases server side and sending draw requests to draw subsets of those. If they send an entire image over the wire for each frame draw, it's purely due to developer laziness.

Also, with "flat design", suddenly libXaw is on the cutting edge of UI look and feel again...

Re:A macOS-like operating system based on FreeBSD by audidude on Friday August 06, 2021 @03:33PM (#28091783)
Yes, they do that. But they often use Xshm to upload those pictures to the display server, and that still means sending them to the peer for server-side blitting.

Further more, by using TCP/X11 for the wire protocol, any dropped packets have to be retransmitted before you can update unrelated portions of the display because it requires in-order processing by design.

This is why high-quality, high-frame-rate remote displays never use that design.

Re:A macOS-like operating system based on FreeBSD by rjsw on Friday August 06, 2021 @02:48PM (#28091345)
Developers don't get to see what is going on, everything is hidden in multiple layers of libraries, it isn't down to laziness.
Re:A macOS-like operating system based on FreeBSD by bitwize on Monday August 09, 2021 @09:51AM (#28116812)
Someone had to write the libraries!
Re:A macOS-like operating system based on FreeBSD by AnonymousPlanet on Friday August 06, 2021 @12:39PM (#28089588)
You might find waypipe interesting: https://gitlab.freedesktop.org/mstoeckl/waypipe/
Re:A macOS-like operating system based on FreeBSD by Teknoman117 on Friday August 06, 2021 @01:48PM (#28090583)
Nice to see someone is working on it.

Over Christmas 2017 I threw together a simple demo of a "system compositor" (a compositor that runs another wayland compositor) that sent all of the video frames rendered into a hardware video encoder (libva on an Intel GPU) as well as the screen. I was able to record playing games without much CPU overhead at all. I never really got beyond nesting the weston reference compositor because both gnome's wayland compositor and kde's kwin compositor don't support running nested (or at least didn't at the time). Was quite proud of myself for being able to record steam games playing at full screen framerate (Crypt of the Necrodancer and other simple things, I had a i7-5600u in my laptop).

I'd have probably turned it into a project like this, but I work for a streaming service professionally and they didn't approve of me working on open source work in that realm :(

Re:A macOS-like operating system based on FreeBSD by ozarkerD on Friday August 06, 2021 @01:51PM (#28090633)
Dang that sounds really cool. Such a shame you couldn’t keep working on it
Re:A macOS-like operating system based on FreeBSD by cpach on Friday August 06, 2021 @01:19PM (#28090213)
How often does one need to do that though?

At ${dayjob} we do it once in a blue moon; not out of sheer necessity but for legacy reasons.

Other than that I never do it.

Re:A macOS-like operating system based on FreeBSD by amrcnimgrnt on Friday August 06, 2021 @02:03PM (#28090799)
When you need it you need it, no matter how often.

in grad school we used it to share very powerful workstations without getting out of the office.

Sometimes I need to use a GUI program on my Desktop while I'm away. It might be something as silly as adjusting a parameter on a simulation run.

Sometimes I want to start a program on a remote computer (say VLC on my kids laptop downstairs)

Embarrassing admission - sometimes I know how to adjust a setting from the GUI and not from terminal. Maybe I want to mute a computer downstairs (btw, just an example. I'd use alsamixer, if killall weren't an option).

Honestly, I'd use it a lot more if it were faster and less laggy. Daily, even.

Re:A macOS-like operating system based on FreeBSD by handrous on Friday August 06, 2021 @01:56PM (#28090700)
I think there's a lot of potential for "run an app remotely, draw it locally". A crippled, single-application version of that's an entire, recent, highly-publicized startup, even (the controversial remote-Chrome-as-a-service company that's been posted about quite a bit in the last couple months).

I think it's not widely done because Apple and Microsoft haven't put out good tooling for it. If one of them released that kind of thing as a high-quality, polished feature, I bet it'd be big.

Also, IMO the default set-up and behavior for it on Linux machines isn't very good (shocker, that). Much better would be persistent remote sessions that let you drop your connection on one machine and re-connect on another, and leave them running indefinitely when not connected. You can get that working with some extra software but it's a bit janky and the UX is nerd-only, like most of this stuff.

Re:A macOS-like operating system based on FreeBSD by tablespoon on Friday August 06, 2021 @01:37PM (#28090441)
>> until you need to forward X, which I sometimes find very useful (on a LAN it's not too bad)

> Other than that I never do it.

If we got rid of all the features that someone never uses (or even a lot of people never use), we wouldn't have any features anymore.

Re:A macOS-like operating system based on FreeBSD by CountSessine on Friday August 06, 2021 @12:49PM (#28089741)
But you can do this with XWayland?
Re:A macOS-like operating system based on FreeBSD by amrcnimgrnt on Friday August 06, 2021 @02:03PM (#28090804)
I don't know, I didn't know about it :p
Re:A macOS-like operating system based on FreeBSD by fddddd on Friday August 06, 2021 @12:23PM (#28089339)
it's bad if you think local single user.

if you actually use remote X capabilities, wayland is no replacement.

also it deals better if you consider apps hostile and want to still run them with some integration with the desktop but still safely isolated. X complements chroot et al much better. which I guess fits this project since this is pretty much Wine but for bsd/osx instead of linux/win

Re:A macOS-like operating system based on FreeBSD by colinthompson on Friday August 06, 2021 @04:14PM (#28092235)
One argument might be that X11 does not support higher than 8bit display tech AFAIK, so if you wanted to do any sort of HDR display (potentially for something like grading or some other gfx development work) you’d be out of luck.
Re:A macOS-like operating system based on FreeBSD by pjmlp on Friday August 06, 2021 @02:25PM (#28091085)
If you want to stay with UNIX 1980's rendering model.
Re:A macOS-like operating system based on FreeBSD by teddyh on Friday August 06, 2021 @02:26PM (#28091097)
And yet Unix itself is even older.
Re:A macOS-like operating system based on FreeBSD by pjmlp on Friday August 06, 2021 @03:04PM (#28091524)
Unfortunately we still haven't been able to fully replace it, so we remove as many crusty layers as possible.
Re:A macOS-like operating system based on FreeBSD by konart on Friday August 06, 2021 @01:17PM (#28090194)
X11 cannot handle two screens with different resolution scaling. For example.
Re:A macOS-like operating system based on FreeBSD by cesarvarela on Friday August 06, 2021 @02:00PM (#28090767)
This has been a nightmare for me. Windows has lot of trouble with mixed dpi/scaling too. The only OS that has handled this flawlessly has been macOS.
Re:A macOS-like operating system based on FreeBSD by AshamedCaptain on Friday August 06, 2021 @01:30PM (#28090348)
Oh yes it can; toolkits, on the other hand...
Re:A macOS-like operating system based on FreeBSD by konart on Friday August 06, 2021 @02:15PM (#28090975)
No it can not. I've seen some xrandr magic solutions but they have their own set of issues. So they are not a solution.
Re:A macOS-like operating system based on FreeBSD by AshamedCaptain on Friday August 06, 2021 @06:14PM (#28093373)
So it can :). I know of the issues you mention, but they are toolkit problems, since they also happen on Windows. And OS X.