Earlier quoted context omitted.
In what way was C#'s tooling not better?
Java seemed to have a lot more options for deployments and monitoring for a long time. More advanced 3rd party libraries in general. It had simply been around longer and thus had those tools available. Now that C# has been standard for a while almost all of those tools have a C# equivalent. As a .NET dev I'd actually argue that the things available to C# now are actually better (especially Visual Studio), but that's…
PowerShell is open sourced and is available on Linux
311–320 of 790 posts
Re: PowerShell is open sourced and is available on Linux
#312Earlier quoted context omitted.
In what way was C#'s tooling not better?
Java seemed to have a lot more options for deployments and monitoring for a long time. More advanced 3rd party libraries in general. It had simply been around longer and thus had those tools available. Now that C# has been standard for a while almost all of those tools have a C# equivalent. As a .NET dev I'd actually argue that the things available to C# now are actually better (especially Visual Studio), but that's…
Also, I keep mentioning this, but .NET lacks a build tool like Maven or something similar (SBT, Gradle, Leiningen). .NET is still at the level of Ant / Make and .NET devs don't realize what a huge difference that is.
Re: PowerShell is open sourced and is available on Linux
#313Earlier quoted context omitted.
If you put this in your `~/.inputrc` [1]: "\e[A": history-search-backward "\e[B": history-search-forward "\e[C": forward-char "\e[D": backward-char you can start typing a previous command and go up through your history for all commands starting with whatever you currently have typed into the bash shell. Reset the scrolling through the history with `ctrl+c`. Personally, I hate that powershell remembers your position i…
I think I tried something like this once before, and it broke something else. I can't remember what that was, so I'm totally trying this.
Re: PowerShell is open sourced and is available on Linux
#314Earlier quoted context omitted.
I can't speak to Ruby, but Microsoft has an active Python group.[1] Granted, it seems to focus on Visual Studio (which I'm told has excellent Python tooling) and Azure. [1]: https://blogs.msdn.microsoft.com/pythonengineering/
Neat, but that doesn't seem to be integrated into .NET like IronPython was (well, is, just not maintained it seems). Which is what the post I was responding to was talking about.
Re: PowerShell is open sourced and is available on Linux
#315Great! So I can now run bash on windows (with WSL), open tmux, and open powershell prompts in each tab: the loop is complete! I wish powershell's documentation was a bit more clear about what's powershell 1.0, 2.0, 3.0... Etc. A lot of time I'd find a verbose and tedious way to do one thing because the code was written in "old powershell", when the latest version had a much more elegant solution (either because of ne…
Re: PowerShell is open sourced and is available on Linux
#316Earlier quoted context omitted.
I love the strongly-typed cookies but I absolutely hate the powershell syntax. It's like C# and Bash got together and had a really ugly baby.
Yeah, I wanted to switch to PowerShell but then I had to call an exe with variable arguments from the PowerShell script. That was a quick way back to cmd.
Re: PowerShell is open sourced and is available on Linux
#317Earlier quoted context omitted.
ArrayList.Add ... whatever ... | Out-Null Its not implicitly returning. The return value wasn't assigned so it is emitted to the pipeline.
OK, sorry (there is an explicit "return" keyword that I thought worked the same way). Either way, yes, I know you can avoid it by piping to Out-Null, but that behavior is surprising.
return {expression}
is equivalent to {expression}
return
the only place you have an exit from a function, script block or similar is either at the end or at a return statement. Every value that isn't assigned or piped into nirvana gets pushed to the pipeline. I actually can't remember having used return statements more often than once or twice so far (and I use PowerShell daily, heavily).Then I rarely found the need to use ArrayList. Sure, you can use it, but you can just as well do
$array = @()
$array += $item
A personal pet peeve of mine is actually that lots of people write PowerShell very similar to equivalent VBScript or C# code. And that makes for horrible PowerShell code (in my eyes). The pipeline is immensely powerful and not using it often makes for pretty crappy code.Re: PowerShell is open sourced and is available on Linux
#318MS should just fork GNU/Linux and port all of their stuff over.
Back to PS. Awful environment over all. It is better than CMD.exe. The language out of the box is limited and the syntax is verbose (those short cuts are crap too), compared to bash or any other Unix/Linux shell/languages. Remote execution of scripts is a pain in the BOOTY. YOu have to configure windows remote on the server you want to work on (pain in the booty). Unlike setting up .ssh and running commands.
Handling error codes or error returns from scripts is also a nightmare and not consistent. Plus the naming of some of those functions is awful. GCI? Get-ChildItem, WTF does that mean? Oh... traverse a file/registry system?
Some of the Excel like function are a nice to have. But when you have to parse strings and such I've run into issues where, the string shows up on the screen, but trying to Select-Object | select-String, only to return empty results, because I didn't get-member or something to see if I'm getting a generic object or a string. Pain in the ass.
Bye - Peace.
Re: PowerShell is open sourced and is available on Linux
#319Earlier quoted context omitted.
This is why I find PowerShell to be an answer to a question nobody asked. If bash/zsh isn't cutting it for you, drop into something like Python, Ruby or Perl to do the heavy lifting. PowerShell will never accumulate a library as comprehensive as what any of those three have, each has had decades to accumulate packages of all kinds, and more are still being added. It's odd, but not surprising given their history of "N…
> This is why I find PowerShell to be an answer to a question nobody asked. If bash/zsh isn't cutting it for you, drop into something like Python, Ruby or Perl to do the heavy lifting. How are Python/Ruby/Perl going to give you structured objects from "ps"? That's the promise of object-based pipes. You can get useful records out of your command-line tools without having to write an ad-hoc regex.
I feel like Kernighan and Pike do a much better job of explaining than I could ever.
https://www.amazon.com/Unix-Programming-Environment-Prentice...
Re: PowerShell is open sourced and is available on Linux
#320Earlier quoted context omitted.
So many strongly typed shells exist already. I don't understand why arbitrary microsoft shit gets so much love for doing things that have already been done in the OSS world, and doing them poorly. PowerShell is a pile of shit.
I take a super utilitarian view. At the end of the day, PowerShell on Linux is another tool in the toolchest. PowerShell has a POV about abstracting gorp into high level task oriented abstractions, object pipelines, structured data, and the workflow from interactive shells to ad hoc scripts to formal scripts to production scripting. That is what a number of people are looking for in their tools and that is why they l…
So are hundreds of other tools. So what?
> PowerShell has a POV about abstracting gorp into high level task oriented abstractions, object pipelines, structured data, and the workflow from interactive shells to ad hoc scripts to formal scripts to production scripting.
Meaningless word salad.
> That is what a number of people are looking for in their tools and that is why they like PowerShell.
They like powershell because you used a large word salad to describe the non-unique things it does?
> We are constantly looking for ways to improve PowerShell and make it more useful so I'd encourage you to suspend disbelieve long enough to kick the tires.
I have self respect and I'm not a total idiot. So no thanks. I have better things to do than be a guinea pig for another micropoop.
> If you see some stuff you don't like, I would be very interested in hearing the details.
That's like you asking me for details as to why I don't like directx. I don't like the fact that you decided to take existing ideas, bundle them into a closed pile of crap, market the shit out of it, and now spread propaganda on how great it is. Why didn't you contribute or fork a open source project, or initially create a community/open project? Powershell serves no real purpose but to increase microsoft revenue through marketing and microshills.
> You don't need to be polite in your feedback but I'd ask you to be specific so that I can identify potential changes.
As specific as your generic marketing word salad above? At least try to be honest.
> If you are happy with your existing tools - happy days!
Fuck off microshill.