News for hackers. Stuff that matters.
Re:PHP has been removed in macOS Monterey by WalterGR on Thursday June 17, 2021 @03:38AM (#27537067)
Xcode 11 Release Notes (https://developer.apple.com/documentation/xcode-release-note...)

"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. (49764202)"

Found via https://mjtsai.com/blog/2019/06/04/scripting-languages-to-be...

Re:PHP has been removed in macOS Monterey by jcfields on Thursday June 17, 2021 @06:42AM (#27538168)
They've actually been warning users since Catalina (if not longer) when the following are run:

python

irb

php --version

tclsh

For PHP, it also shows up in Apache's server string:

Apache/2.4.46 (Unix) PHP/7.3.24-(to be removed in future macOS) mod_perl/2.0.9 Perl/v5.30.2 on hostname

Personally, I've been hoping they'd do this for a while since it's annoying having two versions of each interpreter installed (the system one that can't be updated and the one I installed myself via Mac Ports). Anyone who uses these languages much probably already has a package manager installed. I think they should leave Perl, though, since it's as much as Unix system utility like awk or sed as a programming language.

Re:PHP has been removed in macOS Monterey by mrsuprawsm on Thursday June 17, 2021 @07:29AM (#27538449)
While the warning shows for python2, it doesn't show for python3, implying that it's here to stay for now:

  % /usr/bin/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, Mar 25 2021, 03:11:28)
  [GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.20) (-macos10.15-objc- on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>>

  % /usr/bin/python3
  Python 3.8.2 (default, Dec 21 2020, 15:06:04)
  [Clang 12.0.0 (clang-1200.0.32.29)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>>
Re:PHP has been removed in macOS Monterey by suprfsat on Thursday June 17, 2021 @10:50AM (#27540168)
That's because it's not part of the base OS:

   % /usr/bin/python3
  xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
Re:PHP has been removed in macOS Monterey by Wowfunhappy on Thursday June 17, 2021 @01:29PM (#27542124)
Note how despite not coming with the OS, `python3` is still placed in the Apple-only `/usr/bin/` directory. And a binary exists at that path either way, it's just a stub by default. Because none of this is confusing at all.

I don't like how Apple handles this. If you have the developer tools installed, it's not especially obvious what is part of those tools and what is actually bundled with the OS. And so it's not surprising that some scripts I've come across will silently break in semi-odd ways without the dev tools.

Also, why is Python a developer tool, but Perl isn't? Or ZSH, for that matter? Does the distinction actually make any sense?

Re:PHP has been removed in macOS Monterey by kbenson on Thursday June 17, 2021 @03:00PM (#27543199)
> Note how despite not coming with the OS, `python3` is still placed in the Apple-only `/usr/bin/` directory. And a binary exists at that path either way, it's just a stub by default. Because none of this is confusing at all.

There's long been problems with this on UNIX systems. For a long time there's generally been three categories of software to track (OS provided, third party managed, manually compiled/installed), and two different locations to put them (/usr, /usr/local. / is different and has/had other constrains and reasons behind usage).

OS provided packages go into /usr, stuff a user manually compiles and installs goes into /usr/local, but where does a third party package manager put stuff? It's not OS provided, but it is packages and maintained, so /usr seems valid. At the same time, it's user installed, so /usr/local seems valid. Both make the other used of those locations more complicated to reason about.

> Also, why is Python a developer tool, but Perl isn't? Or ZSH, for that matter? Does the distinction actually make any sense?

Possibly because some are used by the OS to actually do things for the OS (not sure if Apple finally got rid most those dependencies or not).

The problem of the OS shipping a component for it's own needs that gets used by others is a decades old problem at this point. It's complicated because if it's available users to use, they'll use it, and when the OS wants to update or change it in some way it can break user assumptions. If users update it system wide, they can break OS assumptions.

Re:PHP has been removed in macOS Monterey by throw0101a on Thursday June 17, 2021 @05:30PM (#27544689)
> but where does a third party package manager put stuff?

/opt

> The use of /opt for add-on software is a well-established practice in the UNIX community. The System V Application Binary Interface [AT&T 1990], based on the System V Interface Definition (Third Edition) and the Intel Binary Compatibility Standard v. 2 (iBCS2) provides for an /opt structure very similar to the one defined here.

* https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/opt.htm...

MacPorts uses /opt/local for example.

Re:PHP has been removed in macOS Monterey by kbenson on Thursday June 17, 2021 @07:25PM (#27545591)
Yes, that's where I would suggest putting it, but the reason projects don't is either because they aren't aware of it, feel it's a bit more convoluted to make sure you update where PATH is set, or that /opt is generally used for singular applications, not an extended hierarchy such as /opt/local (which is actually a truly weird name, /opt/macports/ with /opt/macports/bin, /opt/macports/lib, etc would make more sense). It makes sense to use /opt from an "application" point of view, but I think the problem is many of these package managers see themselves as more than that, and as pseudo-system components, which clouds their reasoning.

The LFS spec you linked to is actually ancient at version 0.65, the latest is 3.0 and available here[1]. It's a bit "do what you want", but it really expects the "local" part of /opt/local that MacPorts uses to be some sort of identifier for MacPorts.

That said, it's the Linux Filesystem Hierarchy, so it only applies to Apple stuff inasmuch as it's common practices for UNIXes in general. And it's not like the major Linux distros follow it fully either. They're happy to break from it where it preserves some historical layout their OS has had that they think is easier for their users/admins.

1: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html

Re:PHP has been removed in macOS Monterey by SulphurCrested on Thursday June 17, 2021 @10:04PM (#27546665)
python3 is a developer tool because it is the extension language for the lldb debugger. For example, I have python3 scripts for formatting my custom C++ data types, and that formatting also works in Xcode's visual debugger (which is presumably using the lldb API).

Previously, lldb's extension language was python2. This changed a release or two of Xcode ago. At that time, to use lldb scripts with that new release of Xcode you either had to run on Catalina (which added python3 to the existing python2) or install your own python3 and point lldb at that. This actually was what pushed me into moving to Catalina on my development system, because the Unicode handling would be much easier in python3.

As I understand it, Monterey and the Xcode that is released for it move the necessary python3 installation from the operating system itself to Xcode. I'm fine with that.

(I would not be fine with Apple telling me I have to go waste my time figuring out how to install a suitable python myself, when I never had to before. And indeed, many of their own developers may be like me and know a little Python but are in trepidation of the env thing.)

The way it was before meant that if they wanted to update python they had to release a new version of the operating system. This is clearly an imposition on the vast bulk of macOS users, who are not developers.

Re:PHP has been removed in macOS Monterey by samatman on Thursday June 17, 2021 @03:18PM (#27543407)
The reason for zsh is simple enough: Terminal is a standard Mac app, and there are some system maintenance things an ordinary user might do which require the command line.

So there needs to be a shell, and that's zsh now.

Apple switched to zsh because they're allergic to later GNU licenses and the version of bash they were shipping was absurdly out of date.

Re:PHP has been removed in macOS Monterey by Wowfunhappy on Thursday June 17, 2021 @04:16PM (#27544090)
Yes, that's the practical reason. But what's missing is a conceptual reason, something that makes it easy to remember what is and is not a developer tool.

Possible approaches that would be less confusing than what we have today:

1. Ship Python 3 with macOS.

2. Ship all of the command-line developer tools with macOS, including clang et al.

3. Bring back the Snow-Leopard-era /Developer folder, and put developer tools there.

4. Put developer tools in /usr/developer, or /usr/local/developer, or /usr/local/Apple, to balance both UNIXness and clarity.

5. Don't ship Python at all. The Python foundation already distributes a .pkg installer for Mac. If xCode needs Python, follow your own Human Interface Guidelines and put it in the Application bundle.

All of these approaches have downsides, but I still think they'd be clear improvements over the current situation. Which is to say, I want Apple to figure this out!

Re:PHP has been removed in macOS Monterey by szc on Friday June 18, 2021 @01:16AM (#27547580)
It isn't an allergy.

At the time the GPLv3 was written, the GPLv3 was deliberately crafted to put commercial companies into a conflict situation.

(A) Give up selling audio with DRM (DRM did go away) (A) Give up selling video with DRM (A) Give up using HDMI as an output port (A) Give up using digital signatures to secure the integrity of software

-OR-

(B) Give up using GPL v3 software, GCC, Bash

Pretty sure most customers actually want many of the things in (A) and a minority actually care about (B). The items in (B) can be post-installed by those that really want it. Sure those in (B) have a loud voice, but, HN, are they really representative (democratically a majority)?

How would you make the choice between (A) or (B)?

I would bet that if a subeoena for FSF/GNU email was issued there would be a lot of messages related to manipulation and coercion for licensing and re-licensing. The sort of stuff, when associated with companies turns into scandal, lawsuits and monopoly investigations. (GCC almost got to be what could be considered a monopoly compiler)

I do believe that open software has a place and is a really good choice. My opinion is that the GPLv3 is completely toxic, spawned from negativity and is ultimately anti-open source. I will never release any software under the GPLv3.

Re:PHP has been removed in macOS Monterey by Wowfunhappy on Friday June 18, 2021 @12:05PM (#27551794)
> Give up selling audio with DRM (DRM did go away) (A) Give up selling video with DRM (A) Give up using HDMI as an output port (A) Give up using digital signatures to secure the integrity of software.

Does GPLv3 really prevent an OS from doing those things? I think it would just prevent it in the same executable as GPLv3 software?

I don’t actually understand Apple’s “allergy”. On the iPhone I’m sure they object to the Tivoization clause (which coincidentally is why I like to use GPLv3), but I’m pretty darn sure macOS doesn’t fall afoul of anything...

Re:PHP has been removed in macOS Monterey by zitterbewegung on Thursday June 17, 2021 @04:04PM (#27543958)
Python 3 is required for the ability to install coremltools which makes it a developer tool.

Python 2.7 might be there because old software is there for compatibility reasons for software possibly for mathematical software that never really gets updated. Removing it in future versions makes sense because of the fact that if you haven't updated it won't work on ARM Macs.

The best way to make someone upgrade is to deprecate and then remove access. At minimum the worst case scenario is they roll their own and install Python 2.7.

Re:PHP has been removed in macOS Monterey by szc on Friday June 18, 2021 @12:33AM (#27547389)
#!/usr/bin/python

How exactly is the above supposed to work when /usr/bin/python doesn't exist. If Apple chose to break the #! contract by doing something else, how would you feel about that?

Re:PHP has been removed in macOS Monterey by Wowfunhappy on Friday June 18, 2021 @01:09AM (#27547550)
The scripts should be using #!/usr/bin/env python
Re:PHP has been removed in macOS Monterey by szc on Friday June 18, 2021 @03:10AM (#27548073)
This answer is both a great answer, but also a terrible one.

This answer implies all "python" binaries across all operating systems and distributions for all time, are backwards and forwards compatible, no work needed. Guaranteed 100% equivalent.

What about Python2 v.s. Python3?

This isn't true and cannot ever be. This happens for other scripting and interpreted languages.

This approach means that the burden of choice and setup is transferred 100% to the person running the script. If you have 2 scripts that require different dependencies, then you will encounter this problem. I think it is this that encourages folks to include hard coded paths to enumerate explicit dependencies.

Lots of the "package" managers for these scripting languages also don't deal with this very well. They advocate a "do it my way" or "do it yourself". Different languages do it different ways.

Ultimately, the person wanting to run the script, just wants to make it run -- they will follow the instructions to make it work and along the way will make "global" changes -- which will impact what will happen for any other script in the future. This will likely be diverged from anyone else who has a "base install".

The above is mostly about my observations with using Ruby, not Python. However, few attempts in using pre-packaged complex python "recipes" has always resulted in similar conflicts.

Re:PHP has been removed in macOS Monterey by Wowfunhappy on Friday June 18, 2021 @09:13AM (#27549919)
> This answer implies all "python" binaries across all operating systems and distributions for all time, are backwards and forwards compatible, no work needed. Guaranteed 100% equivalent.

Practically speaking, how does using env versus the absolute path make this any better or worse? You as the script author don't know what version of Python/Ruby/Bash/etc lives in /usr/bin. Maybe you could do some kind of automagic detection based on the user's OS, but any such assumptions are likely to go stale over time.

All env does is give users a choice about where to put their binaries. The versioning situation is a real problem, but I don't think using env makes it better or worse.

Re:PHP has been removed in macOS Monterey by comex on Thursday June 17, 2021 @10:16PM (#27546719)
Nit: It’s not that /usr/bin/python3 gets replaced. It’s always a stub, but the stub execs the real python3 if found.
Re:PHP has been removed in macOS Monterey by _wldu on Thursday June 17, 2021 @09:56AM (#27539604)
Python is to Unix/Linux/Mac what PowerShell is to Windows. It's here to stay.
Re:PHP has been removed in macOS Monterey by cortesoft on Thursday June 17, 2021 @11:45AM (#27540894)
I am pretty sure bash is the powershell of Unix/Linux/Mac
Re:PHP has been removed in macOS Monterey by syshum on Thursday June 17, 2021 @12:02PM (#27541109)
bash is more akin to cmd/batch then Powershell.

there is a TON more you can do with powershell than you can with bash. Plus object pipelines are superior to text pipelines

You can also install Powershell on Linux. So I would say Powershell is the Powershell of Linux

Re:PHP has been removed in macOS Monterey by flukus on Thursday June 17, 2021 @07:35PM (#27545669)
I don't think powershell is even the powershell of windows. You get some of the better sysadmins using it, but working in the c#/windows world I see developers rarely touching powershell, certainly nowhere near as often as you'll see Linux develops writing a shell script. I wouldn't be surprised if C# was more used for "scripting" purposes than powershell, it usually ends up shorter and more readable anyway.
Re:PHP has been removed in macOS Monterey by mishac on Thursday June 17, 2021 @06:35PM (#27545197)
you can install bash on windows too.
Re:PHP has been removed in macOS Monterey by jbverschoor on Thursday June 17, 2021 @11:41AM (#27540837)
No it’s not. And it won’t
Re:PHP has been removed in macOS Monterey by rbanffy on Thursday June 17, 2021 @07:23AM (#27538415)
I find the MacPorts approach to be very developer friendly and I wouldn’t really want to use a “naked” macOS install as my work machine. MacPorts makes it look like a very credible BSD workstation.

I really have no issue with Apple trimming down the surface of the OS to a minimum.

Re:PHP has been removed in macOS Monterey by salmo on Thursday June 17, 2021 @08:06AM (#27538686)
Totally agree. I think anyone developing with these tools would too. It's not as annoying as say, RedHat, but out of date "system" versions are just obnoxious.

I don't know if any "native" apps have leveraged them, though. That would be the real risk of disruption.

Also, as someone who never uses PHP, I'd really rather not have it on my machine. Scripting languages are a pretty big attack surface, even if it's just to pivot after initial compromise. I'd rather not have one there that's not being used.

Re:PHP has been removed in macOS Monterey by salmo on Thursday June 17, 2021 @08:10AM (#27538721)
I'll also make the inflammatory statement that people should just use sed and awk in shell scripts and leave Perl for when they really want to write Perl.

It is weird to me the number of times 90's Linux Distros used Perl for things that are easy in awk, awk for things that are easy with cut, and other commands for things that are easy with POSIX shell baked-in facilities. I guess I'm just a shell snob.

Re:PHP has been removed in macOS Monterey by efaref on Thursday June 17, 2021 @08:36AM (#27538906)
cut usually doesn't do what you want it to do. Most of the time you want to split on sequences of whitespace (which may or may not be tabs, it's not easy to tell from the output of the program). cut doesn't let you do this, which is a shame, as it would've been a sensible default. It also does weird things like print out the whole row if there's no instance of the separator on the line.

So because you can't trust cut to do what you want, you'll probably reach for something like awk '{print $3}' instead.

Re:PHP has been removed in macOS Monterey by squiggleblaz on Thursday June 17, 2021 @09:31AM (#27539364)
Yeah, after I remembered that `cut` exists shortly before needing to grab some fields of an input, I thought "oh, I'll use `cut` instead of `awk`". And lo and behold, `cut` couldn't do the thing I wanted. Why learn two tools when one will do? The only reason I can think of is the principle of least privilege, but if you can convince me it applies, I'll convince you should write a single tool that adheres to it instead of using countless tools for any given transform/privilege pair.
Re:PHP has been removed in macOS Monterey by cutler on Thursday June 17, 2021 @12:13PM (#27541262)
Perl was invented to replace the shortcomings of hacking together sed + awk + shell, eg. multi-dimensional arrays.
Re:PHP has been removed in macOS Monterey by iso1631 on Thursday June 17, 2021 @09:55AM (#27539594)
I tend to start writing in bash/sed and going on to regret it as the script gets more involved and needs a refactor in perl.

Most of the time the script doesn't get more complicated and it's fine with cut/sed/wc etc, but at some point it tips the balance and I grumble to myself.

Re:PHP has been removed in macOS Monterey by walshemj on Thursday June 17, 2021 @02:45PM (#27543024)
Only if the said script is less than a dozen lines
Re:PHP has been removed in macOS Monterey by unknown_error on Thursday June 17, 2021 @11:50AM (#27540957)
> since it's as much as Unix system utility like awk or sed as a programming language.

Even those tools suffer from Apple's lack of fucks given. I often have to replace included system commands with the homebrew equivalent because Apple's is missing some common functionality.

I wish Apple would just adopt homebrew as a firstparty package manager.

Re:PHP has been removed in macOS Monterey by brigandish on Thursday June 17, 2021 @11:52AM (#27540981)
I'd plump for Macports or pkgsrc long before Homebrew.
Re:PHP has been removed in macOS Monterey by zodiakzz on Thursday June 17, 2021 @12:26PM (#27541423)
Homebrew should first come up with basic functionality... like you know not assuming the OS will only have one user account ever. I was quite shocked when I found this out about the oh so amazing package manager.

Before someone shares some bizarre workaround: no thanks.

Re:PHP has been removed in macOS Monterey by brigandish on Thursday June 17, 2021 @01:57PM (#27542437)
The last time I bothered with it, it complained about my use of `sudo` but wouldn't run unless I was logged in as admin - not a temporary bump, just logged in as an admin. Sudo isn't alright but running as admin is…? I really can't work that one out.

It also broke so I uninstalled it. When I need to I go straight to their formulas and install by hand, as a non-admin user.

Re:PHP has been removed in macOS Monterey by smoldesu on Thursday June 17, 2021 @12:34PM (#27541507)
The issue (in my experience) is that neither Homebrew nor Macports provide a "full fat" package management experience like pacman or even apt. Not only are they missing packages, they're missing features and are loaded with outdated builds. If Apple made a first-party package manager that didn't suck, I'd probably have a Mac on my desk today.
Re:PHP has been removed in macOS Monterey by donarb on Thursday June 17, 2021 @06:44PM (#27545277)
Homebrew is a piece of crap. There's no away to install specific versions of software (unless you dig through the git repo and install using a commit hash). It has a scorched earth policy of wiping out dependencies willy nilly. One time I installed Python 3.8 and it wiped out the version of openssl used with Python 3.7 I used for a client project.
Re:PHP has been removed in macOS Monterey by unknown_error on Monday June 21, 2021 @10:52AM (#27579734)
You can actually `brew search python@` to see the available versions (major/minor only, not patch) and then `brew install [email protected]` to install an older version. Caveat is that this depends on someone having made a separate formula, under the correct versioned naming scheme, and uploaded it to homebrew. There doesn't seem to be a python2 formula, for example.

I think it's a difference in philosophy? Brew does a "good enough" job for the most common use case, supplementing Apple's janky *nix environment with commonly-needed tools, without a built-in package manager. It doesn't try to do complex simultaneous versions... in my (admittedly limited) experience, if you need to do that, you either do that in something like a project-based setup (npm/composer) or in a VM/container with its own packages.

In your situation, when you have multiple pythons running in the same environment, how does anyone given script know which one to call? What's a better way of doing this?

Re:PHP has been removed in macOS Monterey by Wowfunhappy on Thursday June 17, 2021 @12:26PM (#27541422)
MacPorts did receive official resources from Apple for a long time. Then they stopped.
Re:PHP has been removed in macOS Monterey by Hamuko on Thursday June 17, 2021 @12:57PM (#27541768)
Apple did toss some ARM machines (DTKs I believe) to the Homebrew project.
Re:PHP has been removed in macOS Monterey by sixothree on Thursday June 17, 2021 @12:34PM (#27541500)
You could use homebrew to install powershell.
Re:PHP has been removed in macOS Monterey by mthoms on Thursday June 17, 2021 @02:17PM (#27542672)
I can’t tell if you’re joking or this is actually possible. Is it?
Re:PHP has been removed in macOS Monterey by benbristow on Thursday June 17, 2021 @02:19PM (#27542701)
https://docs.microsoft.com/en-us/powershell/scripting/instal...

From the horse's mouth

You can also install it on Linux if you wish.

Re:PHP has been removed in macOS Monterey by darrenf on Thursday June 17, 2021 @04:42AM (#27537425)
Regarding Perl, rather than removing it Apple actually upgraded it – from 5.28 to 5.30 – in Big Sur 11.3. I wasn't the only one briefly surprised and bitten by it:

• https://github.com/Homebrew/brew/issues/10127#issuecomment-8...

• https://github.com/Homebrew/brew/issues/11275

Re:PHP has been removed in macOS Monterey by Stranger43 on Thursday June 17, 2021 @06:07AM (#27537989)
Perl is requires for apple to maintain their unix(tm) certification. And while they likely dont see it as core to what they want macos to become it would be an news story in the more sensationalist part of the IT press if they were to drop it. and big sur is still listed as certified https://www.opengroup.org/openbrand/register/.
Re:PHP has been removed in macOS Monterey by xeeeeeeeeeeenu on Thursday June 17, 2021 @08:44AM (#27538973)
Perl isn't required by or even mentioned in the Single UNIX Specification.
Re:PHP has been removed in macOS Monterey by tpush on Thursday June 17, 2021 @06:29AM (#27538112)
Genuine question: is there anyone (corporate or not) that cares that macOS is a certified Unix?
Re:PHP has been removed in macOS Monterey by mekster on Thursday June 17, 2021 @06:52AM (#27538218)
It's still impressive that powerful command line environment and the best GUI are offered in a same OS.

Usually it's one or the other.

Re:PHP has been removed in macOS Monterey by akho on Thursday June 17, 2021 @07:58AM (#27538619)
Powerful command-line environments are offered everywhere (wsl, Linux container on Chrome, Linux on Linux). MacOS is actually quite lacking in comparison (being limited wrt licenses and lacking a package manager). So it’s just a GUI question, and I’m not sure there is a definite lead these days.

Integration with their other hardware devices is the more important moat right now, as is hardware.

Re:PHP has been removed in macOS Monterey by JiNCMG on Thursday June 17, 2021 @12:14PM (#27541273)
If you want to throw in WSL then include Docker on any OS
Re:PHP has been removed in macOS Monterey by akho on Thursday June 17, 2021 @12:23PM (#27541391)
Any OSes where Docker runs that I have not covered?
Re:PHP has been removed in macOS Monterey by mirthflat83 on Thursday June 17, 2021 @05:43PM (#27544788)
The joke went over your head
Re:PHP has been removed in macOS Monterey by jolux on Thursday June 17, 2021 @09:34AM (#27539394)
There are plenty of third-party package managers for macOS that work fine. I would prefer it if Apple picked one to officially support, but installing Homebrew takes me ten minutes and then I never have to think about it again.
Re:PHP has been removed in macOS Monterey by akho on Thursday June 17, 2021 @10:39AM (#27540058)
I had unpleasant issues with homebrew upgrades back when I used it. It’s not exactly state of the art. (Nix works the same everywhere, though — but there are some hoops you need to jump through on macs)
Re:PHP has been removed in macOS Monterey by jolux on Thursday June 17, 2021 @10:50AM (#27540176)
It’s definitely not the best. I have my issues with it. But I’ve been using it since I got a Mac in 2014 and it has improved a lot since then, it rarely blows up on me anymore. In fact I can’t remember when last it did.

I’ve always wanted to use Nix and have tried to get started a few times. It has always ended up seeming more trouble than it’s worth.

Re:PHP has been removed in macOS Monterey by vanpythonista on Thursday June 17, 2021 @12:24PM (#27541401)
I've used it as my primary package manager on macOS for six months, but ended up dropping it. My main reasons -

* Nix doesn't have support for GUI apps like homebrew cask does - which meant I couldn't drop homebrew anyway. * The nix ecosystem forums suggest using nix-shell for managing packages for other languages, eg. python, java - but it's been really difficult to convince team members to use nix instead of pyenv, conda, gradle etc

Re:PHP has been removed in macOS Monterey by smoldesu on Thursday June 17, 2021 @12:42PM (#27541595)
Neither Macport or Homebrew work "fine", but please continue.
Re:PHP has been removed in macOS Monterey by geerlingguy on Thursday June 17, 2021 @09:40AM (#27539446)
WSL includes a package manager now?
Re:PHP has been removed in macOS Monterey by akho on Thursday June 17, 2021 @10:24AM (#27539903)
The distro you run in wsl certainly does.
Re:PHP has been removed in macOS Monterey by pornel on Thursday June 17, 2021 @07:37AM (#27538486)
It used to be, but Apple seems to have lost interest in the Unix/Open Source side of macOS a decade ago. They've abandoned GNU tools after GPLv3 (2007), haven't added anything new, and just let the old stuff limp along until it's obsolete.

Nowadays macOS needs something like Homebrew to fill the gaps. It's still slightly better than Windows + WSL, but Microsoft is catching up, while Apple seems to think that iPadOS is the future.

Re:PHP has been removed in macOS Monterey by massysett on Thursday June 17, 2021 @09:56AM (#27539605)
> It used to be, but Apple seems to have lost interest in the Unix/Open Source side of macOS a decade ago. They've abandoned GNU tools after GPLv3 (2007), haven't added anything new, and just let the old stuff limp along until it's obsolete.

There's a whole lot more to Unix and open source than GNU. macOS has current versions of many open source tools, such as zsh, awk, sqlite, tar, git, and xz.

If one is being pedantic, GNU is not even "open source" but rather is "free software," and macOS certainly is not free software.

Re:PHP has been removed in macOS Monterey by smoldesu on Thursday June 17, 2021 @12:45PM (#27541623)
None of that really matters when GNU is the predominant standard, though. You could tell your boss all about how great the MacOS coreutils are, but if your program doesn't compile, you're gonna be in trouble.
Re:PHP has been removed in macOS Monterey by jsjohnst on Thursday June 17, 2021 @01:32PM (#27542157)
> GNU is the predominant standard

On Linux, sure, but not on other Unix OSes (like *BSD)

Re:PHP has been removed in macOS Monterey by max_hammer on Thursday June 17, 2021 @03:46PM (#27543788)
`awk` is part of GNU. And Unix™ is a proprietary product of AT&T.
Re:PHP has been removed in macOS Monterey by blacktriangle on Thursday June 17, 2021 @07:54AM (#27538593)
This new world is way better. Before we were dependent on Apple's release cadence to keep our OSS up to date. Apple officials dropping support doesn't mean they don't want these tools to be on their platform, it just means the community does a better job of managing Unix/OSS tools separate from Apple's release schedule.
Re:PHP has been removed in macOS Monterey by hnlmorg on Thursday June 17, 2021 @08:10AM (#27538714)
That's still pretty appawling though. If Linux distros can have big release candidates and still push out package updates between releases then why can't one of the most profitable companies in the world manage it?

I'm not saying it's an easy problem to solve. Just that Apple aren't dropping support out of respect to their customers. They're doing it because it's cheaper.

Re:PHP has been removed in macOS Monterey by blacktriangle on Thursday June 17, 2021 @08:15AM (#27538759)
Linux distros have massively different expectations of their users. And users have very different requirements from how they get and update their OSS, hence he variety of distros and package managers. Its less that Apple is unable to do this and more that Apple is in the one size fits all business, and that model simply doesn't work for solving the OSS distribution problem.
Re:PHP has been removed in macOS Monterey by hnlmorg on Thursday June 17, 2021 @08:21AM (#27538803)
We're not talking about forking macOS for every theme change or offering alternative init daemons. We're just talking about providing a package manager for common user land tools. In fact Apple already do this: it's called "App Store". But you have to pay to have your app on there so most OSS don't bother. And here lies the problem: why would Apple run another package manager for free? For them, this is 100% a financial decision.
Re:PHP has been removed in macOS Monterey by mousepilot on Thursday June 17, 2021 @09:49AM (#27539524)
I'm thinking that the less value that Apple delivers to the customers, the better it is for their bottom line, don't forget, adding value costs money, plus its not like Apple fans are going to suddenly quit buying their products right?

Apple seems to be really good at maintaining their profit margin.

Re:PHP has been removed in macOS Monterey by smoldesu on Thursday June 17, 2021 @12:47PM (#27541644)
Apple is fantastic at creating artificial scarcity out of zero-marginal-utility.
Re:PHP has been removed in macOS Monterey by chrisfinazzo on Thursday June 17, 2021 @09:54AM (#27539586)
In a nutshell, this is the correct answer. Going all the way back to when Apple's Java was deprecated and eventually removed from the shipping OS. In the moment, it's annoying, but I would rather not have to fight with preinstalled software when trying to get a newer version of (say) zsh installed.

Here, they not only realized it had become popular, but GNU licensing gave them an excuse to switch the default without much thrashing about.

The fact that I can `chsh -s /usr/local/bin/zsh` and macOS doesn't freak out is quite nice.

Re:PHP has been removed in macOS Monterey by smoldesu on Thursday June 17, 2021 @12:46PM (#27541633)
There's still an even better solution: Apple could start treating their operating system like a first-class programming platform, and everyone would win. But it looks like they're still dragging their feet on that one.
Re:PHP has been removed in macOS Monterey by kevin_thibedeau on Thursday June 17, 2021 @01:41PM (#27542268)
They're rolling in billions with nowhere to spend it. They could just hire some more unix devs to update their tooling. Nobody wants to champion that because it'll never be a keynote bullet point.
Re:PHP has been removed in macOS Monterey by pjmlp on Friday June 18, 2021 @01:40AM (#27547680)
Their tools are up to date with UNIX, hence why they keep being certified.

https://www.opengroup.org/openbrand/register/brand3668.htm

Re:PHP has been removed in macOS Monterey by hnlmorg on Thursday June 17, 2021 @07:59AM (#27538629)
That's a hugely subjective comment and there are plenty of instances throughout history of a powerful CLI and sophisticated GUI being included as part of the same OS (Xerox Alto, BeOS, NeXT, Plan 9). Linux and *BSD's have plenty of popular WM / DEs too: personally I'd rate KDE above anything commercial I've used but that's my subjective preference. Heck these days even Windows can be argued as having a "powerful CLI" with both WSL and Powershell existing, and the Windows UI has it's fair share of fans (regardless of what our own personal preferences might be).
Re:PHP has been removed in macOS Monterey by azangru on Thursday June 17, 2021 @07:38AM (#27538492)
> and the best GUI

This is very subjective. I, for one, much prefer kde plasma. And there's a substantial breed of developers who would prefer a tiling window manager with good keyboard navigation, such as i3.

Re:PHP has been removed in macOS Monterey by smoldesu on Thursday June 17, 2021 @12:42PM (#27541589)
It was impressive back when OSX debuted, but now it feels like Apple is lacking in both regards. Their shell utilities are all horribly outdated/mismatched, and their UI design took a nosedive with Big Sur. Modern MacOS reminds me of what Ubuntu felt like 10 years ago: it's a confused and scared operating system that doesn't quite know where to go from here. I mean, look at what Monterrey introduced; basically better Facetime and some new wallpapers. I'm getting the feeling that Apple has painted themselves into a corner here. They spent the past 2 decades focusing on vertical growth, only to discover that the next 50 years are going to be ruled by better interop and protocols.
Re:PHP has been removed in macOS Monterey by pjmlp on Friday June 18, 2021 @01:40AM (#27547682)
Their tools are up to date with UNIX standard,

https://www.opengroup.org/openbrand/register/brand3668.htm

Re:PHP has been removed in macOS Monterey by Andrew_nenakhov on Thursday June 17, 2021 @03:30PM (#27543588)
Best GUI? Finder is atrocious, and overall experience is far worse than even cancelled Unity. YMMV, of course, but I hate every second spent with this 'best GUI'. The only reason I ever use macOS is because I occasionally run Sketch.
Re:PHP has been removed in macOS Monterey by pjmlp on Friday June 18, 2021 @01:36AM (#27547670)
Re:PHP has been removed in macOS Monterey by JeremyBanks on Thursday June 17, 2021 @08:49AM (#27539012)
Indeed.

Windows Subsystem for Linus sure has been a game changer!

Re:PHP has been removed in macOS Monterey by splistud on Thursday June 17, 2021 @01:07PM (#27541891)
and in this case it's neither
Re:PHP has been removed in macOS Monterey by Stranger43 on Thursday June 17, 2021 @07:00AM (#27538279)
not in 2021, but apple made sort of an big deal about it when they started to market OSX 20 years ago.

And while you can still find an traditional unix(tm) box here and there in the dusty forgotten corners of enterprise serverooms(i am personally responsible for maintaining a few hpux boxen), unix(tm) certification haven't really mattered since Linux became serious business which happened around the same time OSX was launched.

What used to matter was that you could run the same CLI tooling in an macos desktop as on an Linux server but i don't think this is an use case apple see's as particularly important for the future success of Apple.

Re:PHP has been removed in macOS Monterey by coredog64 on Thursday June 17, 2021 @09:16AM (#27539244)
That’s the only reason my employer hands out MacBooks. If it stopped being something that used the same CLI tooling as our infrastructure, it would be Dells all around.
Re:PHP has been removed in macOS Monterey by seabrookmx on Thursday June 17, 2021 @11:29AM (#27540664)
Ironically, Dell ships it's XPS "developer editions" with Ubuntu, which is likely much closer to your infra.
Re:PHP has been removed in macOS Monterey by mrehler on Thursday June 17, 2021 @08:01AM (#27538642)
IMO, Apple still sees it as very important that macOS is fairly attractive for developers. Of course they’re selling lots of MacBook Airs to college students, but outside of that…

It’s not as if they want their CLI interaction to be 1-for-1 with Linux, but relatively close seems to still be a priority.

Re:PHP has been removed in macOS Monterey by tarsinge on Thursday June 17, 2021 @08:45AM (#27538980)
Do you have more info on that? Fairly attractive for macOS and iOS developers sure, but for me it was a happy accident that Macs also became popular for web development and Linux server admin, that it was never part of the strategy of Apple.
Re:PHP has been removed in macOS Monterey by ILMostro7 on Thursday June 17, 2021 @09:08AM (#27539174)
Companies see Mac products as more attractive for their workforce than Linux-based workstations. Having printers, wifi, other products seemlessly work, since Apple devotes time and money ensuring that, improves productivity, generally, and lowers costs in (in terms of Helpdesk staff and time spent diagnosing and fixing systems integration). So, developers and admins make use of what's offered, as it is a middle-ground between stability and functionality.
Re:PHP has been removed in macOS Monterey by rovr138 on Thursday June 17, 2021 @09:23AM (#27539291)
While it may have been a happy accident, it's a pretty big market.

Precovid, on any conference I went to, professional or academic, the amount of Apple laptops was insane. I'm sure they're running things locally or on Linux servers, but the fact that they work pretty well between them is important.

Re:PHP has been removed in macOS Monterey by crooked-v on Thursday June 17, 2021 @06:11PM (#27544997)
For anecdata, I've worked at two companies in a row now that have used exclusively Macs because it's simultaneously an acceptable platform for serious dev work and still user-friendly to tech illiterate interns.
Re:PHP has been removed in macOS Monterey by smoldesu on Thursday June 17, 2021 @12:50PM (#27541682)
I can't consciously buy a Mac if Apple is going to treat Linux like competition. One is free software, provided by volunteers for free, and the other is a desktop OS ran by the largest company in the world. It costs Apple nothing to respect the predominant standards, so why can't they do it?
Re:PHP has been removed in macOS Monterey by jsjohnst on Thursday June 17, 2021 @01:37PM (#27542212)
> It costs Apple nothing to respect the predominant standards

Actually, it would cost them a lot, due to the GPL. Sure, they could try and pull a Google re: Java/Oracle feud, but I doubt they will and for good reason.

Re:PHP has been removed in macOS Monterey by defaultname on Thursday June 17, 2021 @01:19PM (#27542024)
Maybe they don't care about you as a customer? Apple has never pretended to cater to everyone.

They aren't for you. Move on.

Re:PHP has been removed in macOS Monterey by smoldesu on Thursday June 17, 2021 @04:45PM (#27544371)
I agree, Macs aren't for me. But if Apple wants to increase their market share (hint: they're one of the most-traded shares of all time), they should start listening to their detractors. Especially for their desktops, where MacOS barely constitutes 7% of the desktop market share. Apple has been selling computers for nearly 5 decades, and their market share is still pitiful. Hell, if Google is selling more computers than you, something is seriously wrong with your computer.
Re:PHP has been removed in macOS Monterey by defaultname on Thursday June 17, 2021 @05:12PM (#27544560)
Again, Apple is not interested in catering to you. Clearly. I think they're pretty happy with where they are, and catering to the demands of the "make it like Linux" crew are laughably irrelevant. I have no idea why "most-traded shares" is pertinent -- yeah, they're a super, ridiculously profitable company. Your commentary on their "pitiful" computer sales are not cogent.

The Google bit is particularly goofy. No, "Google" doesn't even appear on the charts (you know -- the charts which Apple usually is within the top 2, often leading). Chromebooks do, sold by a wide variety of sellers, as a schoolhouse special. Their great for what they do.

Re:PHP has been removed in macOS Monterey by Stranger43 on Thursday June 17, 2021 @08:56AM (#27539065)
I just don't see them making any decision that does not make the MacOS CLI less useful with each and every release since at least the big cat series, and the user pattern is changing with those changes.

IT's an trip the classic macos took before it and i think there is an signficance in apple returning to the MAcOS branding thats subly hinting that the days when OSX was an relatively open unix is ending.

Re:PHP has been removed in macOS Monterey by tgragnato on Thursday June 17, 2021 @06:31AM (#27538121)
Many care that macOS is Unix-like, I doubt anyone cares about the certification.
Re:PHP has been removed in macOS Monterey by chrisseaton on Thursday June 17, 2021 @08:04AM (#27538672)
I believe it's a compliance thing for government contracts.
Re:PHP has been removed in macOS Monterey by fomine3 on Thursday June 17, 2021 @11:58PM (#27547216)
It would be needed to POSIX compliant (even Windows had compliant) but not UNIX(R)
Re:PHP has been removed in macOS Monterey by cpach on Thursday June 17, 2021 @06:58AM (#27538257)
End-users? Probably ~0.

But it might help Apple to win government contracts.

Re:PHP has been removed in macOS Monterey by rbanffy on Thursday June 17, 2021 @07:26AM (#27538435)
And who’d imagine, in 2000, that 20-ish years later, one of the most popular lines of computers would be RISC-based UNIX workstations…
Re:PHP has been removed in macOS Monterey by curt15 on Thursday June 17, 2021 @11:48AM (#27540923)
The few, government workstations that aren't running Windows are probably using RHEL. Microsoft and Red Hat/IBM have much more experience than Apple at speaking "enterprise."
Re:PHP has been removed in macOS Monterey by smoldesu on Thursday June 17, 2021 @12:38PM (#27541544)
I mean, I do. I'm sure plenty of businesses love having a standardized spec across their devices, too.
Re:PHP has been removed in macOS Monterey by mrpippy on Thursday June 17, 2021 @11:10AM (#27540406)
Yes, but Perl still has a warning banner when you run it (at least in Big Sur and Monterey):

% 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.

Re:PHP has been removed in macOS Monterey by kqr on Thursday June 17, 2021 @05:08AM (#27537594)
I doubt they'll be able to get rid of Perl any time soon.

However, how come things break when Perl is upgraded? From what I've heard, Perl should be extremely backwards compatible. What am I missing?

Re:PHP has been removed in macOS Monterey by pjmlp on Thursday June 17, 2021 @05:13AM (#27537628)
Enjoy the incompatible changes section from all Perl history,

https://perldoc.perl.org/perl#History

Re:PHP has been removed in macOS Monterey by mst on Thursday June 17, 2021 @08:34AM (#27538894)
That's a link to complete changelogs.

Those aren't an "incompatible changes seection".

perldelta covers bugfixes, feature additions etc.

Re:PHP has been removed in macOS Monterey by pjmlp on Thursday June 17, 2021 @10:15AM (#27539798)

   foreach entry in "https://perldoc.perl.org/perl#History" do
      open entry on browser
      search for "Incompatible Changes" section
      read section contents
Writing a script in Perl to do the above is left as exercise to the reader.

Hint, use LWP.

Re:PHP has been removed in macOS Monterey by anthk on Thursday June 17, 2021 @07:09AM (#27538330)
That's bullshit. I've run exercises from the Orelly CD bookshelf more than a decade old and they just run as is.
Re:PHP has been removed in macOS Monterey by viraptor on Thursday June 17, 2021 @07:36AM (#27538484)
Almost all exercises are minimal in nature. They will touch only small areas and (unless the book is based around advanced ideas) will not touch tricky / changing functionality. So I'm not surprised exercises still work.
Re:PHP has been removed in macOS Monterey by pjmlp on Thursday June 17, 2021 @07:17AM (#27538386)
That just proves the point you got lucky with what language features were used on the exercises.
Re:PHP has been removed in macOS Monterey by Ensorceled on Thursday June 17, 2021 @09:24AM (#27539300)
> That's bullshit.

Dude, there is literally a link with references.

Re:PHP has been removed in macOS Monterey by darrenf on Thursday June 17, 2021 @05:35AM (#27537797)
For me, I had been too lazy to use Homebrew or Perlbrew since I don't develop locally per se, but I wanted `Perl::LanguageServer` for use with VS Code – which I'd installed via `local::lib` into `~/perl5/`.

Post-upgrade either various modules weren't found (because they were installed in a versioned path), or they didn't compile because the XS components had been compiled against the prior version of Perl.

Re:PHP has been removed in macOS Monterey by mst on Thursday June 17, 2021 @08:35AM (#27538901)
Right, that's a risk you take doing local::lib against system perl.

I will often use the system perl to bootstrap https://p3rl.org/Perl::Build which makes building -one- perl for local use easier than perlbrew/etc. - and then https://p3rl.org/App::plx for managing per project environments if I need that

Re:PHP has been removed in macOS Monterey by rurban on Thursday June 17, 2021 @05:15AM (#27537644)
They had to recompile their perl XS bindings, where esp. subversion is horrible to update.
Re:PHP has been removed in macOS Monterey by enriquto on Thursday June 17, 2021 @08:04AM (#27538662)
> for compatibility with legacy software.

The way it is written, it sounds like they are trying to hide the fact that said "legacy software" is part of the (new) system itself. Otherwise they wouldn't need to include it in the base install.

> Python, Ruby, and Perl

The order they use for the languages hides the fact that, at least for Catalina, Perl is by far the most used scripting language by core elements of macOS, even more than the shell. Check it by yourselves:

    file -b /{usr/,}{s,}bin/* |cut -d\  -f1,2|sort|uniq -c|sort -n|tail

     13 setuid Mach-O
     23 a /usr/sbin/dtrace
     50 a /usr/bin/perl5.28
     53 a /usr/bin/perl5.18
     81 POSIX shell
    116 Perl script
    954 Mach-O 64-bit
Conclusion: Apple is a Perl shop.
Re:PHP has been removed in macOS Monterey by Cthulhu_ on Thursday June 17, 2021 @08:10AM (#27538719)
What they could do is use an internal, non-user-usable runtime for their own perl scripts and allow the user to install their own one.

And of course compile their scripts into executables or something.

Re:PHP has been removed in macOS Monterey by unethical_ban on Thursday June 17, 2021 @10:11AM (#27539759)
That is actually truly unfortunate, I think. While I understand the issues with lagging versions of system-installed languages, I think there is a comfort and educational value in having them available as part of the system for anyone to access without having to go fetch it.

It "lowers the friction of curiosity".

(And, it allowed our shadow IT custom request system and automation package to be built in 2014. I hope RHEL never takes this away).

Re:PHP has been removed in macOS Monterey by Rebelgecko on Thursday June 17, 2021 @06:53PM (#27545360)
I'm inclined to agree with you. When teaching someone programming, there's something comforting about telling them they can just open up a command prompt and type "python" (or irb, perl, etc) and start programming.

I recently wrote a short Ruby program to help my not-computer-literate-at-all mother automate a task that would've taken hours and hours to do manually. She's barely comfortable using GUI programs, but because Ruby was already installed and I was able to give her clear directions she was able to run the program in Terminal.app without much trouble. It would've been frustrating as hell to remotely get her set up with homebrew (or whatever the new hotness is in package managers nowawadays), install the right version of Ruby, fix any $PATH shenanigans, etc.

(There was still some trickiness because her included version of Ruby was super old and couldn't install gems because it used an old version of SSL/TLS, but we were able to figure out a workaround)

Re:PHP has been removed in macOS Monterey by aasasd on Thursday June 17, 2021 @05:23PM (#27544623)
Bummer about Perl, because a stint with a slower machine taught me just how slow Python is. My Lua scripts were often done faster than Python starts up—even though the scripts were doing file i/o. So, for anything like personal productivity scripting, Python is bad. However Lua requires managing the runtime and modules—and I was thinking about dusting off Perl, since it's pretty fast and is just always around like Sh while not being garbage at data structures and code organization.
Re:PHP has been removed in macOS Monterey by h1fra on Thursday June 17, 2021 @01:55PM (#27542406)
That's good, too many package assume you have python installed in macos and go looking into the wrong folder.

Or default python2 breaking stuff that assume you have a recent install

Re:PHP has been removed in macOS Monterey by nickysielicki on Friday June 18, 2021 @03:11AM (#27548083)
Does this mean MacOS is finally going to get a real package manager?