Topic: https://brettterpstra.com/2019/06/26/on-scripting-runtimes-and-macos/
hide preview

What's next? verify your email address for reply notifications!

unverified 5y, 188d ago

Swift can be executed as a script and I'm assuming it's shipping. Do a web search for swift scripting. Maybe Apple is favoring Swift scripting over all else.

hide preview

What's next? verify your email address for reply notifications!

unverified 5y, 266d ago

From what I’ve understood, Apple has never been able to ship up-to-date versions of scripting languages because users and third-party vendors would rely on specific versions and if Apple updated the languages, it would break existing scripts. So now, they’ve decided that they’d rather not ship any scripting language runtime rather than be forced to ship obsolete and potentially insecure versions.

hide preview

What's next? verify your email address for reply notifications!

PeterNLewis 5y, 266d ago

Here is an added consequence of this choice the just occurred to me - /usr/bin is a SIP protected directory. Which means even if you manually install perl/python/ruby yourself, you cannot install them in, or link them from /usr/bin and thus every single script you have that has #!/usr/bin/perl at the front of it breaks and has to be updated - Peter N Lewis.

remark link
hide preview

What's next? verify your email address for reply notifications!

KkwaZYr8 5y, 265d ago

Using '/usr/bin/env perl' instead gets around that and eats the one argument an interpreter directive is allowed.

remark link parent
hide preview

What's next? verify your email address for reply notifications!

PeterNLewis 5y, 262d ago

Yes, #!/usr/bin/env perl works, but a) that executes a random perl that could vary from place to place (which is actually the exact opposite of the problem Apple claims is a problem, namely that it is stuck with an old version that never changes, and hence never breaks scripts!); and b) still means I have to change every existing script, of which I have hundreds.

hide preview

What's next? verify your email address for reply notifications!

Brett 5y, 264d ago [edited]

Unfortunately doesn't work for bash, afaik. EDIT: Oh, just tested, I think it does :).

hide preview

What's next? verify your email address for reply notifications!

unverified 5y, 266d ago

Personally, I like this decision, as I don't believe that advanced scripting languages (outside of the shell) should be included with a Unix. Need Perl/Python/Ruby etc? Install it.

As the the Bash, this comes down to the GPL3, which is why macOS has been using an old version of it.

hide preview

What's next? verify your email address for reply notifications!

unverified 5y, 266d ago

The move to Zsh seems to be due to it having a more permissive licence than Bash (MIT like vs GPLv3). If this is so then it seems understandable. The runtimes don’t seem to have licenses as restrictive as GPLv3 so maybe they’re being removed for a different reason.

hide preview

What's next? verify your email address for reply notifications!

unverified 5y, 266d ago

My guess is it's about security. By bundling a specific version, without an easy way to update it outside of OS updates, Apple is becoming responsible for the security of those runtimes. And if they did have to get updated due to some significant vulnerability, Apple would have to get a way to push those updates out ASAP. I can certainly see the appeal of "if you want it, install it yourself... any version you want" from their standpoint.

hide preview

What's next? verify your email address for reply notifications!