Presently trying out an account over at @[email protected] due to scraping bots bogging down lemmy.today to the point of near-unusability.

  • 1 Post
  • 139 Comments
Joined 2 years ago
cake
Cake day: October 4th, 2023

help-circle

  • It does sort of suggest that from a UI standpoint, a chunk of users doesn’t really deal well with the traditional paradigm of “opening a document in an application consumes resources, and part of the job of the user is to manage those resources”. Like, maybe Chrome should just do the equivalent of, at least by default, converting a tab that hasn’t been viewed for some time into something akin to a bookmark, just reload it when it’s viewed. Or at least push the data into on-disk storage.

    I don’t use Chrome, but Firefox does something vaguely-analogous to that for session storage — like, if Firefox dies unexpectedly, restored tabs won’t reload content until actually viewed, I assume to avoid the thundering herd problem.

    I remember when I first encountered mobile OSes auto-killing programs and stuff to try to manage memory for users. I thought that it was pretty insane. But…clearly some users have trouble with it, and maybe it’s a reasonable UI change for them. I know people who had difficulty, on various desktop OSes, understanding the significance of starting a program and the idea that a running program would consume memory and perhaps CPU time.




  • tal@lemmy.todaytolinuxmemes@lemmy.worldFish rules
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 days ago

    I mean, that’s not a question I can answer for you. I have never had a problem, myself, but I have no idea what your professional situation is. There are a shit-ton of ways to move git repositories around. If you can ssh out, if you can move physical storage in and out, if you have https out (though that’ll be unidirectional in). I doubt that a typical IT department is going to care about you moving your dotfiles in, so if they do block something, probably worth a try just saying “I just want to pull my dotfiles from home; what’s a good way to do that?” My guess is that most IT departments aren’t going to have an issue with that. If you work for an intelligence service or something that has really super-stringent security requirements, then having any data movement in or out may be more of a headache.

    I would be careful to avoid sticking credentials (keys, passwords, anything like that) in any git-managed dotfiles. Not an issue for most software, but there are a few packages that will do that (neonmodem, a BBS-themed console Linux Lemmy client, does that…was just trying it yesterday.) You don’t want to be dumping your home credentials all over in your git history, and work isn’t going to want you pushing work credentials out.


  • tal@lemmy.todaytolinuxmemes@lemmy.worldFish rules
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    9 days ago

    I have no shell configs of any kind because it seemed like everytime I used another computer, I would not have them and I would end up having the re-learn everything.

    What I do is store my dotfiles in a git repository, and leave symlinks to the files in that repository. Then, when I move to another computer, pulling over all my configuration consists of doing a git pull to pull the git repo over and then running a command to set up the symlinks on that new computer. I can also make changes and selectively push things in. Some things need to be specific to a computer, and those don’t go in.

    I use a homebrew script to set up the symlinks. A number of people use GNU stow for this.

    kagis for an example of someone using stow

    https://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html?round=two

    If you edit the symlinks in emacs (and I imagine vim), it picks up on the fact that they’re symlinks into a git repository and that they’re version-controlled.

    So, like:

    • Have a bare git repository on home machine, the “master” copy.

    • Every machine with an account has a non-bare dotfiles git repository checked out and symlinks pointing into that repo.

    • Make any changes on a given machine like you normally would, then git commit them to the local non-bare dotfiles git repo and push them to the master repository.

    • If setting up on a new machine, pull the git repository, and then run the command to set up the symlinks.___





  • tal@lemmy.todaytolinuxmemes@lemmy.worldAn awkward realization
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    12 days ago

    I mean, there’s a point in data structure complexity where it’s useful to use Python.

    But as to dicts, sure. You’re looking for zsh’s “associative array”. Bash has it too.

    zsh

    $ typeset -A mydict
    $ mydict[foo]=bar 
    $ echo $mydict[foo]
    bar
    $
    

    bash

    $ typeset -A mydict
    $ mydict[foo]=bar
    $ echo ${mydict[foo]}
    bar
    $
    


  • tal@lemmy.todaytolinuxmemes@lemmy.worldAn awkward realization
    link
    fedilink
    English
    arrow-up
    15
    ·
    edit-2
    13 days ago

    To be fair, a lot of the programs don’t use a single character, have multiple spaces between fields, and cut doesn’t collapse whitespace characters, so you probably want something more like tr -s " "|cut -d" " -f3 if you want behavior like awk’s field-splitting.

    $ iostat |grep ^nvme0n1
    nvme0n1          29.03       131.52       535.59       730.72    2760247   11240665   15336056
    $ iostat |grep ^nvme0n1|awk '{print $3}'
    131.38
    $ iostat |grep ^nvme0n1|tr -s " "|cut -d" " -f3
    131.14
    $
    




  • tal@lemmy.todaytolinuxmemes@lemmy.worldi use arch btw
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    28 days ago

    Not certain of whether you’re thinking specifically of plain ASCII art or also ANSI art (which was specifically around that time and made use of PC drawing characters and ANSI escape sequences), but there’s a software package called ansilove that will render ANSI art, as well as some related text art formats, into an image for viewing.

    https://www.ansilove.org/

    It’s packaged in Debian Trixie.

    https://16colo.rs/ is a gallery of ANSI art. A lot of the thumbnails are in grayscale, but tap on them and they’ll open up and have a lot of colorful artwork.