I wrote a minimalist fetch tool for Linux with Python programming language. Have a look: mlzfetch. UPDATE: Now with installation support (pip install .) Also I added a performance benchmark into README.

  • thingsiplay@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    1 day ago

    As it is for Linux, I don’t think that’s a problem. Python is pre installed on basically all Linux operating systems.

    • org@lemmy.org
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      Bash would be more efficient at this point. But you clearly like this for some reason, which is fine.

      • TehPers@beehaw.org
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        1 day ago

        Rust would be more efficient. Hand written assembly would be more efficient. Using butterflies to manually flip bits in the memory would be more efficient.

        OP wanted to use Python. It’s not a very large program. It really doesn’t matter.

      • thingsiplay@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        1 day ago

        I don’t believe that. In fact, neofetch is written in Bash and is known to be slow (that is why I looked at faster options). Python is not really slow. It is just a little bit slower on the starting the interpreter, but then it does not matter how fast it is. Because the thing which Python is slow is mostly math and that does not matter much for system query like this.

        Did you test neofetch and this program in Python? Because you would be surprised at how fast it can be.

        • org@lemmy.org
          link
          fedilink
          arrow-up
          1
          ·
          1 day ago

          Did you test this program re-written as a script vs running it in Python?

          • thingsiplay@lemmy.ml
            link
            fedilink
            arrow-up
            2
            ·
            1 day ago

            No, but I was not the one claiming that the Bash version would be more performant. As said this is querying the system information, in which Python does basically the same job as Bash. I mean we are not comparing math.

              • thingsiplay@lemmy.ml
                link
                fedilink
                arrow-up
                2
                ·
                1 day ago

                Dude you started this whole nonsense of Bash being more performant. I say without testing you can’t make such statements. Besides that, neofetch is very slow. And do you have any Python script doing this kind of work that is slower than neofetch or do you repeat what people say without testing? I do lot of Python stuff and you would be surprised how fast it can be.

                • org@lemmy.org
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  1 day ago

                  You’d be surprised how fast not using Python can be. You say without testing too. I don’t know why you keep replying.