lunes, 23 de diciembre de 2019

Do not delete tmux dead panes

I've been using tmux for about a year. tmux-fingers and the feature that I helped add of instant pasting was what triggered the move.

Even I can't exactly replicate my screen workflow in tmux, I'm more than happy with the tradeoff.

Here's a nice option I didn't know about tmux: "remain-on-exit"

By default, tmux (like screen) kills the panes (or frames, or windows, or however they are called) when the process inside them dies. And usually, that's what you want.

But there's a case when you probably don't want this: "parallell --tmux"

I use GNU parallel as much as I can. I find it an awesome tool. Very hacker friendly and composable with everything you're already doing.

So I was recently using it to build packages for multiple distros. The command was something like  "parallel ./ --tmux {} ::: alpine ubuntu".  But when the processes finish (both successfully or not), the pane disappears, and doesn't let you review and debug the outputs.

Setting "set-option -g remain-on-exit on" on tmux, leaves every pane opened for your inspection.

viernes, 6 de diciembre de 2019

Making "docker run ... bash" Remember

Here's a small docker+shell hack I've never seen around and feel it makes a difference if you're getting in and out different (but related) containers. Very hackish, but works surprisingly well! Don't try it at home or rely on anything from it for other tools, as it doesn't compose very well, but hey... it's free :)

It's shell monkeypatching, and some kind of command parsing that looks like tcl/lisp-y list munging. Enjoy!

miércoles, 4 de diciembre de 2019

Software Like Scrabble

I don't know where did I read this one but talking about how development is not linear, someone was comparing it with scrabble, where you could add words only connecting one letter, and be "ok", but if you really want to get the max scoring, you have to think of synergies (gasp), and symetries, and how to reuse components in multiple subsystems.

I don't remember the exact quote, but I like to think it as well. Although iterating is THE WAY, focus and review of greater goals help you reuse in non-obvious ways. I'm not sure if this goes against TDD, or some other methodology (but it really shouldn't)