5 ms·
Apple to Deprecate Scripting Languages in Future Versions of macOS
- sys_64738 7y agoBrew.sh
- cstross 7y agoAbout bloody time! Apple don't keep their scripting languages updated. For example, macOS Mojave 10.14.6 ships with perl 5, version 18, subversion 4 (v5.18.4) in /usr/bin/perl; but my homebrew setup provides perl 5, version 30, subversion 0 (v5.30.0). (And for those who don't know perl, it's been semi-permanently pinned at "perl 5" as a major version number for about 20 years due to the existence of perl 6, which is effectively a different language—as different as C++ is from C—so those minor version number differences are as significant as a major version number change in another language.)
- crocbuzz 7y agoTo be fair, Mojave comes pre-installed with the latest release of Python and PHP.
- ohmybrew 7y agoDo you use Perl a lot? I haven't used it extensively since probably 2004.
- weberc2 7y agoWhoa, I’ve been using Mac for almost a decade and I never knew it shipped with perl!
- ingve 7y agoIt was even used in some unexpected places, for example, see the HN discussion about "Apple's libc shells out to Perl to implement wordexp" [0], [1] [0] https://news.ycombinator.com/item?id=9025572 https://news.ycombinator.com/item?id=9025572 [1] https://github.com/Apple-FOSS-Mirror/Libc/blob/2ca2ae74647714acfc18674c3114b1a5d3325d7d/gen/wordexp.c#L192 https://github.com/Apple-FOSS-Mirror/Libc/blob/2ca2ae7464771...
- snazz 7y agoMost Unix systems do. Apple just does a terrible job of keeping scripting runtimes up to date.
- selectodude 7y agoEverything seems to be frozen in time at just before a project changed to GPL 3
- hpcjoe 7y agoI generally set up my own toolchain, with up to date versions of Perl 5, Python, Julia, R, Octave. I've found the system distro installed tooling to be too ancient for productive use. While this doesn't bother me much per se, the issue I see as looming is what I've experienced on a few platforms. Where their "protection" mechanisms effectively prevent you from building the code you need to function effectively. I usually test each (new) platform by taking my code and trying to build it. If the platform is important to what I do, I'll spend some time making sure it builds correctly, and passes regression testing. WSL in Windows 10, albeit running on a kvm on my linux laptop, does not pass muster as a system worth targeting for a number of reasons. Not the least of which is that the environment breaks the regression testing. My concern is that MacOS gets to that point. Its getting close, as I have to specifically allow perl/python/julia/jupyter to open ports. I suspect that soon MacOS will disable this capability. I already run Linux everywhere, MacOS is just what the corporate folks indicate is an acceptable alternative to Windows 10, which doesn't work for me. Once MacOS doesn't work, it will be far easier to argue for corporate issued Linux laptops. Alienating DevOps, developers, hpc/ai folks ... not really a good idea. But hey, Apple does Apple, so why not. [Edited for grammar]
- chmaynard 7y agoIf I use homebrew or macports to install the latest versions of these languages, are their runtimes included? Just asking.
- martius 7y agoYes, basically this news means "Ruby, python and Perl may not be preinstallled, install them yourself". It's not a big deal for users of Homebrew or other package managers.
- polpo 7y agoIt’s a big deal for Homebrew, which is written in Ruby and uses the version shipped with macOS to install itself.
- jakobegger 7y agoI think that telling users to execute a shell command to install software is not the smartest idea in any case (eg. no way to verify signatures of installed software) A standard installer package would be much better.
- hk__2 7y ago> I think that telling users to execute a shell command to install software is not the smartest idea in any case (eg. no way to verify signatures of installed software) Installing via a shell command has nothing to do with the (in)ability to verify signatures. You aren’t more protected running a random installer package than an auditable shell script from the official Homebrew repo. Also, Homebrew supports more installation methods including cloning the git repo by yourself or un-taring an archive.
- jakobegger 7y agoInstallers are signed, scripts piped from curl to ruby are not. Homebrew circumvents all the protections built into macOS (like Gatekeeper / Xprotect etc) for convenience. I don't think this method for distributing software has much of a future.
- l2dy 7y agoPrevious discussion 3 months ago: https://news.ycombinator.com/item?id=20109469 https://news.ycombinator.com/item?id=20109469.
- goatinaboat 7y agoscripts are just text files that can do a great deal when executed by the scripting language runtime Microsoft have done a lot in Windows 10 to counter PowerShell malware https://blogs.technet.microsoft.com/poshchap/2015/10/16/security-focus-defending-powershell-with-the-anti-malware-scan-interface-amsi/ https://blogs.technet.microsoft.com/poshchap/2015/10/16/secu... https://www.microsoft.com/security/blog/2017/12/04/windows-defender-atp-machine-learning-and-amsi-unearthing-script-based-attacks-that-live-off-the-land/ https://www.microsoft.com/security/blog/2017/12/04/windows-d... It’s not foolproof but it copes with many common attacks. It’s surprising Apple hasn’t taken this approach.
- paranoidrobot 7y agoTo do so would run counter to the "Mac's don't get viruses/malware" mythology. There's been a persistent "That's only a PC thing" for a long time. Fairly sure it was even referenced in Apple's own advertising during the "I'm a Mac, I'm a PC" phase.
- fortran77 7y agoApple still advertises their operating systems as "Secure By Design". With the latest news about iOS zerodays in the wild for years, we know this isn't true. Do a google search for "Secure By Design" site:apple.com to see where they use this term for both iOS and OSX. Someday, someone will win in court over this.
- jmull 7y agoDesigning for security doesn’t guarantee no security issues. Done well it should substantially reduce the number and severity of security issues. To back up your claim from a numbers standpoint you’d have to quantify the number and severity of security issues in Apple OSs vs comparable OSs that aren’t “Secure by Design”. That’s obviously problematic in a few ways. You could also analyze the design of the OS for security flaws. Though again, finding that the design isn’t perfect isn’t enough. You’d need to show how the design disregards security. A proper analysis should acknowledge history, BTW.
- rapsey 7y agoDon’t just deprecate. Remove them entirely please. If I wanted them I would install up to date versions.
- Dunedan 7y agoIt's good practice to not just remove stuff, but to deprecate it first, to give everybody time to migrate. That's exactly what Apple is doing there. The deprecation notices clearly states that they'll eventually remove it: > Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. Future versions of macOS won’t include scripting language runtimes by default, and might require you to install additional packages. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app.
- IloveHN84 7y agoAlso AppleScript?
- rahuldottech 7y agoAppleScript will remain
- hhas01 7y agoAppleScript’s reckoning will come once Siri Shortcuts officially ships in macOS 10.16. As Steve Troughton-Smith has demonstrated, the technical guts are already present in 10.15 [1]; it’s just not quite ready to roll as a Product yet. [1] https://twitter.com/stroughtonsmith/status/1135956331360346113 https://twitter.com/stroughtonsmith/status/11359563313603461...
- rasengan 7y agoIt’s not really UNIX anymore.
- frou_dh 7y agoPOSIX defines what Unix is, and there's no Python/Ruby/Perl here: https://shellhaters.org https://shellhaters.org https://pubs.opengroup.org/onlinepubs/9699919799/ https://pubs.opengroup.org/onlinepubs/9699919799/
- rasengan 7y agoAgreed as it relates to UNIX(R). But, I think we have all come to expect BASH and other scripting to be available on our systems.
- msla 7y agoNo, the The Open Group, which owns the trademark on the name "Unix", defines what Unix is, and that group defines macOS as Unix. It also defines z/OS as Unix and does not define any of the Open Source BSDs as Unix, which means FreeBSD, OpenBSD, and NetBSD are not Unix and are, at most, Unix-like. OTOH, the Inspur K-UX Linux distribution is Unix. And The Open Group doesn't use POSIX, it uses the Single Unix Specification.
- RichardCA 7y ago
- mikece 7y agoSo not only is macOS changing from bash to zsh by default, but (potentially) pulling all scripting languages. Reduced attack surface... I like it! I had no idea Perl support was still there since I don't use it.
- xiaq 7y agoTitle is misleading and makes it sound like Apple is removing support for scripting features that are integrated with macOS - AppleScript for instance. More like "Apple to stop shipping scripting language interpreters in macOS".
- fortran77 7y agoIf they ship with the OS, they're "integrated" with the OS.
- ralmeida 7y agoStrictly speaking, yes, but the level of integration is very different. I can get the version of Python which would come bundled elsewhere, but if they remove Automator, there's nothing I can do.
- jboles 7y agoNot really, no. Python/Ruby/Perl interpreters are not “integrated” into the OS like AppleScript and Automator are. They’re just some binaries sitting in /usr/local/bin.
- pdpi 7y agoInternet Explorer was integrated into Windows in ways that Calculator or Mine Sweeper weren't — those were merely bundled with the OS. Python, Perl are the calc.exe of this story — not integrated into the OS, just bundled with it. There's a long history between OSX and Ruby, with MacRuby and RubyCocoa being some efforts to actually integrate Ruby more tightly into the ecosystem, but those efforts have long been abandoned.
- jhanschoo 7y agoThis sounds good to me. Best practice since probably close to a decade ago has been to use scripting executables with regular user permissions in their own environment with associated required libraries per app, if not in a container.
- hsaliak 7y agoGood, they were poor at keeping them updated. Glad they did not limp into python3 and encumber the ecosystem with some version that would have to be supported for a long time.
- hhas01 7y agoAmusingly enough, 10.15 is the first and last macOS to ship with python3 bundled as standard. As to the rest of it, I’ll just re-post the same comment I post every time some muppet starts with all the wailing and rending of teeth: This is a perfect opportunity for FOSS to position Homebrew—a proven, successful, developer-friendly software distribution channel—as an integral part of the standard development toolkit of ALL Mac developers; up to and including convincing the Xcode team to bundle it themselves. .. Apple serves on a plate the greatest geek market opportunity in the 20-year history of Mac OS X… and only the geeks could so totally miss it!
- crb002 7y agoSo they want to make it Windows? Going to get rid of AWK next? Not cool. Far too many things rely on them. Good internally for Apple to stop relying on them.
- acomjean 7y agoI think its going to cause problems for developers if they completely remove them. As people won't be able to run the script to install the things that give them up to date scripts. Its like using the default web browser to download the "browser of your choice". There is the issue that apple usually "quarantines" executable downloads ("You downloaded this from X, do you really want to run) and these scripts do an end run around that. will apple be forcing a download of a signed package dng that installs macports or brew..?
- chongli 7y agoThey won't get rid of zsh, which they've just adopted as the default shell going forward. Macports and homebrew can bootstrap with a shell script.
- louisch 7y agoApparently homebrew currently pulls a temporary ruby to run its installation on linux where it can't expect there to be a systen ruby installed. Something like that would have to be done.
- ken 7y agoIt's a pain to switch languages, but it looks like there will still be at least 4 scripting languages available: Z shell, Applescript, Javascript, and Swift.