Question for the more seasoned Mac/Linux folks on HN: Powershell has been a gift in getting things accomplished in Windows. But one thing I've also come to enjoy using it for is quick and dirty interactions and scripting with REST APIs. Things like Invoke-WebRequest, ConvertTo-Json/ConvertFrom-Json, Export-CSV, piping between almost everything, and the results being passed around like an object that I can use SQL-ish…
Jeffrey Snower was originally demoted over PowerShell
131–140 of 153 posts
Re: Jeffrey Snower was originally demoted over PowerShell
#132Earlier quoted context omitted.
> mit vs. GPL By this measure, we shouldn't be using X or Wayland because they're MIT. > pipe-and-filter vs loaded DLLs At first I didn't understand what you were referring to, but I realized you were talking about cmdlets. In that regard, PowerShell is more like a scripting language than it is like a traditional Unix shell. The more "Unix-like" approach would be to write thin command-line wrappers around the librari…
Regards the licencing: you are right. I was a vit blinded by the core gnu tools. Tiny wrappers do not work since .NET, while being very Performanz will never be C like tiny.
I meant tiny wrappers around non-.NET libraries, to approximate the functionality you get in PowerShell in a traditional UNIX shell.
Re: Jeffrey Snower was originally demoted over PowerShell
#133Earlier quoted context omitted.
... Neither? It's a superior alternative to cmd.exe. bash has never been a serious contender for Windows. Before PS you always wrote .bat scripts for cmd.exe (or .vbs for cscript.exe if you were really depraved). Nobody except Linux-first FOSS authors would expect Windows users to have cygwin / msys / mingw32 installed. PS gave us a saner choice, though we would still usually bundle it with a .bat wrapper, just to a)…
But instead of coming up with PS, it would have been pretty straightforward to just install bash on Windows. Someone chose to go the PS way rather than the bash way. My question is what the reason was for making this choice. > Nobody except Linux-first FOSS authors Bourne shell and its predecessors and successors are traditional and common on most computer systems since the early 1970s (starting with the Thompson she…
> "The question is, why go for PS instead of adopting a regular shell."
The question is, why stick with 1970s stuff when you can have progress?
Re: Jeffrey Snower was originally demoted over PowerShell
#134Question for the PowerShell afficionados: Do you consider PowerShell to be "something we can count on to exist on Windows systems, in the absence of Bourne-like shells" - or is it "a superior alternative to Bourne shells which only got traction on Windows because Bourne is too deeply embedded in the Unix world"?
Once, yes; then they renamed it "Windows PowerShell" and deprecated it so it's no longer being developed. Instead they started trying to appeal to Linux users with new cross-platform "PowerShell" which you have to install separately. Windows PowerShell is increasingly falling behind that in performance and compatibility. We're heading away from "PowerShell included" back to the old world of "if you have to download and install something to get away from this abandonware legacy thing, why not Python or node.js?".
> "a superior alternative to Bourne shells which only got traction on Windows because Bourne is too deeply embedded in the Unix world"?"
It's a superior alternative to Bourne shells on Windows, and because it's basically Microsoft-Perl or Microsoft-Clunky-Python as well as being a shell, as in - it's more capable than Unix shell because it's a kitchen sink of scripting and programming language as well as command line.
Re: Jeffrey Snower was originally demoted over PowerShell
#135Question for the more seasoned Mac/Linux folks on HN: Powershell has been a gift in getting things accomplished in Windows. But one thing I've also come to enjoy using it for is quick and dirty interactions and scripting with REST APIs. Things like Invoke-WebRequest, ConvertTo-Json/ConvertFrom-Json, Export-CSV, piping between almost everything, and the results being passed around like an object that I can use SQL-ish…
Curl, jq is the good answer here. More from the fringe, I'm quite enjoying zx, a really nodejs powered scripting environment. https://github.com/google/zx Covered somewhat in ZX 3.0 https://news.ycombinator.com/item?id=28195580 (189 points, 8 months ago, 163 points)
Technically true in some sense, but not really.
Re: Jeffrey Snower was originally demoted over PowerShell
#136Re: Jeffrey Snower was originally demoted over PowerShell
#137Earlier quoted context omitted.
As a mac user, I was going to provide a flippant answer, but I decided to look into it instead. Personally, I use zsh or a custom built shell scripting library inside swift. Always like to see improvements to shells though. Googled for it and got a dozen guides on how to install it in mac, but none that actually explained how to use it. (One video result looked like it might have some info, but to me that doesn't cou…
I'm certain I once wrote a long rant about why I think the concept of PowerShell (using objects instead of text as interface) is interesting but it fell flat on execution and felt like something in the uncanny valley between *nix shells and Python/Perl, with a thousand papercuts. I'm not gonna dig that out, but to add some points I can remember at the moment to yours: - Write-Output and friends try to be smart and pr…
I'm quite sad that gdb doesn't have something similar: 'step in my application only' no I don't want to step into the STL shared pointer dereference implementation for the n-th time!
Re: Jeffrey Snower was originally demoted over PowerShell
#138Earlier quoted context omitted.
... Neither? It's a superior alternative to cmd.exe. bash has never been a serious contender for Windows. Before PS you always wrote .bat scripts for cmd.exe (or .vbs for cscript.exe if you were really depraved). Nobody except Linux-first FOSS authors would expect Windows users to have cygwin / msys / mingw32 installed. PS gave us a saner choice, though we would still usually bundle it with a .bat wrapper, just to a)…
But instead of coming up with PS, it would have been pretty straightforward to just install bash on Windows. Someone chose to go the PS way rather than the bash way. My question is what the reason was for making this choice. > Nobody except Linux-first FOSS authors Bourne shell and its predecessors and successors are traditional and common on most computer systems since the early 1970s (starting with the Thompson she…
Re: Jeffrey Snower was originally demoted over PowerShell
#139Question for the more seasoned Mac/Linux folks on HN: Powershell has been a gift in getting things accomplished in Windows. But one thing I've also come to enjoy using it for is quick and dirty interactions and scripting with REST APIs. Things like Invoke-WebRequest, ConvertTo-Json/ConvertFrom-Json, Export-CSV, piping between almost everything, and the results being passed around like an object that I can use SQL-ish…
Re: Jeffrey Snower was originally demoted over PowerShell
#140I've often wondered why powershell hasnt taken off on linux/mac. I'd guess MS would have a good case for investing there (given, eg., linux usage on azure). Particularly in the recent history of "every day, another shell" on linux/mac. Powershell seems to solve the problem being resolved in rust,go,scala,... over-and-over. Why not just use that?
Look, I’ve written a lot of powershell, and I don’t mind it at all, but its not surprising at all to me. Powershell isn’t in the same problem domain as rust/go/Scala/python. The niche it fills is “calling windows apis from c++” or, more recently, c#. It’s less effort than that, so it’s useful, on windows. It is not less effort than using say, a bash script on other platforms because it: - does not provide unique acce…