Bringing the Unix Philosophy to the 21st Century

Discussion in 'Other Operating Systems' started by RnR, Jun 5, 2020.

  1. RnR

    RnR Member

    Joined:
    Oct 9, 2002
    Messages:
    16,581
    Location:
    Brisbane
    HyRax1 likes this.
  2. HyRax1

    HyRax1 ¡Viva la Resolutión!

    Joined:
    Jun 28, 2001
    Messages:
    7,935
    Location:
    At a desk
    Definitely interesting! :thumbup:
     
  3. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    44,048
    Location:
    Brisbane
  4. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    9,832
    Location:
    Briz Vegas
    Been using inline JSON and MQTT for 3 years now as preferred output to CLI and allowing filters to pass thru mosquitto for all my projects.

    Just need a bash equivalent to source to load config file into variables based on JSON. :thumbup:
     
    RnR likes this.
  5. OP
    OP
    RnR

    RnR Member

    Joined:
    Oct 9, 2002
    Messages:
    16,581
    Location:
    Brisbane
  6. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    44,048
    Location:
    Brisbane
    Remember that "UNIX" is not "BASH".

    "UNIX" can load up BASH, DASH, ZSH, CSH, Python, Perl, Ruby, whatever. These can be used as both programming environments and shells.

    If you want to get a bunch of info out of Linux and treat it like text, there are tools to do that. If you want to get a bunch of info out of Linux and treat it like a collection of objects, there are tools do that. If you want to get a bunch of info out of Linux and treat it like JSON, there are tools to do that. If you want to use <insert_new_hotness_framework_here> as a way to interact with Linux, do that.

    There is no "right" or "best" way to do things with computers. If there was, we'd all use one OS, with one distro, and one desktop. Computers are infinitely flexible and can do whatever it is we want them to do. More to the point, if someone comes to me and says "Wouldn't it be cool if Linux could....", 99% of the time it can, and they just don't know.

    You want PowerShell on Linux? THERE ARE TOOLS TO DO THAT: https://github.com/PowerShell/PowerShell

    Do whatever you want. Linux allows it. None of this is new. The amount of stuff Linux has on offer is insane. I've been using Linux every day since 1997, and I'm still finding new and interesting things that I never thought it offered.
     
  7. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    9,832
    Location:
    Briz Vegas
    Because we never had that stuff... like before powershell... :rolleyes:

    https://en.wikipedia.org/wiki/C_shell <- 1978
    https://en.wikipedia.org/wiki/Bash_(Unix_shell) <- 1978
    https://en.wikipedia.org/wiki/Z_shell <- 1990

    https://en.wikipedia.org/wiki/Read–eval–print_loop <- repl
    https://en.wikipedia.org/wiki/GNU_Debugger >- GDB 1986 not sure when REPL function where added just remember it was early 90s.

    I've been scripting the OS's since I began mainframe's in mid 80's, but in the early 90s PERL repl blow my mind, then python came with is repl, long before Powershell was twinkle in any MS dev, they could only dream of interactive shells... well kind had some interactivity with DOS. The interactive shell already existed before powershell, long before Windows did a 180 about face on CLI based toolsets. And now we have people postulating that UNIX pipes are shizzle, like we didn't know this was a thing for the past 40 years! While its nice Windows people are suddenly doing IT the more productive way on the commandline, its like being lectured to by an adolescent who knows everything about the world and refuses to take advice from their parents or elders, because they know best, time will pass then they realize the wisdom of their elders, and could have saved themselves alot of grief.
     
    Last edited: Jun 5, 2020
  8. OP
    OP
    RnR

    RnR Member

    Joined:
    Oct 9, 2002
    Messages:
    16,581
    Location:
    Brisbane
    Sorry mate, maybe I should have been more precise. Powershell uses objects to pass information from tool to tool. I believe thats what the doc in the article talks about and was in context of using JSON to pass information from tool to tool.

    From the paper;
     
    Last edited: Jun 5, 2020
  9. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    9,832
    Location:
    Briz Vegas
    REPL... PERL and Python both pass objects, not sure I get the part I don't understand. Powershell is essentially a fancy REPL to the WIN API. The whole concept of objects at a user interface especially binary objects is such a dumb idea, I have always been critical of windows for storing its logs in a binary object format, and thus systemd doing the same makes me think the history of stupidity is repeating itself. JSON was meant to be the object container of choice to replace binary, so I still don't see anything new as a concept with object passing in powershell, only MS continuing down the path of making interfaces, in this case CLI, a proprietary lockin.

    PS - I know they have open sourced powershell, but it is just a thin veil to them wanting to use the path of open source to gain control of the Linux eco system, no thanks.
     
    Last edited: Jun 6, 2020
    RnR likes this.
  10. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    44,048
    Location:
    Brisbane
    You're understanding it just fine. As I said above, this stuff has existed for ages. PowerShell didn't invent anything in that space. It merely brought it to the Windows ecosystem.

    The irony here are all these posts talking about "bringing UNIX into the 21st century", when what we're actually seeing is the world wake up to methods available last century that is only being ported to Windows this century, and thus awakening the world to ye olde ways of computing. Secure shell remote access to a scripted just-in-time language that passes objects on the command line? Yeah, welcome to 1990, Windows 10. Glad you finally made it.

    There's nothing wrong with Powershell. And there's nothing wrong with Powershell on Linux (or Windows, or Mac, or your bloody iWatch/smart-tv/whatever). I welcome any open source tool that provides more options to more people. But there's very little left to invent in computing any more. We're at a point now that for traditional computing, all we're really doing is distilling or merging ideas. Just like Rust and Go are the new hotness in programming, but neither does anything revolutionary new, and merely distils the ideas of old in different ways. The tools we're talking about in this thread are the same.

    So, yay for Powershell being open source. That's genuinely cool. Yay for Microsoft leaving the Gates/Ballmer/Sinofsky era behind and seeing excellent leadership under Nadella. That's genuinely cool. And yay for Microsoft embracing open source, and giving us a heap of options. Likewise yay for new, young programmers bringing us interesting tools. But, I repeat, this has all been done before. But I'm still happy it's happening again, especially if it awakens more people to possibilities that have been around for a long time.
     

Share This Page

Advertisement: