Remix.run Logo
RaptorJ 5 days ago

or directly in powershell, `Start-Process myproc.exe -Environment @{ FOO = 'bar' }`

Sohcahtoa82 5 days ago | parent [-]

What an absolutely awful syntax.

How Powershell ever got popular is beyond me.

amonith 5 days ago | parent | next [-]

Because it's objects, not text. It "scales" a lot better in your brain because in general you need to know a lot less than in bash. No more awkward sed and awk scripts, manipulating objects is a breeze. Awkward syntax at places where you have to create an object from scratch is a fair price.

encom 5 days ago | parent | prev [-]

Right? This is your brain on Windows.

ohdeargodno 5 days ago | parent [-]

yeah | it's | so | much | better | with | bash | tr | cut -d' ' -t5 | jq .entry[].text | sed -i s/who/evenknows/g

Anyone who has ever maintained a semi complex set of bash invocations and pipes knows it's a fragile incantation that breaks anytime you look at it funny, or something in your chain produces unexpected output.

Powershell, while absolutely horrible to read and only slightly less horrible to write (hey look, proper auto completion instead of trying to cut on the 4th, wait no sorry 5th, ah fuck it's the 6th there's an invisible space) at least produces consistent and reproductible results.

No, your python script doesn't count, it makes me do a pip install requests. Oh, sorry, pip can't be used like that, gotta run apt instill python3-pip or my whole system breaks.