Live data from Hacker News

PowerShell is open sourced and is available on Linux

azure.microsoft.com

221–230 of 790 posts

Re: PowerShell is open sourced and is available on Linux

#221

How much does astroturfing pay?

We detached this subthread from https://news.ycombinator.com/item?id=12313389 and marked it off-topic. Baseless accusations of astroturfing are not allowed on HN. If you believe this is happening and you have evidence, please email us hn@ycombinator.com and we will happily investigate.

Re: PowerShell is open sourced and is available on Linux

#222
post #17

Earlier quoted context omitted.

As a full-time Linux user, I have to say that bash is overrated. For instance, on Windows I could press the up arrow through my history 20x to find a group of commands I want to run, press Enter, then press DOWN for the following command, then enter, then DOWN until I run them all. In Bash, I need to press UP 20x every single time. Yes, you can customize it a lot, and you can script it but default bash isn't that spe…

>For instance, on Windows I could press the up arrow through my history 20x to find a group of commands I want to run, press Enter, then press DOWN for the following command, then enter, then DOWN until I run them all. In Bash, I need to press UP 20x every single time. I know other users have addressed this issue in other comments with solutions, but you do know this isn't an issue with Bash so much as it is with rea…

I actually did not know that.

Re: PowerShell is open sourced and is available on Linux

#223

Earlier quoted context omitted.

> So many strongly typed shells exist already. But no one uses them, and no one is building an ecosystem around them. That's what I'm hoping will change thanks to this announcement. Even if it's not PowerShell itself, if a different strongly-typed shell gets traction because of this, I will be happy. That's what I was trying to say with my comment.

> But no one uses them, and no one is building an ecosystem around them. About as many people that use powershell, the only people I've seen say nice things about powershell are microshit fanboys that don't know any better. Not sure what you mean by 'ecosystem'.. a very ambiguous term. Linux already has a 'shell ecosystem' far superior to anything windows has. > Even if it's not PowerShell itself, if a different stro…

> the only people I've seen say nice things about powershell are microshit fanboys that don't know any better.

I really like Powershell. If you install RHEL or Fedora I'm the 'mikem' in the default /etc/sudoers file.

Re: PowerShell is open sourced and is available on Linux

#224

Earlier quoted context omitted.

I know the problem you are talking about - it has bitten all of us. The new language mode you use when writing classes in PowerShell shifts the needle more towards programming semantics than shell semantics and addresses this. Give it a try! Jeffrey Snover [MSFT]

Interesting. I'll have to look into it. Thanks.

Our goal is to be incapable of sustained error. :-)

Jeffrey Snover[MSFT]

Re: PowerShell is open sourced and is available on Linux

#225
Powershell is a horrible abortion, what the hell do people see in it? I mean that on a language level, I cant speak for Windows specific features. I have once written a simple script to copy a folder recursively to a fileshare, rename some stuff, edit some files. Took me 4-5 hours. I then did it with julia in 30 minutes and I never did anything in either language before that. It's insane the kind of weird language crap you have to deal with, the weird options that some functions need and worst of all: That the functions have weird problems, like I dont remember the specifics but I'm pretty sure that the folder copy function had no option to actually recursively copy all of them. I had to work around that. Then I had to work around some more specifics around file/folders. In a normal language you would just call something like "copyFolder(srcPath, dstPath, recursive: true)" nope.

Re: PowerShell is open sourced and is available on Linux

#226
post #202

This might come across as a little rude, but I really wish Windows developers stayed away from Unix. I moved away from Windows a long time ago because I didn't want anything to do with Windows or Microsoft, and I went to great lengths to avoid their software and their proprietary file formats. Now we had command-line interfaces, desktop environments, running on top of an incredible, powerful Unix-like OS. It was free…

"Um excuse me, but I really like dogs. However, I don't like you, so I don't want you making movies about dogs. Dogs are my thing. Stay away from the concept of dogs."

Re: PowerShell is open sourced and is available on Linux

#227
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…

This is why I find PowerShell to be an answer to a question nobody asked. If bash/zsh isn't cutting it for you, drop into something like Python, Ruby or Perl to do the heavy lifting. PowerShell will never accumulate a library as comprehensive as what any of those three have, each has had decades to accumulate packages of all kinds, and more are still being added. It's odd, but not surprising given their history of "N…

> This is why I find PowerShell to be an answer to a question nobody asked. If bash/zsh isn't cutting it for you, drop into something like Python, Ruby or Perl to do the heavy lifting.

I'm not sure this is really right though. You could make the same argument against Ruby or Python in favor of Perl or Pike, could you not?

PowerShell syntax is quite minimal, has a novel methodology for strongly typed interactive use, and has the ability to directly invoke managed code. You can write shell components in any .NET language and invoke them (with care at writing time, this can be done very cleanly, but even without said care it's possible with a bit of a mess).

> PowerShell will never accumulate a library as comprehensive as what any of those three have, each has had decades to accumulate packages of all kinds, and more are still being added.

It has the entire .NET library at its disposal. I certainly never feel a lack of support using it.

Re: PowerShell is open sourced and is available on Linux

#228
post #5

Microsoft is projecting that the .NET ecosystem will become a main revenue driver, regardless of the underlying operating system.

By giving everything away for free?

The only related revenue stream M$ seems to have left is Azure with some vague notion that giving away their ecosystem will drive people to use their cloud more

Re: PowerShell is open sourced and is available on Linux

#229
post #61

Is this actually useful? I always thought powershell was largely just for interacting with windows components, like installing an msi or talking to active directory. What would you actually practically use this for on a linux box?

Scripting. While I typically use Bash on Windows to use grep to interactively test my webserver, I'm much happier using Powershell ISE (which I don't know was ported [1]) to write standard tests with multiple parts, particularly ones that require e.g. checking cookies on the response. 1. Looks like they ported a service that does the same. https://github.com/powershell/powershelleditorservices

Yes, and there's an extension to use it from VS Code[1]. It works pretty well (autocomplete, F8 to run a script, debugging, go-to-definition, etc.). The fact that it's a language server means it can be used from other editors to (although I don't know if any other extensions exist).

[1] https://marketplace.visualstudio.com/items?itemName=ms-vscod...

Re: PowerShell is open sourced and is available on Linux

#230
post #17

Earlier quoted context omitted.

As a full-time Linux user, I have to say that bash is overrated. For instance, on Windows I could press the up arrow through my history 20x to find a group of commands I want to run, press Enter, then press DOWN for the following command, then enter, then DOWN until I run them all. In Bash, I need to press UP 20x every single time. Yes, you can customize it a lot, and you can script it but default bash isn't that spe…

If you put this in your `~/.inputrc` [1]: "\e[A": history-search-backward "\e[B": history-search-forward "\e[C": forward-char "\e[D": backward-char you can start typing a previous command and go up through your history for all commands starting with whatever you currently have typed into the bash shell. Reset the scrolling through the history with `ctrl+c`. Personally, I hate that powershell remembers your position i…

I think I tried something like this once before, and it broke something else. I can't remember what that was, so I'm totally trying this.
Post reply on HN