Live data from Hacker News

PowerShell is open sourced and is available on Linux

azure.microsoft.com

411–420 of 790 posts

Re: PowerShell is open sourced and is available on Linux

#411

I bought a new laptop recently, and used Windows for a little while (I didn't have time or a USB drive handy for installing Linux for a couple of weeks). I was pleasantly surprised at PowerShell. Not because of all the stuff people normally like about PowerShell; all the PS things are still confusing as hell, to me. But, because MS has embraced compromise and meeting developers where they are in ways that I have neve…

"and I can't even imagine it for server usage...how would you even do that without a decent system package manager?"

I'd be pretty hesitant myself to use it as a web-facing server. But if you're running an enterprise network, the reality is almost everything you need on your server can be added and removed from the "Add Roles and Features" wizard. There's not a whole ton of outside packages you would want to add.

If your server is running third party software, you should probably only run that one piece of software on that particular server, and that software should install everything it needs to run on it's own.

Re: PowerShell is open sourced and is available on Linux

#412
post #79

Great! So I can now run bash on windows (with WSL), open tmux, and open powershell prompts in each tab: the loop is complete! I wish powershell's documentation was a bit more clear about what's powershell 1.0, 2.0, 3.0... Etc. A lot of time I'd find a verbose and tedious way to do one thing because the code was written in "old powershell", when the latest version had a much more elegant solution (either because of ne…

Does tmux work well on Windows? Everything Microsoft has been doing recently with bash on Windows has made me consider buying a surface pro as my next machine.

Tmux came first to cygwin, and now it works on msys2. I don't know about MS-BASH, but MinTTY + msys2 + tmux has been working great for me.

Re: PowerShell is open sourced and is available on Linux

#413

Earlier quoted context omitted.

> So, yes, someone did ask for it - the IT industry. ... who couldn't use the well-known mature shell tools since they were locked into a closed platform, and Windows' cmd.exe was comparatively very weak.

It wasn't cmd that was the problem (although, it is weak); it was how Windows exposed APIs to allow automated solutions. You had two options: VBScript (which is a glorified COM+ agent) or a "real" programming language like VB6/C# which mixed COM+ with Win32 API calls (which are too hard to use for most non-programmers). Powershell within itself does improve CMD. But that isn't primarily how PS pushed Windows automati…

If all this API effort had gone into a real cross-platform language (Python, Ruby, or even Perl which was king in 2001), Windows would have flourished. They went for their traditional lock-in approach instead, so now they have to catch up.

Re: PowerShell is open sourced and is available on Linux

#414

Earlier quoted context omitted.

> So, yes, someone did ask for it - the IT industry. ... who couldn't use the well-known mature shell tools since they were locked into a closed platform, and Windows' cmd.exe was comparatively very weak.

No. The well-known mature shell tools manage files and processes - neither of which are a focus of managing a Windows system. Windows revolves around services which you RPC to, which internally store their state - attempting to faff with their state from outside the service is almost always both undocumented and likely to cause failure. Powershell allowed those services to standardise their RPCs in such a way that sy…

It's been years since I used Windows APIs -- back then there was OLE Automation, which allowed dynamically, late-bound (call by name, really) RPC calls into COM from scripting languages. Has this been superceded by something else? Using IDL-defined COM interfaces from scripts sounds like something nobody would want to do.

Re: PowerShell is open sourced and is available on Linux

#415
post #281

Earlier quoted context omitted.

I've been using bash for 20 years, trained a few hundred RHCEs, and spent a large part of my life working for Red Hat and then IBM's dedicated Linux group. So yeah maybe I don't know any better, but that's because I haven't encountered it before. Piping objects to 'where' and 'select' is simply a better approach than scraping text. The implementation details - having to use .net to make cmdlets - aren't great but the…

> I've been using bash for 20 years, trained a few hundred RHCEs, and spent a large part of my life working for Red Hat and then IBM's dedicated Linux group Neat. Irrelevant. > So yeah maybe I don't know any better, but that's because I haven't encountered it before. Okay? > Piping objects to 'where' and 'select' is simply a better approach than scraping text. Why is it better? 'Simply'? Is this unique to powershell…

We've banned this account for repeatedly violating the guidelines. If you'd like to commit to only commenting civilly and substantively, you can email hn@ycombinator.com and we'll happily unban the account if we believe you'll do so.

Re: PowerShell is open sourced and is available on Linux

#416
post #232

Earlier quoted context omitted.

[Disclaimer: I work for Microsoft.] As far as I recall, the original impetus behind what became PowerShell (as handed down to us in a conference room by Ballmer himself, sometime around 2001) was to fill the gap between ops people who did enterprise administration manually with tools like MMC and engineers who automated enterprise administration with tools like C++/DCOM. The latter were necessary in a lot of cases, b…

All those sysadmins would have been perfectly happy with just a properly working unix like shell.

Yes. Like all those early car buyers would be perfectly happy with faster horses.

Re: PowerShell is open sourced and is available on Linux

#417

Earlier quoted context omitted.

Java seemed to have a lot more options for deployments and monitoring for a long time. More advanced 3rd party libraries in general. It had simply been around longer and thus had those tools available. Now that C# has been standard for a while almost all of those tools have a C# equivalent. As a .NET dev I'd actually argue that the things available to C# now are actually better (especially Visual Studio), but that's…

> ...things available to C# now are actually better (especially Visual Studio), but that's certainly biased. You call Visual Studio good? Have you actually used it? VS2015 is painfully slow, and yes, I've installed all of the updates and I have no plugins or such. Heck, even Eclipse feels zippy compared to it. Something as simple as finding next text search match takes about a second. Changing to a different source c…

There's a box you can tick that says no to all of that stuff, though I don't know if you can access it after the first run. (I never have to log in when I run Visual Studio.)

Re: PowerShell is open sourced and is available on Linux

#418
post #93

Earlier quoted context omitted.

As a note, there have been strongly-typed shell languages for Unix for some time. Scheme Shell[0], Turtle[1] and TCSH[2] leap to mind; but there's nothing preventing a developer from using Perl, Python, Lisp or any other language that allows itself to accept stdin as an interpreted script. 0: https://scsh.net/ 1: http://www.haskellforall.com/2015/01/use-haskell-for-shell-s... 2: http://www.tcsh.org/Welcome Edit: oh m…

I've been loving using Node.js for scripts. You get all the NPM goodies plus STDIO, and they end up working just as well as shell scripts. One of the big advantages IMO is that I only need to master one language for all of my needs, from browser to server to shell :)

How do you find dealing with async? Virtually everything I'd want to do with scripting would almost certainly be async in node libraries, and while I'm willing to pay the callback / promise tax in production code, for scripts it seems like the convenience of just dealing with everything synchronously would outweigh the advantage of keeping things in one language.

Re: PowerShell is open sourced and is available on Linux

#419
A lot of people seem to be missing the point of PowerShell. The concept is far more poweful than the unix shells, because it's a superset of them. It's like Haskell and Haskell-without-types.

We could only dream we had something like strongly-typed pipes in Unix -- and that various tools supported it too.

Re: PowerShell is open sourced and is available on Linux

#420

Earlier quoted context omitted.

Java seemed to have a lot more options for deployments and monitoring for a long time. More advanced 3rd party libraries in general. It had simply been around longer and thus had those tools available. Now that C# has been standard for a while almost all of those tools have a C# equivalent. As a .NET dev I'd actually argue that the things available to C# now are actually better (especially Visual Studio), but that's…

Meh, to make Visual Studio do IDE-like things, people install things like ReSharper, built by the same people that are building IntelliJ IDEA. And I worked with both and IntelliJ is much smarter, and has support for way more technologies. And yes, it's built in Java and can be sluggish, but then again I'm using it on both Linux and OS X and runs just fine on Windows too, so it doesn't tie me to an OS I don't want. Al…

>people install things like ReSharper

This used to be true but VS2015 is actually completely fine without ReSharper. Roslyn is amazing, I've even built my own custom code analyzers (ie. compiler extensions) that integrate in to the entire ecosystem seamlessly (nuget package registers them to VS project, IDE shows you code analysis on the fly, C# compiler uses them on every build, including CI/build server - and you can enforce stuff with it - eg. raise build errors).

>but .NET lacks a build tool like Maven or something similar

There are .NET build tools, FAKE, CAKE, etc. etc. but people don't use them much, tooling integration is notably missing. It would be nice to have something like Gradle in .NET but VS support for msbuild is good enough for most.

Post reply on HN