Live data from Hacker News

PowerShell is open sourced and is available on Linux

azure.microsoft.com

421–430 of 790 posts

Re: PowerShell is open sourced and is available on Linux

#421

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)

I'm not a huge fan of PowerShell but you're not really making a good comparison here. Bash is "just a shell" that executes commands with a few bits of syntactic sugar here and there to make it easier to string those commands together and perform some primitive logic. PowerShell is basically an interpreter that works more like a Java Virtual Machine. Consider the hypothetical example that you need to lookup 100 users…

So I wonder how it compares to having the python interpreter open.

According to my machine, running the python interpreter results in 1 PID, 129M virt, 4.6M res.

Re: PowerShell is open sourced and is available on Linux

#422

Earlier quoted context omitted.

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

That is not quite right. At the end of the day it is all about automation. But we took the position that the way Admins automate is by scripting the things that they do in an interactive shell. Bruce Payette had a great way of saying it - he said that the lifecycle of 99% of scripts starts at the prompt and ends at the carriage return. Then, somethings you want to codify things so you put it into a script. Then as th…

As one of those enterprise pseudo-sysadmin-scripting-guy, I do agree with the sentiment; and I think the fundamental object-ness of PS was nice and the emphasis on docstrings is nice. However, I still think a python-like syntax would have been miles better. As much as I tried, I just can't get into Powershell -- way too many special characters look awfully "dirty", and $vars give me PHP/Perl-induced PTSD. Deployment is also a bit of a pain.

Re: PowerShell is open sourced and is available on Linux

#423
post #350
post #322

Earlier quoted context omitted.

Its ecosystem isn’t. C# will never get accepted as an open source product. It only has open source code, it’s not actually ‘open-source.’ Compare it with Typescript, which—despite originating from Microsoft—is a truly open project, and getting love left and right. C# might be better than Java/JVM, but it’s not better enough. The culture/ecosystem barrier is so high that C# would have to be miles ahead, technically su…

i have a hard time with this argument. on one hand what you say is true: C# is a strictly smaller community than java. OTOH that's true of pretty much any language, and yet python, ruby, elixir, swift, golang, etc. communities are healthy and vibrant. if what you really mean is 'java people won't switch to C# anyway', then i agree, but C# isn't a really a language for them. it's a language for people who don't like a…

That is not quite true.

Many of us doing enterprise consulting do jump between Java and .NET projects all the time.

Sometimes even doing mixed projects, like the UI in .NET and the backend in Java.

Re: PowerShell is open sourced and is available on Linux

#424

Still need something other than powershell to access a linux server from a windows machine, which seems ironic... ssh : The term 'ssh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

What would a shell have to do with the existence of a userland program? ssh isn't exactly a bash built-in either ...

Re: PowerShell is open sourced and is available on Linux

#425

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…

The JetBrains folks make incredible tooling.

I got into their stuff via pycharm and phpstorm and then ended up using intellij with the php and python plugins (plus node and a bunch of others).

I haven't enjoyed using a development tool so much since back when Borland was good, intellij is pretty much 99% of my development tool usage at this point and that 1% is mostly nano for quick 'I need to edit this one line' edits.

The thing they seem to get so right is that intellij with say php plugin feels like phpstorm and with python plugin like pycharm at the same time, it's not the features so much as how they are all seamless integrated and the tool as a whole feels designed.

One of the few bills I genuinely don't mind paying each month, everything thing else I've tried just doesn't compare*

* Your Milage May Vary.

Re: PowerShell is open sourced and is available on Linux

#426
post #9

I'm always in favor of things being open-sourced, but I do kind of wonder in what universe I would use PowerShell when Bash is readily available.

I think PowerShell would actually be way ahead of Bash. But we have things so much better than Bash. Python/Ruby let you do a lot of amazing stuff (not shells, I know, but still immensely more useful scripting languages than what you can do in Bash). Also, if you're still using Bash, I'd highly recommend looking at newer shells. Fish is pretty amazing. I've been using it over over a year. There are others too like Zs…

I actually use Zsh most of the time, but my point is that pretty much every Linux box has Bash at this point, so I'm a bit curious what Powershell has to offer.

Re: PowerShell is open sourced and is available on Linux

#427
post #51

Earlier quoted context omitted.

Which is why I have no doubt the Universal Windows Platform will become the Universal Platform and be a true desktop/tablet/mobile/server/etc Java competitor on all major OS (mobile, traditional and server). It must be rather frustrating for Microsoft to look back a decade or more and see they were sitting on the exact technology a hell of a lot of people said would be their future had they made it cross-platform fro…

Yup, I've been playing around with C# more lately and it's such a good language. Things like embedding with native code is trivial compared to Java. Want to call a delegate(with extras) from a C function pointer? Sure thing, just specify some syntax and away you go. Marshalling strings? Just works. Totally a breath of fresh air compared to the mess that is JNI.

Me too, back in the first .com wave I had access to early betas and was quite critic of it, nowadays I enjoy using it more than Java.

Although I do still like Java, just don't like having to wait for Java 10 for some of the .NET features already available (possible free AOT compiler, value types, reified generics, JNI replacement).

Re: PowerShell is open sourced and is available on Linux

#428
post #363
post #350

Earlier quoted context omitted.

i have a hard time with this argument. on one hand what you say is true: C# is a strictly smaller community than java. OTOH that's true of pretty much any language, and yet python, ruby, elixir, swift, golang, etc. communities are healthy and vibrant. if what you really mean is 'java people won't switch to C# anyway', then i agree, but C# isn't a really a language for them. it's a language for people who don't like a…

People who aren’t forced to use Java will choose Scala or other JVM langs, like Kotlin, Ceylon (a favorite of mine) or even Clojure. C# the language is not exactly that exciting. I get it, it looks attractive next to Java, but it’s still a verbose, corporate-first, sort of thing. If anything, F# is much more competitive. Too bad it’s on CLR.

[disclaimer, also MS employee].

This has already devolved into opinion territory but I don't think you're giving C# enough credit.

I picked up F# relatively early in it's lifetime (2006ish?), back then there were many language features in F# that you just couldn't do in C#. The gap closed a lot when C# got LINQ, generics, and lambda/first-class functions (these are relatively old language features by now).

If I want to write in an quasi-functional-programming language style I can do it without having the language get in my way. I certainly wouldn't call it a "verbose, corporate-first" language, although the fact that it can be used for that is a bonus.

Re: PowerShell is open sourced and is available on Linux

#429
post #369

Earlier quoted context omitted.

What do you mean by it not being open source? The core CLR is MIT licensed and the compiler is Apache licensed. This sounds like fud to me.

I have no issue with the license.

So it's maintained in the open on GitHub, it's technically open source in terms of licensing. Yet you claim it's not really open source. Care to clarify?

Re: PowerShell is open sourced and is available on Linux

#430

Earlier quoted context omitted.

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.

In scripts I'll keep things synchronous unless I have a specific need for async.
Post reply on HN