* 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.
That beings said, the vast majority of consumers, and I suspect the vast majority of developers, do not rely on such applications (or their equivalent w/r/t Windows).
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.
You didn't ask for advice, but if I had any, it would be to avoid Ubuntu. Most of the poorly functioning and randomly crashing processes I've seen on Linux was on Ubuntu machines.
Since Windows is not an option for me, I switched to a Mac.
I don't recommend gentoo for everyone although it really isn't that bad--if you can develop a web app, I'm sure you're definitely capable enough to use a supposedly "advanced" distro like arch or gentoo, but Ubuntu isn't that sterling of a system in my experience especially when you need something beyond the defaults.
I also enjoy pacman a lot more than apt.
Hate that Ubuntu == Linux for many people.
I've toyed with Arch during Windows 7 times - after hearing how linux is more stable than windoze/windblowz - and then nVidia drivers crashed, X server crashed, aaand upon starting X - all GUI applications were closed.
Are. You. Friggin. Kidding me? People were talking about stability when such things happened? Linux stability compared to Windows 7 - zero. At that time.
Has it changed?
This is an often repeated myth that just isn't true, (unless you have [testing] enabled). I had a single Arch install survive for 3 years without any problems and that involved switching over to a new init system.
I only had to install Windows back on the machine because I went on to sell it and get a new one.
(Performance is another matter, of course, but for regular desktop use, it does not matter that much.)
I personally haven't had the video driver crash on me, but even so, I think a video driver is not the OS, so not sure what you're talking about.
Kernel panics would be more understandable comparison.
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
This is a problem. I want a desktop, not a job with "feeling good" salary.
That's why I said you can do it, the days when you had to do it are long gone.
Seriously, I think two of the biggest problems facing desktop Linux are:
- people having outdated experiences - equating Ubuntu, (not that great), with Linux and thinking that Ubuntu problems are Linux problems.
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.
Windows vs. OS X have quite different philosophies in font rendering:
> https://blog.codinghorror.com/font-rendering-respecting-the-...
"Apple generally believes that the goal of the algorithm should be to preserve the design of the typeface as much as possible, even at the cost of a little bit of blurriness.
Microsoft generally believes that the shape of each letter should be hammered into pixel boundaries to prevent blur and improve readability, even at the cost of not being true to the typeface."
Also under Windows font hintings and other subtile details of the font format have much more importance on a good-looking font display than in the font rendering algorithm than under OS X.
Source:
> https://www.smashingmagazine.com/2012/04/a-closer-look-at-fo...
(This article is from 2012; I don't know whether it is still up-to-date):
"On Mac OS and iOS, we hardly have any control over the rendering, which is acceptable (since it’s generally very reliable). [...] On Windows, hinting matters—especially for TrueType-based fonts (the only Web fonts Internet Explorer 6–8 will accept). Apart from that, one significant control we have over the rendering is the choice between TrueType and PostScript. Except for very well-hinted fonts in smaller sizes, the latter is equal or superior in rendering, and easier to produce. Even though DirectWrite is making Windows rendering more pleasant, it will not remove the necessity to provide well-hinted fonts."
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.
Have you tried a tiling WM like i3? If you unplug and replug monitors you're just changing what workspaces are displayed where. The experience is identical if you have one or many monitors.
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.
You can use something like https://antergos.com to install Arch and https://www.sabayon.org for Gentoo.
[ It still has terrible battery life, and chucks out a load of heat though ].
I did have other problems -- some serious. Right now, running Fedora 24 and Gnome 3, it seems to be a reasonably workable machine, but yeah, it's been more trouble than you'd like for the money. Part of it seems to be that Skylake is just wonky on its own. Some of my issues in Linux have been issues with the dual-booted Windows 10 install as well (e.g., sometimes rebooting instead of waking from sleep).
I'm not saying Lightroom will run in a VM, I haven't used VMs for heavy programs, this was just an anecdote of me being surprised by how someone could use huge engineering programs inside a VM.
Personally whenever I use the clone/heal brush Lightroom slows down to almost unusable performance and this is on an i7 + 8GB RAM - I can't imagine running it in a VM. I am sure this is Adobe's fault though cause the same tools in Photoshop perform multiple times faster.
Which is what I do nowadays, my netbook is the only surviving desktop still having a native install of GNU/Linux.
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.
I do agree it's a bit naggy at times. As for the updates... I have complicated feeling about that. It's annoying that it auto-restarts, but the alternative is so much worse. There's a registry hack to prevent it, which if you think it's a good idea to turn auto-updates off, you should probably feel comfortable making a registry change to show you know enough to be responsible about that. The windows store stuff seems to only come back from certain updates, I'm not sure which ones.
> I'm constantly seeing nags and offers for things I'm not interested in using on the lock screen.
I've seen multiple reports of this, but I don't see it, so can't really comment on it. My lock screens are just images (rather good ones actually, like for the chromecast, IMO).
> 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.
Was it a specialty mouse? Did it install it's own software (it sounds like it, when you mention "installing the software for it")? If it automatically launched a third party installer that decided that you needed to restart, that one can't be totally blamed on MS (beyond expecting them to blacklist the device for poor driver quality/installation, which won't exactly make people happy either).
The problem with the MS platform is that as it's the primary market for most people and devices, you get some very low quality stuff. That same stuff might not work at all on other platforms, or be feature poor (e.g. a mouse that can't use all it's swizzy features because it's using the base USB HID stuff). That's a common problem with hardware on Linux (until the device gets open source support, if it ever does), so I'm used to it. Sometimes I choose not to install the proprietary driver for Windows anyway, just because I don't want their crap on my system.
Poor third party driver quality has historically been a large cause for instability in Windows systems, and IIRC around Vista was where they changed how drivers worked to address this problem, and now Windows is much more stable IMO. So, crappy devs shunting crappy drivers with their products is less of an issue, but still a problem, and one that's not really going to go away as long as closed source third party drivers are allowed without careful vetting (which they may be doing to some degree now, I'm not sure).
The one-two punch that routinely frustrates the hell out of me is when the vendor driver software requires an update, and the reboot process in turns fires off the windows update install. Now, instead of sitting down to play a game, I'm waiting fifteen minutes for two different software updates to finish and reboot my computer.
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.
Microsoft more or less did the same thing with OpenBSD and NT kernel. Several kernel sections started out as BSD code (the networking stack for example).
Don't forget Jobs attempted to steal NeXt's fork of the GCC with Obj-C extensions. The FSF had to sue NeXt to get them to release their modifications.
Stealing Free Software is cheap from a business perspective.
Actually there was no lawsuit. NeXT released the patches after a warning: http://ebb.org/bkuhn/talks/LinuxTag-2011/compliance.html
> Stealing Free Software is cheap from a business perspective.
This is why I recommend everyone use AGPLv3 whenever possible (and consider changing the license on your old Free Software - you can do this if all of the contributors consent). Apple has been removing all GPLv3 software from Mac OS X over the past several years because v3 is incompatible with their goals of totalitarian computing: http://meta.ath0.com/2012/02/05/apples-great-gpl-purge/
Brillo and Fuchsia have almost no GPL or LGPL licensed code.
They also are in the process of kicking GCC out of the Android NDK. Only a few feature parity issues are preventing it for the time being.
When Apple tried A/UX he was on his way out and it was never an attempt to replace Mac OS.
Regarding NeXT, the company was targeting the new workstation market, which was moving away from Lisp and Ada Machines into UNIX ones, thanks to UNIX code being freely available, as AT&T was not allowed to charge for it.
NeXT main competition were Sun and Irix workstations, so a certain compatibility with UNIX was desired.
However the whole Mach stack was very UNIX-unlike. Many naysayers regarding Objective-C use for systems programming aren't aware that even NextSTEP drivers were written in it.
So it was all about business, Steve was always keen on how Xerox PARC OSes used to work.
Why should they care about it as a platform if its impact is negligible. Wouldn't one prefer to focus on the next non-negligible thing?
Apple should care for multiple reasons:
- reputation matters
- not acting like it's abandoned its roots is a positive in image building
- not being shamed repeatedly, with good reason, about its attitude as well as seeming ineptitude
- recruiting talent becomes easier since it's likely more people may see Apple as a decent place to work at (considering this alone in this context, for the sake of simplicity)
- making the platform used to build apps for its best selling platform a lot better ought to be a no-brainer
- …and many more that don't occur to me right now
As I said, I don't think Apple would have to blow a significant amount of money with its finances and budgets to make this better. In my view, with the reasons stated above, Apple has more to lose with this lackadaisical attitude toward macOS/OS X and the Mac platform than just saving some money because the revenue potential is lower. I can't imagine how it'd be to be in a company that gets shamed so much and doesn't seem to want to respond or do much to alleviate matters.
On a related note, Xcode also gets a lot of flak, despite the fact that it's what helps Apple make money from apps. I repeat, something seems seriously missing.
Apple's long term strategy absolutely relies on OSX, if current management are taking a short term view, well it wouldn't be the first time. Only there is now now Jobs to come riding to the rescue.
In last quarter Apple had revenue of $42B.
$24B in phone sales compared to $5B in Mac sales. iPad revenue roughly same as Mac sales. Services made up the bulk of the remaining revenue.
This gives you an idea of how unimportant Mac sales are to Apple. They just need Macs for the sake of the iOS ecosystem.
I think problems with macOS are often magnified on discussion forums. Partially, because there is a subset of the community that heavily dislikes Apple (for ideological or other reasons). Some macOS updates introduced minor bugs for my daily use, but it is an incredibly smooth ride compared to most other systems (I have used Linux on the desktop from 1994-2007 and still have a Linux machine at home for porting software, etc.).
It's very clear from Apple's action, or rather, inaction and silence, over several years, that Apple doesn't "need" the Mac for any specific reason. It's one of those things that's there because it's there.
If it were true that Apple needs the Mac, we would've seen a lot more attention paid to the platform, not just neglect that has been shamed online repeatedly for a long time. The situation is quite unfortunate, in my view.
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.
I don't know who is agreeing here, but I find people who say this to be looking with some seriously rose-tinted glasses. Mac OS X 10.6 is really not that great. It's hardly as "rock-solid" as people make it out to be.
It's the iOS 6 of OS X. It's the refinement of the most familiar interface before things started changing. That doesn't make it better, just more comfortable for some.
Here's the kicker: it's ugly. It looked good at the time, but looking back on it, it looks clunky. The remaining Aqua elements look out of place and weird, buttons lack consistency, design is all over the map.
10.12 isn't perfect but it's a pretty damn good OS. Mac OS X/OS X/macOS has always been kinda buggy; it's the nature of an OS with a significantly smaller userbase. IMO it's no worse now than it was in 10.6, except it has a ton more features.
Many of those features are the reasons why it is worse to many people. New code comes with a cost. Every new system feature (handoff, clipboard sharing, sandboxing, etc.) is more places for bugs to pop up.
There was no code in 10.6 that could cause your desktop, documents folder, and photo library to just randomly "disappear" one day when iCloud decides to have a few too many drinks and stumbles home. In 10.6, they didn't need a new low-level networking library to support drag-and-drop between your iPhone and your Mac, and as such, that code wasn't there to repeatedly rename your Mac "Foo (7)" or whatever.
Sure, if you use the new features, then on balance, they're probably fine, despite the problems that pop up. But a lot of people see these features as solving problems they don't have and solving them in a way that makes loads of things that used to work reliably no longer quite so reliable.
What are you talking about? Assuming you mean universal clipboard (you can't drag & drop to your iPhone), that's built on top of handoff, a technology we've had for a few years now, and has nothing at all to do with your computer being named "Foo (7)". I suspect you're thinking of the discoveryd fiasco, which isn't related to any feature work at all but was caused by Stuart Cheshire retiring (and was fixed by Stuart coming back out of retirement).
Might be -- I'm using just one external monitor, so don't know.
That said "multi-monitor support suffered badly for a version or so" is rather anti-climatic after "butchered".
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
Returning immediately with a non null fds, a zero lenght and non zero timeout is unarguably a bug.
I'm not making any claim about the actual source of the poll bug here.
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.
For example, struct sockaddr only contains 1-byte members. Therefore it does not have special requirements on alignment. struct sockaddr_in contains at least one member of 4 bytes (struct in_addr), therefore it also has a alignment requirement of 4 bytes to avoid splitting the 4 byte member between memory words.
In order to support casting pointers to any of these struct types, implementations pad all of these structs to make them all the same size and therefore having sane alignment requirements.
You will not read anything about these kind of problems in POSIX, since these are limititations implied by the hardware architecture.
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys...
Quote: "The sockaddr_storage structure solves the problem of declaring storage for automatic variables which is both large enough and aligned enough for storing the socket address data structure of any family."
You're never going to define the storage for an object of `struct sockaddr`; that's just the "abstract base" so to speak: pointers are cast to that type when calling the API. The API switches to the right department in the code, which converts the pointer back to the right concrete type again, like "struct sockaddr_in". So all that is needed is the property that the "struct sockaddr " type can store and recover any other "struct sockaddr_whatever " pointer.
You're also never going to be doing completely silly things like converting a "struct sockaddr_in " to "struct sockaddr_ax25 " or whatever.
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.
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/net...
> The <netinet/in.h> header shall define the sockaddr_in structure that includes at least the following members: [...]
The "at least" is the keyword. Additional members in the struct are allowed by POSIX. You have to expect and handle them according to the standard.
Is there a blanket requirement somewhere in POSIX which says that whenever a structure may have members in addition to the required ones, these members must be initialized (and specifically to zero) when the application creates such a structure and passes it to a library function?
(If so, why are they repeating that requirement for struct sockaddr_in6?)
In any case, does the issue reproduce on FreeBSD? If I google for this bind problem, it only appears to be reported against Mac OS X, and no other Unix, historic or current.
https://groups.google.com/forum/#!topic/comp.std.c/zl15FkixB...
If a standard structure may have additional members, those do not have to be initialized by the program, unless the requirement is explicit somewhere. For example, we do not have to initialize members of "struct tm" other than the standard ones when calling asctime; there is no wording which absolves asctime of behaving as required if those members are not initialized.
The same reasoning applies to the POSIX bind function and the members of struct sockaddr_in. (But not struct sockaddr_in6, for which initialization requirements are specified).
About sockaddr_in, POSIX-2001, 2004 edition[1] has to say:
10004 The <netinet/in.h> header shall define the sockaddr_in structure that includes at least the
10005 following members:
10006 sa_family_t sin_family AF_INET.
10007 in_port_t sin_port Port number.
10008 struct in_addr sin_addr IP address.
So implementations are free to add whatever extra members they feel like.However, about IPv6 it says:
10016 The <netinet/in.h> header shall define the sockaddr_in6 structure that includes at least the
10017 following members:
10018 sa_family_t sin6_family AF_INET6.
10019 in_port_t sin6_port Port number.
10020 uint32_t sin6_flowinfo IPv6 traffic class and flow information.
10021 struct in6_addr sin6_addr IPv6 address.
10022 uint32_t sin6_scope_id Set of interfaces for a scope.
10023 The sin6_port and sin6_addr members shall be in network byte order.
10024 The sockaddr_in6 structure shall be set to zero by an application prior to using it, since
10025 implementations are free to have additional, implementation-defined fields in sockaddr_in6.
So raimue's point is explicitly true for sockaddr_in6; while it is
left ambiguous whether the (allowed) implementation-defined members of
sockaddr_in must be initialized.[1]: The current UNIX standard is UNIX V7, which corresponds to SUSv4, which corresponds to the POSIX-2008. However, macOS is certified UNIX under the previous version, UNIX 03, which corresponds to SUSv3, which corresponds to POSIX-2001.
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.
The recovery tools are kind of touchy too, they only work on certain versions of MacOS and are kind of difficult to track down. The only saving grace is that Time Machine is so easy to use that people sometimes actually turn it on.
How recent is your experience, I have found this not to be really true anymore, at least for the past few years.
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.