{"id":25548,"date":"2019-06-04T16:16:40","date_gmt":"2019-06-04T20:16:40","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=25548"},"modified":"2023-02-10T10:45:00","modified_gmt":"2023-02-10T15:45:00","slug":"scripting-languages-to-be-removed","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2019\/06\/04\/scripting-languages-to-be-removed\/","title":{"rendered":"Scripting Languages to Be Removed"},"content":{"rendered":"<p><a href=\"https:\/\/developer.apple.com\/documentation\/xcode_release_notes\/xcode_11_beta_release_notes\">Xcode 11 Beta Release Notes<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/documentation\/xcode_release_notes\/xcode_11_beta_release_notes\">\n<p>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&rsquo;t be available by default, and may require you to install an additional package. If your software depends on scripting languages, it&rsquo;s recommended that you bundle the runtime within the app.<\/p>\n<p>[&#8230;]<\/p>\n<p>Use of Python 2.7 isn&rsquo;t recommended. This version is included in macOS for compatibility with legacy software. Future versions of macOS won&rsquo;t include Python 2.7. Instead, it&rsquo;s recommended that you run python3 in Terminal.<\/p>\n<\/blockquote>\n\n<p>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 <a href=\"https:\/\/mjtsai.com\/blog\/2019\/04\/09\/toggle-system-grayscale-mode\/\">lean on<\/a> other scripting languages.<\/p>\n\n<p><a href=\"https:\/\/twitter.com\/krzyzanowskim\/status\/1135819731485777921\">Marcin Krzyzanowski<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/krzyzanowskim\/status\/1135819731485777921\">\n<p>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.<\/p>\n<p>No explanation was given, but we&rsquo;re curious. Maybe there&rsquo;s a valid reason.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/jckarter\/status\/1135642792028397568\">Joe Groff<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/jckarter\/status\/1135642792028397568\">\n<p>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.<\/p>\n<\/blockquote>\n\n<p>It still doesn&rsquo;t make sense to me because these scripting languages aren&rsquo;t huge, and Apple did update them and remove old versions from time-to-time.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2019\/01\/04\/mojaves-rsync-from-the-days-of-tiger\/\">Mojave&rsquo;s rsync From the Days of Tiger<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2019\/05\/10\/windows-to-include-a-full-linux-kernel\/\">Windows to Include a Full Linux Kernel<\/a><\/li>\n<\/ul>\n\n<p>Update (2019-06-04): <a href=\"https:\/\/twitter.com\/galooticus\/status\/1136008799184011264\">Adam Maxwell<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/galooticus\/status\/1136008799184011264\">\n<p>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&rsquo;ll have ten of them, and you&rsquo;ll have to play with paths to pick the right one, like Windows.<\/p>\n<\/blockquote>\n\n<p id=\"scripting-languages-to-be-removed-update-2019-06-06\">Update (2019-06-06): See also: <a href=\"https:\/\/lobste.rs\/s\/dntqc6\/scripting_languages_be_removed\">Lobsters<\/a>, <a href=\"https:\/\/www.reddit.com\/r\/programming\/comments\/bwvb6x\/scripting_languages_to_be_removed_from_macos\/\">Reddit<\/a>, <a href=\"https:\/\/news.ycombinator.com\/item?id=20109469\">Hacker News<\/a>.<\/p>\n\n<p id=\"scripting-languages-to-be-removed-update-2019-06-10\">Update (2019-06-10): <a href=\"https:\/\/leancrew.com\/all-this\/2019\/06\/deprecating-scripting\/\">Dr. Drang<\/a>:<\/p>\n<blockquote cite=\"https:\/\/leancrew.com\/all-this\/2019\/06\/deprecating-scripting\/\">\n<p>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&rsquo;ve never done it before. Even &ldquo;power users&rdquo; quail at the idea of scripting until they&rsquo;ve done it a few times and survived. If the first step in learning to script is <em>Install Python via Homebrew<\/em>, they are simply going to pass.<\/p>\n<p>These new scripters don&rsquo;t care, for example, that the Apple-supplied Python is out of date, and there&rsquo;s no reason for them to. Python 2.7 is a perfectly good starting point, as is Perl 5.18 and Ruby 2.3.<\/p>\n<p>Removing scripting languages also means that those of us who know how to use them can&rsquo;t send scripts to our friends to help them automate their tasks. I&rsquo;m perfectly happy to &ldquo;slum&rdquo; in Python 2 (oh dear, I have to use the format function instead of f-strings) if that&rsquo;s what it takes.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/python-in-the-windows-10-may-2019-update\/\">Microsoft<\/a> (via <a href=\"https:\/\/news.ycombinator.com\/item?id=20123736\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/devblogs.microsoft.com\/python\/python-in-the-windows-10-may-2019-update\/\">\n<p>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.<\/p>\n<p>[&#8230;]<\/p>\n<p>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 <code>python<\/code> and <code>python3<\/code> commands that take you directly to the <a href=\"https:\/\/www.microsoft.com\/p\/python-37\/9nj46sx7x90p?Cid=AnnounceBlog\">Python store page<\/a>.<\/p>\n<\/blockquote>\n\n<p id=\"scripting-languages-to-be-removed-update-2019-06-12\">Update (2019-06-12): <a href=\"https:\/\/twitter.com\/kcrawford\/status\/1136056800544006145\">Kyle Crawford<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/kcrawford\/status\/1136056800544006145\">\n<p>Scripting runtimes and bridges should be included in an OS.  I like Swift. I&rsquo;m comfortable with Swift. But I also like ruby and python. And often they are a better fit for the job. I&rsquo;ve written a lot of Swift but I still write lots of ruby and python.<\/p>\n<\/blockquote>\n\n<p id=\"scripting-languages-to-be-removed-update-2019-06-27\">Update (2019-06-27): <a href=\"https:\/\/tidbits.com\/2019\/06\/25\/apple-to-deprecate-scripting-languages-in-future-versions-of-macos\/\">Curtis Wilcox<\/a>:<\/p>\n<blockquote cite=\"https:\/\/tidbits.com\/2019\/06\/25\/apple-to-deprecate-scripting-languages-in-future-versions-of-macos\/\">\n<p>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.<\/p>\n<\/blockquote>\n<p>If you look at the sizes of the different parts of each installation, I don&rsquo;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.<\/p>\n\n<p><a href=\"https:\/\/brettterpstra.com\/2019\/06\/26\/on-scripting-runtimes-and-macos\/\">Brett Terpstra<\/a>:<\/p>\n<blockquote cite=\"https:\/\/brettterpstra.com\/2019\/06\/26\/on-scripting-runtimes-and-macos\/\"><p>Considering how integral these runtimes are to my own daily use of my Mac, this is a real annoyance. I&rsquo;m fully capable of installing them myself, but I still find the decision baffling.<\/p>\n<p>[&#8230;]<\/p>\n<p>So while this might not be a huge blow for me, it&rsquo;s an impediment to anyone who uses my projects that isn&rsquo;t a Terminal nerd.<\/p>\n<p>[&#8230;]<\/p>\n<p>So the question is why? I can&rsquo;t wrap my head around any real benefit to Apple&rsquo;s line of reasoning on this. They&rsquo;ve not been great about keeping the runtimes up to date, but that&rsquo;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 <em>add<\/em> tools like this to the default Windows install. <em>And<\/em> they&rsquo;re including a sexy Terminal. So why is Apple moving in the opposite direction?<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/brentsimmons\/status\/1143967635987750912\">Brent Simmons<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/brentsimmons\/status\/1143967635987750912\">\n<p>I&rsquo;m one of those people who just use whatever&rsquo;s on the system.<\/p>\n<\/blockquote>\n<p>Me, too.<\/p>\n\n<p><a href=\"https:\/\/twitter.com\/peternlewis\/status\/1144067068578283520\">Peter N Lewis<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/peternlewis\/status\/1144067068578283520\">\n<p>Something that only just occurred to me is this will break every single script with <code>#!\/usr\/bin\/perl<\/code> irretrievably since <tt>\/usr\/bin<\/tt> is a SIP protected directory.  Every one will need to be edited.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/brentsimmons\/status\/1143996246069317632\">Brent Simmons<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/brentsimmons\/status\/1143996246069317632\">\n<p>Having to install Python\/Ruby\/etc. manually is gate-keeping. It might be easy for pros, but it&rsquo;s not easy for everybody.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/inessential.com\/2019\/06\/26\/i_cant_help_but_picture_the_15_year_old_\">Brent Simmons<\/a>:<\/p>\n<blockquote cite=\"https:\/\/inessential.com\/2019\/06\/26\/i_cant_help_but_picture_the_15_year_old_\">\n<p>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 <em>safe<\/em>?<\/p>\n<p>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&rsquo;ll get.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/pxlnv.com\/linklog\/scripting-languages-removed-macos\/\">Nick Heer<\/a>:<\/p>\n<blockquote cite=\"https:\/\/pxlnv.com\/linklog\/scripting-languages-removed-macos\/\">\n<p>But something about this feels both arbitrary and inherently wrong. The beautiful thing about MacOS is that there&rsquo;s a visually coherent interaction layer that most users spend most of their time in, but anyone &mdash; including a lunkhead like me &mdash; can fire up the Terminal at any time and run a script. Having that capability at one&rsquo;s fingertips just below the surface, as well as programs like Homebrew and MacPorts, makes the Mac feel limitless.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>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&rsquo;t be available by default, and may require you to install an additional package. If your software depends on scripting languages, it&rsquo;s recommended that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2019-06-04T20:16:45Z","apple_news_api_id":"2261a8df-ace7-4446-9332-808a1d53b471","apple_news_api_modified_at":"2023-02-10T15:45:05Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAACg==","apple_news_api_share_url":"https:\/\/apple.news\/AImGo36znREaTMoCKHVO0cQ","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[159,30,1666,252,71,635,232,287,1227,163,219],"class_list":["post-25548","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-applescript","tag-mac","tag-macos-10-15","tag-perl","tag-programming","tag-pyobjc","tag-python","tag-ruby","tag-top-posts","tag-unix","tag-windows"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/25548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=25548"}],"version-history":[{"count":10,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/25548\/revisions"}],"predecessor-version":[{"id":38430,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/25548\/revisions\/38430"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=25548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=25548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=25548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}