Seems like a great PowerShell replacement.
PowerShell is the ultimate Chatgpt language. For better or worse. Usually worse as most shops end up with "write only" PowerShell scripts running all the glue/infrastructure stuff.
Seems like a great PowerShell replacement.
PowerShell is the ultimate Chatgpt language. For better or worse. Usually worse as most shops end up with "write only" PowerShell scripts running all the glue/infrastructure stuff.
> Seems like a great PowerShell replacement.
It sounds like it can potentially replace way more than PowerShell. I mean, why would a .NET shop even bother with Python or any form of shell scripts if they can attach a shebang on top of an ad-hoc snippet? And does anyone need to crank out express.js for a test service if they can simply put together a ASP.NET minimal API in a script?
I've been writing shell scripts in PHP for more than 20 years for this reason. Don't work on a lot of PHP sites any more but I still do most of my shell scripting in it. I think this'll be a big win for C# users once they get used to the paradigm shift.
I notice another poster said it's a bit slow but for many common use cases even half a second startup time is probably a small price to pay to be able to write in the language you're familiar with, use your standard libraries, etc.
Ecosystem, people keep forgetting syntax, grammar and standard library isn't everything.
That is why even the languages I dislike and am not a big fan of, have a little place on my toolbox.
> Ecosystem, people keep forgetting syntax, grammar and standard library isn't everything.
Ecosystem means nothing if you have comparable or even better alternatives in a framework of choice.
Also, it's not like the likes of Python don't have their warts. Anyone with a cursory experience with Python is aware of all the multiplatform gotchas it has with basic things like file handing.
For me, every time I have to use python it's the package handling that leaves my head spinning. It still feels like the bad old days of npm.
I think it's a popular language with scientists despite that because they don't have to care about portability, reproducability or needing your replacement to be able to run it without ever speaking to you.
I use python infrequently enough that every time it's a pain point.
Not sure I follow. I wish python was as good as npm/node_modules. And how is nuget better than npm? Is it just package quality or something else? I rarely use npm and I'm not a webdev but whenever I use it I think it's pretty great.
When I said "bad old days" I mean a previous iteration, not the state today. I'm talking about the early days of npm.
In the early days of npm a lot of install examples would do global installs, you'd often end up with a confusing mess in npm.
Nowadays people are much better at only doing project level installs and even correctly telling you whether to have it as a dev dependency or not.
Ah sorry that makes sense!! Yeah, that's exactly what how I feel too. It's sad that npm has improved so much while Python's packaging hasn't (not by default at least, whereas npm is basically a default in js projects by now), in the same time frame.
If you work alone, maybe.
Some of us have to take other devs into consideration.
Human collaboration is also part of the ecosystem.
I don't think ecosystem or people forgetting syntax would be an issue in a .NET shop.
It certainly is, unless the folks at the .NET shop get to be the ones writing the missing libraries, related tools, books, tutorials, conference talks,....
Python has a lot of libraries (ai, machinelearning, data stuff, whatever) that no one has bothered porting to .net (or other platforms).
.Net is usually a second tier target but python ALWAYS has first tier support (along with java and usually go).
You can invoke C# from PS if you want:
https://learn.microsoft.com/en-us/powershell/module/microsof...
I love PowerShell. It’s amazing the things I’ve been able to accomplish with it. Hands down my favorite language.
I think you're the only one.
On polyglot, OS agnostic agencies, I bet there are plenty of Powershell folks.
BS. There are dozens of us ;)
Oh God. I hadn't considered that windows sysadmins are likely the most prolific ChatGPT scripters. If I was still one, given the state of the MS docs, I would be guilty for sure.
I think most people would be shocked to know how much glue code is in powershell or bash/perl that kind of keeps everything running.
I remember looking on in horror as a QA person who was responsible for the install/deploy of some banking software scrolled through the bash/perl script that installed this thing. I think it had to be 20k+ lines of the gnarliest code I've ever seen. I was the java/.net integration guy who worked with larger customers to integrate systems.
My group insisted we should do single sign in in perl script but I couldn't get the CPAN package working. I had a prototype in java done in an afternoon. I never understood why people loved perl so much. Same with powershell. Shell scripters are a different breed.
On the other hand, I was once tasked to rewrite a couple of Korn shell scripts, initially written for Aix, ported to Red-Hat, into Java.
The reason being the lack of UNIX skills on the new team, and apparently it was easier to pay for the development effort.
Afterwards there were some questions about the performance decrease.
I had to patiently explain the difference between having a set of scripts orchestrating a workflow of native code applications written in C, and having the JVM do the same work, never long enough for the JIT C2 to kick in.
> PowerShell scripts running all the glue/infrastructure stuff.
I'm pleased to report it is usually not possible to do that. It would only create a huge mess. C# is more conducive for anything more than a few methods. And there is almost no barrier. PS is great for smaller ad-hoc stuff, and it is the "script that is on every Windows platform" component similar to what VBScript was a few years ago.
Seeing as Powershell can run .net code I wonder if this actually augments Powershell.
Only if you enjoy coding the low level stuff, instead of the higher level cmdlets.