macOS 13.5 no longer allows setting system wide ulimits
developer.apple.com
developer.apple.com
All programs that don't use select() should raise the limit to the hard limit on startup. Then drop it back down before exec()ing another program. It is a silly dance but that is the cost of legacy. I'm surprised that these programs that are affected can't add this dance in.
It would be interesting to do something like avoid defining that symbol by default, require `-DENABLE_OBSOLETE_SELECT_API` to make it available. It would cause trouble for compiling old software but it is easy to remedy and at least makes new users extra aware that they shouldn't start using this function.
Tracking down a build failure in some old software project that may or may not have approachable people left on the team through elaborate build scripts that may or may not surface the error in a way that may or may not be easily comprehensible for an outsider can be really hard.
Kqueue/kevent/epoll are good options if you have very particular needs, such as a huge number of file descriptors, but I'd argue poll() should be the go-to.
ulimits are quotas that disallow excessive resource consumption by an application, not bug shields.
I guess the real solution would be updating `FD_SET()` and `FD_CLR()` to abort if `fd > FD_SETSIZE`. IDK if writing to the fd set outside of these two functions is officially supported.
.... and if SIP is turned off?
$ sudo launchctl limit maxfiles
maxfiles 256 unlimited
$ sudo launchctl limit maxfiles 65536 200000
$ sudo launchctl limit maxfiles
maxfiles 65536 200000I feel Apple is trying to force apps to handle this “the correct way” - remember UAC prompts all over the place when they were first introduced in Windows?
You lose Touch ID & Apple Pay
The most frustrating thing with SIP was that I’d always butt up against it at the most inopportune moments: deep in a rabbithole of diagnosing some unusual issue, I’d finally have everything running and set up just right to reproduce it, realize I needed to trace a specific process or something, only to have the system tell me I wasn’t allowed to.
Perfect timing to have to restart the computer and wait while it slowly boots into recovery, then remember where I left off and recreate my environment.
The continuing iOS-ification of MacOS really drove me away from using it as my main computer, despite having been a lifelong Mac user. I still have a Macbook Air, but for any real work it’s just a thin client to my Linux desktop.
https://www.google.com/search?q=ulimit+mac+site%3Astackoverf...
vs
https://www.google.com/search?q=%22launchctl+limit+maxfiles%...
The default soft-limit should match FD_SETSIZE and should not be raised globally by the user. I don't know why the default hard limit is 256 and not 1024. Perhaps FD_SETSIZE was lower than 1024 historically?
If you like, archive 1 level deep too, where it makes sense.
While much was gained in the NeXT merger, the biggest thing that was lost was developer support and documentation. They were gutted in March 1997 and were never restored. Avie Tevanian had no respect for documentation and his attitude infected the rest of the organization. One dude did so much irreparable damage.
I do know how they are today though and it’s sad.
http://preserve.mactech.com/articles/mactech/Vol.16/16.06/Ju...
1. exec should reduce the hard-limit to FD_SETSIZE unless it's passed a flag
2. When a process calls `select` while having a hard-limit > FD_SETSIZE, it gets terminated. (Strictly speaking this doesn't prevent the memory corruption, since it happens in select's support macros, not select itself. But I'd expect it to be good enough in practice)
A modern application which doesn't use `select` should raise its own hard-limit during startup, option into the select-termination in exchange for the ability to open many files.
But Apple should generally fix this. Having a system wide limit of 256 files open is almost as outdated and idiotic as having a filesystem that doesnt support case or more than 256 characters (NTFS)
Case sensitivity will break certain applications.
How can you say this? They don't have CUDA. Right now M$ + Nvidia have the market completely cornered :'(
Linux + Nvidia suck btw. The only option is M$.
AMD on Linux is also making at least some waves recently. Still catching up, but it seems like I've seen 100% increase in ROCm posts compared to last year...
Apple docs for it: https://developer.apple.com/documentation/metalperformancesh...
PyTorch backend: https://pytorch.org/docs/stable/notes/mps.html
I can speak for someone who has done it. I have not been able to achieve Windows level performance. Plus the time it takes to do things like force the GPU to turn on/be used by the application/OS is nontrivial and I'm a full time programmer.
Not to mention when I'm using GPU based applications, my second monitor sometimes freezes. Mostly Steam, but rarely videos.
(Not to say Windows didn't have its own problems like forced update/reboot, ads/ragebait news in the start menu, full remote control of your file system.... gross)
I agree on the general sentiment that nvidia is expletive expletive expletive.
That's a pretty strong statement. I use both and it's been very smooth sailing for me, switching to Windows is something that comes with so many headaches that I couldn't make the case for it, besides I wouldn't know what to improve compared to how it is today. Using multiple GPUs under linux while also using them to drive a display is perfectly normal.
Was there anything specific that you would like to see improved on a Linux/NVidia combo that I may simply never have run into?
I find the UX quirky and akward to use. I hate how the window management works. I hate how annoying it is to get two windows to show side by side. I hate how there end up so many icons in the menu bar which are entirely unhelpful. I hate how space inefficient the dock is, but when you auto hide it, you can no longer see the notification counts at a glance.
I would honest to God rate macOS UX a 2/5 for design and a 5/5 for QA.
If I were ever to go back I’d run Gentoo or some other rolling release distro; at least then I get changes a little bit at a time.
There are addons and tricks to do window management in Mac OS - but the big one I do is throw that dock on the right hand side of the screen and leave it. Wide screens have space there, might as well use it.
Mac OS still has a bit of that “upgrade changes everything” going on but it seems more gradual and less painful - and in my experience pretty polished.
I've used a couple of different desktop environments or window managers over the past few decades, but these days I either stick with the default (which is so often Gnome) or use Sway, where I can just copy in my config file and everything works exactly as I'm used to.
That has not been my experience. If you are using something like Arch (rolling release distro) maybe, but Ubuntu and Debian stable have been pretty much that.
I also find it a little funny that a complaint about Linux is in the thread of a post showing how Apple will change things that break their users without apology.
If it weren’t for the fact that such a thing would progress glacially if worked on only in my spare time I’d write my own DE and maintain enough forks that my GitHub profile would look like a fork factory.
Whereas in Mac OS X it's a simple configurable option (a bit hidden, System Settings, Keyboard -> Keyboard Shortcuts -> Modifier Keys).
I know there was a way to load different keyboard layouts, but the problem with those mechanisms is they often cannot remap modifier keys, of which capslock is a special case of.
I've remapped CapsLock to Esc on both macOS and Linux/GNOME. It's just a checkbox/combobox in a settings in both cases. What is 'a whole side quest' you are talking about?
With Linux it feels I can keep doing the things how I want them to do. True, there are some distributions and window managers that throw the baby out with the bathwater for every update, looking at Ubuntu and Gnome, but sticking to something more conservative and you are set for live. Also, every time this happens, somebody will always fork of the old code, like with Mate and Trinity.
With a Mac or Windows you are sort of stuck with wills and whims of some company. If Windows could still look and function like 2000, but just be better, I might still use it to this day.
It's true, but I'd also say macOS as it is today looks pretty damn similar to screenshots of the first OSX version shown off 20+ years ago. Other than updated icons (which are still mostly based off the original icons) and an overall flatter aesthetic compared to the flashy, novel 3D of those days, it mostly functions the same. They only updated the Preferences app to System Settings in the last version with a design overhaul, and it was a pretty big deal because they don't do that much.
At this very moment, I'm still going through the "play" phase. If you pick a distro and then never change anything about it, then maybe it will work out for you out of the box. But as soon as you try to "make it yours", suddenly you'll find yourself with a second day job with no pay, you'll wonder where all your free time went, and your muscle tone will be gone. Inevitably, you'll have some weird issue like a particular program acting slow and causing the mouse to lag, or maybe your Wayland compositor has the wrong cursor position, and nobody on the internet knows why, except for some guy with a script as long as the declaration of independence that you can run in your terminal to fix all your problems (um, no). Eventually you give up and run the built-in compositor within another compositor, and somehow that fixes the original issue. But now your keyboard/mouse configuration no longer works! Holy shit, it's almost Christmas? Screw this, let's install Debian stable. Wait, what? The installer can't find the installation media? You ARE the installation media! Fuuuuuuuuu...
I love Linux as a tool, but the desktop experience will never get its act together. Whether it works for you or not seems to be based on luck. I don't even want a complicated desktop experience; I just want something basic like Openbox and a web browser, but these days you can barely even do that without a bunch of tinkering (unless you want to stick entirely to X11).
> If you pick a distro and then never change anything about it, then maybe it will work out for you out of the box.
Yes, exactly. Use a stable distro, don't touch things, and they won't change. It will continue to run exactly the same for years and years. This is in contrast to OSX and Windows. Windows is completely unrecognizable to me since stopped using it 7-8 years ago (the last version I used being Windows 7). My Linux desktop works exactly the same (with Firefox as an outlier that randomly removes/hides functionality). Apple is notorious for not caring about backwards compatibility, and just expecting everyone to accommodate whatever changes they want to make.
> unless you want to stick entirely to X11
Right, don't change things, and it will keep working. Wayland sounds like its benefits are all nerd stuff that I don't care about (a "better" architecture or whatever). Meanwhile, X works just fine. At some point, if people stop complaining about Wayland, and if it has some benefit to me, maybe I'll try it. Currently it seems that neither of those criteria are met. When I do try it, if it doesn't work, I'll just roll it back.
Unless you're willing to use Flatpak though, you'll be stuck with old versions of applications because user applications in the Linux world are typically tightly coupled to the system packages.
Kind of.
If you have a Retina display, for instance, Wayland is superior out of the box. Unless an application is written all stupid, it has a good chance of rendering at the correct scale while looking crisp. It's possible to do this with X11 or Xwayland, but I found it requires more tweaking of individual app settings and GTK environment variable to get it to look right. But even then, try using both X11 and Wayland apps together and get both kinds to look right on your HiDPI display without one or the other looking fuzzy or incorrectly scaled. I found it virtually impossible, thus it's better to just go with either one or the other. Although I think it would have been better to actually fix X11, Wayland does actually do most things better. HiDPI is one of them, and the other is vsync. I haven't seen Wayland cause horizontal tearing, but X11 always gave me this issue. A popular Stack Exchange question titled "Why is video tearing such a problem on Linux?" was written by me as a result of having tried my best to get my Linux installations to not experience horizontal tearing but inevitably failed no matter what display or graphics card I was using. I'm glad that someone in the Linux sphere decided to take vsync seriously and make it a non-issue with Wayland.
The average person doesn't need to know about Wayland, especially if they are going with a Wayland-based distro and not changing anything about it.
The only reason one would need to know about it, besides if they are writing a compositor, is if they are trying to customize their Linux distribution. In that case, they may be in for a world of hurt, because it may not be so easy as to install all the Linux apps they know and love and have everything look and play nice.
That's I think what gets to people like me. Linux is great for the server and containers, but as far as the desktop goes, it's still trying to figure out what it wants to be all these decades later. The idea that you can make it anything you want is true more in principal than in practice. Luckily, I think I have found my happy place with my customized version of Debian that I'm rolling for my own personal use, but that was after countless hours of trying things until they worked. If I wasn't willing to put in that effort and risk having nothing to show for it, I'd have dismissed Linux as a joke and just used macOS everywhere instead.
I have read that HDR support will likely come to Wayland first (if it ever comes to X). That may be a compelling reason to try it out. Hopefully by then some of the kinks are worked out.
> I have read that HDR support will likely come to Wayland first (if it ever comes to X). That may be a compelling reason to try it out. Hopefully by then some of the kinks are worked out.
As a side note, it's kinda crazy to me that we're talking about HDR "coming" in 2023; my graphics design teacher was telling us about HDR in 2009.
It's true for every OS. I went Windows -> Linux -> MacOS and I had to get used to every time.
I generally have one big window or two windows side-by-side on Linux though.
The "windows should be grouped in terms of the applications" does not make sense to me AT ALL.
Most work is done on a project basis, which crosses application boundaries quite readily. E.g., one project might involve having an open Android Studio project, a PDF with documentation, a browser window and a note pad. "Cmd-tabbing", though, brings up the next window of the same application that I am currently on. Viewing a PDF with preview, this will bring up some random image most of the time? (Luckily this is fixed by AltTab)
No solutions for the dock from me though. Personally I hate how the dock can randomly move between two monitors if you just happen to drag a file through the area where the dock COULD go on your second screen.
Additionally, things I hate and have not been able to fix: how if you close a window of a specific application in MacOS, it moves another window of that same application forward (similar to the Cmd+Tab behaviour) and if you click on an application in the Dock, it brings forward ALL windows of that application (whereas I would expect only the most recently used one).
There is Rectangle which is free and open source.
Also there is Touch-Tab (disclaimer: I'm the developer) to switch apps with 3-finger swipe left/right.
Plenty of window management apps and tools available. Rectangle, for example.
> I hate how there end up so many icons in the menu bar which are entirely unhelpful.
The only ones I cannot seem to be able to remove trivially are the clock and the Control Center. Solved in mere seconds by typing "menu bar" into the System Settings search. You could literally even just hold cmd and drag almost any icon out of the bar. Not to mention any of the more involved menu bar customization apps and tools.
Why does it seem like such "macOS bad Linux good" comments always compare the default macOS experience to a personalized Linux environment?
Why does an out-of-the-box Mac have to fulfill the same requirements we spent hours configuring for on a Linux machine?
Where does the capability or mindset to install a tool disappear when we move from Linux to macOS?
I think part of the problem is due to Mac and Apple have traditionally sold itself as intuitive and easy-to-use out of the box. People buy a Mac because they've been told that they don't have to spend hours configuring it. Hell Apple built a whole ad campaign around how the Mac is so much easier and more intuitive to use than Windows computers. However truth is that if you're coming from Linux or Windows, a lot of MacOS is incredibly unintuitive and weird out of the box.
I am just curious where all the willingness to tinker and solve problems appears to disappear when we move to macOS.
Windows spying on you? Oh, let's install this tool X and change a whole bunch of registry settings to prevent that.
App windows behaving annoyingly on Linux? Oh, let's just switch to a completely different desktop environment/window manager or what have you.
Too many icons in the menu bar on macOS? Yeah, I'm returning this machine. :)
Pretty much all of their complaints are addressed out of the box by most of the major desktop environments. Install whatever popular distro of your choice and you can trivially put two windows side-by-side like you can on Windows.
Because the "Linux bad macOS good" comments say things like the parent:
> Linux may be fine if you like tinkering
Are you now saying macOS requires tinkering too?
I'm not, I'm comparing to an unmodified, standard config Gnome or Plasma.
I also use Sway, and I'm pretty sure I've spent less time customizing/configuring it than my Mac.
So have Linux and Windows. I just didn't get that 'compromises' statement about them.
Using gesture based window management is one of the bigger strengths of the Mac.
2. What essential features of 'gesture based window management' aren't present on Windows or Linux (GNOME for example)?
On Windows it's 4-finger swipe left/right but it's not possible to switch between apps on macOS via gestures without 3-rd party apps. That's why I didn't get that 'compromise on UX' statement. MacOS gesture support is poorer compared to Windows (at least for my workflow) but on the hardware side Mac's Trackpad is superior.
> An interesting addition is the ability to use a three finger swipe up gesture to activate the new Task View feature of Windows 10. Not only does Task View look like OS X’s Mission Control (Exposé) feature, the three finger swipe up is the same gesture. Microsoft is also borrowing the three finger swipe left and right to activate switching between apps
https://www.theverge.com/2014/10/28/7082441/windows-10-new-t...
> it's not possible to switch between apps on macOS via gestures
It sounds like you aren't quite familiar with how a Mac works.
> It sounds like you aren't quite familiar with how a Mac works.
Another "you're holding it wrong" moment. Windows has better window management even from gestures perspective. Proof me wrong.
Only if you unchecked 'Automatically rearrange Spaces based on most recent use' in the settings.
It just feels like a toy to use, and too distracting. Its developers took too many liberties with focus stealing too.
I remember when they removed HiDPI support for <4K monitors. Such a ridiculous move by Apple...
I assume you don't do mobile app development?
I've never had to use anything worse than xcode yet. I'm almost sure that they have some kind of secret stuff in house to develop their own software other than that.
After some years using Mac, I kinda like it. But still prefer Linux whenever possible.
MacOS as a user interface is an abomination with pretty bows on it.
For many of us it isn't classical UNIX CLI and daemons, stuck on 1970's programming model.
https://www.mothersruin.com/software/SuspiciousPackage/faq.h...
basically no experienced Mac user would ever open a .PKG package with the Installer, but rather open it with a safe inspection app (Suspicious Package, Pacifist) first, either for security inspection of the pre- & post-install scripts, or to do a manual install outright to prevent the security nightmare that actually installing a package is.
while inspecting and/or manually installing packages is much safer than installing packages with the installer, it is now effectively outlawed by Apple. continuing to do things in the safe way now takes a lot more time...
If you’re a developer, you live in the Terminal, you obviously need full control over your OS.
edit: I appreciate the irony of being downvoted for suggesting having control over your OS on Hacker News, so keep it coming please. Mo’ downvotes mo’ irony.
That is true in most social, legal, etc settings.
(in law, it's known as but-for causation)
So yes, this is MacOS's fault.
Are you perhaps thinking of single user mode instead?
I misspoke
> System Integrity Protection (SIP) in macOS protects the entire system by preventing the execution of unauthorized code. The system automatically authorizes apps that the user downloads from the App Store. The system also authorizes apps that a developer notarizes and distributes directly to users. The system prevents the launching of all other apps by default.
https://developer.apple.com/documentation/security/disabling...
I was thinking of this https://eclecticlight.co/2020/06/25/big-surs-signed-system-v...
The change in limits doesn't persist across restarts anymore like it used to in the past.
I’m sure there are newer equivalents to what I’ve listed. I’ve been using those programs for years.
Some jumping off points
Meanwhile on Linux it is generally fairly easy to find what you need in the documentation or in the forums. It can be a bit more involved when using some very niche tools but it's not worse than the average Mac app I had to deal with.
I am not a very talented engineer. I'm a normal engineer who enjoys his craft, tries to do quality work and tries to be efficient. My opinion is based on my experience using Mac and Linux alternatively for the last 5 years doing development professionally.
I have seen very talented devs using Mac, but also others that were just as talented and complained when they were forced to switch from Linux to Mac. Hell, the smartest most talented developer I have ever met (by a mile) developed drivers on Windows and he told me that for the type of development he did Windows was all right.
I have to doubt that there is any correlation between how talented a developer is and the quality of a OS because most developers I know use what the company allows them, and it's somewhat rare to be allowed to choose.
People probably don't believe they should have to do that to perform regular development work.
Its high time for the FTC to start busting fraudulent rentals misrepresented as a "sale".
(And anybody viewing the Apple ecosystem KNEW this anti-owner lockdown phone shit would eventually hit their laptop and desktop computers as well. But for some reason, the Apple fanatics are OK with this stuff. )
Intellectual property rights (copyright, trademark, patent) should NOT dilute or devalue or remove inherent ownership from property rights.
And "license" presented after the purchase fact should make that the equivalent of toilet paper. It's a "license" after they have your money and over a barrel. There's no agreeing to that. At at least the Europeans with the GDPR realize that farcical situation and illegalized it appropriately.
"Agree or turn your $X000 device you paid for into a paperweight" is no agreement.