Live data from Hacker News

PowerShell is open sourced and is available on Linux

azure.microsoft.com

341–350 of 790 posts

Re: PowerShell is open sourced and is available on Linux

#341

For Fedora 24 users: So some reason, the rpm that Microsoft provides doesn't list all the dependencies that it actually requires. What is even worse, the compiled binaries inside, require quite outdated versions of icu & openssl that are not available in Fedora 24 any more. What I've come up w/ to force poweshell to run: # dnf install icu lldb lldb-devel lttng-tools lttng-ust To view what we're still missing: $ find…

Thank you for taking the time to share all that work you did to get Powershell running. Your instructions work for Fedora 23 as well.

Re: PowerShell is open sourced and is available on Linux

#342
post #132

Earlier quoted context omitted.

It's been something I've used for many years, so I really don't recall any more just where I found out about it...

Maybe it went something like "god damn it why can't I ctrl+v to copy, what other ctrl keys are there..."? And now I'm looking at http://ss64.com/bash/syntax-keyboard.html and being amazed I didn't know about / forgot a few of these. It'd be nice to put some of the good ones on a coffee mug, I first learned useful vim commands from a coffee mug...

Nope, because I've never used control-keystrokes to do cut-n-paste. I always use (and love) X-style mouse cut-n-paste and hate that there are no good implementations of it on other OSes.

Re: PowerShell is open sourced and is available on Linux

#343

Earlier quoted context omitted.

I feel very similarly, but then I'm of the mind that if I can't apt-get it, I'm not interested, and I'll bet that "open source" doesn't mean to MS what it means to the open source world. As for the NIH syndrome, one of my favorite Paul Graham essays is still "What Languages Fix" ( http://www.paulgraham.com/fix.html ) particularly for C#: the problem that C# was invented to solve is that Microsoft doesn't control Java…

>and I'll bet that "open source" doesn't mean to MS what it means to the open source world The github repo use the MIT licence, so I don't see what you're talking about. If you want it in your distribution repos, ask your distribution maintainers (and I bet Microsoft is going to do so anyway for the big ones)

Yes, please ask them....happy to help adding PowerShell to any distribution .NET Core supports.

Re: PowerShell is open sourced and is available on Linux

#344
post #87

Cool! I'm having a play with it and it seems to work really nicely. Does anyone know why the following commands don't produce the same output? get-childitem | ConvertTo-Csv get-childitem | ConvertTo-Json | ConvertFrom-Json | ConvertTo-Csv It seems like, if there's a perfect underlying data model doing what's effectively an identity conversion shouldn't change anything. Edit oooo, and all the linux stuff is available…

I don't have a powershell handy, but one thing that might be causing changes is that json dictionaries usually don't have a defined order (parsing libraries are free to render the keys of a dictionary in any order); are the changes you're seeing just ordering changes?

If you have a Docker Host, you can simply run: docker run --rm -it trevorsullivan/powershell

To clean up the image after you're done:

docker rmi trevorsullivan/powershell

Re: PowerShell is open sourced and is available on Linux

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

Pipe anything to Get-Member. For example: (ls)[0] | gm will list every field and its type on a File object. Wicked easy.

[deleted]

Re: PowerShell is open sourced and is available on Linux

#346

Earlier quoted context omitted.

I feel very similarly, but then I'm of the mind that if I can't apt-get it, I'm not interested, and I'll bet that "open source" doesn't mean to MS what it means to the open source world. As for the NIH syndrome, one of my favorite Paul Graham essays is still "What Languages Fix" ( http://www.paulgraham.com/fix.html ) particularly for C#: the problem that C# was invented to solve is that Microsoft doesn't control Java…

> if I can't apt-get it, I'm not interested, It was released just now, under MIT license. Give it a little time and it'll show up.

Or even more! It will need to be backported to Trusty Tahr if one wants to apt-get it on Windows (subsystem for Linux) ;-)

Re: PowerShell is open sourced and is available on Linux

#347
post #93

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…

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…

There is also Ammonite Shell[0], XONSH[1]

0: http://www.lihaoyi.com/Ammonite/#Ammonite-Shell 1: http://xon.sh/

Re: PowerShell is open sourced and is available on Linux

#348
In the fifth paragraph: "But this is a new Microsoft". They are acknowledging that they made mistakes in the past due to which the missed out big on the server market. As much as .NET is popular, it would have been a lot more popular (vs Java ecosystem) if they were OSS from the beginning. As primarily a Java developer, C# seems more elegant to code in.

As they say - the first step to fixing a problem is admitting that you have a problem.

Re: PowerShell is open sourced and is available on Linux

#349

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…

> Once you've piped strongly-typed objects around between your shell commands, text scraping seems barbaric by comparison This is why Powershell is a great thing on Windows. Windows works with .Net objects and Powershell works directly with those objects. It's also why I don't see the reason to be excited that it can run on OS X and Linux now, because neither of those systems work by passing .Net objects around. You…

I'm assuming that the Powershell port includes some subset of the standard cmdlets, which will handle serializing to and from objects.

Re: PowerShell is open sourced and is available on Linux

#350
post #322
post #242

Earlier quoted context omitted.

except that C# as a language is by leaps and bounds better than Java (both in syntax and useful features departments), so there have been other problems to solve, too.

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 and/or aren't forced to use java by their employers.

Post reply on HN