• 0 Posts
  • 9 Comments
Joined 2 years ago
cake
Cake day: June 18th, 2023

help-circle
  • This is why i refuse to use zsh. I have nothing against it but if i get paged at 3 in the morning and need to access a production server I need my as little friction as possible.

    When Amazon or canonical or whoever start to ship servers with zsh instead of bash then I’ll look into it, but ultimately bash, like sh, have a different target audience than zsh. Bash and sh are designed as system admin or ops utilities first and zsh is more geared towards developers. They are incredibly similar in design and syntax, it’s really just philosophically, who is this tool best suited for?

    Fwiw if we could start it all from scratch and have our choice of today’s options, i think oils does a lot right, and the way it’s implemented especially wrt whitespace parsing is actually consistent and sane and has a robust test suite to back it up, especially compared to the old guard.

    But again, until somebody starts shipping oils I’m going to keep using bash.

    My philosophy for things like aliases and functions is to only create them for things that i cannot commit to memory and type quickly. For example a common alias is ll which often expands to ls -l. What this does to me is i tend to use that reflexively only to find out i need a different invocation anyway like ls -1 or ls -alFH .

    But let’s say i need to know what server in my ceph cluster is the manager currently so i can go to the WebUI that’s something I’ll probably not be able to remember:

    # relies on yq4
    ceph_dash ()
    {
        if [[ -z ${CEPH_DASHBOARD_ADDR:-} ]]; then
            CEPH_DASHBOARD=$(ceph mgr services | yq '.dashboard');
            CEPH_DASHBOARD_IP=$(sed -E 's|https?://([0-9\.]+):8443/?|\1|' <<< "$CEPH_DASHBOARD");
            CEPH_DASHBOARD_HOST=$(nslookup "$CEPH_DASHBOARD_IP" | sed -E 's/^.+name = ([^\.]+).+$/\1/' | head -1);
            CEPH_DASHBOARD_ADDR=$(sed -E "s|$CEPH_DASHBOARD_IP|$CEPH_DASHBOARD_HOST|" <<< "$CEPH_DASHBOARD");
            export CEPH_DASHBOARD_ADDR;
        fi;
        if [[ ${XDG_SESSION_TYPE:-} == tty || -n ${FORCE_TTY:-} ]]; then
            echo "$CEPH_DASHBOARD_ADDR";
        else
            xdg-open "$CEPH_DASHBOARD_ADDR";
        fi
    }
    

    This is more complicated than it needs to be but basically once the mgr is determined it’ll be stable so i cache the result. If i find it has moved i can unset $CEPH_DASHBOARD_ADDR or prepend the function call like CEPH_DASHBOARD_ADDR= ceph_dash. The hostname nslookup is optional but nice to have. Then if you have a desktop it should open in the default browser or whatever you have that handler pointed to. If it’s just a tty it’ll echo it out for you. You can also do FORCE_TTY=anything ceph_dash to get the echo even if you have a desktop

    Anywhere i administer ceph i need to have the _admin keys available so i have a script to place those and my functions all in one go.

    All that being said, my mentor who got me into tech is neurodivergent like myself and he has like a whole bespoke framework where depending on the folder he’s in certain aliases and functions will be available and a special global scope. He’s gone in on zsh because it helps him to pair with other engineers, and both of those decisions suit him. We work on a team together now again and i wouldn’t dream of imposing my decisions on him any more than I’d allow it in reverse.

    You end up learning cool stuff that way, like i asked him how he handles the on-call situation, he had been doing bash for decades and he can model the subtle and not so subtle differences between bash and zsh. As for aliases and functions he keeps a copy of his global set in his sshconfig that runs if the server allows running RemoteCommand on connection which i thought was super cool.






  • Yeah, the games you want to play on Linux, you should install those to a drive formatted with ext4, btrfs, or done other Linux native filesystem. Specifically you will run into issues using things like Lutris because setup scripts largely assume this to be the case and make use of things like soft or hard links.

    And while ntfs has similar functionality like junction, the standard Linux tool to create links ln and other basic commands like cp don’t work with ntfs (afaik Windows still doesn’t even expose that functionality from ntfs) and you’ll see errors similar to what you described, either looking like a permissions error (eg unable to create) or depending on the tool you may get a more specific error.

    I have less experience with Heroic but if you want something close to turnkey Linux gaming of Windows titles a Linux filesystem is non negotiable unless you feel like debugging things any time sometime doesn’t work. From my experience with Lutris that’s not the only reason you’ll see issues either and your ability to diagnose and resolve those as they come up will be a factor.

    You should also get familiar with wine and specifically valce’s proton, figure out the command line invocation that will launch a title through proton like steam does since i imagine you aren’t running these through the steam client. Finally look into proton-ge (glorious eggroll) which i use almost exclusively for Windows gaming on Linux.

    Also learn what a wine prefix is and strongly consider using a different prefix for each game. Its just folders and for transparency you’ll have redundant files across them, but it lets you have different sets of dependencies for each title. So like one game you might need mono (open source c#) but another you might need actual C# and have wine also handle running that. This is a case where installing both might make neither game playable if both games and both dependencies are in the same prefix.

    The biggest issues you’ll run into that you may not be able to resolve with any Linux gaming setup that is running Windows software is anti-cheat. Epic’s EAC can work for some titles, I’ve seen steam deck specific instructions, but my game library is single player heavy so i rarely am challenged by these. Steam Deck adoption has helped there but it’s still slow going.

    I have Baldurs Gate 3 and BG3 Mod Manager all Windows native running through steam and proton on my Debian tower, just to underscore the success of this approach

    tl;dr use a file system that supports hard and soft (symbolic links), use proton-ge and a separate wine prefix for each game



  • Okay, I made a play on words and a hopeful statement with the implication that these would be one and the same revolution.

    I’m not sure why that merits putting words in my mouth and then accusing me of lip service. You are right that I likely won’t be on our even near the front lines, but that’s because the current form of government has already failed me and I am disabled by long COVID. It has failed me through medication shortages for my ADHD. And society has failed myself and all autists ever since that nazi fuck asperger first othered us. Probably before that even.

    Can I ask you to try coming in next time with a bit more charity, a lot more curiosity, and to check your assumptions at the door? I bet we are more alike than you think.

    There are really interesting conversations we could be having now based on what you said, and I think you genuinely want to have those conversations, and sort of hope you just misread my tone or intention and assumed that I on the other hand do not. I am autistic, and this is s things that happens a lot, especially with my neurotypical peers but even some of my neurospicy family are not immune.

    How could this exchange have gone differently if you had asked me what I think would or should come after revolution, or offer your own ideas. What form of government do we both see as ideal? What do they have in common, where do we differ. Let’s explore those things. We could be building each other up, testing our beliefs and improving them together through discourse, even and especially where we still disagree after that.

    And I’d like to make it clear that if the revolution doesn’t include a vision of a world that treats disabled folks as equals, or more specifically, one that supplants the medical model of disability with the social model, then my revolution hasn’t come yet. If it doesn’t include all folks, that black lives matter and trans lives matter, my revolution hasn’t come yet. If it doesn’t abolish prisons and police, my revolution has not come yet.

    I can never be front line infantry but i have other less common and equally necessary skills to contribute in the hardware and software space. Will we need computers? Drones? Secure communications? If so then we will need more than a few people like me, able bodied or not.

    Friend, what’s in your revolution? What are your passions and what are your struggles? How can I support you and what you need?

    Maybe we didn’t communicate well today, that’s okay. Let’s try again another time. I hope that’s something you’d consider in the future, if not with me, with someone else. But when the revolution comes, I know I will be there, and I have a pretty good feeling you’ll be there too.