Jonkman Microblog
  • Login
Show Navigation
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Verius (verius@community.highlandarrow.com)'s status on Wednesday, 17-Jan-2018 11:50:48 EST Verius Verius
    Pondering powershell some more I'm asking myself the question whether I would use it on Linux as well. The more I learn of it the more the answer is: yes, as long as I don't need to run external programs. But looking back at my scripting quite a lot of it doesn't really require external programs other than for reasons that bash is not suited for any kind of data handling beyond the most utterly trivial and of course doesn't include a full HTTP client. For a typical hackjob of downloading some JSON and interpreting it a bit to get at the interesting parts plain powershell is quite sufficient and if I need more the .NET stdlib should be more than enough. However if I do need external commands (like git) powershell rapidly becomes a PITA because of things like interpreting any output on stderr as failure whereas linux programs often use stderr as a debug message channel. 
    In conversation Wednesday, 17-Jan-2018 11:50:48 EST from community.highlandarrow.com permalink
    1. Sorokin Alexei (xrevan86@loadaverage.org)'s status on Thursday, 18-Jan-2018 08:47:13 EST Sorokin Alexei Sorokin Alexei
      in reply to
      @verius Um, if you don't need external commands, there are Python and Perl and have been for far longer than PowerShell.
      In conversation Thursday, 18-Jan-2018 08:47:13 EST from loadaverage.org permalink
      1. Verius (verius@community.highlandarrow.com)'s status on Thursday, 18-Jan-2018 13:28:17 EST Verius Verius
        in reply to
        @xrevan86 Granted, I'd probably use Python on Linux. But Powershell has a rather strong feature, though it isn't a new one. It's easy to program in pipeline style - adding maps, filters, folds step by step - when you're used to thinking functionally and Powershell is one of the few languages that combines ease of experimentation and a flexible (dynamic) type system with a functional workflow style. I've looked quite a bit for functional languages but most are statically typed and while that's great for larger coding it's not pleasant for scripting. There are a few languages that support the functional pipeline style but pretty much all of them as lisps and that kinda doesn't do it for me.
        In conversation Thursday, 18-Jan-2018 13:28:17 EST from community.highlandarrow.com permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Jonkman Microblog is a social network, courtesy of SOBAC Microcomputer Services. It runs on GNU social, version 1.2.0-beta5, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Jonkman Microblog content and data are available under the Creative Commons Attribution 3.0 license.

Switch to desktop site layout.