Live data from Hacker News

Show HN: Shpool, a Lightweight Tmux Alternative

github.com

121–130 of 201 posts

Re: Show HN: Shpool, a Lightweight Tmux Alternative

#121
post #76

Earlier quoted context omitted.

shpool doesn't allow splitting screens either! But I guess in my head, screen is largely for resuming a shell connection on a remote host while tmux is a window splitter.

Screen and tmux are almost the same these days. Screen used to not allow side-by-side splits, but it can do that too now.

It has allowed that for a long, long time.

Re: Show HN: Shpool, a Lightweight Tmux Alternative

#124
post #117

Earlier quoted context omitted.

I use remote notebook and just connect to it. The key to out of order problem is simple: once a piece of code works - save it in .py module and import it. Very little discipline is required to achieve significant productivity gain. That way notebook is always clean and tidy and always resembles a “pseudo code”, with implementation detail hidden in modules (that were tested and are working).

You were talking about replacing the terminal with notebooks, I assumed you meant for terminal tasks. If you are using notebooks for notebook coding tasks then fine but what does that have to do with tmux?

There are two ways to run shell commands:

1. Jupyter has terminals feature in addition to notebook (New->Terminal instead of New->Notebook). You can run any number of terminal sessions, they will be persisten like tmix and each open in separate browser window.

They are also shareable and easy to collab, so you can toss the terminal URL to your colleague to let him continue where you left off, or let him monitor stdout as you run some long running process.

2. You can run shell command and capture its output in python var inside jupyter cell with “!” macro, for example:

  files = !ls *.csv

This allows you to mix&match and interleave bash and python and store intermediate data in variables, instead of pipes

  files = !ls *.csv
  pd.concat([pd.read_csv(x) for x in files]).MyColname.value_counts().to_frame().to_csv(“summary.csv”)


Just one sample I just used today: This code merge all csv files (and will correctly merge even if column names are random order in diff files), and group by one field and save stats.

This is more readable and maintainable than bash oneliners and magic with awk and more powerful

Things like read cav, json, write parquet, any manipulation with data, both local and remote is a breeze and I dont feel like constrained by bash syntax.

Most importantly code is readable and maintainable

Re: Show HN: Shpool, a Lightweight Tmux Alternative

#125
post #46

This is awesome! I hate the way tmux hijacks so much of my terminal's behavior (scrollback, seaching with escape-/, etc.) and I've been looking for something like this that will manage persistent sessions without any extra nonsense. BTW I think your readme shouldn't just characterize it as a resumeable ssh tool. I often need to start a long running process that I want to reconnect to later, or I want to put some alwa…

Do you know mobile shell (mosh)? [1]

Seems like most of the features you need are what mosh offers. I've been using it for a decade, probably, and it is pretty awesome for latent mobile connections (read as: throttled 2G @16kBit/s with interruptions).

https://github.com/mobile-shell/mosh

Re: Show HN: Shpool, a Lightweight Tmux Alternative

#126

This looks awesome, what a great simple idea. I like tmux, but native smooth scrolling is so much better. So is searching, copy and pasting. Is it tested on macOS? Ready for use in production? Thanks

You can definitely use it in production, it is deployed internally at Google and we have a bunch of users. It doesn’t currently work on MacOS, but one of my colleagues is currently working on a port to Mac.

Re: Show HN: Shpool, a Lightweight Tmux Alternative

#127
post #49

I'd love to try this, but most of the places that I would want to use it are servers, and the rust requirements are way beyond where debian-stable lives. Too much hassle to muck with backports and package pinning for a QoL tool - my feedback would be to try to make this install without tomfoolery on the stable branch of major distros.

Rust executables generally compile to static binaries. No you don't need to install Rust on the server, just compile once locally and copy the binary.

That is exactly the problem. Debian prefers the dynamic linking approach, where libraries can be updated individually. The problem usually comes down to having all the cargo dependencies packaged inside the debian repo. Which is doable, a similar thing happens for pip and other tools. But still kinda messy

Re: Show HN: Shpool, a Lightweight Tmux Alternative

#128
post #77

Earlier quoted context omitted.

The thing is that without hijacking it and passing it through, you can't have nice things like handling resizes, supporting attaching with multiple terminal emulators, or reconnecting to applications that make heavy use of terminal escape codes, because all of those set up persistent state in the terminal emulator. As a result, any tmux-like layer needs to emulate a console in order to get a view into the state, and…

You definitely don't need the in-memory terminal emulator to handle resizes or allow attaching with multiple local terminal emulators, since dtach does both and does not have an in-memory terminal emulator. > I'm actually confused about why they'd go to the effort of implementing a VT100 emulator, write the code to redraw the screen from it Well, we kinda cheated here. shpool_vt100 is just the already existing vt100…

Hi. Nice kit. > I couldn't use my normal `i3`/`sway` bindings to switch between terminals inside a tmux session Just curious, what are your normal 'i3'/'sway' bindings that you cannot get to work with tmux ? And what actual terminal program do you use ? Perhaps tmux wants more config than most people care to bother with, but scrollback and copy-paste can be configured just as you like.

Re: Show HN: Shpool, a Lightweight Tmux Alternative

#129
post #46

This is awesome! I hate the way tmux hijacks so much of my terminal's behavior (scrollback, seaching with escape-/, etc.) and I've been looking for something like this that will manage persistent sessions without any extra nonsense. BTW I think your readme shouldn't just characterize it as a resumeable ssh tool. I often need to start a long running process that I want to reconnect to later, or I want to put some alwa…

Do you know mobile shell (mosh)? [1] Seems like most of the features you need are what mosh offers. I've been using it for a decade, probably, and it is pretty awesome for latent mobile connections (read as: throttled 2G @16kBit/s with interruptions). https://github.com/mobile-shell/mosh

I think mosh first appeared in 2012? How can you have been using it for decades?

Re: Show HN: Shpool, a Lightweight Tmux Alternative

#130

I super duper highly recommend iterm2 (macos) + its integrated tmux support. It was relatively popular in my circles at google when I was there. It comes with this tool’s benefit of native scrolling/cp paste PLUS the huge benefit of “right click to split vertical/horizontal”.

On that front: I've been using wezterm which includes a built-in tmux+mosh functionality, and it works quite well. It gives you first-class scroll/copy/paste management and multi-windows, plus session re-attachment. Probably 50% of my use of my mac is just SSHing in to my Linux box, and wezterm works great for that.

Last I tried there’s 2 major limitations, one is that the version on both ends has to be compatible, another is that it seems the wezterm at the host must be available in the system default PATH. This makes it hard to adapt to arbitrary remote systems that you have limited control of. Tmux+mosh doesn’t have these limitations (well I’m sure the mosh client and server must be compatible to each other but given it is so stable that the last 2 updates are 5 years apart there won’t practically be any problems).
Post reply on HN