4 ms·
unfortunately sixel seems to be seeing a kind of revival by retrocomputing enthusiasts who want sixel support to become ubiquitous excerpt from my comments yes
by kragen 4y ago
unfortunately sixel seems to be seeing a kind of revival by retrocomputing enthusiasts who want sixel support to become ubiquitous
excerpt from my comments yesterday at https://news.ycombinator.com/item?id=35940188 https://news.ycombinator.com/item?id=35940188:
> some technologies, like the unix shell, smalltalk, and tcp/ip, make hard things easy and easy things possible. others, like retrocomputing, code golf, and malbolge, make easy things hard and hard things impossible. sixel makes easy things hard and hard things impossible, ....
> that's a fun way to spend my time when i choose to (e.g., in https://asciinema.org/a/390271 https://asciinema.org/a/390271 i did real-time 3d graphics in a unicode terminal emulator with braille) but it's not how i want my primary user interface to my computer to work ...
> sixel is oulipo programming; encoding your graphics in sixel is like writing a novel without the letter 'e'. btw, a wonderful article about oulipo programming is https://100r.co/site/working_offgrid_efficiently.html https://100r.co/site/working_offgrid_efficiently.html
> sixel is an art project, not an engineering project
- flohofwoe 4y ago> unfortunately ... Is there a better alternative for pixel graphics in the terminal? If yes I'm all ears. The way Sixels encodes pixel data sucks, but currently it seems to be the only way to render pixels in the terminal (and that's implemented in more than one terminal application).
- kragen 4y agoyou seem to be attempting to define 'terminal' as 'vt100 emulator', which unfortunately condemns you to only unreliable solutions like sixel that are too inefficient to provide smooth graphical interaction and full of compatibility problems. you can plot a graph from a remote machine, sure, but if you want to use your mouse to zoom in on it, you just bought a one-way ticket to jank city but i've used graphical terminals like ncd x terminals since 01994, and they provided smooth graphical interactions even over shared 10-megabit ethernet. current xorg and xwayland do a great job of emulating those terminals, with most of their deficiencies fixed, and ssh has built-in support for transparently passing along the needed credentials xpra works even better, supporting h.264 compression and reattaching to applications you've detached from the big problem with x11 is that trying to write a program to do something simple like display an image or draw a bar graph ensnares you in five pages of bureaucracy to solve that problem i wrote yeso: https://gitlab.com/kragen/bubbleos/blob/master/yeso https://gitlab.com/kragen/bubbleos/blob/master/yeso here's a program to display a png with yeso: #include <yeso.h> int main(int argc, char **argv) { ypic img = yp_read_png(argv[1]); if (!img.p) return 1; ywin w = yw_open(argv[1], img.size, ""); yp_copy(yw_frame(w), img); yw_flip(w); for (;;) yw_wait(w, 0); } it also runs on the linux framebuffer without x-windows here's a color generalization of munching squares in yeso in python: import yeso def munch(t, fb): for y, p in enumerate(fb): for x in range(fb.size.x): p[x] = (t & 1023) - ((x ^ y) & 1023) if __name__ == '__main__': with yeso.Window(u"CPython μunching", (256, 128)) as w: t = 0 while True: with w.frame() as fb: munch(t, fb) t += 1 it uses python context managers so you don't forget to yw_flip() there's also a luajit binding the example programs above are non-interactive, like virtually everything sixel that isn't full-screen; here's a lua program to test mouse interaction: local yeso = require 'yeso' function bounds(a, b) if a < b then return a, b else return b, a end end yeso.Window("mΩuso", {256, 256}):run(function (w) local m, dragStart = {x=128, y=128} while true do for ev in w:events() do if ev.isMouse then m = ev.p if ev:button(1) and dragStart == nil then dragStart = {x=ev.p.x, y=ev.p.y} elseif not ev:button(1) then dragStart = nil end end end w:frame(function (f) f:fill(0x7f7f7f) if dragStart then local minX, maxX = bounds(dragStart.x, m.x) local minY, maxY = bounds(dragStart.y, m.y) f:sub({minX, minY}, {maxX-minX, maxY-minY}):fill(0x336699) end end) w:wait() end end) as for embedding interactive graphics in a text stream, i'm still trying to figure out the bubbleos solution to that. but i'll get there, and the result will be usable over ssh, while sixel probably hasn't gotten there even for low-bandwidth interactive localhost cases and probably never will
- hello_computer 4y ago> but i've used graphical terminals like ncd x terminals since 01994, and they provided smooth graphical interactions even over shared 10-megabit ethernet The problem is that with the predominance of toolkits like GTK & Qt in the *nix application space, which pre-rasterize everything for easier cross-platform compatibility, X forwarding is nowhere near as efficient as it once was. Under present circumstances, the h.264 route is probably as good as it gets.
- kragen 4y agothe h.264 route used by xpra is dramatically better than remote x-windows has ever been; x11 forwarding has never been great, for reasons including bufferbloat, compatibility problems, and excessive round trips, even if it's not nearly as bad as sixel
- hello_computer 4y agoi believe MS RDP has also taken that approach https://techcommunity.microsoft.com/t5/security-compliance-and-identity/remote-desktop-protocol-rdp-10-avc-h-264-improvements-in-windows/ba-p/249588 https://techcommunity.microsoft.com/t5/security-compliance-a...
- kragen 4y agointeresting, i thought rdp was a vnc-like protocol with minimal compression, but i don't think i've actually looked at it looks like you're right: > With RDP 8.1 we introduced an AVC/H.264 mixed mode which in addition to using RemoteFX Media Streaming, extended support for AVC/H.264 to images as well, while text is compressed using a proprietary Codec. This mode is used by Windows RT devices running Windows 8.1 and some 3 rd party RDP implementations.
- hulitu 4y agoReal users don't use GTK and QT. Real users use Xt, Xaw(3d) and Motif.
- hello_computer 4y agohttps://news.ycombinator.com/item?id=35951733 https://news.ycombinator.com/item?id=35951733
- kragen 4y agobase64-encoded graphic files are obviously a much better idea than sixel but graphics really benefits from animation and interactivity
- vidarh 4y agoI don't think the issue you describe there is very relevant for typical Sixel usecase. Yes, it's not efficient to play full screen high frame rate animations that way, but the more typical use would be things like being able to pipe log data into a command line tool and get a plot out inline in the terminal, or similar type of uses where you'd otherwise use characters. You can do all kinds of things to make something better, but the two things that matters for this usecase is being able to do it over ssh and wide enough support that you can start relying on it. Better performance or more features only matters if both of those are met.
- kragen 4y agossh has supported x11 forwarding since at least 01996, and i've frequently forwarded vnc over it as well i think the problem here is that x11 is shitty at 'inline' (things tend to open annoying new windows) and a modern terminal cosplaying a vt100 is shitty at graphics sixel doesn't solve that problem; your terminal emulator is still shitty at graphics
- vidarh 4y agoBeing shitty at graphics doesn't disqualify it for what most people want to use Sixel for, so it doesn't matter. X11 isn't an option not just because it opens windows but because it'd have been too much hassle even if it was inline for the type of simple things people want Sixel for. Just something that's marginally better than emulating bitmaps with unicode characters is sufficient, as long as it's inline and simple to output.
- kragen 4y agoin https://news.ycombinator.com/item?id=35951674 https://news.ycombinator.com/item?id=35951674 you can see that with yeso i've reduced the hassle of viewing a png in x-windows to ten lines of c, and you don't have to worry about terminal emulator incompatibility, interleaved background-process output, error recovery, or dithering (you do have to worry about bugs in yeso, of which there are several) if you don't like c, in cpython it's four lines of code with yeso from yeso import * w = Window('hello, world', (406, 220)) w.frame().copy(read_png('admu_shell.png')) while True: w.wait() this requires a little bit of tweaking to work in pypy also it works on the linux framebuffer as well as in x-windows not being inline is a harder problem to solve
- hello_computer 4y agoIf I were retired, I'd write a terminal that passes an extra bi-directional pipe (fd 3?) to programs for an interactive jupyter-like REPL experience. From that pipe, programs could request a canvas from the terminal (mmapped file?, shm?, another pipe?), and the terminal could send per-canvas mouse/key actions back to the program. Obviously, I haven't dug into the details yet, but it's on the list.
- kragen 4y agothat's an interesting approach i think you could probably get pretty far by creating a new x11 socket with fresh xauth for each new program launched; then, instead of opening new floating overlapping windows for them, embedding the display of whatever windows they create in your notebook, just below below the command that created them a bytestream protocol has some real advantages, including being able to forward it over a network socket, including an ssh-forwarded socket, or providing a gui for whatever little embedded electronic gadget you build and connect to your terminal over spi or usb serial i had previously rejected it as too inefficient for the localhost use case, but in https://news.ycombinator.com/item?id=35693474 https://news.ycombinator.com/item?id=35693474, and some later protocol-design ideas i haven't shared yet, i convinced myself that you can probably make it efficient enough for anything that doesn't use custom shaders is this something you'd be interested in talking about in a less hostile environment
- hello_computer 4y agoIs the email on your site still good?
- kragen 4y agoyes, but sometimes i fail to notice email among the spam unless you ran across the pobox address, which has been dead for... a while the canonical.org address is the correct one comment if you've emailed me and not gotten a response