Live data from Hacker News

PowerShell is open sourced and is available on Linux

azure.microsoft.com

561–570 of 790 posts

Re: PowerShell is open sourced and is available on Linux

#561

Earlier quoted context omitted.

false equivalency

No, actually it's quite apt. PowerShell, or at least the concept behind PowerShel, is an improvement/superset over the Unix shells -- and can do whatever the shells can do, plus stuff they cannot do, because they don't support typed entities. Its problems are not technical or conceptual -- they are ecosystem and historical: lack of compatible tools, windows-only, etc.

Or to the point of the original parent: the industry considers powershell a solution in search of a problem.

Re: PowerShell is open sourced and is available on Linux

#562
post #379
post #365

Earlier quoted context omitted.

ip addr | awk '/inet / { print $2 }'

That doesn't work either. [kapil@localhost ~]$ ip addr | awk '/inet / { print $2 }' 127.0.0.1/8 192.168.128.236/24 [kapil@localhost ~]$ You guys are just proving my point. _I_ already know how to do it using bash. Its just that using objects and querying properties is far simpler . And I just took a random example because its a common thing that someone would want to do.

I think what others might be demonstrated is that there isn't a reliance on what object Microsoft decides to ship to you, in *nix we can combine commands and builtins and get the information in the structure we need without having to wait 8 months for a system reboot (or worse a paid for upgrade) that will give us what we need.

Re: PowerShell is open sourced and is available on Linux

#563

Earlier quoted context omitted.

The dollar sign is charming. There's a few points here: 1) Not all data is text. In fact, very little of the data people see/work with day-to-day is raw text. It's silly to transform a PNG image into text to be able to pipe it around. (Or to pipe around its filename instead and have a dozen tools all having to open and re-parse it each time.) 2) There's nothing on PowerShell preventing you from serializing a piece of…

Unfortunately PowerShell relies on everything running on .NET (well, I think COM works, too); the idea of a shell that can expose live objects is useful, but PowerShell's platform limitations in reality doing that make it a far from ideal implementation of that concept. Something built on a protocol that is platform agnostic would be better.

Live objects don’t usually expose any protocols at all. They only expose an ABI. Do you know any platform-agnostic OO ABI, besides what’s in .NET?

If you’ll wrap your objects into some platform-agnostic protocol like JSON, you gonna waste enormous amount of CPU time parsing/formatting those streams at the object’s boundaries.

Re: PowerShell is open sourced and is available on Linux

#564

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…

Along the same lines, for Linux and MacOS: https://github.com/geophile/osh

Interesting, nice work

Re: PowerShell is open sourced and is available on Linux

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

0: scsh is a nice scripting language, however it's not meant for interactive usage (PowerShell is) See: http://www.alphanet.ch/~schinz/scsh-faq/scsh-faq_4.html#SEC3... Scheme is also dynamically typed. 1: It's the first time I see it, but from a cursory glance and some docs ( http://hackage.haskell.org/package/turtle-1.0.0/docs/Turtle-... ) I think it doesn't include simply calling external commands (I couldn't find…

> I think it doesn't include simply calling external commands

proc and inshell. Did you check out the built-in tutorial?

http://hackage.haskell.org/package/turtle-1.0.0/docs/Turtle-...

Re: PowerShell is open sourced and is available on Linux

#566
post #485

Earlier quoted context omitted.

There’s more to open-source than license. Such as? You seem to have a mental model of things that make a project objectively open source, that don't include the license. I'd be curious what those things are.

I really don’t, it’s more of a feeling. With an open-source release like .NET it seems more like better documentation. In fact that was the case for early commercial Unixes—you needed the source code to actually use the system, but it wasn’t open-source. Open-source as-documentation (for lack of better term) is still useful. It makes bug fixing a whole lot easier, for one thing. But it’s not quite the same as open-so…

by that definition, it'd be hard to call Python open source.

Re: PowerShell is open sourced and is available on Linux

#567

Earlier quoted context omitted.

Microsoft operates as though, and under the assumption that their software is needed. It's a faulty premise. The presumption is arrogance incarnate. As a business I can fully, completely operate without any of the their software, profitably, peaceably, and with at least the same amount of friction or less. And more securely. If you think otherwise, you are ignorant of the tools available for free and of some intellig…

As a Windows Sysadmin, my life would be a living hell without PowerShell.

Maybe consider moving away from Windows/ You are living in their world. If they want PowerShell to be adopted their whole program management will make sure you can only get things reasonably done with PowerShell. It's their world, and you don't have to be a non-paid employee of Microsoft.

Re: PowerShell is open sourced and is available on Linux

#568
post #506

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…

After a number of years using PowerShell, my conclusion is the opposite: text "scraping" is just better for most cases. Normal shell usage means doing a lot of one-shot pipelines incrementally. This is just easier and faster to do when passing text around because you can look at it and not have to inspect some object for it's type and what attributes/methods it provides. Parsing the text is not the problem here (alth…

I'm not entirely convinced that "plain text" is "simple." For one, utf-8 is a variable-length encoding, which can cause all sorts of subtle bugs and sometimes leads to security issues because somebody failed to parse a character correctly somewhere. On top of this, using plain text means that every program has to choose its own control characters, essentially an encoding within an encoding. This is great for readability, but it's not always easy to know how a certain program will treat certain corner cases, or even really just at all. I'm not sure what you mean by "you can just look at the text," because unlike something that encapsulates functionality alongside the data, text input into a program might do anything.

Re: PowerShell is open sourced and is available on Linux

#569

Earlier quoted context omitted.

I find that to be the issue. You are considering it just RAW text when it is actually formatted text that has been parsable for years with common unix command line tools. It not being in the format you consider a structured object does not mean it's not a object or even parsable. If you are using ad hoc regex I suspect you are not using all the tools available to you. I feel like Kernighan and Pike do a much better j…

> You are considering it just RAW text when it is actually formatted text that has been parsable for years with common unix command line tools. Parsing command output with sed/awk/etc (ie. "common unix command line tools") is absolutely an ad hoc parser. Let me give you an example that I recently ran into. I have a tool that parses the output of "readelf -sW", which dumps symbols and their sizes. The output normally…

I would like to see how it will look in PowerShell. $(readelf).ShowMeTheSecondStringFromTheEnd or $(readelf).PrintTheLastColumnInHeX?

Re: PowerShell is open sourced and is available on Linux

#570
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

Microsoft does not grow food, build houses, create clothes, cars, or protect you from foreign invaders. The basic human needs are not met by MS. The business that claimed that open-source was a cancer is just a marketing company with memetic feedback loops. Plenty of over Operating Systems are out there. Their office product is no longer relevant (vis. a vis. Libre Office, Google Docs, and others). Are you telling me a multi-billion dollar company cannot compete with a startup such as Google? There's a reason why. They do not create. Just marketing.
Post reply on HN