3 ms·
> Can you hook a full ncurses up to this? Yup! Any ncurses thing should work great. I couldn't find a golang curses lib that doesn't hardcode to stdout except
by shazow 12y ago
> Can you hook a full ncurses up to this?
Yup! Any ncurses thing should work great. I couldn't find a golang curses lib that doesn't hardcode to stdout except for crypto/ssh/terminal, but it's fairly limited.
> Going by my input lag, it looks like all keypresses are sent to the server, can you implement readline somehow or can i configure SSH to buffer input locally? Cook terminal mode or something?
I believe that's up to your ssh client. There are things like https://mosh.mit.edu/ https://mosh.mit.edu/ which try to mask the latency.
> What's pty.go used for?
For bootstrapping the pty request/response. :)
> If i write a line that's longer than my terminal width, it wraps onto a second line, but new incoming messages obscure the first line
Yea, there's a bug with long line reflow, not sure how to fix it. :(
- Scaevolus 12y agoYou could probably write raw ANSI escape sequences -- they're essentially universal by this point. http://en.wikipedia.org/wiki/ANSI_escape_code http://en.wikipedia.org/wiki/ANSI_escape_code ncurses is overkill nowadays when everything is a (VT100) emulator.
- shazow 12y agoYup, that's how most of these curses libraries work. It's a lot of work doing layout with straight up escape sequences, though.
- Scaevolus 12y agoCompatibility is most of the complexity: http://invisible-island.net/ncurses/terminfo.ti.html http://invisible-island.net/ncurses/terminfo.ti.html
- qcoh 12y agoHere's [0] a small IRC client that uses escape sequences for its UI if you want to look at it. Not mine. [0] https://github.com/rcr/rirc https://github.com/rcr/rirc
- yebyen 12y ago>> If i write a line that's longer than my terminal width, it wraps onto a second line, but new incoming messages obscure the first line > Yea, there's a bug with long line reflow, not sure how to fix it. :( This is a bug we had in the hoon chat client on Urbit that has seen various iterations of fixed, not that this is at all helpful, because it is written in hoon it will probably seem like line noise even if I could bisect and show you the commits that fixed it for urbit... But if you want to come to chat on ~doznec, there are about half a dozen people who can translate hoon and probably can explain in plain English what the fix looks like.