4 ms·
> on windows This is the mistake. Linux and, I believe, OSX come with several tools pre-installed including python.
by Iv 5y ago
> on windows
This is the mistake. Linux and, I believe, OSX come with several tools pre-installed including python.
- AnIdiotOnTheNet 5y agoWindows comes with PowerShell, which is a pretty fully featured programming language that can interface directly with the .NET ecosystem.
- fivea 5y ago> Windows comes with PowerShell (...) It might be just me, but PowerShell feels outright developer-hostile even when compared to Bash. Perhaps it's their approach to rely primarily on .NET stuff which makes things so arcane, but when given the option it's far simpler and better to go with, say, python than PowerShell.
- AnIdiotOnTheNet 5y agoI couldn't disagree more, I think bash is a horrifically bad programming language. Honestly I'm incredibly surprised anyone could compare PowerShell and bash and think that PowerShell is the arcane one.
- fivea 5y ago> I couldn't disagree more, I think bash is a horrifically bad programming language. Bash is described as a "command language" and not a programming language per se. Bash is what you use to type in commands, and automate said commands if you need to whip out a quick script that runs what you would otherwise run manually. Bash, scripting-wise, is command line glue. If all you want to do is run commands with some logic, PowerShell is simply dreadful and outright developer-hostile. I doubt there is a single person on earth who uses PowerShell as a command shell like Bash is used.
- majkinetor 5y ago
- AnIdiotOnTheNet 5y agoAgain, I disagree and regularly use PowerShell as a command language --as do many Windows admins-- and much prefer its object-based pipelining and relatively sensible and consistent command and argument naming to bash's error-prone text pipeline and mixture of 2-letter abbreviations and complete nonsense names. But whatever, to each their own. This subthread was specifically about programming languages being available out of the box in OSs, so when you brought up bash my natural assumption was that meant as a programming language.
- lillecarl 5y ago> If all you want to do is run commands with some logic, PowerShell is simply dreadful and outright developer-hostile. I doubt there is a single person on earth who uses PowerShell as a command shell like Bash is used. Expand your views. Everyone aren't you, didn't learn the same things as you and understand different things than you. I learned some C++ as my first language, therefore I got stuck in an object oriented mindset, this translates really well to PowerShell and really poorly to bash. The thing where everything is text doesn't make sense, text isn't stable and everyone will write their own partially broken parsing implementation. In PowerShell they try to make everything an object, with type checking and other goodies, solid autocomplete for scripts being one. In PowerShell I can deserialise JSON and perform CRUD operations on the data easily. I'd say powershell is outright developer friendly as it brings a production grade language to the scripting table. If powershell could parse bash completion files and integrate sudo better I'd use it as a command shell on all platforms, which right now are limited to MacOS and Linux.
- williamtwild 5y agoThe problem is that you think bash is a programming language.
- majkinetor 5y agoIts bad even for one liners.
- mavhc 5y agoPeople complained about Python using whitespace, adding an extra space in bash can break the whole thing
- cxr 5y agoThe person who you're responding to is engaging with the person who they're responding to in the terms chosen by the latter. If the original commenter hadn't written, "PowerShell feels outright developer-hostile even when compared to Bash", then we might have some reason to find fault with the person who replied. Considering that's what did happen, however, this comment of yours—which is both snarky and implicitly demands the wrong person to take responsibility for the comparison—just comes across as annoying.
- majkinetor 5y agoTotally. Bash is such nonsense. Its little better then batch on Windows. PowerShell is such joy that it should be there on any Linux as default interactive shell.
- chungy 5y agoPowerShell is the worst of bash and perl combined. It's like Microsoft took a look at each of those, "We can do that!" and implemented them.... worse.
- mavhc 5y agoWhat's bad about it specifically? Main thing I don't like is verb-noun, breaks tab complete
- enumjorge 5y agoA tool shouldn’t need to come preinstalled with the OS in order to be useable. And “switch to a different OS” is not a good solution especially for cases where you don’t control the OS you run. For a long time MacOS came with only Python 2.x installed. I looked up what the latest version of MacOS comes with and came across an Apple support forum post with several responses posting conflicting answers [0]. One person got an Xcode related error. Having to install a heavyweight IDE just to get a language to run correctly is the type of needless complication the parent comment is talking about. [0] https://developer.apple.com/forums/thread/691403 https://developer.apple.com/forums/thread/691403
- lloeki 5y ago> Having to install a heavyweight IDE xcode-select --install pulls in the CLT, which is a fairly reasonably sized download given that it includes various essential dev tools including python3 but without Xcode. This is hinted at by attempting to run python3 before any install, which calls a stub prompting you to do just that. py2/ruby/perl/etc... are part of the base OS for backwards compatibility/expectations (because they were so before Xcode/CLT were even a thing) but have been marked as due for removal from base for something like half a decade. My bet is that at some point they will move to the CLT (or some other optional download) as well.
- emeth 5y ago> 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. https://apple.stackexchange.com/questions/406244/will-macos-big-sur-remove-the-default-python-installation-for-good https://apple.stackexchange.com/questions/406244/will-macos-...
- pmarreck 5y agoThat's probably for the best, as the ones that ship are often old and buggy, and Apple doesn't seem to care for maintaining them (even if they pretend to care about developers). As long as there's a way for actual developers to install these tools themselves (such as Homebrew), things will work out fine.
- throwhauser 5y agoAnytime I do anything with python on Linux or MacOS I encounter python, python3, pip, pip3, venv, virtualenv, conda, poetry... so much machinery around the code. Throw in your platform-specifc package manager of choice as well (apt, brew, etc) EDIT: Oh and pipenv!
- young_unixer 5y agoWhich creates more problems than solutions. If the Python version that comes with your OS is not the one you want (e.g. it's outdated), then you'll have to: 1. Install the version you want anyway, and all the tools required (that usually don't come preinstalled in the OS) 2. Try to not make them collide, which, last time I tried, was a PITA, because the OS depends on original version of Python being in the the $PATH or something. Python on Ubuntu is notoriously misleading for newbies, because even if you apt install python3 and it tells you that it's already installed, it's not fully installed. For example, venv is not installed, you have to `sudo apt install python3-venv` and do that for every Python module that's not installed by default. It would be easier if Linux didn't come with Python, and then people simply installed the actual, full version of Python they wanted.
- f1refly 5y ago>and then people simply installed the actual, full version of Python they wanted. Which then wouldn't work for all the repository python programs. The repo's python is what everything is built and tested against, so there is no replacing that.
- young_unixer 5y agoThe package manager could install its own version of Python, isolated from the rest of the system, so that it doesn't get in the way of the user, but repository programs know where it is and can use it.
- dan-robertson 5y agoI wanted to focus on a ‘first introduction to programming’ which on average means windows. Obviously installing and running python can be easier on Linux but you still have problems with anything not-just-text.