Remix.run Logo
godelski 2 days ago

In the last 5 years I pretty much fully migrated to my laptop being a terminal for other machines. I more use it like a local machine in HPC: web browsing, word processing, scripting. Anything serious is done remotely. But I also live in the terminal and so realistically what's the difference? 99% of the time the result is that I get to use a "big" computer without having to carry it around.

FWIW, I'm not a big fan of AI coding. I use AI (including LLMs) and I am an AI researcher, but the vibe coding just hasn't clicked despite constant efforts. I guess it can make more sense to do it if you're programming from your phone because while normally typing isn't the bottleneck it definitely is on the phone (or at least far less comfortable)

wolfgang000 2 days ago | parent | next [-]

Same setup as mine, I have an OpenVPN server running in my router, and my main PC has wake-on-lan and a KVM as a backup to turn it on and off.

I have an old used Dell Latitude that I use as a pseudo thin client. I ssh into my PC, and everything just works.

I really like this setup because I only have one environment, so everything is there, and I don't have to install anything in the laptop

godelski 2 days ago | parent [-]

  > I really like this setup because I only have one environment, so everything is there, and I don't have to install anything in the laptop
Yeah that's one of my favorite parts. Same about living in the terminal. I can be effective anywhere nearly instantly. I carry everything around in my dotfiles and keep it small (keep the .git folder small and don't add anything except text files)[0].

On that note, one thing I highly recommend to people is to add some visual clues to tell you which machine you're on. I use starship and have a few indicators but I also have some PS1 exports that I've used in the past or use in new tmp instances (I HIGHLY recommend also doing this for when you're using the root account). It can get confusing when you have different tabs on different machines and it is easy to mistake which one you're on.

[0] I also recommend keeping notes there if you like writing in markdown. Files are so tiny that it's worth having them. It's benefited me more times than I can count.

jdshaffer 2 days ago | parent [-]

If you don't mind, I'd like to hear more about your setup. I have a bunch of bash scripts and python programs I've used to make working in the terminal easier (and more fun). Are you saving your dotfiles are a git project and then just syncing and pulling them down from there? I'm not an expert, just a tinkerer, but I like tinkering in the terminal. :)

Thanks in advance!

herewulf a day ago | parent | next [-]

Not the parent but a project (glorified Bash script) called vcsh[1] has served me well over the years for managing multiple Git repositories containing my dotfiles (separation of concerns).

Lately I have migrated some of that to Guix Home because the other half of the problem is having all the dependent programs necessary for the dotfiles installed automatically at the appropriate versions.

The latter one especially falls into the realm of tinkering. :)

[1]: https://github.com/RichiH/vcsh [2]: https://systemcrafters.net/craft-your-system-with-guix/guix-...

jdshaffer a day ago | parent [-]

Thanks for the input! :-)

godelski a day ago | parent | prev [-]

Yeah my dotfiles, notes, and scripts are in a single repo. I think the most important thing to do is organize. I just match the system. So I put everything that a rc file in ~/ in one directory and everything in ~/.config in another. Then if you have your repo downloaded all you need is to run 2 find commands like this

  find "${DOTFILE_DIR%/}/configs/" \
        -maxdepth 1 \
        ! -name "*.md" \
        -exec bash -c 'ln -Fis "${0}" "${CONFIG_DIR%/}/${0##*/}"' {} \;
It baffles me that people are so unorganized in their dotfiles. A little goes a long way to making your life easier. But then again people suck at bash so they're probably not thinking of using find this way. You could also use xargs to parallelize if you want but there'd be no practical speed difference for me

Another key component is to break out files. For example I have the directory ~/.dotfiles/rc_files/zsh. My zshrc file sources different files from that location. So I have a Linux file and OSX file there for anything that is specifically system dependent. If you want different configs on different machines you can check the hostname and use the same pattern!

Speaking of which, use functions! At first this is going to sound crazy but it's worth the effort and let's be honest, the effort is very low (though the initial rebase might not be depending on how messy you are)

  function _exists() {
      command -v "$1" &> /dev/null
  }

  alias_ls() {
    alias_lsd() {
        alias ls='lsd'
        alias la='lsd -A' # A drops . and ..
        alias ll='lsd -l' # h is automatic
    }
    alias_base_ls() {
        alias ls='ls -v --color=auto -h' # numerical sort, color, human readable
        alias la='ls -A' # ignore . and ..
        alias ll='ls -lh'
    }
    if ( _exists lsd );
    then
        alias_lsd
    else
        alias_base_ls
    fi
  }
  main() {
    alias_ls || echo -e "\033[1;31mls aliasing fucked up!\033[0m"
  }
  main
Yeah, it is a bit more cumbersome but it's really not that bad and

  1) debugging gets so much easier
  2) you know where everything is and what everything does. 
  3) trying new aliases, command tools, scripts, etc also becomes a lot easier. 
Following Unix philosophy has more advantages than disadvantages. I also strongly suggest adding comments because you'll forget why you did something. I'll often link to posts for this and for giving credit.

Since we're speaking of bash, bookmark this website: https://mywiki.wooledge.org/BashPitfalls

Fwiw, my main language is Python but for pretty much everything in the terminal I write in bash. You can often make oneliners that would traditionally be a lot of lines in Python. Not to mention it's usually faster. It's a good way to help you learn bash too! ^__^

jdshaffer a day ago | parent [-]

Thanks for the detailed reply, examples, and links! Yeah, I definitely rely heavily on bash script functions, but had never thought about using git to share or sync my scripts and little programs. Thanks again, I really appreciate it!

zahlman 2 days ago | parent | prev [-]

My desktop is 11 years old, but I still feel like it does so much that I wouldn't want any cloud services except for AI. (And there's no way this thing would handle a useful local model, but I'm also really not very enthused about the kind of data sharing involved in remote AI use.)

godelski 2 days ago | parent [-]

I mean the power of the work machine really depends on what your needs are. Definitely should adapt to whatever your needs are.

  > And there's no way this thing would handle a useful local model
So if you have a setup like mine then it is fairly trivial to incorporate that (or anything else). Either way you'll need a machine that can do the local AI though. Either that is on your "work machine" or you run the AI on a separate machine. You could even rent a machine and as long as you add it to your Tailscale network then you're connected.

I strongly suggest having a workhorse machine and then let other devices be your terminal into it. Your terminals can be very cheap (or an old machine) or as suggested, your phone.

zahlman 2 days ago | parent [-]

I appreciate the thought, but advice like this is completely irrelevant to my current circumstances (and personal principles) and would be very expensive (respectively, emotionally unpleasant) to implement.

godelski 2 days ago | parent [-]

Just trying to help given that you responded. I'm happy to help you find solutions but the constraints might be too much, unfortunately. If you don't have a machine that can run local AI and don't have the funds to buy one then frankly it just isn't in the cards. But hey, if you don't want to use AI or at least willing to use non-local then the setup probably doesn't require you to spend a dime.

zahlman 2 days ago | parent [-]

(I wasn't looking for a solution, just giving my perspective.)