I use Windows btw

  • mafbar@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    2
    ·
    1 year ago

    I mean I prefer Pacman too, but yeah, maybe because I don’t use Ubuntu / Debian that much so I can’t really say.

    • Dnn@lemmy.world
      link
      fedilink
      English
      arrow-up
      11
      ·
      1 year ago

      I like pacman too but I will probably never get comfortable with its arguments. It’s worse than tar which has already become a meme. apt is more intuitive to use.

      • nottheengineer@feddit.de
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        After a month of using arch, I’m still considering aliases for pacman.

        At least I can remember “Xtract Ze Vucking File” for tar, but whenever I want to do anything more than -Syu with pacman, I have to look it up.

        • Dnn@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          “Xtract Ze Vucking File” for tar

          Hey thanks! I should be able to remember that too.

        • russjr08@outpost.zeuslink.net
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Right, but if you don’t already know what those arguments mean, then its not exactly super obvious as to what they do.

          For example, I’ve been told that you’re generally not supposed to do pacman -Syyu because it can result in partial upgrades (unless I’m remembering the wrong set/combination of flags, which would just be case in point…) - I tend to remember flags by associating them with words.

          For example, the common flags for tar was brought up in one of the sibling comments here, but at least I can remember them by:

          • x: eXtract
          • z: Use gzip for the operation (which originally I remembered as “the file has .gz” in its extension before I knew what gzip was)
          • v: verbose, giving the details about what its doing
          • f: file, the file name you’re wanting to work with
          • c: create archive
          • t: test archive (I use this with the v flag to see what is in an archive before extracting it)

          But with Pacman, even after using it on and off for a couple of years, I can try to estimate what the flag names are, but have no idea if its right without double checking:

          • S: Sync with repositories
          • s: No idea on this one
          • y: Also no idea on this one
          • Q: Query (search)
          • u: Allow upgrades (?)

          Really I think its the fact that some of the flags can be used in different combinations which have different effects - like passing z to tar doesn’t change the effect of the flag whether you use x or c. Yet apparently -Syyu and -Syu are valid but one does a proper supported upgrade, and one does a partial upgrade which is not supported and is generally not recommended unless you know what you’re doing. I also know of no occasion where passing the same flag to tar multiple times mutates its behavior as well.

          That makes it feel like an anti-pattern to me, similar to using magic numbers in programming. Maybe there is a valid reason for this decision (such as why the Linux kernel uses magic numbers in syscalls) but the result is still that it feels incredibly foreign to me, despite having 10 odd years of Linux experience under my belt.

          • mafbar@lemmy.worldOP
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            I agree with that. My reply was to illustrate how cryptic sometimes the most common pacman commands are, and you have to refer to both –help and man pacman, though I find it easier to go to Arch Wiki or Google it generally. The tar flags are great! Pacman can be a bit confusing.

            • s is for search, I believe. When you add the S flag, so it becomes pacman -Ss, it synchronises the package database and search within that database.
            • y is refreshing local database or something like that? If you put pacman -Syyu, it will force refresh the master package database so that it can deal with corrupted databases or something like that. Pacman seems advanced to me but I just don’t really remember / know my way around it that well.
            • Q is for searching local package database.
            • u is for system update, since it is preferable to rebuild the whole package database in your system to synchronise against the database containing the latest packages.

            I hope I’m somewhat correct. There are other flags but I don’t remember them. It is elegant if you already are familiar with the commands, but otherwise, other package managers and program commands like tar are much easier since they contain English language imperatives.

            As for the magic numbers, that’s the first time I knew of that concept. Quickly looking at Wikipedia seems to suggest that there probably are accepted use cases, though that might be historical and not entirely logical.

            Really, sometimes computers can be a mess, we’re just used to that mess.

            • russjr08@outpost.zeuslink.net
              link
              fedilink
              English
              arrow-up
              2
              ·
              1 year ago

              Those definitions of pacman’s flags sounds correct to me, at least when I correlate them to my (admittedly rough) memory of using them in the past. I generally ended up using yay for handling both Arch and AUR package management, but I did most of my package searching via DDG’s !arch and !aur “bangs” to look at it on the web (or just yay likely-the-package-name) which explains my lapse in the Q/s flags.

              As for the magic numbers, that’s the first time I knew of that concept. Quickly looking at Wikipedia seems to suggest that there probably are accepted use cases, though that might be historical and not entirely logical.

              I won’t pretend like I’ve seen every possible API out there, but the only time that I personally know the use of magic numbers made sense from a developer standpoint was in Linux’s reboot system call which this question/answer does a good job of explaining the reasoning behind it but the quick rundown is that its a safety feature; A bit-flip could inadvertently trigger the reboot system call to be ran instead of something like say exec() which you definitely wouldn’t want to have done on your PC while you’re working (or even worse, something like a web server) . The magic numbers are required for the reboot system call to eliminate this possibility because its practically impossible to inadvertently pass in the exact correct numbers for the reboot syscall to another one in the same way that its unlikely you’d accidentally unlock the guard to a fire alarm and pull the trigger by just brushing up against it.

              (Okay, maybe that rundown wasn’t quicker than the answer on stack-exchange… oops)

              I suspect any other use cases for magic numbers are very similar to this (a safety precaution against accidentally calling a destructive API) or some silly (and weak) “security through obscurity” type of principal. Somehow I doubt the “magic arguments” for pacman are for either though 😅

              Really, sometimes computers can be a mess, we’re just used to that mess.

              Oh yes for sure, computers are quite the double edged sword - vastly handy and important tools but also a royal pain in the ass way too often…

              • mafbar@lemmy.worldOP
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 year ago

                That makes sense about the magic numbers! Though I suspect that that isn’t the case for pacman’s commands. This might be totally false but Arch is designed with simplicity and elegance in mind, and so short single letter commands to manage your entire system is preferred.

                Just out of curiosity, are you a developer or sysadmin?

                • russjr08@outpost.zeuslink.net
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  1 year ago

                  Just out of curiosity, are you a developer or sysadmin?

                  Somewhat both! Most of my background is software development, but I always felt it was important to have decent sysadmin skills so that I’d be able to fully understand the requirements of something that I could be in charge of developing (or at least, helping develop).

                  This idea was further cemented when I started hearing more and more cases of professional sysadmins having a disdain for developers not understanding things like DNS. And to be fair, I think the reverse is important too - that sysadmins should have at least some knowledge of the development world. At the end of the day, usually both roles have to coexist with each other in a symbiotic relationship of sorts or else it doesn’t work. If you don’t have people to make an application, then you have nothing to deploy - but if you have no one to deploy and maintain the environment an application runs in, there’s no point in creating it. It makes me sad to see that even to this day there still tends to be an “us vs them” mentality from both sides, but I guess that’s just humanity in general…

                  Funnily enough, at my current job my roles are the opposite - I primarily do a lot of system administration, but every now and then I do some of the development at my job as well.

                  It worked out though, because it got me more into the sysadmin side of things and I try to strengthen my knowledge of systems administration even in my personal time - that’s one of the reasons why I’m hosting the instance I’m commenting from 😁

                  Probably a longer answer than you were looking for, but there you have it!

                  • mafbar@lemmy.worldOP
                    link
                    fedilink
                    English
                    arrow-up
                    2
                    ·
                    1 year ago

                    Ah I see! So you were/are both, that’s why you can understand both perspectives. I see, you’re your instance’s host! Nah, thank you for sharing! I’m quite new to the free/open-source software and Linux world, and this meme sort of sums up my feelings about the different Linux distributions. I guess I’m still in that infatuation phase where I think of distros as cool and looking at new cool stuff and projects. I’m not a technical person, so this is a total noob’s perspective.