4 ms·
Piping data from one command to the next is one of those things that I love showing to new users and it gets them all excited, only to then have to disappoint t
by franga2000 6y ago
Piping data from one command to the next is one of those things that I love showing to new users and it gets them all excited, only to then have to disappoint them when they think of a cool idea because they'd need to learn regex, sed and awk first to do anything non-trivial.
It's a shame Powershell is a disaster, because having a structured-by-default pipeline would've really bridged the gap between power users and programmers.
- majkinetor 6y ago> It's a shame Powershell is a disaster Yeah, lets get back to bash forever :S
- franga2000 6y agoBash is a good shell with a fairly unimpressive pipeline. Powershell is bad shell with a good pipeline. For me, as a programmer, the shell part of a shell is more important, as I can do the rest in a more powerful language. Powershell is too verbose for shell usage (see New-Item), brings nothing new to the table in terms of scripting and is ultimately not worth using just for the better pipeline. (another commenter pointed me to Nushell, which seems to be a very good middle ground, and I've heard of a few more similar efforts, so we hopefully won't be stuck with just bash for too long)
- majkinetor 6y agoOh, here we go again with verbosity like aliases are non existent. For realz, New-Item is ni for example or mkdir or whatever... > as I can do the rest in a more powerful language Powershell is like repl for dotNet. You can't really get more powerfull. > brings nothing new to the table in terms of scripting Are you serious ? I guess somebody has a lot of learning to do. > (another commenter pointed me to Nushell, which seems to be a very good middle ground, and I've heard of a few more similar efforts, so we hopefully won't be stuck with just bash for too long) We were on that road number of times before...
- franga2000 6y ago> Oh, here we go again with verbosity like aliases are non existent Aliases would have to be standardised (and I don't mean the crap they pulled with aliasing wget) and regardless, only provide an illusion of simplicity that breaks down the moment you try to do anything more advanced. > Powershell is like repl for dotNet. The only place dotNet actually matters on Windows. Everywhere else it's just unnecessary bloat. > You can't really get more powerfull. I mean, yeah, technically anything Turing-complete is as powerful as it gets. But things like generators, coroutines, easy multi{thread,process}ing, good support for object-oriented and functional patterns... are what I'm looking for in a powerful language. > Are you serious ? I guess somebody has a lot of learning to do. Besides structured data, which was the entire point of this discussion, I don't know of anything Powershell can do that other scripting languages can't. I am, of course, not counting the many system and application hooks, as those are usually 1) not part of Powershell itself, 2) Windows-only and 3) were already possible on Linux (unlike on Windows, basically everything has CLI support here). In all of this, btw, I was not considering Python a scripting language, which I easily could have (there are even a few neat shells for it). Once you have Python, it's barely even a contest.
- majkinetor 6y ago> Aliases would have to be standardised (and I don't mean the crap they pulled with aliasing wget) and regardless, only provide an illusion of simplicity that breaks down the moment you try to do anything more advanced. OK, wget/curl was bad idea, but lets not overreact here about one bad judgement. Illusion of simplicity ? That breaks ? Cmon... never had a single problem with aliases until pwsh, and I am using Powershell 24x7 almost exclusivelly in aliased form. Also, powershell does standardize aliases, once they are in, they never change (except when it went x-plat, but everything changed, so that is moot point). > The only place dotNet actually matters on Windows. Everywhere else it's just unnecessary bloat. Let me just say here that entire sentence is crap :) I do not work for MS but life became good when it was x-platformed. MS reputation was bad in linux world but its a social construct that now starts to fade away. I am into technology, not into that social mumbo jubmo bs. > I mean, yeah, technically anything Turing-complete is as powerful as it gets. You cant really compare PowerShell with mainstream langauges, since its made for shell context. Regardless, you can do all those fancy stuff in C# and compile it inline. Native powershell has all the things you mention tho, seems you need to take a good look into it (except coroutines but who cares for that in shell ?) > I don't know of anything Powershell can do that other scripting languages can't. Let me cite another well known person to you - I mean, yeah, technically anything Turing-complete is as powerful as it gets. The point is to do it in easy to understand and concise manner, without reinventing the entire universe in the process. > In all of this, btw, I was not considering Python a scripting language, which I easily could have (there are even a few neat shells for it). Once you have Python, it's barely even a contest. I was waiting for this: lets get python (or ruby or <insert-non-shell-language-here>. Lets be serious about this.
- 6510 6y ago"ex" stands for extraterrestrial.
- viraptor 6y ago> It's a shame Powershell is a disaster What's your take on nushell?
- franga2000 6y agoI looked it up and it looks like basically exactly what I want. Thanks for the suggestion. I'll definitely give it a try in the following weeks.
- AnIdiotOnTheNet 6y agoPowershell is a disaster? Did no one tell Microsoft or the hundreds of vendors supporting Powershell as an interface to their product?
- pjmlp 6y agoDisaster? It feel quite good over here.