Live data from Hacker News

Mosh

jefftk.com

121–130 of 152 posts

Re: Mosh

#121
post #58

Earlier quoted context omitted.

Why do you code on a remote server?

Not OP, but I frequently code remotely from an iPad and from laptops that may not have a full dev environment available. It didn’t even occur to me that this was a foreign concept to folks!

He might be asking why your laptop does not have a full dev environment.

Re: Mosh

#122
I use mosh in tandem with tmux.

About say 10% of my reconnects would fail with mosh, and the session would be orphaned. But combining with tmux, even if I lost the mosh session I could make a new one and reattach to tmux.

My use case was iPad/iPhone remote working. (Usually while visiting in-laws or on a plane) Very intermittent connectivity.

I used the open source blink terminal for iOS (which I bought because it’s great). It can use mosh.

Re: Mosh

#123
post #53

As someone who codes on a remote server the whole day, mosh is absolutely necessary and it is fantastic Advantages: - you dont see any lag when you type, it is exactly as if you were on your local machine - when network disconnect, the terminal freeze and when network is up again, the terminal becomes interactive again preserving everything in between - connection is preserved as long as the terminal is open, so even…

Drawbacks: - No commits in github in over 9 months, PRs and issues are stacking up. - I've had friends report clipboard broken in latest Mac OS X version. Don't get too attached to mosh.

What does mosh have to do with the clipboard?

Re: Mosh

#124
post #113

Earlier quoted context omitted.

>But what’s the alternative? Local development with syncing back to a server? I'd say this is a perfectly fine solution for a lot of cases. Not all, of course, like your iPad one sounds a great fit for mosh (and I'm gonna try it out!) But even a RaspberryPi can power a really powerful terminal. You can use sshfs[0] to mount a remote drive over ssh. Obviously there will still be some lag - `ls` will require a round tr…

Blink is a great and open source SSH/Mosh client for iPad. https://blink.sh/

This sounds like a joke but is entirely serious:

How is mouse support in Blink? I've been searching online and can't find a good answer. I regularly use the mouse in Terminal.app to manipulate Tmux windows and move around in the Micro text editor. I am curious about Blink, but hesitant to drop $20 if it turns out it doesn't work the way I need it to for terminal usage.

Re: Mosh

#125
post #58
post #53

As someone who codes on a remote server the whole day, mosh is absolutely necessary and it is fantastic Advantages: - you dont see any lag when you type, it is exactly as if you were on your local machine - when network disconnect, the terminal freeze and when network is up again, the terminal becomes interactive again preserving everything in between - connection is preserved as long as the terminal is open, so even…

Why do you code on a remote server?

Since no one has put this reason out there: to have one's development OS mirror production[1]. IME, the "develop on Mac, break on Linux" problem is not uncommon, even with high level abstractions. Plus, things like docker are native.

This can be all done in a VM, of course. I personally like the remote server, especially since they can be spun up so easily with cloud services now.

[1] - Though sometimes that's impossible. I.e. embedded.

Re: Mosh

#126
post #58
post #53

As someone who codes on a remote server the whole day, mosh is absolutely necessary and it is fantastic Advantages: - you dont see any lag when you type, it is exactly as if you were on your local machine - when network disconnect, the terminal freeze and when network is up again, the terminal becomes interactive again preserving everything in between - connection is preserved as long as the terminal is open, so even…

Why do you code on a remote server?

My work prefers their IP be kept inside their network, so to speak. Yes, nothing really prevents me from cloning my work git over the VPN and doing the work locally, except for norms and limited local disk space.

Re: Mosh

#127
post #121

Earlier quoted context omitted.

Not OP, but I frequently code remotely from an iPad and from laptops that may not have a full dev environment available. It didn’t even occur to me that this was a foreign concept to folks!

He might be asking why your laptop does not have a full dev environment.

Space? Performance? Builds typically perform best directly adjacent to storage, and if you're working with a large project syncing that back and forth may be slow.

Re: Mosh

#128
post #58
post #53

As someone who codes on a remote server the whole day, mosh is absolutely necessary and it is fantastic Advantages: - you dont see any lag when you type, it is exactly as if you were on your local machine - when network disconnect, the terminal freeze and when network is up again, the terminal becomes interactive again preserving everything in between - connection is preserved as long as the terminal is open, so even…

Why do you code on a remote server?

My laptop does not have enough disk space to check out my repository.

Also, security policies. But I like the first reason more.

Then again, my laptop won't run friggin mosh, because of security policies.

Re: Mosh

#130

Earlier quoted context omitted.

If you are in a buffer for a remote file, then M-x compile should run make on the remote machine. Docs are here: https://www.gnu.org/software/tramp/#index-compile

Ooh, nice. I'll have to take a look at it again. That may be something that I accidentally broke in customizing my environment. I bound `C-c C-c` to look for either a Makefile or a SConstruct in the current directory, walking upwards up the hierarchy until one is found, then to launch either make or scons depending on which one is found. That may have been the source of my remote issues.

Tips if you're writing your own elisp:

- If you're walking the filesystem, make sure you start from the "default-directory" variable.

- If you call other programs, make sure you use "process-file" (for synchronous processes) or "start-file-process" (for async). Using "call-process" or "start-process" unfortunately won't do the right thing, but the two functions I mentioned are mostly drop-in replacements.

Post reply on HN