• 3 Posts
  • 20 Comments
Joined 1 year ago
cake
Cake day: July 22nd, 2023

help-circle

  • According to tab autocomplete…

    $ git
    zsh: do you wish to see all 141 possibilities (141 lines)?
    

    But what about the sub options?

    $ git clone https://github.com/git/git
    $ cd git/builtin
    # looking through source, options seem to be declared by OPT
    # except for if statements, OPT_END, bug checks, etc.
    $ grep -R OPT_ | grep --invert-match --count -E \
    "OPT_END|BUG_ON_OPT|if |PARSE_OPT|;$|struct|#define"
    1517
    

    Maybe 1500 or so?

    edit: Indeed, maybe this number is too low. git show has a huge amount of possibilities on its own, though some may be duplicates and rewords of others.

    $ git show --
    zsh: do you wish to see all 489 possibilities (163 lines)?
    $ man git-show | col -b | grep -E "^       -" --count
    98
    

    An attempt at naively parsing the manpages gives a larger number.

    $ man $(find /usr/share/man -name "git*") \
    | col -b | grep -E "^       -" -c 
    1849
    

    Numbers all over the place. I dunno.


  • Huh, TIL.

    To be fair, git switch was also derived from the features of git checkout in >2.23, but like git restore, the manual page warns that behavior may change, and neither are in my muscle memory (lmao).

    I’ll probably keep using checkout since it takes less kb in my head. Besides, we still have to use checkout for checking out a previous commit, even if I learn the more ergonomically appropriate switch and restore. No deprecation here so…

    edit: maybe I got that java 8 mindset

    edit 2: Correction – git switch --detach checks out previous commits. Git checkout may only be there for old scripts’ sake, since all of its features have been split off into those two new functions… so there’s nothing really keeping me from switch.


  • It probably is, but I think their main point is the protest against the age-old delineation into “GUI vs CLI” camps. I’m not saying that you’re elitist, even if your statement might be interpreted as such (it’s hard to communicate tone online but the quotations around “their workflow” could appear mocking), but regarding the structure of your statement, I had a “Windows users are all button-presser noobs” phase and would’ve typed something similar about the Git CLI if time was decently rewound (sans the kindness of a “use what you like” statement). They could be interpreting your statement as a propagation of the anti-GUI stereotyping.

    Evidently they prefer GUI but can effectively use the CLI – no one disagrees that the CLI is more functional.


  • Click to view diffs is super ergonomic; on the other hand, I actually have a story about the Git CLI trumping the GUI (spoiler: reflog).

    In high school we had gotten the funding to build a robot, and one of the adults in charge – guy was brilliant – was using GitHub Desktop to conduct a feature merge with the student who served as team lead. The thing was, he was used to older codebases, so all of his experience was with CVS instead of Git – so when the two slightly messed up the git merge, they discussed recloning everything instead of wasting time plumbing the error (relevant xkcd).

    That was one of the earliest times I had the cajones to walk up to a superior and say “No, you’re doing this totally wrong. You don’t have to do that.”

    He looked at me and nodded. “What would you do instead?”

    “Reflog.”

    “Reflog? I’ve never heard of it before. Can you show us?”

    I hopped onto the laptop and clicked around GitHub Desktop, but couldn’t manage to find any buttons related to reflog… so I went straight to cmd.exe instead.

    git reflog
    git reset --hard "HEAD@{7}"
    

    “Done. We can continue rebasing.”

    And after that, the advisor complimented me for using the command line tool!

    “Lots of GUI apps are just limited frontends to the real meat and potatoes, the command line. Nice job!”

    I felt like a wizard! And so I became the team’s Git-inator.

    edit: pruned story







  • Hahaha, I’m overjoyed that you’re joyful! Net positive.

    You aren’t alone on the absolutivity thing, autism or not. Absolute blanket statements have always made me uncomfortable. With stuff like

    Leftists are all self-righteous.

    American Republicans are all backwards.

    Christians are cultists.

    and the obvious accompanying internet convoy of

    Clicks -> discussion -> algorithm promotion -> pipeline -> opinions upgrade from “bad cases of” to “lots of them” to “all of them”

    not only sacrifice nuance and make it easy to Just Stay Agreeable, but discourage any questioning of the status quo.

    Of course, one can argue that this is an online thing, an archetype of Reddit and Tumblr and Twitter spaces, but now I don’t even question these things aloud in real life. I don’t want to be seen as

    The “see-from-all-sides” guy is obviously a closeted bigot lmao.

    in a place where reputation actually matters, but it’d be easy to lump me in like that. Nuancelessness is simple, kneejerk, catchy…

    Now, my point. I don’t think I’m making this up, and maybe I’ll get downvoted for this diatribe but I feel like disagreeing in real life has become much riskier. Am I sounding cynical again? As a solution (solutions aren’t cynical right?), optimally I’d want a way to discuss across views in an educated, “I’ll hear you out” way, but the real-life risk outweighs reward, and online spaces bubble-up really easily. Counterpoint: r/changemyview has put up promising resistance.

    The other day I saw this business school complaint discussion. It’s on a kind of out-of-touch subreddit, but what do you think of its survivalistic smile-and-wave message?

    Sorry for being so negative =.=


  • Wow, really interesting take! Made me realize…

    Wow. I’m the baddie.

    I’ve done my fair share of admit “AI bad, Twitter bad” and felt that shift towards cynicism, I admit – but 'til now I couldn’t see my own hand in the subject. I’d worked hard over the years to avoid the more overt frustrator communities like r/facepalm, but as much as I’d like to presume… I’m clearly not doing so much better after all.

    That ambient cynicism… I still perpetuated it, I still wrote those kneejerk comments, I still went on the preordained in-group spiel of valuelessnesses.

    It’s so easy to insult the things you mentioned, to partake in the “I Want to be Agreeable and Get Points” mindset and dunk. But it’s precluding our ability to experience the things you mentioned in para #4. I want more of para #4 in my life… I’ll need to think things differently.

    Idk. Thanks for the meaningful substance. :p


  • Oh I love the “walk me through what I’m about to do” concept. Dry runs should be more common – especially in shell scripts…

    The world would be a better place if every install.sh had a --help, some nice printf’s saying “Moving this here” / “Overwrite? [Y/N]”, and perhaps even a shoehorned-in set -x.

    Hope your r/w wasn’t eaten up by the subfolder incident (that I presume happened) :P




  • Hah, stochastic parrots.

    Makes me wonder. Every laziness I’ve had with the vector guessers, I’ve seen an exact counterweight.

    matrix scrombulator webpage (2007-2014)
    Here’s random code. Pray it works Free ancient code at man 3 getifaddrs.
    How does this API work? (when the API has below 10 million sample lines of code) Incredibly concise documentation worth spending 2 minutes on or HTML text without margin lines worth spending 20 minutes on
    Maybe this is what’s causing your bug. Investigate a, b, and c. Conclusion sentence. footnote in ArchWiki / archetypal 2009 StackOverflow duplicate
    Here’s the main idea of X… you need to take into account a combination of facets to ensure safety. Angry blog post about X that’s oddly technical (now you see both sides)

    One, you can invoke more often (throw ChatGPT configs against the wall until it doesn’t error); the other you can invoke more deeply. So I can’t help but wonder – when we cancel out all the terms – if the timesaving sum is positive or negative. ¯\_(ツ)_/¯



  • Yeah, it’s pretty funny how distros just passed each other by like that. Back then it was Debian that was regarded as the hyper-poweruser distro:

    The reason I havn’t used Debian is because I can’t install it. “This guy is totally clueless” you might think. My only response is that I’m writing this on a Gentoo box that I have installed myself.

    And then now there are plenty of people reading this thread who liked Windows 7. As time passed, their grade on the ease-of-use of A passed the don’t-get-in-my-way of B, and a load of Windows 10ers jumped ship to Linus & Friends, the last place their Windows 7 selves would have expected to go. Always a reminder that the end of history isn’t now.


  • Bending the question a little but my second “first impression” of Arch’s “simplicity” surprised me the most.

    I was running Gentoo for a while before deciding to move back, and I was surprised that somehow I had

    • saved space
    • gotten faster at doing new things (…)
    • didn’t lose any boot speed or anything like that

    Granted, I had jumped on Gentoo because of misconceptions (speed, ricing, the idea that I needed USE flags), but going back, I saw things more clearly:

    • the AUR being basically a shell script download + 300 MB of base-devel was simpler and more space-efficient than /var/db/repos (IIRC – since the portage and guru ebuilds were all held locally anyway after syncing, an on-demand AUR saved space).
      • the simple automatic build file audits on Arch felt more clean to me. I like checking my build files; had to make a script for the guru ebuild equivalent (but maybe there’s a portage arg i missed somewhere – wouldn’t be the first time)
    • Arch repos separating parts of packages in case you don’t need some part (like splitting some font into its languages, or splitting a package into x and x-doc and x-perl) was almost a simple USE flag-ish thing already
    • /etc/makepkg.conf was Gentoo’s make.conf. And its build flags looked similar to the CFLAGS I manually set up anyway.
    • My boot time (btrfs inside LUKS with encrypted /boot) was the same with systemd vs. openrc
    • I realized I liked systemd (because of the completeness of my systemctl muscle memory, like with systemctl status and journalctl, or managing systemd-logind instead of using seatd and friends).

    Not bashing on Gentoo or anything, but it’s when I realized why Arch was “simple.” Even me sorely missing /etc/portage/patches was quelled by paru -S <pkg> --fm vim --savechanges.

    And Arch traveling at the speed of simplicity even quantifiably helped: Had to download aur/teams the other day with nine-minute warning.

    ¯\_(ツ)_/¯