top | item 26285394

(no title)

electricEmu | 5 years ago

PowerShell also runs on Mac, Windows, and Linux. You pass objects instead of plaintext through the pipeline which provides a rich experience. The full .NET type and ecosystem are also available when you really need a full fledged class for a thing.

There are good choices in 2021.

https://docs.microsoft.com/en-us/powershell/scripting/instal...

discuss

order

hnlmorg|5 years ago

murex also passes objects. The difference is the objects are passed as UNIX byte streams but with an additional data-type meta field. So processes written in murex can have PowerShell-like objects but at the same time standard POSIX utilities can still be added to the pipeline with no additional effort.

That latter point is, in my opinion, the biggest hurdle to using PowerShell.

Of course, it ultimately boils down to personal preference and for some, .NET support is a killer feature.

uranusjr|5 years ago

The cross-platform pwsh is actually what inspired me to go on the hunt, and was the first thing I tried. But while it’s good on Windows, using it on POSIX just felt… wrong, somehow. I later discovered uutils/coreutils (a Rust reimplementation of GNU coreutils that works on Windows) and decided it’s easier to bring my POSIX workflow to Windows than the other way around.

zokier|5 years ago

The magic thing that powershell has is that its objects are full .net objects so you can do method calls etc and not just structured data, so you can do stuff like

    Get-Foo | % { $_.bar() }
Which is roughly equivalent to e.g. python

    map(lambda x: x.bar(), getFoo())
Does murex have anything like that? Generally serializing objects (with methods) is to byte streams is not trivial nor without tradeoffs

ridiculous_fish|5 years ago

Can you say more about that? So for example if I pipe to `grep`, murex will write some additional metadata info to the pipe? Won't that confuse grep?