Live data from Hacker News

I've returned to Linux but I miss PowerShell

chrisfun.xyz

21–25 of 25 posts

Re: I've returned to Linux but I miss PowerShell

#21
post #20

Earlier quoted context omitted.

I don't think it's fair to say Microsoft hijacked the curl command. It's just an alias for a powershell cmdlet. Powershell is definitely not perfect but theres less pitfalls than bash (string quoting, etc; there's loads: https://mywiki.wooledge.org/BashPitfalls ). I think powershell was/is a step in the right direction, but in that respective I also think Nushell is a massive improvement on top too. All of this is op…

I create courses that are taken on Linux and Windows. On one hand, I love that curl is aliased to iwr, since I can tell learners to run a curl command without arguments and trust that it will work cross platform On the other hand, iwr is a cmdlet that shortcuts the System.Net.WebRequest .NET method, which is very, very different from libcurl. For example, the cmdlet uses one of its properties to obtain bytes download…

I've been using iwr for years and didn't know that the progress bar added latency! Much appreciated.

My main point to the OP was more that it's just an alias, you can remove it and use real curl if you want.

Re: I've returned to Linux but I miss PowerShell

#22
post #9

You can use powershell on linux: https://learn.microsoft.com/en-us/powershell/scripting/insta...

He did note that in the article. It's under 1). at the bottom as well. > "I realize PowerShell is cross-platform (I wrote this on macOS) but good luck evangelizing it to teams used to Linux." Well, this is about his _own_ use no? So why not just use powershell in Linux? If it's good, tell us why. I actually am in the same boat. I spent a lot of time learning it, and I do know bash, but not as well. If there is a happ…

See other comment on that: https://news.ycombinator.com/item?id=44697990#44698111

I’d prefer to invest in languages that are actually useful to my team. I want to eat my team’s dogfood so I can help them with issues.

Re: I've returned to Linux but I miss PowerShell

#23
post #20

Earlier quoted context omitted.

I create courses that are taken on Linux and Windows. On one hand, I love that curl is aliased to iwr, since I can tell learners to run a curl command without arguments and trust that it will work cross platform On the other hand, iwr is a cmdlet that shortcuts the System.Net.WebRequest .NET method, which is very, very different from libcurl. For example, the cmdlet uses one of its properties to obtain bytes download…

I've been using iwr for years and didn't know that the progress bar added latency! Much appreciated. My main point to the OP was more that it's just an alias, you can remove it and use real curl if you want.

No problem! I definitely recommend using the real thing where possible!

Re: I've returned to Linux but I miss PowerShell

#24

Earlier quoted context omitted.

I could but no one else on my team (which is used to Linux) would touch my scripts. It’s just too foreign for Linux devs whereas it ships with Windows.

Nowadays a lot of people script in python

Yeah sure after they are done fighting with venv or why this scripts written in a different version of Python behaves differently on this computer...

During scripting they can be constantly annoyed by Python's indentation errors. Really awesome stuff when your syntax is whitespace dependent.

Re: I've returned to Linux but I miss PowerShell

#25

Earlier quoted context omitted.

Nowadays a lot of people script in python

Yeah sure after they are done fighting with venv or why this scripts written in a different version of Python behaves differently on this computer... During scripting they can be constantly annoyed by Python's indentation errors. Really awesome stuff when your syntax is whitespace dependent.

> ... behaves differently on this computer...

vs. in linux, running powershell scripts under a virtualized instance of windows to avoid linux OS / windows OS differences issues?

----

other extreme end of the 'whitespace' spectrum:

APL : no white space / single character instead of multicharacter programming language tokens. Maximum expressiveness without any need for whitespace!

Post reply on HN