News for hackers. Stuff that matters.
Re:Aminal: Golang terminal emulator from scratch by enriquto on Wednesday November 28, 2018 @09:53AM (#18551926)
> The terminal couldn't do that as it wouldn't know the difference between a user typing `cat lena.png` into Bash from typing the same sequence of characters into vim (for example).

This is not what I am talking about. I mean the binary headers inside png, jpg, tiff files, etc. These binary sequences can be easily interpreted as terminal control sequences, and they are very unlikely to appear otherwise. For pnm files I agree that the situation is a bit more delicate, as these sequences are likely to appear in the wild (e.g., in the pnm man page for example).

Re:Aminal: Golang terminal emulator from scratch by laumars on Thursday November 29, 2018 @10:44AM (#18560967)
Ahhh. That's an interesting idea. I like it
Re:Aminal: Golang terminal emulator from scratch by enriquto on Thursday November 29, 2018 @03:42PM (#18563799)
This is an inevitable feature of the perfect terminal. The alternative is showing the binary contents of the image file in ASCII, which is always undesired.
Re:Aminal: Golang terminal emulator from scratch by laumars on Thursday November 29, 2018 @04:33PM (#18564243)
Not just undesired; it can sometimes play havoc with your terminal session. I've had tmux status bars break; bash prompts go "weird" and all sorts of other glitches before when I've accidentally piped binary data to the STDOUT.

I'm very tempted to fork Aminal and have a play with your idea.

Re:Aminal: Golang terminal emulator from scratch by enriquto on Thursday November 29, 2018 @04:46PM (#18564369)
That would be lovely! I do a lot of image processing using unix pipes, and when I forget the "|display" at the end it breaks everything.

Notice that you do not even need to use sixels in your case. Since you control the rendering, you can simply put the pixels of the image on a rectangle (that allows paning and zooming, for example), and move the cursor below it.

Re:Aminal: Golang terminal emulator from scratch by laumars on Friday November 30, 2018 @08:26AM (#18568883)
It wouldn't be until I'm off for Christmas holidays (at the earliest) though. I don't have a whole lot of time left between work and family; and have a few projects on the go as it is already.