161 points · by csdvrx · 5y ago · 86 comments
> Sorry guys, but I don't want you to hold Linux terminal users hostage for your petty concerns over what is the "right" way to do something like sixels. [...] It's something that has been done successfully for over 30 years.
...
> Still, you could successfully block sixel support by having control over the terminal emulators or the libraries. Ok, but now, try to prevent your users from running sixel-tmux!
...
> Also, you guys like to say that the only voices that matters are from those who can code? Hmm, ok for that too. Let's see how you like the code I release to show the pointlessness of your petty fights, and free your users from your questionable decisions.
Also, I wasn't familiar with the term "sixel". They've been around since DEC introduced them in the 80's: https://en.wikipedia.org/wiki/Sixel
I can't agree. Like most rants, I found it to be very needlessly emotional, lacking in the technical department, and motivating towards the wrong goal (trying to fight and argue with maintainers, accusing them of negative things like "holding users hostage", etc) rather than doing the right thing for users (delivering new and useful features in a way that isn't broken). I wish open source programmers would make less rants and emotionally-driven forks, it's not helpful to someone like me who just wants to get something new like images in their terminal. The issues in the GNOME/WT bug trackers are what actually contain technical information. And just from looking at that, it appears there is an open development branch for VTE that contains sixel support: https://gitlab.gnome.org/GNOME/vte/-/issues/253
So if you use GNOME, I would say just use that and work on that, the quality is going to be better than the degraded functionality you get from de-rasterizing. In my opinion, it would be better from a technical standpoint if the author just wanted to work on that, or wanted to work on getting it implemented proper in WT. The degraded-image approach used by this tmux fork is unusable for the cited use case of getting nice graphs in the terminal, and I can't see how it's going to make it any easier for those other terminals to solve the real technical issues with sixel.
Edit: I also want to respond to this comment in the rant:
>What will happen as Wayland replaces X?
Nothing? XTerm still works. But there is also a Wayland-native terminal called "Foot" that supports sixel, if that's your thing: https://codeberg.org/dnkl/foot
2nd edit: To those downvoting, please reply to me instead of doing that. If you disagree with me it would be better to know why so I could potentially change my view, a downvote communicates nothing of value towards changing my mind.
It's titled as a rant, in a file called RANTS.md, and unless you've gone out of the way to read it, the rest of the immediately available documentation looks to be perfectly professional and courteous. I'm not sure what you are expecting?
I dislike when this sort of stuff is front-and-center on a project but it seems perfectly reasonable to accept that a developer might have opinions and feelings that caused them to "scratch an itch". People who aren't annoyed with existing systems don't in general try to replace or work around them, and there's certainly a load of projects I've found with disagreeable approaches to contributions or governance that I would rather not put my own time into. I imagine they feel the same, and appreciate that they documented that frustration.
It was an accurate assessment of the situation. Read @hpa technical analysis if you prefer, but you'll see he and I seem to concur: there's nothing technically wrong in sixels.
> So if you use GNOME, I would say just use that and work on that
The difference between you and I is you still believe what they say. I don't. And I question the motives of people associated with a project whose official stance is that it's acceptable to plan technical hurdles to prevent people from using themes: https://news.ycombinator.com/item?id=28559716
> In my opinion, it would be better from a technical standpoint if the author just wanted to work on that
I have no interest in wasting hours writing then submitting code to people who have put into writing the reasons why they are playing the clock against sixel support (as if I couldn't have read between the lines...), and who have said previously they would use their positions to veto the inclusion.
By default, I no longer trust them. It's up to them to prove they have changed. In the meantime, sixel-tmux will exist to push for change, as a pebble in their shoe.
> The degraded-image approach used by this tmux fork is unusable for the cited use case of getting nice graphs in the terminal, and I can't see how it's going to make it any easier for those other terminals to solve the real technical issues with sixel
Don't be so focused on one format. There needs to be a foot in the door, after which other formats can be added. It's just a bootstrapping problem.
Said differently, if tmux can understand sixels and store them into some internal representation, it's easy to convert from that into other formats as needed (iterm, kitty...) meaning others terminals will enjoy the graphical formats in pixel perfect quality, as long as they support at least one format.
Meanwhile, gnome users will be left to wonder why they are left to deal with a derasterized output, and fingers will be pointed into the right direction.
Maybe that will encourage the VTE team to do what the users want? If not, it will make it easier for alternatives to emerge (like "foot" for Wayland that was mentioned here)
What I'm doing is totally a political move, I grant you that.
> solve the real technical issues with sixel.
THERE IS NO TECHNICAL ISSUE WITH SIXEL (!!)
Try the nyancat linked below. Look at the FPS. 30 fps in the terminal is good enough for most uses.
The only issue with sixel is some people hold personal grudges against it.
Sorry, but I don't play ball with them anymore.
I normally just default to using Gnome Terminal on Linux, which sadly doesn't support Sixels, so I'll definitely give this a go.
Looking around I've just found Foot, which looks like it does support Sixel on Wayland[1].
So that might be a more permanent way forward.
Here's another explanation why VTE based terminals are best avoided.
https://github.com/thestinger/termite
Here's a complete list.
https://wiki.archlinux.org/title/List_of_applications#VTE-ba...
I think VTE is fine if you don't mind development happening at a glacial pace...
https://gitlab.gnome.org/GNOME/vte/-/issues/253#note_1049040
In terms of customization and configuration, I'd say foot falls between Alacritty and Kitty with Kitty being the most customizable and configurable while Alacritty being the least.
One of the things I really like about Alacritty and foot is that they don't enforce italic and bold monospace variants while Kitty does. I despise italic variants of monospace fonts. Most monospace fonts don't even have proper italic variants. They're just slanted.
I tried using foot a few days ago but went back to Alacritty because of this issue.
https://codeberg.org/dnkl/foot/issues/628
I think I might move back to foot though because it felt a bit faster (lesser latency) and for some reason, text on Alacritty is sometimes blurry for me.
But I think having the possibility of italic, bold, bold+italic in the TE is a very good thing. And if you do not want that I think Kitty allows you to just use another font then; please correct me here, but I think that is configurable. Bold text in the TE world is yet another heated discussion. Some people like it bold, some people like the color to be intensified instead when using `SGR 1` (which is responsible for making font intensified/bold).
Kitty supports images via a custom API. There's loads of really cool plugins for it but what's interesting about Sixel support is that it's a standard, even if it's primitive.
I'm not sure that Alacitty can support images or, at least, I couldn't see that reported anywhere (it's been a while since I ran it myself).
In terms of performance Foot seems to compare well to both[1].
1. https://codeberg.org/dnkl/foot/src/branch/master/doc/benchma...
Which was then obviated by the first download of an animated gif. Petabytes in bandwidth and disk storage wasted because FF decided saving a couple hundred K on the png animation code.
By not supporting sixels, it forces people to use a whole browser to show images. Graphics support in the terminal is more than just QoL for the users, it is also a power savings and a hardware lifetime issue.
You are fighting the good fight.
Indeed, penny wise but pound foolish... and I guess they were proud of themselves!
> You are fighting the good fight.
Thanks, hopefully due to kicking the ant nest with my rants and now sixel-tmux, VTE will be forced to deliver something, anything really, even if it may be 6 years too late and not enabled by default (!!)
At least Linux distributions would have the possibility to compile it in?
But at this point, even that I can't believe. I think they will weasel out at the last minute with some half-baked more or less plausible excuse, like your example about firefox code increasing by a few kb.
My hopes for gnome are extremely low, so "I'll believe it when I can see it" and not before, say when it's shipping in Ubuntu.
It's not! Gnuplot in the terminal open many new use cases, such as examining data on remote hosts with scripts without even bothering to scp the data first.
Also, Notebooks in the terminal is wonderful!
Check https://github.com/koppa/matplotlib-sixel
As for kitty format, adding support in sixel-tmux is planned, but you are welcome to write a patch if you want it sooner!
Imagine sixel-tmux as some middleware, because it is totally possible to intercept sixel sequences and rewrite them on the fly into something more palatable to kitty or iTerm.
This way, even if gnuplot doesn't support kitty, you could still view the results. If it's done well enough, you may not even perceive the difference!
That's the direction I want to follow, so that users can take any software and play with it on their terminal regardless of the underlying format.
You misunderstood me, I was saying Kitty graphics protocol feels more like a toy in how well it can produce graphics (GIFs, videos, etc). Sixel is more common in actual use cases (at the moment). But, take notcurse's graphics demo for example, using the kitty backend, it's very unreal terminal experience. But once Kitty's graphics protocol has more widespread support, for example in graphing tools, it'll be just as useful as Sixel :)
At first I was afraid the project would take the easy way out and ignore hard features or take shortcuts (ex: SGR1 : bold or bright? or both? or none?) but you have shown you are willing to do what it takes to properly support applications.
This is not just in line with the reputation of Microsoft when it comes to backwards compatibility, but going above and beyond to make sure everything works perfectly.
When sixel support is added to WT, it will replace mintty as my favorite terminal -- and I'm very picky when it comes to terminals.
WT is a wonderful contribution to the open source world, and I hope it will inspire similar terminals on Linux (or be usable through wine)
Oh, and uh, my apologies if you felt my contribution to the sixel thread (PR #448) were out of line. Since your last message, I've realized my posts may be off topic, as a degraded mode is not what most people may want, even as a stopgap measure, so I've stopped posting there.
Or compile it yourself using MinGW64 : after installing from msys2.org, pacman -S base-devel etc
It works fine here. I have a Windows Terminal settings to start sixel-tmux instead of bash, using script to provide a pty: just have the command line be:
C:/msys64/usr/bin/env.exe MSYS=winsymlinks:nativestrict MSYSTEM=MSYS /usr/bin/script -c /usr/bin/tmux /dev/null
This looks fun
Here's the (abandondend) sixel-version source code, only with two colors, more color planes would drastically reduce the performance.
https://github.com/floooh/chips-test/blob/master/examples/as...
I really wish there was a decent pixel-framebuffer standard for terminals (with at least the same performance as ncurses). This would allow a lot of fun "terminal applications" (e.g. everything that used to run in VGA Mode 13h).
That's not due to sixels. Check out the sixel nyan cat: https://github.com/hackerb9/sixvid
Look at the FPS indicator in the bottom. It was pointed to me in https://github.com/microsoft/Terminal/issues/448#issuecommen...
The issue may be in your code.
I think I have similar performance issues, as the glyph selection process could be more optimized.
Derasterized is mostly Jart work (who is best known here for her work on Cosmopolitan), we were mostly interested in quality.
Reducing the set of glyph to something that could benefit from optimizations could help.
> I really wish there was a decent pixel-framebuffer standard for terminals (with at least the same performance as ncurses)
Sixel performance is quite decent: personally, I can play videos in my terminal.
Try MPV on mintty: https://github.com/mpv-player/mpv/issues/2183
I have also played with a X server rendering over sixel, no performance issue: https://github.com/saitoha/xserver-SIXEL
When sixel support is added to Windows Terminal, I may update it, because it would be fun to have one tab to run stuff!
I should definitely have another look though, it's good to know that it is possible to get decent performance out of sixels.
If you are a Mac user, could you please consider writing a patch? The ability to dogfood it means whatever you write will still be better than whatever I may come up with.
This is not based on technical facts, but bias against an old format.
> png/gif/jpg--for higher quality output & lower bandwidth
For bandwidth, my ssh stream is compressed.
For quality, I can't see difference in a 24 bit bitmap when comparing with a png or jpg, unless I compress them too much, in which case the compression artifacts start playing AGAINST the formats you recommend.
I came to Linux last year, and I've been on it 100% no windows during this entire period.
I'm using Sway (Wayland), a DE (well, really just a window manager) you cannot replicate in the windows graphical environment, and I'd never go back. Everything is so smooth, and of course you may say that it's "because vsync is used in Sway and vsync = bad blah blah", but I've never agreed with that and a good implementation of vsync with minimal latency increases is worth it, especially paired with freesync/adaptive sync (which works on the desktop just as it does in Windows).
Fyi, before my Linux days, I was a very competitive gamer, and absolute windows power user. I went out of my way to get every last bit of performance and latency reduction possible (just so you know where I'm coming from).
My terminal emulator is Foot, a wayland native terminal with a focus on TUI performance, especially in TUI editors like (neo)vim (my editor of choice). It has amazing Sixel support with a developer who goes out of his way to fix even the smallest imperfections with the implementation. Foot has features I really love, like link following by keyboard shortcuts, great font fallback customisation, and no bloat (a feature in my book)
My multi-resolution setup is not impacted by Linux because Sway, and Wayland ecosystem in general, handles multi resolution tremendously, and supports integer and fractional scaling per display. Multi display freesync/adaptive-sync (and gsync whenever Nvidia starts playing ball) works great too, just as it does on windows.
The majority of stuff you complain about is due to crusty old X11 (whether you're stuck on X because of nvidia or not, it's not a fair argument). Or because you think the way Windows does something is better than the way Linux does that thing (even though in most cases I think the opposite, clearly a subjective thing).
Oh, and yea I think Windows sucks and Linux does <insert> better. But I'm saying that as a zoomer, not a "geek millennial" (as you said in your rant) :)
He also tried getting sixel support in tmux but was rejected again. All he did was make a hard fork to get the feature that he wanted. That's it. The end. There are some things that Windows does better and some things that Linux does better. Generalizing your anecdotal experience and implying that one is entirely "better" than the other is what fundamentalism and fanaticism looks like.
Also they go on from there about how they want to encourage Linux users to jump over to Windows. Again, I think this is just frustration with their perception that there are too many control freaks in the opensource world acting as gatekeepers for important feature availabilities (the core of their rant is just that they really wish they could have done graphical plots in their default terminal when they were in school years ago).
To my reading, it sounds like someone who wanted to support free software who jumped over to Windows in disgust, not really a "Windows fanboy."
I have a few things that I can't stand and I have no problem ditching something that doesn't offer me what I want. For example, I ditched Kitty because it doesn't let me disable italic variants of monospace fonts. In a hypothetical scenario, if tmux/screen didn't exist and Kitty was the one terminal which had these features, I would be frustrated as well if the dev didn't budge from his position of not letting users disable italic fonts. Fortunately, tmux exists and Alacritty lets me disable italics.
It's pretty naive and immature to get married to the tools you're using. Unfortunately, you see this a lot in the FOSS world.
[0] https://github.com/csdvrx/cutexterm#wait-i-thought-people-sa...
So I guess in a way OP is (sort of) seeing the light on free software here too. Don't like it? Fork it!
The rant in this repo links to a related rant in another one of the author's repos: https://github.com/csdvrx/cutexterm#wait-i-thought-people-sa...