Live data from Hacker News

PowerShell is open sourced and is available on Linux

azure.microsoft.com

171–180 of 790 posts

Re: PowerShell is open sourced and is available on Linux

#171
post #32

Earlier quoted context omitted.

Is this really so useful in practice? I have never used PowerShell before (nor do I have plans to do so in the near future), but I would imagine the downside is complexity, both for user and especially for developers. With text you just read and parse, while with objects you need to know the object type, its fields,... Whatever happend, I hope text stays here (and I have a bad feeling about it ever since I met system…

> With text you just read and parse, while with objects you need to know the object type, its fields parsing is actually a huge pain in general. a lot of unixy tools produce different output when their stdout is not a terminal to be more pipeline-friendly. That output is generally easier to parse (often tab-separated or so), but you still need to know the same things about the output (the "type" could be whether it c…

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 the sorted order.

Re: PowerShell is open sourced and is available on Linux

#172

Earlier quoted context omitted.

Except that they added a bunch of new warts that don't have any relation to CMD.EXE. They took the opportunity to re-invent how a shell works from the strongly-typed object perspective but then they copied some of terrible syntax of 40 year old unix shells. I just don't understand it. I'd rather write scripts in pure C#.

The point of PowerShell isn't just to write scripts but to work as an interactive shell.

I'm not at all convinced that the syntax is any better for typing in as commands in an interactive shell.

Re: PowerShell is open sourced and is available on Linux

#173

Earlier quoted context omitted.

> With text you just read and parse, while with objects you need to know the object type, its fields parsing is actually a huge pain in general. a lot of unixy tools produce different output when their stdout is not a terminal to be more pipeline-friendly. That output is generally easier to parse (often tab-separated or so), but you still need to know the same things about the output (the "type" could be whether it c…

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.

Re: PowerShell is open sourced and is available on Linux

#174

Gates pioneered copyright protection for source code. Ballmer said Linux is cancer. This company has betrayed its own values. Actually it hasn't. The strategy is always the same: destroy the competition. Undersell. Even give away software for free. Whatever it takes. Money to burn. What's interesting is that they see the UNIX shell, which has long been open source and free, as competition.

> Ballmer said Linux is cancer

He more or less said that the GPL is cancer which is pretty accurate. The entire quote is

"Linux is not in the public domain. Linux is a cancer that attaches itself in an intellectual property sense to everything it touches. That's the way that the license works"

Not very nice but not entirely wrong either.

Re: PowerShell is open sourced and is available on Linux

#175

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…

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.

Re: PowerShell is open sourced and is available on Linux

#176
post #86

Gates pioneered copyright protection for source code. Ballmer said Linux is cancer. This company has betrayed its own values. Actually it hasn't. The strategy is always the same: destroy the competition. Undersell. Even give away software for free. Whatever it takes. Money to burn. What's interesting is that they see the UNIX shell, which has long been open source and free, as competition.

Just like Google, Apple, IBM, etc. etc. etc. I'll join in on the Microsoft bashing club when every other major corporation gets bashed the same way by devs. The day that will happen is when socialism makes more sense to people than capitalism, and it becomes a pervasive idea, but sadly, I think that day won't be coming around any time soon. Until then, let's enjoy the fruits of capitalism.

I've been enjoying the fruits of Bell Labs and UC Berkeley.

I'm not a "dev" or even a Linux or Bash user. I like the simplest Bourne shells the best. Plan 9's rc is also good.

I've never enjoyed using Microsoft Windows. (But if they gave away the source for NT kernel I might find use for it, after a lot of work trimming it down to size.)

Maybe the size and power of UNIX has spoiled me.

MS obsessively focuses on their competition to the detriment of users and software quality.

Re: PowerShell is open sourced and is available on Linux

#177

Having powershell + bash on linux lets me compare this way: powershell, 14 pids(threads?), 3119M Virt size, 80160kb Resident. bash, 1 pid, 22068kb Virt, 3976kb Resident. And this is simply starting the process to an idle prompt. This is on a Debian 8 64bit system. (using their Ubuntu 14.04 binary)

Powershell is essentially running a JVM stlye virtual machine in the background though.

Re: PowerShell is open sourced and is available on Linux

#178
post #140

Earlier quoted context omitted.

Well, yeah, but I mean the concept (grepping in tabular data). If, hypothetically, bash had database integration, ls Columns would probably return something like foo varchar 30 NOT NULL bar decimal 8 baz int 4 Which would be a royal PITA to search for anything in—if I were to search for ‘int’ I'd get all int columns and any columns with int in the name…. I could've used an example involving process lists, but I didn'…

But thats why there are tools like awk.

awk is rather similar in many ways to powershell, actually, but untyped. I agree most of what powershell does you can do with awk, but it's often less pleasant than powershell (in my experience).

Re: PowerShell is open sourced and is available on Linux

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

Last IronPython release: 2014

Last IronRuby release: 2011

Re: PowerShell is open sourced and is available on Linux

#180
post #54
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…

Bash is 27 years old. It was written to replace the Bourne shell, which is 39 . It is not terribly surprising that a 9 year old tool like Powershell made some improvements over an earlier tool that was already old enough to vote!

I don't see a tremendous amount of accumulated wisdom in Powershell. It may be newer, but I'm not sure they looked at prior art or had design members who were shell gurus in any other shell than `cmd.exe`, which is a horrific shell. Why are commands horrendously long in powershell? If you spend time in the shell, you don't want your fingers falling off due to overuse. Aside... one of the design decisions Microsoft took that absolutely blows my mind is using `\` for file hierarchies instead of `/` when you're writing an operating system in C!
Post reply on HN