Categories


Archives


Recent Posts


Categories


Programming Languages “Leaving” Mac OS 11 Big Sur

astorm

Frustrated by Magento? Then you’ll love Commerce Bug, the must have debugging extension for anyone using Magento. Whether you’re just starting out or you’re a seasoned pro, Commerce Bug will save you and your team hours everyday. Grab a copy and start working with Magento instead of against it.

Updated for Magento 2! No Frills Magento Layout is the only Magento front end book you'll ever need. Get your copy today!

I recently bought one of the new M1 Macs to replace my aging laptop, and with it came MacOS 11 Big Sur. There’s lots of foundational shifting things happening with Apple’s computers there days — one of those is the official deprecation of programming runtimes that have been shipping with OS X since its earliest days.

PHP

First, for for my traditional audience — PHP. When I first started up my new computer out of the box this is the message that greeted me when I checked the PHP version

% php --version
WARNING: PHP is not recommended\nPHP is included in macOS for compatibility with legacy software.\nFuture versions of macOS will not include PHP.
PHP 7.3.22-(to be removed in future macOS) (cli) (built: Oct 30 2020 00:19:07) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.22, Copyright (c) 1998-2018 Zend Technologies

The line endings being wrong gave me a bit of a chuckle/sigh. After the MacOS 11.1 update all that became a bit more readable.

% /usr/bin/php --version
WARNING: PHP is not recommended
PHP is included in macOS for compatibility with legacy software.
Future versions of macOS will not include PHP.
PHP 7.3.24-(to be removed in future macOS) (cli) (built: Nov 23 2020 06:45:16) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologi

Dropping to be removed in future macOS right in the version string is a pretty clear indicator of where things are headed.

Ruby

At first, the ruby programming language seemed to escape

% ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]

But if you startup the interactive interpreter.

% irb

WARNING: This version of ruby is included in macOS for compatibility with legacy software. 
In future versions of macOS the ruby runtime will not be available by 
default, and may require you to install an additional package.

irb(main):001:0> 

You see a similar message about this interpreter going away in the future.

Also giving me a bit of a chuckle/sigh was the fact that while ruby (and, as we’ll see the other languages runtimes) includes this sort of messaging

will not be available by default, and may require you to install an additional package

PHP gets a

WARNING: PHP is not recommended

There’s a paper or two to be written on the general disrespect PHP gets inside tech-first companies despite it’s wider success.

Perl

Even the venerable perl is not immune. Startup the debugger and you’ll see this

% perl -de1

WARNING: This version of perl is included in macOS for compatibility with legacy software. 
In future versions of macOS the perl runtime will not be available by 
default, and may require you to install an additional package.


Loading DB routines from perl5db.pl version 1.53
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main::(-e:1):   1
  DB<1> 

When I consider perl historically is seems like a foundational bridge between traditional shells (ksh, bash, zsh, etc.) and more modern non-compiled programming languages. It sonds like Apple, for its unix, have placed perl firmly in the non-compiled programming language camp.

Python

Similarly for python, going interactive brings up a warning

% python

WARNING: Python 2.7 is not recommended. 
This version is included in macOS for compatibility with legacy software. 
Future versions of macOS will not include Python 2.7. 
Instead, it is recommended that you transition to using 'python3' from within Terminal.

Python 2.7.16 (default, Nov 23 2020, 08:01:20) 
[GCC Apple LLVM 12.0.0 (clang-1200.0.30.4) [+internal-os, ptrauth-isa=sign+stri on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

However, our python friends get to be a big smug here. While Apple will be removing the version of Python that ships with the OS by default, it seems like Apple’s developer tools ship with a recent version of python 3.

Does this Matter?

As to whether this matters? For professionals, probably not. I have a certain seductive nostalgia for a time where Apple had to engage with the wider programming and web development communities: The value of of having these programming language for beginners be right there can’t be overstated.

However, that’s not the world we live in today. I don’t like this, but I do have to accept it.

In 2020 these stock packages often lag behind the official releases, and as we’re learning a lot of modern software development is just bailing water to keep the ship going.

For example — the version of PHP that ships with MacOS has no way to compile and install common PHP extensions. Extensions are the compiled C code that gives PHP its built-in functions (vs. composer packages which are libraries written in pure PHP).

Apple used to include pecl with their PHP distributions. This is a tool for one-step downloading and compiling of PHP extensions from a central source. However, the pecl tool has lived in, what I’d describe as, a quasi-deprecated state for years and Apple stopped shipping it as part of their PHP distribution. They leave you with a copy of of PHP’s compilation tool phpize and an implied “have fun compiling yourself”. This means that, over the years, Apple’s built-in PHP is often missing extensions that are required for many developers to do their jobs.

PHP’s current defacto-standard solution for installing these extensions is to use your operating system’s package manager.

Package managers are why, at the end of the day, Apple’s change isn’t life altering. While Apple doesn’t ship with its own package manager, as long as projects like homebrew and MacPorts remain as thriving open source projectswe’ll be able to run whatever open source programming languages we want.

Copyright © Alana Storm 1975 – 2023 All Rights Reserved

Originally Posted: 26th December 2020

email hidden; JavaScript is required