337 points · by okket · 10y ago · 310 comments
Off hand I remember spending the better part of two days trying to understand a bug that was traced to a coroutine issue -- OS X was just not saving a required register, known and reported for 5 major versions.
I remember discovering that unnamed semaphores don't work on OS X. Not that the functions aren't implemented, just that they always return an error.
So I'm not surprised that poll() would be broken, nor am I surprised that it's broken again.
The only thing that surprised me anymore is how many people continue to insist to me that OS X (or macOS now, I guess) is a great UNIX. It may be a great desktop OS.
* HiDPI does not seem to work as well on other platforms.
* Lightroom is a pain to run over wine or some other tool (and no, Darktable is not there yet)
* 1Password still has no linux client
* I like the iPhone and do not plan to move away anytime soon
* iOS app builds - not really a problem to keep my old MBP around just for doing builds
I have been using linux for years on the server and I'm really amazed how short this list has become.
There is no Linux desktop experience that is consistent, or coherent. You'll frequently want to use software that happens to be made for the other window manager, and suddenly you have different keyboard layouts depending on the window that's active. Toolbars are sometimes on top, sometimes in the window. Sleep absolutely definitely will never work, unless you muck around in the kernel for a bit. Then it works but your wifi cuts off when you're playing music.
Most of design is either created by people who want to punish you for leaving the command line, or these people who put blinking, nascar-style ornaments into their water-cooled, wall-mounted, intel-inside-stickered towers.
Oh, and battery life on Skylake is about half of what a Macbook gets.
So, I can't directly disagree with most of what you said on point, except for sleep/hibernate/suspend. Especially in the last decade, it often works without any low-level tweaking, and I can get it going in MOST cases without too much fuss.
In the last 10+ years, my wifi experience on Linux has been very solid, often more solid than my OSX-using co-workers.
But this is all anecdata.
Though Ubuntu (and to a much lesser extent, some others) have come light-years toward producing a consistent, coherent Linux desktop experience, it still lags painfully behind OSX and Windows.
With all of these disadvantages, though, the 'all the way down' reliability and no-bullshit you get from a Linux desktop (or server) is worth its weight in gold. It's just that the entry fee is still too high.
Agreed in a sense. All OSes have their issues. They're just different issues.
> Linux on the desktop is nowhere near macOS.
And that's because it's a different OS. It's not trying to be MacOS. And I'm glad it isn't. Because if I wanted MacOS I'd run that, don't you think?
> Sleep absolutely definitely will never work, unless you muck around in the kernel for a bit. Then it works but your wifi cuts off when you're playing music.
I've yet to experience any issues like this on any of my hardware, but I've been shopping around from Linux-friendly OEMs like Dell XPS laptops and Lenovo ThinkPads. So maybe that's just you being unlucky about your hardware? Hard to tell over an internet comment.
But let's be real here: Linux as a general purpose desktop OS mostly works on pretty much any hardware you throw at it. OSX works on maybe 3 models made by 1 vendor.
Trying to arrest Linux for poor hardware-support in this scenario is a pretty weak hand to play, honestly. Because out of the three big OSes, MacOS is clearly the general purpose operating system with the weakest hardware support of them all. Its hardware support is piss poor.
[edit]
The only issue so far is that when I unplug an external display, it sometimes fails to shrink my desktop accordingly. I've seen issues of a similar level of annoyance on macs as well.
[edit2]
There are the other standard linux things (every piece of software is configured differently &c.) but as we are talking about someone who uses linux on the server already, I didn't consider that apropos.
Try updating your firmware. My Skylake laptop gets 10 hours or so. If a Macbook got 20, I'd be quite impressed. :)
Straight up FUD. This isn't the experience at all. Linux had these issues in the mid 2000s, that hasn't been my experience in years.
I agree with the "inconsistency" but I see the same "inconsistency" when I open matplotlib windows (wxgtk I suppose) and they look different, only closing the window fails randomly on OS X and leaves Python interpreter running while I've yet to experience that on Linux.
Then, I'd try to kill the non-responding app, and kill works on Linux, but on macOS, it is inconsistent. And that wasn't ten years ago, that was may be two or three days ago.
Since Windows is not an option for me, I switched to a Mac.
Is it as refined as MacOS? No. Does it have the same polished application selection? No. Does it need both of those to be useful? Up to you, and you can help mold it and become part of the community
I would argue that hidpi doesn't look as good as Mac, but better than Windows. I'm primarily committed to Gnome, so I cannot speak for other desktop platforms, but GTK applications look pretty good and the font rendering is fine (again, not great like Mac, but not bad like Windows).
But there's always that one tool that just isn't there...
- GNOME 3.22 has pretty great HiDPI and most GTK apps work very well with it + it looks great with the Arc theme + Numix icons
- A small virtual machine for Lightroom may be easier than Wine, or try a commercial, supported fork like Crossover
- The system is just soo much lighter and more responsive than macOS, no constant locks or spin wheels in 1/3rd of the CPU+RAM usage of a Mac.
- A package manager like pacman runs circles around Homebrew and the whole UNIX CLI toolset feels much more like a first class citizen
- Bugs are visible and traceable in the open and patches are often provided within a couple of days.
- WiFi on my 2015 15" MBP constantly drops for me, never happened to me under Linux (Arch specifically)
- The kernel can be compiled with only your specific modules, allowing for even faster, leaner system
- systemd is amazing and makes managing the system super easy
- Greater choice of file systems to fit your needs, most of which are not 30 year old and do not operate on a single file at a time.
- Even if the GUI freezes, it's super easy to switch to a tty and restart the display server, avoiding a hard reset
- Hardware with proper GPU available, allowing you to play over 2000 games on Steam, including some which are not on Mac at all
- Vulkan support/more likely to support future games
- Runs cooler and quieter
- Not subject to one company's whims and control
- I also have an iPhone, apart from iOS dev, why is this a concern for you under Linux?
- Rolling release if you want it, (contrary to popular opinion, very stable, I had the same install for 3 years without issues and that involved swapping the entire init system)
- Free as in freedom software, passionate people and community, generally much more of a developer/like minded individual type of crowd if you care about that With it comes a sense that you're contributing to something having real impact out there.
I'm dual-booting Windows for Photoshop and Lightroom, and using the 1Password Web interface since there isn't a Linux client.
Like you, I still have my MacBook Pro around for when I really need a Mac. But I'm tired of supporting Apple when its clear they're not especially committed to the Mac anymore.
That doesn't really solve your other issues though. Personally I use lastpass which works fine in Linux but I haven't used 1password enough to be able to say whether it's a valid comparison or not. Lightroom might work under Wine or in a VM if you don't use it so often that you really need it to be native.
HiDPI was broken for me on my external display once I "upgraded" to Sierra. In order to fix the problem, I had to install the most recent beta of the OS - not a move I liked making, but one I felt necessary because my external display is such an important part of my work.
This marks the first time that I've had this kind of issue with a macOS upgrade so soon after release. Lesson learned. Now I plan to hold off, with future releases. These new versions aren't bringing any new features that I care about, in the end, so there's no need for the new & shiny version of the OS anyway.
It seems that if you have a GTK3 desktop (I've tried elementaryOS, GNOME 3 apparently works well as well) most of the developer related things will work well at 2.0 scale - like Mac does it. At least I've tested out Sublime Text, Chrome, Terminal apps, GVim and other included GTK3 apps.
Another thing is if you lug your computer around a lot, I often go from one 3-monitor setup at work to another at home however this always messes up my window placement and I haven't seem to found any DE/WM which handles this cleanly in a convenient way even near the experience on macOS.
This experience have made me realise that even though Linux is workable as a developer OS today it is nowhere near as convenient and seamless as macOS.
It was much easier getting nvidia-docker, tensor flow and caffe running than getting the desktop to limp along.
I would recommend giving something with GNOME 3.22, like Arch or Gentoo a serious try instead.
HiDPI is just a waste of processing power and money anyway.
> * Lightroom is a pain to run over wine or some other tool (and no, Darktable is not there yet)
Sure, but that's an Adobe issue.
> * 1Password still has no linux client
KeePass?
> * I like the iPhone and do not plan to move away anytime soon > * iOS app builds - not really a problem to keep my old MBP around just for doing builds
Being that tied to your desktop OS sounds like a huge reason to move away from iOS.
I don't really care whose issue LR is. It's a tool really without equal, and it's required for my use case.
Keepass is what I would move to, but 1Password is so much nicer. Hopefully they support Linux fully at some point.
Why would I move away from iOS? The hardware and software as a package work better than anything on Android I have used, again for my use case. Part of my job is building apps for both platforms. There is no way we would stop doing the iOS version.
You're right, we should all go back to 640x480 CRT screens.
After being on HiDPI displays for years, old LCDs are practically unusable. More eye strain, lower max information density, less visually appealing.
As someone who ran Linux both on the desktop and laptop for well over a decade, for me Windows 10 has finally gotten to a usability point that I accept, WRT the window manager. That may sound odd, but I was "that guy" you might have run into who had a fully hand written FVWM config that was extremely customized to be efficient, so the fact that Windows is often sufficient now is quite a feat to me.
That said, my workflow does often consist of just browser + email + terminals, so take that into consideration.
Every windows update (which MS now shoves down my throat at the most inconvenient of times) seems to want to force me to use Cortana. Every update also re-adds shortcuts to the windows store to my quicklaunch. I'm constantly seeing nags and offers for things I'm not interested in using on the lock screen.
It feels like there is no one at Microsoft really in charge of the user experience and every department within the organization gets to add their "must haves" to the next version with little consideration on how it affects the overall experience of the operating system. In this regard, Apple is and always has been lightyears ahead of MS and that just doesn't ever seem to change.
Then there's still long standing issues that exist that completely boggle my mind - I just plugged in a new USB mouse the other day and had to restart after installing the software for it.
They were never committed to it with A/UX and for NeXT it was just a way to bring in software from the blooming UNIX workstations market.
I remember back in the early 2003, they came to CERN trying to promote the idea of using Mac OS X for research because of the UNIX compatibility.
In both cases, NeXT (aka Apple) needed the developers to help grow their diminishing market.
Now they have the upper hand and don't need UNIX compatibility more than they already offer, and the non-UNIX layers is what matters.
They are not alone, just look at Google efforts with Brillo, Fuchsia and removal of insecure UNIX V APIs in Android.
Between 10.2 and 10.8 it was both, culminating on 10.5 and 10.6, the crown jewels IMHO. After 10.8 it took a definite turn for the worse, acquiring the worst of 'modern' practices and slashing many historic features that users loved, from user-friendly stuff to power user shortcuts and customizations.
I haven't even tried 10.12. The previous releases (10.9 through 10.11) have thoroughly butchered the interface, usability, compatibility, performance, and UNIX-level features.
I'm now back on GNU/Linux (Mint 18 Cinnamon) and I'm loving it! I have yet to find a feature or program I'm missing, while many things are so much easier. (Focus follows mouse, middle button paste, and Alt + window dragging, how I missed you! Not to mention apt-get)
Anything specific? Because I don't find anything "butchered", apart from the usual assortment of bugs.
It seems like 10.6 is the agreed-upon high point for macOS - then the porting of iOS designs/features (remember those linen textures?) resulted in more UX issues and bugs than usual. Thankfully it has improved significantly since then, though.
edit: iOS->OSX
I wonder if the Open Group will accept a bug report? From http://www.opengroup.org/openbrand/ : "Anyone buying a Registered Product is guaranteed that: The product conforms to the identified Product Standard. ... The product will continue to conform. ... Any conformance problem will be fixed within the prescribed timescale."
The poll issue is a clear violation of the UNIX spec. http://pubs.opengroup.org/onlinepubs/7908799/xsh/poll.html
Yeah, Posix semaphores don't work on macOS. Confusingly, support for unnamed semaphores exists however in Apple's libdispatch, using dispatch_semaphore_t. Don't ask me why.
E.g.
http://www.kylheku.com/cgit/txr/commit/?id=8bc6ba624272e9df4...
/* Apple's socket address. */
struct sockaddr_in {
__uint8_t sin_len;
sa_family_t sin_family;
in_port_t sin_port;
struct in_addr sin_addr;
char sin_zero[8];
}
Why is sin_len that necessary? The socket functions have a length parameter, including bind: int bind(int sockfd, const struct sockaddr *addr,
socklen_t addrlen);
If this redundant length is necessary, why is it okay to lie and set it to zero? The length of the address sure isn't zero.If sin_zero must be zero, why doesn't the bind function make it so?
Don't add a member to the end of a struct just so that padding has a name, and then make me initialize it.
POSIX defines a type called struct sockaddr_storage which is at least as large as the largest sockaddr_* type. There is no need to pad the various sockaddr-s up to that size; the sockaddr_storage can be used to declare storage large enough to receive any address.
The API is extensible in that we can introduce new address types, and overlay new structures. You can implement a new network "foo", then in the API add AF_FOO address family enumeration and a struct sockaddr_foo which exhibits whatever members you want (which are documented and must be initialized).
The AF_INET family has only sin_family, sin_addr and sin_port. If we init these, we are good to go.
If you want a struct similar to struct sin_addr, but with more fields that are user-visible and must be initialized, you must introduce a new derived type AF_INET_SPECIAL along with struct sockaddr_in_special.
> Enforcing this rule leads to more robust and portable code.
Enforcing this rule ensures that correct code that works everywhere breaks on (i.e. does not cleanly port to) Mac OS.
I'm not convinced the desktop is great either. Sure, the visual polish is better (font rendering is much better on OS X), but things like windowing, workspaces I find was much more my speed on Gnome 3.
From the bottom of my heart, I want to thank you for using a word aside from "problematic."
In over a decade of submitting bug reports to Apple, they've only ever fixed a few of my issues. Most of my reports are easy to reproduce and test. I'm better off spending my time doing clean room reimplementations of whatever their API promises or just scrapping whatever I wanted to do than even wasting time reporting bugs.
"Radar Radar Radar" is all they ever ask. I don't care anymore. The whole process is opaque with no guarantees of a fix or a workaround; it'a unworthy of my time. They have over $100 billion in cash - about time they start testing and fixing more of their own issues.
In fairness, this applies to any large company. What gets the grease is volume field reports from Customer Support, not bug reports from developers, no matter the level of detail.
I have an outstanding Radar report of a problem with the Fusion drive from at least Yosemite on; on a full SSD in the CoreStorage volume, allocating a file buffer larger than the 4GB copy partition will instantly hang the file system, effectively disabling the computer. You can't even reboot, hard power cycle is the only solution. This isn't in general a good way to create a file, but Transmission does exactly this, unfortunately.
If everyone follows your algorithm then you will have efficiently implemented the Bystander Effect.
Why would any organization with all that cash worry about fixing issues. They were showered with money in spite of those issues, so they must not matter.
So if anything, the bigger and richer they get, the less inclined they are to fix issues. Unless they perceive that there is a looming threat, and certain issues are seen as connected with it.
Having a support contract helps a lot. Apple doesn't really even offer that.
With one fairly epic failure from them, my employer was big enough to get a sad Apple guy to fly up and express his heartfelt sorrow. Very touching. His SE helpfully suggested that we restore our phones (15,000 of them). That was about the extent of it.
It's just their way, each vendor is uniquely obnoxious. But the unpredictability limits what you can do with their products.
It's not like Apple doesn't have the cash either. They could take some of the money that is trapped overseas for tax reasons and open up a field office somewhere (Ireland? China?) who's only job is to run through Radar from top to bottom and close out/fix every issue.
How recent is your experience, I have found this not to be really true anymore, at least for the past few years.
I'd argue that missing out on security fixes is far more risky than any technical issues you may encounter after an update but I'm a security engineer.
While that works well, you can install the newer version in another partition or disk. That's what I did with macOS Sierra and then I went back to an older version as it doesn't seem very stable to me.
FWIW on a macOS Sierra test box I just had compress hang on zipping up 2 small log files. Not sure if that's Sierra or if the machine has problems, but it sure was weird.
I come from linux, I'm used to screwed up APIs, and stuff breaking. But when we have something broken, it's usually because it was designed that way (see epoll). Usually, anyways.
But even we would never break something this fundamental. And if it did break, we'd probably fix it. Immediately.
Breaking one of the most used syscalls in the POSIX spec isn't an option, and is never okay. Ever.
Of course these things get fixed very rapidly, so completely unlike this Apple/poll story.
But in this case, they are using poll as the time-honored way to sleep. Yes Apple should follow the expected POSIX behavior but at the same time if sleep is what is desired, there's usleep(3) and nanosleep(2) which are found in libc's time.h
Also, according to the developer, this same behavior was present from 10.3 to 10.9 ( Apple was certified to be compliant from 10.5 onwards which tells you that this isn't non conformant) and OS X did not even ship with a poll(2) implementation before 10.3 .
My MBP is so buggy as it is with El Cap that I prefer to use a cheap surface 3 for anything other than dev work.
Every time Apple releases a macOS update I'm left to decide between the bugs I already experienced that might be fixed and the mountain of bugs that are surely hidden in the new update.
Every couple of weeks they'd put out a patch that claimed to fix the wifi, and while it did get better, it was never as good as it should have been. I live in a 1-bedroom apartment with an 802.11ac router and all of my other devices work fine. The router's off at one end of the apartment where the coax comes in, but I'm never more than 25 feet away from it.
I've heard here and talked to a number of professionals that do not use Linux because they want something that "just works". But if I really sit down and catalog my issues, Linux can be a headache to set up, but once it's working I rarely have issues. Part of that is researching the right hardware, so I guess it's not the plug and play of proprietary platforms, but it works.
The last piece of productivity software I wanted on Linux was just released recently (Substance Designer), so I'm seriously considering a dual boot. Have to keep Windows around because it's my gaming machine, but I'm a bit sick of having software updates shoved down my throat at inopportune times.
What pisses me off the most about W10 is that it makes you pick "active hours" when it won't install updates, but it's a 12 hour maximum and it's the same every day. As if my home computer's usage pattern on Monday-Friday is going to be the same as the weekend.
The newest and my personal favorite is a faulty file save/open dialog on OS X. Anytime an app invokes that, the entire app crashes. Really fun in Chrome, Word, Atom, or any other app that involves opening or saving files.
Libc (or the various other libs that compose libc) are not necessarily system calls, often they are wrappings of severals.
I'm talking about the `dlfnc.h` interfaces.
"If none of the defined events have occurred on any selected file descriptor" - This statement is not same as passing NULL.
I have adopted the practise of installing new OS releases on a separate test partition first. Blindly updating the main system can be a really bad trap.
From the Go1.7 release notes: "Binaries built with versions of Go before 1.6.3 will not work correctly on Sierra."
I don't know what the underlying cause was.
Bonus stink - http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#OS_X_AN... - kqueue has been buggy and Apple switched poll to use kqueue in 10.5.6!
> most versions support only sockets, many support pipes
That seems to be self-contradictory, especially because elsewhere in the document it says
> usually it doesn't work reliably with anything but sockets and pipes, except on Darwin, where of course it's completely useless
But nowhere on that page can I find an explanation of what's actually wrong with it.
Here is a thread with sample code having kqueue issues - https://discussions.apple.com/thread/4783301?tstart=0 (Note: I haven't seen that code myself - it might as well be buggy itself but you can use it for your tests as a starting point I suppose.)
Edit: User DerekL also reports running code that illustrates the bug on latest iOS version - https://news.ycombinator.com/item?id=12687527
But it needs to be a regression or integration test
(However I can understand people thinking "ah if you're polling nothing then it immediately returns" instead of looking at the spec)
I personally would not have guessed that this usage is valid at all, since it would always for the timout. If no timeout is specified there's then even the question if it should wait infinitely (makes no sense but matches the normal poll-without-timeout behavior) or not at all.
This behavior is explicitly described in posix, worked prior to OSX 10.12, but behaves differently as of OSX10.12
Where? Here's the [POSIX specification of poll][1], for reference. Nowhere in there can I find that it explicitly specifies the behavior of an empty-set poll. The only really relevant paragraph, with relation to the timeout arg is this one:
> If none of the defined events have occurred on any selected file descriptor, poll() shall wait at least timeout milliseconds for an event to occur on any of the selected file descriptors. If the value of timeout is 0, poll() shall return immediately. If the value of timeout is -1, poll() shall block until a requested event occurs or until the call is interrupted.
But "if none of the defined events have occurred" isn't really evaluable when there aren't any defined events in the first place; the answer is undefined because the question is wrong. Thus, it seems to me that this behavior is undefined, as far as POSIX is concerned.
(I wonder if this could be rephrased as, if ∃ fd∈∅ where none of the defined events have occurred on fd, then poll shall wait timeout…; this if is false (not undefined), so is should not wait the timeout. But then, the standard leaves us wondering what it should do, if not that. I think this reinterpretation depends on equating "any" with "at least one", though.)
(Having poll wait the timeout when passed the empty set certainly seems useful, but whether or not that's standard is a different question.)
[1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/po...
It absolutely is evaluable. If there are no defined events then none of them has occurred. There's nothing weird or undefined about that; the empty set is empty.
It might make sense on mobile since features and abilities are changing rapidly. For desktop, I'd take stability over new features yearly.
Why do people wait for things to go wrong then make blanket statements about a "better way"?
This makes me wonder if Apple really earned the Unix certification. If it didn't, then the Open Group should be ashamed.
All I know is I'm getting 50% less battery time this week.
Oh, and sqllite-ruby seems to be a bit grumpy.