News for hackers. Stuff that matters.
Re:Simplicity of IRC by AnIdiotOnTheNet on Sunday January 09, 2022 @09:53AM (#29863704)
Windows comes with PowerShell, which is a pretty fully featured programming language that can interface directly with the .NET ecosystem.
Re:Simplicity of IRC by fivea on Sunday January 09, 2022 @10:30AM (#29864066)
> Windows comes with PowerShell (...)

It might be just me, but PowerShell feels outright developer-hostile even when compared to Bash. Perhaps it's their approach to rely primarily on .NET stuff which makes things so arcane, but when given the option it's far simpler and better to go with, say, python than PowerShell.

Re:Simplicity of IRC by AnIdiotOnTheNet on Sunday January 09, 2022 @10:43AM (#29864193)
I couldn't disagree more, I think bash is a horrifically bad programming language. Honestly I'm incredibly surprised anyone could compare PowerShell and bash and think that PowerShell is the arcane one.
Re:Simplicity of IRC by fivea on Sunday January 09, 2022 @11:43AM (#29864860)
> I couldn't disagree more, I think bash is a horrifically bad programming language.

Bash is described as a "command language" and not a programming language per se.

Bash is what you use to type in commands, and automate said commands if you need to whip out a quick script that runs what you would otherwise run manually. Bash, scripting-wise, is command line glue.

If all you want to do is run commands with some logic, PowerShell is simply dreadful and outright developer-hostile. I doubt there is a single person on earth who uses PowerShell as a command shell like Bash is used.

Re:Simplicity of IRC by carlhjerpe on Monday January 10, 2022 @07:26AM (#29873746)
> If all you want to do is run commands with some logic, PowerShell is simply dreadful and outright developer-hostile. I doubt there is a single person on earth who uses PowerShell as a command shell like Bash is used.

Expand your views. Everyone aren't you, didn't learn the same things as you and understand different things than you.

I learned some C++ as my first language, therefore I got stuck in an object oriented mindset, this translates really well to PowerShell and really poorly to bash. The thing where everything is text doesn't make sense, text isn't stable and everyone will write their own partially broken parsing implementation. In PowerShell they try to make everything an object, with type checking and other goodies, solid autocomplete for scripts being one.

In PowerShell I can deserialise JSON and perform CRUD operations on the data easily.

I'd say powershell is outright developer friendly as it brings a production grade language to the scripting table.

If powershell could parse bash completion files and integrate sudo better I'd use it as a command shell on all platforms, which right now are limited to MacOS and Linux.

Re:Simplicity of IRC by AnIdiotOnTheNet on Sunday January 09, 2022 @01:21PM (#29865893)
Again, I disagree and regularly use PowerShell as a command language --as do many Windows admins-- and much prefer its object-based pipelining and relatively sensible and consistent command and argument naming to bash's error-prone text pipeline and mixture of 2-letter abbreviations and complete nonsense names. But whatever, to each their own.

This subthread was specifically about programming languages being available out of the box in OSs, so when you brought up bash my natural assumption was that meant as a programming language.

Re:Simplicity of IRC by majkinetor on Sunday January 09, 2022 @01:01PM (#29865716)
Totally. Bash is such nonsense. Its little better then batch on Windows.

PowerShell is such joy that it should be there on any Linux as default interactive shell.

Re:Simplicity of IRC by chungy on Sunday January 09, 2022 @02:23PM (#29866473)
PowerShell is the worst of bash and perl combined. It's like Microsoft took a look at each of those, "We can do that!" and implemented them.... worse.
Re:Simplicity of IRC by mavhc on Sunday January 09, 2022 @06:37PM (#29868636)
What's bad about it specifically? Main thing I don't like is verb-noun, breaks tab complete
Re:Simplicity of IRC by williamtwild on Sunday January 09, 2022 @12:00PM (#29865067)
The problem is that you think bash is a programming language.
Re:Simplicity of IRC by cxr on Sunday January 09, 2022 @01:43PM (#29866107)
The person who you're responding to is engaging with the person who they're responding to in the terms chosen by the latter. If the original commenter hadn't written, "PowerShell feels outright developer-hostile even when compared to Bash", then we might have some reason to find fault with the person who replied. Considering that's what did happen, however, this comment of yours—which is both snarky and implicitly demands the wrong person to take responsibility for the comparison—just comes across as annoying.
Re:Simplicity of IRC by majkinetor on Sunday January 09, 2022 @01:02PM (#29865738)
Its bad even for one liners.
Re:Simplicity of IRC by mavhc on Sunday January 09, 2022 @06:37PM (#29868623)
People complained about Python using whitespace, adding an extra space in bash can break the whole thing