Tuesday, June 4, 2019 [Tweets] [Favorites]

Xcode 11 Beta Release Notes:

Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. In future versions of macOS, scripting language runtimes won’t be available by default, and may require you to install an additional package. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app. […] Use of Python 2.7 isn’t recommended. This version is included in macOS for compatibility with legacy software. Future versions of macOS won’t include Python 2.7. Instead, it’s recommended that you run python3 in Terminal.

This is a big deal in terms of philosophy; Apple once touted the built-in Unix tool suite as a Mac advantage. And it also means lots of practical changes; installers and AppleScripts can no longer lean on other scripting languages.

Marcin Krzyzanowski:

The same year Microsoft is proud to add a new terminal app with the full support of bash and everything to please developers. Apple decided to deprecate scripting on macOS and replace bash with zsh. No explanation was given, but we’re curious. Maybe there’s a valid reason.

Joe Groff:

The downside of all that stuff getting included was that it could never be upgraded, because apps would depend on the exact versions that shipped a decade ago.

It still doesn’t make sense to me because these scripting languages aren’t huge, and Apple did update them and remove old versions from time-to-time.

Previously:

Update (2019-06-04): Wood Borer:

I guess the kids all think this is a good change, because now no one will have an old version of Python or Perl. Instead, they’ll have ten of them, and you’ll have to play with paths to pick the right one, like Windows.

One of the great values of Apple providing scripting languages with macOS is to make it easy for regular users to turn themselves into occasional scripters. People who program all the time seem to forget how terrifying the idea of writing code is to those who’ve never done it before. Even “power users” quail at the idea of scripting until they’ve done it a few times and survived. If the first step in learning to script is Install Python via Homebrew, they are simply going to pass. These new scripters don’t care, for example, that the Apple-supplied Python is out of date, and there’s no reason for them to. Python 2.7 is a perfectly good starting point, as is Perl 5.18 and Ruby 2.3. Removing scripting languages also means that those of us who know how to use them can’t send scripts to our friends to help them automate their tasks. I’m perfectly happy to “slum” in Python 2 (oh dear, I have to use the format function instead of f-strings) if that’s what it takes.

Microsoft (via Hacker News):

Microsoft has been involved with the Python community for over twelve years, and currently employ four of the key contributors to the language and primary runtime. The growth of Python has been incredible, as it finds homes among data scientists, web developers, system administrators, and students, and roughly half of this work is already happening on Windows. […] Finally, with the May 2019 Windows Update, we are completing the picture. While Python continues to remain completely independent from the operating system, every install of Windows will include python and python3 commands that take you directly to the Python store page.

Scripting runtimes and bridges should be included in an OS. I like Swift. I’m comfortable with Swift. But I also like ruby and python. And often they are a better fit for the job. I’ve written a lot of Swift but I still write lots of ruby and python.

Although multiple apps needing their own copies of Perl, for instance, might seem inefficient, developers need to include only the runtime and exact libraries they use, not a full scripting language installation. Some apps have already taken this route to keep using Java, and many modern apps rely on the Electron framework, which includes Node to run JavaScript.

If you look at the sizes of the different parts of each installation, I don’t see how shipping separate copies of the runtime would ever come out ahead. The Electron framework in a single app is larger than the entire system-provided Perl.

Brett Terpstra:

Considering how integral these runtimes are to my own daily use of my Mac, this is a real annoyance. I’m fully capable of installing them myself, but I still find the decision baffling. […] So while this might not be a huge blow for me, it’s an impediment to anyone who uses my projects that isn’t a Terminal nerd. […] So the question is why? I can’t wrap my head around any real benefit to Apple’s line of reasoning on this. They’ve not been great about keeping the runtimes up to date, but that’s actually been a boon, requiring less effort to keep scripts working with every OS release. These runtimes were even touted as a selling point in the past, and Microsoft is just now starting to add tools like this to the default Windows install. And they’re including a sexy Terminal. So why is Apple moving in the opposite direction?

Brent Simmons:

I’m one of those people who just use whatever’s on the system.

Me, too.

Peter N Lewis:

Something that only just occurred to me is this will break every single script with #!/usr/bin/perl irretrievably since /usr/bin is a SIP protected directory. Every one will need to be edited.

Brent Simmons:

Having to install Python/Ruby/etc. manually is gate-keeping. It might be easy for pros, but it’s not easy for everybody.

Brent Simmons:

Are we going to ask that person to figure out how to install Ruby? If there are one-click installers out there, are we going to ask them to figure out which one is actually reputable and safe? Curiosity like this is one of the ways new developers are made. I worry that the less the Mac is tinkerable out-of-the-box, the fewer developers we’ll get.

Nick Heer:

But something about this feels both arbitrary and inherently wrong. The beautiful thing about MacOS is that there’s a visually coherent interaction layer that most users spend most of their time in, but anyone — including a lunkhead like me — can fire up the Terminal at any time and run a script. Having that capability at one’s fingertips just below the surface, as well as programs like Homebrew and MacPorts, makes the Mac feel limitless.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.