8 ms·
I feel like "parsing each keystroke twice" is pretty low on the list of things that wastes CPU cycles and drains my laptop battery. I cannot at all get worked u
by kelnos 2y ago
I feel like "parsing each keystroke twice" is pretty low on the list of things that wastes CPU cycles and drains my laptop battery. I cannot at all get worked up over this, getting to the point I'd pull out the word "poison" to describe it.
It's nice that Kitty does most of what tmux does built in, but as the author points out, that's not really all that helpful for anyone who does any work over ssh.
And to me, bundling all that into a terminal emulator is bloat. Terminals should be terminals. If I want a multiplexer on top of that, I will... use a multiplexer on top of that.
I am potentially sympathetic to the idea that tmux and screen make it harder for terminal developers to add new features to their terminals. I don't really know enough about the issues involved to form an opinion. But from the perspective of a regular user, I do not want a multiplexer in my terminal app. When I need one, I prefer to reach for an app-agnostic multiplexer like tmux or screen.
- colordrops 2y agoAgree with all your points. The main problem with Tmux that no one talks about is its arcane configuration and interaction patterns. If you set up a ton of config while gritting your teeth, it begins to work well, but the configuration semantics are a nightmare. I would love something similar to tmux that has sane configuration and theming. I switched from XMonad to i3 for the same reason.
- iiio8 2y ago[dead]
- usrbinbash 2y agoSure, but how often do you need to touch that config? Since I keep my configs in a repo, I just checked the last time I changed my `.tmux.conf`. Turns out it was 2018, and I changed a grand total of 2 lines. And I use tmux daily, not just remote, but also on my local machine. So yeah, if I am using something for more than half a decade without requiring any change, then its pretty safe to say that whatever hassles the configuration of that something imposes, is completely irrelevant.
- kergonath 2y ago> Sure, but how often do you need to touch that config? It’s not only the config, though. It’s the arcane shortcuts and the weird way it seems to handle most things (trying to get the mouse working is a bloody nightmare and it regularly borks the terminal). I have a mouse with a scrolling wheel, for example. It works fine with most programs over ssh, why is it such a pain with tmux? Such pains remain even after having felt down the rabbit hole and spent 2 weeks tweaking settings. iTerm2 is fantastic and I would be very happy to just use it and call the problem solved, but I don’t have a Mac at work.
- skydhash 2y ago> trying to get the mouse working is a bloody nightmare and it regularly borks the terminal It's literally one line of config. > It’s the arcane shortcuts and the weird way it seems to handle most things Tmux is a TUI and the shell and other software running on it are themselves TUI. There will be conflict and the prefix solution is actually simple. Tmux solves one particular problem and solves it well. It's on you if you want it to be something else.
- usrbinbash 2y ago> It’s the arcane shortcuts All of which can be configured.
- sigil 2y ago> Sure, but how often do you need to touch that config? More often than I’d like! tmux config has broken backwards compatibility on me multiple times over the years. This is fine for most software — you upgrade your config once and you’re done. However, the nature of tmux is that I use it on many servers, some old and some new, some with tmux 1.x and some with 2.x. Getting a ~/.tmux.conf from my dotfiles repo that works across both has been papercutty. Love tmux though & can’t imagine tty life without it — I run it locally as well as on remote machines.
- fl0ki 2y agoIt's interesting we've had such opposite experiences with tmux configuration. My home git log shows my first tmux configuration was in 2017. Since then, several options have been removed, they now throw an error on startup, and mess with muscle memory for key bindings that are essential to using a program like this. This means that to get tmux working properly again I have to catch up on years of release notes to figure out what I'm supposed to change. I have never once had to do this with screen despite using it for over 20 years. Any time my muscle memory is betrayed, I give up and go back to screen and don't bother touching tmux again for several months.
- yoyohello13 2y agoLook into zellij
- setopt 2y agoHave you tried `tmux-tilish` [1]? It’s a tmux plugin that replaces the default Ctrl-b keybindings with the same keybindings used in i3wm (including turning on automatic tiling instead of manual splitting). Given that you use i3wm on your desktop, you might like it :) [1]: https://github.com/jabirali/tmux-tilish https://github.com/jabirali/tmux-tilish
- pzmarzly 2y agoFrom the perspective of "a regular user" (which is a bad term, because of course I see myself as the norm), I don't care if multiplexer is part of terminal app or not, but I do care about it reacting to my clicks. I don't want to learn obscure multi-step keyboard shortcuts in order to open a new tab, rename a tab, resize a pane, reorder tabs, copy the scrollback buffer, etc. Sadly, that seems to leave me with only 2 options that work well over SSH: - using a terminal with client-server model and built-in multiplexer (VSCode Remote SSH extension, WezTerm) - using iTerm2 with tmux integration (apparently nothing else implements tmux control protocol https://unix.stackexchange.com/a/280829 https://unix.stackexchange.com/a/280829)
- Barrin92 2y agoyou might want to give Zellij a try. (https://zellij.dev/ https://zellij.dev/) Works like tmux but with the UI friendliness of more modern apps.
- pzmarzly 2y agoOkay, just going through the first tutorial[0], I am convinced that Zellij is truly something else. I've never opened up my wallet[1] so quickly for any open-source project, but here the author is clearly creating something amazing (and maintaining awesome documentation and tutorials!). Thank you a lot for this recommendation :D BTW this is the first time I've seen a working drag and drop TUI (you can use drag-and-drop to move floating panes around). [0] https://zellij.dev/tutorials/basic-functionality/ https://zellij.dev/tutorials/basic-functionality/ [1] https://github.com/sponsors/imsnif https://github.com/sponsors/imsnif
- skitter 2y agoMaybe it's because I don't use it that intensely, but I've found the default a bit noisy, so I switched my default layout to only contain `pane` and turned pane frames off.
- naikrovek 2y agoTurboVision from the 1980s or 1990s has draggable and overlappable windows inside a single shell/DOS screen. https://tvision.sourceforge.net/tvQNX-pterm-photon.jpg https://tvision.sourceforge.net/tvQNX-pterm-photon.jpg
- iiio8 2y ago[dead]
- bayindirh 2y ago> I am potentially sympathetic to the idea that tmux and screen make it harder for terminal developers to add new features to their terminals. Both are actively maintained and can work with modern terminals, as long as the hosting terminal is standards compliant. I don't understand why people love to break standards.
- fiddlerwoaroof 2y agoThe cynical view is that non-standard features make your product sticky
- bayindirh 2y agoSo EEE is preferred now?
- aumerle 2y ago1) There are no standards 2) The problem happens when someone wants to add something new to the terminal ecosystem. 2a) Designing something becomes harder because it has to be designed to work with the horrible hack that is terminal multiplxer. The tty model is dead simple, one tty per child process. When you add a terminal multiplxer it completely confuses this simplicity, making it instead multiple processes per tty and does it in a way that is opaque to both the processes and the host terminal, leading to endless bug and incompatibilities. 2b) Any new feature is now gatekept by the individuals in charge of the multiplexer projects.
- bayindirh 2y ago> There are no standards. I don't agree with this. There are tons of standards (even if it's de-facto) from VTxxx to XTerm's emulation standards. If there were no standards, it wouldn't be possible to talk with a modern system using a real VT320 (Yes, we have these), or with a vintage system with a modern terminal over a TTYUSB device. > The problem happens when someone wants to add something new to the terminal ecosystem. I understand, but every decent standard should take what's done before them and be prepared to face with it. Let it be Ethernet, TTY, even something modern like DisplayPort. When people doesn't do their due diligence and spend the time required to handle edge cases, things are bound to break (e.g. Cheap monitors' firmware contains identical serial numbers, causing all types of shenanigans in multi-monitor setups). > 2a) Designing something becomes harder because it has to be designed to work with the horrible hack that is terminal multiplxer. For harder part, see the previous paragraph. i.e.: One should do their homework to work with other systems. On the oh gawd horrible hack! part, That "horrible hack" is saving hours of work per month per person who work with remote servers for ~30 years now, and nobody is planning to give them up AFAICS. > The tty model is dead simple, one tty per child process. When you add a terminal multiplxer it completely confuses this simplicity, making it instead multiple processes per tty and does it in a way that is opaque to both the processes and the host terminal, leading to endless bug and incompatibilities. Maybe one should draft a new standard about multiplexing terminals persistently without it being a hack? There's a big gap there, as you point out. > 2b) Any new feature is now gatekept by the individuals in charge of the multiplexer projects. Both screen and tmux are maintained properly, and they fix the bugs they cause actively. For example, screen was causing a problem in SGR mode, and they fixed it 2 months ago [0]. Oh, on SGR; it's an ECMA Standard. Standard-48 to be more precise [1]. So, again, there are standards, and you can build new ones, and I bet, terminal multiplexers will play along if you don't throw eggs at them. [0]: https://git.savannah.gnu.org/cgit/screen.git/commit/?id=c184c6ec27683ff1a860c45be5cf520d896fd2ef https://git.savannah.gnu.org/cgit/screen.git/commit/?id=c184... [1]: https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf https://www.ecma-international.org/wp-content/uploads/ECMA-4...
- rickstanley 2y agoFully agreed. I myself use 2 terminals: Alacritty and WezTerm. The former for local work, and the latter for my VMs, and occasional remote server work. I couldn't explain exactly why I use separated applications, since WezTerm works well for local (which even has a menu entry for that) and remote alike, but I'm comfortable with the workflow that I have today, and for me it's enough and what matters.
- fiddlerwoaroof 2y agoI like how iTerm2 can act as a UI for tmux via tmux’s control protocol. We don’t need to reinvent tmux to fix some of the UX issues of tmux sessions inside terminal tabs inside terminal windows.
- lathiat 2y agoThis is my favourite, I use it all the time. There's a couple bugs that show up but it's really good. Having real local tabs for a remote SSH is great.
- BeefySwain 2y agoAnyone know of a terminal for Linux with this feature?
- fiddlerwoaroof 2y agoI haven’t found a great Linux terminal: it’s one of the things that really makes it hard for me to use Linux
- naikrovek 2y agoWhat? Xterm is amazing.
- coldtea 2y agoParent means with those kind of features something like iTerm has
- fiddlerwoaroof 2y agoiTerm2 has a ton of quality of life features that no alternate terminal comes close to: automatically detecting tables in output and handling copy/paste correctly. Quick navigation between shell prompts, etc. If emacs wasn’t really slow with long lines in buffers and high volume output, it could be better
- Xeamek 2y ago>that's not really all that helpful for anyone who does any work over ssh. If you are hoping to new machines every time then sure. But lets be honest, thats a minority. I don't know kitty in specific, but wezterm ie. can connect to target via SSH, start daemon of itself there and actually work better then tmux, because it's controlled from the client (where the gui runs), but with all the tmux upsides. And yes, it's not as portable as tmux (simply because its not as popular), but again, in majority of the situations the setup required is really not that much. Especially if you would spend that time on tmux config anyway.
- sweeter 2y agoKitty does this as well. They have a section on ssh-integration on the wiki. I personally love it. I can use the kitty multiplexer remotely and I can copy and paste from local to remote. So at least he does implement a solution/alternative. The thing I like about tmux and zellij is persistence and the "task-runner" nature of them. Its great for managing sessions and running things in the background. Though I do hate how they also break a lot of features that I do like about terminals.
- deleted 2y ago[deleted]
- em-bee 2y agoall of the tmux upsides? including detach and reattach to a running session? i'd love a nice gui for tabs, but i really use tmux for its ability to survive gui crashes locally and network disconnects when running remotely.
- Xeamek 2y agoAs I said, on connections it's spawns a daemon on target machine that will do exactly that - keeping the State despite clients disconnection
- em-bee 2y agooh, sorry. i didn't read your comment close enough. that actually sounds interesting. i'll have to take a look. although i prefer mosh over ssh because it is more reliable with the slow connection that i have. however if wezterm can reconnect like mosh that might work. thanks.
- scoodah 2y ago> I cannot at all get worked up over this, getting to the point I'd pull out the word "poison" to describe it. Kovid Goyal has a history of being incredibly opinionated to the point of being combative and toxic at times. He makes some great software, I’m a user of kitty, but this hyperbolic tone about this issue is not shocking to me at all.
- DaSHacka 2y agoReminds me when he said he'd maintain the entire python 2 language instead of upgrading Calibre to use python 3 https://bugs.launchpad.net/calibre/+bug/1714107 https://bugs.launchpad.net/calibre/+bug/1714107 There are a lot of other gems too if you look through Calibre's bug tracker https://bugs.launchpad.net/calibre/+bug/885027 https://bugs.launchpad.net/calibre/+bug/885027 https://bugs.launchpad.net/calibre/+bug/1894442 https://bugs.launchpad.net/calibre/+bug/1894442 https://bugs.launchpad.net/calibre/+bug/853934 https://bugs.launchpad.net/calibre/+bug/853934
- biftek 2y agoThe argument about parsing twice doesn't seem very good to me. Vim and emacs are also parsing keystrokes, should we abandon them too? The cynic in me thinks it's more likely that because kitty offers tmux features he wants to lock users in to his product.
- ehPReth 2y agoit's a foss project: http://www.9bis.net/kitty/ http://www.9bis.net/kitty/ https://github.com/cyd01/KiTTY https://github.com/cyd01/KiTTY
- ckolkey 2y agoNot that KiTTY, this kitty: https://sw.kovidgoyal.net/kitty/ https://sw.kovidgoyal.net/kitty/ But it's also foss, so, you're still right.
- Repulsion9513 2y ago> Offloads rendering to the GPU for lower system load My God, what have we done
- mrgaro 2y agoWhat's wrong with that? Computing history has a lot of machines with various co-processors which are used to offload various things from main CPU. Just as an example: Amiga and C64 had both co-processors for rendering text faster.
- aumerle 2y agoKeystrokes!! Way to come up with a strawman. Every byte that the program running inside tmux send to the terminal has to be parsed and re-interpreted by tmux first and then the actual terminal. Same for every byte that the terminal sends the program running inside it. These include every byte used to redraw the screen, which with modern full screen applications like editors can be several kilobytes per screen refresh. Keystrokes indeed. This reduces throughput by a factor for 2 at a minimum, reference: https://sw.kovidgoyal.net/kitty/performance/#throughput https://sw.kovidgoyal.net/kitty/performance/#throughput see the table entries for alacritty vs alacritty+tmux. And that is just throughput, tmux will affect latency as well, though I dont have a reference to measurements handy at the moment.
- jauntywundrkind 2y agoJust off the wall crazy shit dealing with absolutists like this. Yes efficiency is good. But... Damnit man! The performance numbers shown for this low power processor are 43MB/s without tmux vs 30MB/s with tmux. It's likely going to take a lot of activity for that to aggregate into even a decent fraction of a ms of latency. Beware extremists. Some people will never be pleased, will accept nothing. The only answer is to cut cut cut forever. There's a cult of people out there that idolize performance above any practical use like a god & will destroy & savage anything else. Deny this falsity. Respect performance, but also allow other factors to balance in. (Side note: I'd love to know how dtach performs. It has the key advantage to me of tmux, which is detachability, but no virtualization. Great for running a vim session! And by design is a very pure simple pass through.)
- aumerle 2y agoFirst I dont know what table you are looking at, but its 54MB/s vs 24 MB/s on average across different data types. That's a factor of 2. Aka half the throughput. I dont know what kind of performance engineering you do, but a halving of throughput is a pretty serious performance regression where I come from. Also, latency is not a direct function of throughput. The two are separate. In this case the latency will come because when you have tmux in the middle it means your command line program writes to a pipe, which is a buffer in the kernel. tmux then has to read from that pipe, then it has to process that byte updating its internal state, then it has to generate the output bytes based on the internal state, those output bytes are written to another pipe, and finally the terminal reads from that second pipe. There is a whole extra pipe with associated context switches for every byte (or more accurately every packet since reads/writes on a pipe are buffered). This will add latency for example for every keystroke no matter what the throughput numbers are. A pipe operation requires a poll on the pipe fd which is a context switch. Apart from whatever internal processing tmux does, there are four extra context switches added for every keystroke + response.
- mmis1000 2y ago> parsing each keystroke twice I think it's an unavoidable cost for any remote re-attachable system. No matter it's tmux/vnc/whatever remote protocol. But even in all these options. Tmux is still the lightest weight among them. Which can runs on a 500mb-memory vm totally fine. Spin up a actual desktop is way way more heavier than a terminal emulator like tmux. And allow you to split the terminal is just a free bonus tmux provided. In an ideal world, connection can live forever, so re-attachable protocols like those are totally unnecessary. But in reality, the network sucks often.