Live data from Hacker News

PowerShell is open sourced and is available on Linux

azure.microsoft.com

191–200 of 790 posts

Re: PowerShell is open sourced and is available on Linux

#191

Earlier quoted context omitted.

So many strongly typed shells exist already. I don't understand why arbitrary microsoft shit gets so much love for doing things that have already been done in the OSS world, and doing them poorly. PowerShell is a pile of shit.

> 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 strongly-typed shell gets traction because of this, I will be happy.

I don't see why it would, or why powershell would help it get traction. There is not really a good reason to even use a strongly-typed shell, if you need strong typing why not just use a proper programming language? If you need interactivity why not use a REPL?

> That's what I'm hoping will change thanks to this announcement.

No self-respecting OSS developer would want to use powershell.

Re: PowerShell is open sourced and is available on Linux

#192

PowerShell is my guilty pleasure of the computing world. Once you've piped strongly-typed objects around between your shell commands, text scraping seems barbaric by comparison. The problem, of course, is that you can't use all that power for much, since the pool of PS-compatible tools and utilities is much shallower than it is for Unix shells. I'm really hoping this will help spur a new wave of PowerShell-compatible…

I love the strongly-typed cookies but I absolutely hate the powershell syntax. It's like C# and Bash got together and had a really ugly baby.

In my admittedly limited experience there seems to be at least 3 aliases for every keyword which makes reading someone else's code a real hassle sometimes. Our ops guys swear by it though.

Re: PowerShell is open sourced and is available on Linux

#193
post #173

Earlier quoted context omitted.

I wrote a bash script to sort processes by age on an old redhat 4 machine. What sounded like a very simple thing, quickly ended up being a complete nightmare of bash, python, and an unholy bunch of linux commands. It was ugly, and a terrible way of doing it, but we got it working. It would have been amazing if i could pipe PS into something that could sort by the dates on the 4th column, and return the last column in…

You could probably hack something together with awk, but this sort of thing is exactly why I like powershell a lot.

Yeah i ended up using awk, some python for the date parsing and sorting, back to bash for grep and another thing i can't remember, then into the program that actually needed the data.

It was a mess, and I remember thinking it would be such a simple thing that was so much more complicated than i thought it would be.

Re: PowerShell is open sourced and is available on Linux

#196

Earlier quoted context omitted.

The implicit return semantics are insane, since you can implicitly early-exit when you do things like call ArrayList.Add (which returns a bool to indicate whether the thing was added).

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.

Re: PowerShell is open sourced and is available on Linux

#198
post #192

Earlier quoted context omitted.

I love the strongly-typed cookies but I absolutely hate the powershell syntax. It's like C# and Bash got together and had a really ugly baby.

In my admittedly limited experience there seems to be at least 3 aliases for every keyword which makes reading someone else's code a real hassle sometimes. Our ops guys swear by it though.

You're supposed to avoid the aliases in scripts. Or that's what's recommended anyway.

Re: PowerShell is open sourced and is available on Linux

#199

Earlier quoted context omitted.

I love the strongly-typed cookies but I absolutely hate the powershell syntax. It's like C# and Bash got together and had a really ugly baby.

Yeah, I wanted to switch to PowerShell but then I had to call an exe with variable arguments from the PowerShell script. That was a quick way back to cmd.

Couldn't you use $() for this?

Re: PowerShell is open sourced and is available on Linux

#200
post #56
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…

You can use control-O for that, which does "execute this command as if I pressed enter, then when it's done bring up the following command in command line prompt". So if you have a set of commands to run that are 20 lines up in history, you can first find them (with 20x UP or by reverse-search), then just control-O control-O control-O control-O ... to execute them one after another.

Don't forget control-R. I find that even the GP's example of up arrow 20x to be ridiculous when I can type C-r and a few unique letters that were anywhere in the command to find it instantly.
Post reply on HN