Dear Clojurians: what's your terminal setup?

Interesting.

Workspaces as in different virtual screens or as in you have your screen divided into 3 subsections?

I’d love to see a screenshot, if you don’t mind!

May I ask about how you do your development remotely? Are you using terminal Emacs, and keep that running so that you can just log back into you development environment, or something else?

After ssh’ing to the remote server, I connect to a tmux session that has nested tmux sessions inside. The inner tmux sessions are each a development environment.

To make it more concrete, in the first inner session, I have Neovim and the Clojure REPL running in panes in the first window and the second window has the frontend Neovim and build watcher. I create new windows in that session as needed for that project.

Then, in another inner tmux session, I’ve been working with Yetibot and so I have a window with Neovim and the project REPL and another window for managing the database.

I have several more, but I hope the idea makes sense. Usually I’m only working in one inner session at a time, and then it’s just vanilla tmux. But then I can switch from one to another by using the outer tmux. I could do it all with one big tmux session, nesting makes it more straightforward to focus on one project at a time.

I assume this is for Clojure development?

I’m currently doing most of my development in Clojure, but I’ve used the same style for Python, Go, and Perl development.

What’s the best advantage of working this way?

The first benefit is the ability to pick up where I left off. I remember making several tabs in my mac terminal window when I was at work and then wanting to work from home and having to recreate all that context on my home computer. So I started using tmux to manage that and then made my multi-level tmux to handle multiple work threads.

The second benefit is resource usage. I run several repls and a whole host of other applications on the server and I can connect from my little Surface or Macbook and leverage all that processing power.

There are some disadvantages of using this method of development. For one, when I want to access one of these processes (like to see a frontend in my browser), I need to do some port forwarding with SSH or use a VPN. It also would not be suitable for things like mobile app development or anything that needs a thick client app. In those cases, I just use my local computer for development.

I hope all that makes sense. I’m happy to answer more questions if you have them.

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.