1. 38
  1. 21

    Back in the 80s Apple liked to advertise the computer as a bicycle for the mind. Now I think it considers computers as Barcaloungers for the mind: consumption devices, to be used for watching movies, listening to music & playing games; owned only legally by their users but managed by Apple (to the point that only Apple-approved software is permitted on them).

    From that mindset, what sense does it make to ship tools which can be used to create? Creation is an activity best performed in California, in LA by Disney, or in San Francisco by a partner firm or at the Cupertino mothership; Billy in Kansas should just sit and enjoy his curated experience.

    It makes me really sad — I was a huge Mac fan back in the days of System 7 & System 8. I’m really glad that I got into Linux 20 years ago. Often it feels that I escaped, like one of those refugees who managed to cross the Iron Curtain to the free world. Yeah, life can be messy and complex here in GNU, but I can control my destiny.

    Well, except for systemd😉

    1. 5

      Yeah, it’s a shame. I recently taught a classroom full of high school students a bit of Python, and I was quite thankful that Python came standard with all macOS installations. It would have been much more difficult to get Python onto their laptops otherwise. In all honestly, I probably would have resorted to teaching them Javascript through the browser instead.

      1. 1

        There is asdf 1 which makes that really easy to install most of the interpreters.

        1. 16

          I think you’re underestimating the difficulty of installing software on laptops owned and operated by a high school. There is a world of difference in the friction between “yeah give me any macOS laptop and I can roll with it,” and, “oh actually can you install this asdf thing. Please have your high school students with zero programming experience follow the instructions on this github readme to install it.”

          1. 1

            I understand it very well, but it is not that hard with prepared shell script. Additionally I think that most of these languages will be present in Xcode command line tools, these languages just will not be supported OOtB so the installers should not rely on them.

            1. 3

              I don’t think the laptops the students were using had Xcode installed? At least, I’m not sure.

              But yeah, for these students, we spent a long time just making sure everyone could type in a single curl command. Having them install software too would be nuts. I could have perhaps gotten the IT staff to do it, but even that’s unreliable.

              Anyway, all I’m trying to say is that having Python right there and ready to use was really useful. I imagine it would be similarly useful in other environments that are locked down. I mean, my wife works for a company where she needs to have IT come and install Python for her on her workstation. Nuts.

          2. 4

            Okay, I was very confused by that suggestion. Naming things is hard.

          3. 1

            Could you not direct them to use Python in the browser, with something like Skulpt? (It was the top hit when searching for “python in the browser”).

            1. 8

              Yes, I did quite a bit of research on doing it that way, and I might have done that instead of Javascript if I couldn’t get Python to work on their machines. I had eventually settled on using repl.it as my backup, and even had the IT folks at the school test it to make sure it would work in whatever laptops the kids would use.

              However, I’m just not a fan of that approach. It’ll work if there are no other options, but I really wanted the kids to get a taste for how programmers actually work. Most or all programmers I know don’t write Python code in the browser as part of their normal day-to-day work. So I set the kids up with the closest thing to the real world I could get: two side-by-side terminals, with one in nano editing source code and the other in a shell for running the program. If Python wasn’t installed, this would have been more difficult to pull off. Moreover, falling back to the browser is hard to do on the spot, because the lesson plan I devised is necessarily (because these are complete beginners) coupled to their environment.

              If you’re curious, this is what I handed to the students at the beginning of class, and then I handed them the answers at the end.

              I think my original point stands. It’s nice to have something there by default for cases like these. There are a million work-arounds, but nothing as nice as something that Just Works. Running the code on their computer also has little victories that are hard to get if you send the code off to some server somewhere. For example, one student accidentally wrote an infinite loop that locked up their entire machine. I had to force reboot his laptop to get him back up and running. The students loved that kind of crap, because it gave them something real and tangible to experience: Wait, the code I just wrote made my machine lock up? Wow.

              1. 2

                That’s a thoughtful answer and approach. I understand what you mean by wanting things to feel more “real” and closer to the metal, to make a greater impression on the kids. If it’s on a webpage, then what makes it different from all the other webpages? But if it can crash the machine or spin up fullscreen graphics , then that’s different, and more interesting.

                I have two kids and I want to teach them to type commands at the command line as one of the fundamental ways to make fun things happen on the computer, like starting a game or showing some ASCII graphics (aliases for ponysay has been a hit). I’m not sure if it’s mainly nostalgia from my own childhood or a good way to create an interest in typing words that makes computers do interesting things, but I’m hoping for the latter.

          4. 3

            The essential notion of the modern computing device is a consumption oriented one. Those of us who walk towards freedom might be called vegans, according to a recent widely linked essay. Which gives one a notion of the slide towards consumption.

            Having a decent general purpose programming system readily available is a chainbreaking thing.

            For some of us, this is all antithetical to freedom; the difficulties of GNU/Linux are the price of freedom.

            1. -1

              I remember when they stopped shipping Hypercard with MacOS. It’s about when they stopped really mattering.

            2. 5

              Interesting to see this on the front page together with the article that bash is being replaced by zsh as the default shell on the Mac.

              Two questions spring to mind:

              1. The bash/zsh switch is clearly motivated by licensing issues, not technical ones. Is the removal of Python, Ruby, Perl and friends also motivate by license issues?

              2. Is zsh not regarded as a “scripting language”?

              1. 11

                Is the removal of Python, Ruby, Perl and friends also motivate by license issues?

                I think not as all of them are on quite liberal licenses. I think the main reason for removal of these scripting languages from “core” is that these do not provide much value by default as almost anyone who need to work in these languages will install them separately via external package/version manager. And not having them in core will actually help, as there will be less confusion and version conflicts.

                1. 7

                  Is the removal of Python, Ruby, Perl and friends also motivate by license issues?

                  My guess is “everyone who uses them installs a newer version from Brew/etc”.

                  1. 1

                    Is zsh not regarded as a “scripting language”?

                    Perhaps? It’s certainly not as well known as sh/bash, which are not really promoted as scripting languages. Maybe in the future the stuff that used to rely on Perl/Python/Ruby on macOS will use zsh.

                  2. 3

                    The same year Microsoft is proud to add a new terminal app with the full support of bash and everything to please developers.

                    Is Microsoft actually distributing a GPLv3 licensed copy of Bash with every Windows install? I’m surprised their lawyers are comfortable with that.

                    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’ll have ten of them, and you’ll have to play with paths to pick the right one, like Windows.

                    Why is the author acting like this wasn’t already a problem– since OS X shipped with old versions of runtimes, installing N project’s depended-upon versions of Ruby/Python et al required having N+1 versions installed to begin with. This just drops it down to N.

                    And for someone supposedly concerned about the QoL of scripting devs, the author is oddly ignorant, or deliberately acting ignorant, of the fact that the Ruby/Python/et al communities developed tools to automatically manage paths for switching between different runtime versions a decade or more ago. It’s an absolute non-issue.

                    1. 3

                      Is Microsoft actually distributing a GPLv3 licensed copy of Bash with every Windows install? I’m surprised their lawyers are comfortable with that.

                      It’s an add-on you can get from the Windows Store. Naturally, at the bottom of the product page, you find links to the licensing terms and websites where you can get the source code. You could also use apt to fetch the source deb packages after installing it.

                      Which is kind of the same deal that Apple has with Xcode, so, no, I don’t see much difference with where they’re going. Microsoft’s just starting from a different place.

                      1. 1

                        Which is kind of the same deal that Apple has with Xcode, so, no, I don’t see much difference with where they’re going. Microsoft’s just starting from a different place.

                        Yeah, that’s basically my read on it as well

                      2. 3

                        Is Microsoft actually distributing a GPLv3 licensed copy of Bash with every Windows install? I’m surprised their lawyers are comfortable with that.

                        Perhaps Microsoft’s lawyers actually understand GPL3, then. Nothing about it is dangerous for Microsoft in this case.

                      3. 3

                        installers and AppleScripts can no longer lean on other scripting languages.

                        That kind of sucks. I used to write scripts for my father to speed up menial tasks, like merging audio channels from separate audio files into a single file, which would’ve otherwise taken him days, and I loved how I could write the scripts in Ruby and then occasionally call out to AppleScript when I needed some text input or to choose a file. When it was done it was just a matter of creating a few folders, a manifest file, and adding the shebang line to my script, without having to bother with bundling Ruby or anything dumb like that.

                        1. 2

                          fwiw homebrew already bundles/install a new version of ruby for their installer, it doesn’t rely on the system version

                          this also sorta follows what red hat is doing in rhel/centos 8 where they aren’t picking anything as python, instead shipping python2 and python3

                          1. 2

                            Maybe there’s a need for Swipt - a Swift-like scripting language.

                            1. 2

                              No need for a separate language, Swift is very well fit for this, you only need some good libraries for it.

                              1. 2

                                Is a swift interpreter actually installed by default? I’m not a mac person but I would’ve thought you’d need xcode for that. (I know, some people could easily install it, but see what burntsushi wrote about macs at school for example)

                                1. 1

                                  Ah yeah it’s not installed by default, but this isn’t needed for something to be a scripting language at all.

                            2. 2

                              Scripting languages are being removed, yet Python will apparently be updated to 3 for LLDB for XCode. Can we assume that LLDB is embedding Python, thereby not leading to a system-wide Python 3 being available by default in Catalina?

                              If so, that’s a bit of a shame. While system Python installations are best avoided, they can be useful for bootstrapping isolated versions with invocations like python3 -m venv.

                              Even so, I understand Apple wanting to simplify the basic tools in their OS from the “every popular Unix program you’re used to, preinstalled” approach from the early Noughties.

                              1. 5

                                Maybe Python 3 will not be present OOtB but it will be installed when you install xcode-tools.

                              2. 2

                                Is anybody else a little annoyed by all these people referring to Python and Ruby as scripting languages ಠ_ಠ

                                1. 11

                                  no, ‘scripting language’ has a well-understood meaning and perl, python and ruby certainly qualify

                                  1. 1

                                    “Scripting language” isn’t a very good distinction. People typically mean that the main implementation of it is an interpreter instead of a compiler, but defining a language by its implementation detail is a bit of questionable choice. Just because the implementation changes but the syntax and semantics doesn’t shouldn’t fundamentally change what a language is.

                                    “Scripting language” used to mean a programming language that was part of a larger system, a smaller thing for automating the execution of tasks, something that ran only within a specialised environment like an IRC program or a web browser, such as e.g. javascript or mIRCscript. That usage is almost dead now.

                                    And sometimes people are just ambiguous about which one of these two they mean.

                                    1. 2

                                      After having considered this a bit, I’d defined “scripting language” as

                                      • interpreted - i.e. no compilation stage before executing the source
                                      • has good “hooks” into the computer’s file system and stuff like the Internet

                                      So that would cover Perl, Python and Ruby, even if Perl explicitely grew out of the smaller, more specialized text processing tools like sed and awk, while Python approached the domain after having been designed as an educational tool.

                                      1. 2

                                        i’d define it as a grab-bag of features including:

                                        • dynamically typed
                                        • effectively interpreted (i.e. if it’s compiled under the hood that should be transparent to the user)
                                        • good support for strings, lists and hashmaps, almost always including syntactic support and data literals
                                        • having, as you note, good out-of-the-box support for filesystem operations and talking to the world
                                        • the possibility to wrap and use C libraries
                                        • eval
                                        1. 1

                                          Except for dynamic typing, all of this sounds like D, although you can sort of get something like dynamic typing in D via compile-time type inference.

                                          Hell, if you use ghci, it also kind of sounds like Haskell. Or due to REPLs, it sounds like most or all lisps.

                                          I still don’t think “scripting language” is a clear or useful distinction.

                                        2. 1

                                          I think I’d be able to qualify D as a scripting language, since it has curl in its stdlib (and obviously, filesystem), and you can use rdmd as a shebang, therefore getting rid of an obvious compilation step.

                                          1. 1

                                            That’s interesting to know!

                                            1. 3

                                              But note that rdmd is still a compiler. It just happens to be a “dumb” compiler that never frees memory during the compilation step, hence does no memory management and is therefore speedy enough to match most interpreters’ warmup time.

                                              On the other side, most interpreters nowadays also do at least a little compilation. Python’s pyc files are one of the more obvious examples.

                                              I’ve also heard people who have only used Python refer to C++ code as “C++ scripts”. The “scripting language” distinction really is nebulous.

                                    2. 1

                                      But you think it’s ok to refer to Perl as one? Why?

                                      The term is from the XCode beta release notes.

                                      1. 0

                                        I omitted Perl because I’m not as familiar with its internals. Both Python and Ruby compile to bytecode, and Ruby recently added a JIT. So neither language is interpreted.

                                        1. 4

                                          Taken from wikidepia:

                                          The term “scripting language” is also used loosely to refer to dynamic high-level general-purpose languages, such as Perl, PowerShell, Python, and Tcl.

                                          The term “scripting language” is a characterization of a language itself: being dynamic, high-level, and well-suited to small programs.

                                          The term “interpreted” is a characterization of a particular implementation: is their an interpreter involved in running it? So a language can be both a scripting language and interpreted.

                                          That said, both Python and Ruby are in my mind interpreted. They compile to a high level bytecode, which is subsequently interpreted. There are also interpreters for C, C++, and other non-scripting languages. Does that make them interpreted? Kind of, yeah, but I’d argue you wouldn’t apply the term “interpreted” to a language itself unless its one of the most common ways of running it.

                                          1. 1

                                            Script language vs compiled language. The unit of distribution for all three is still raw source code, or script.

                                            1. 0

                                              go get downloads source code and compiles locally. But Go is a compiled language.

                                            2. 1

                                              Thanks for the clarification!

                                              I’ve not really thought about whether a language compiles to bytecode as a characteristic of being a “scripting language”.

                                              Also, does Perl 5 have a bytecode stage? It depends.

                                        2. 1

                                          I don’t think this will be a hurdle for the groups of people being discussed in this thread…

                                          1. No developer uses system python/perl/ruby.
                                          2. This is a complete nonissue for schools. Every school that I know of that teaches Python needs to install a Python IDE or some kind of text editor anyway, so adding on one more Python installer .pkg makes no difference in the authorization process.

                                          The real issue comes with people writing scripts that rely on a Python / Ruby / Perl interpreter being present. That might be hard to work around, but the people using those types of random scripts are developers and can probably figure out how to install the interpreter.

                                          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’ll have ten of them, and you’ll have to play with paths to pick the right one, like Windows.

                                          This is already an issue. I welcome turning my N Python installs into N - 1 Python installs.

                                          1. 1

                                            No developer uses system python/perl/ruby.

                                            Quite false. When I am writing tools for a wide audience, I avoid forcing version issues on my users. When it is practical to write a script without requiring anything other than the current major version of the language – i.e., Perl 5, or Ruby 2 – I do so.

                                            (Let’s not discuss Python 2 vs 3.)

                                            1. 1

                                              You have the newer versions installed surely? Removing the older ones by default probably won’t affect you.

                                              1. 1

                                                It’s not my machine that is the problem, it’s the dozens of machines I don’t control!

                                          2. 1

                                            Pardon my ignorance, but isn’t this just saying you will need to invoke python3 deliberately instead of having 2 installed?

                                            1. 1

                                              I do not think so. It seems like article is saying that eve Python 3 will not be available in future versions of MacOS