News for hackers. Stuff that matters.
Re:Unicode-based scientific plotting for working in the term... by dorfsmay on Saturday June 06, 2020 @10:37AM (#23439469)
As somebody who grew up during the semi-graphic era, it makes me sad that we still use a 30 year old standard for terminals and cannot do direct plot in the main terminal (as opposed to the Tektronix separate window).
Re:Unicode-based scientific plotting for working in the term... by KenoFischer on Saturday June 06, 2020 @10:44AM (#23439530)
Several terminals (kitty, iTerm2) do support plotting right into the terminal, but this is still sometimes useful if you don't want to load a while graphics stack just to do a simple plot.
Re:Unicode-based scientific plotting for working in the term... by dorfsmay on Saturday June 06, 2020 @10:52AM (#23439580)
Are they using a similar API/standard?
Re:Unicode-based scientific plotting for working in the term... by kps on Saturday June 06, 2020 @12:05PM (#23440114)
Most use OSC 1337 (originally from iTerm2) and/or SIXEL (originally from DEC -ades ago). At a quick glance, kitty appears to have NIHed their own instead.
Re:Unicode-based scientific plotting for working in the term... by tempodox on Saturday June 06, 2020 @10:44AM (#23439527)
I was thinking something similar. Looking at this makes me wish a terminal app could just embed a PNG or whatever in its output.
Re:Unicode-based scientific plotting for working in the term... by kps on Saturday June 06, 2020 @11:54AM (#23440008)
The OSC 1337 protocol pioneered by iTerm2 does exactly that. You'll have to check whether your preferred terminal supports it (I known mlterm does), either from documentation or just trying it¹.

Also, some terminals support the DEC SIXEL protocol² (again, I know mlterm does).

¹ https://www.iterm2.com/utilities/imgcat

² https://en.wikipedia.org/wiki/Sixel

Edit: I couldn't find a simple SIXEL sample — you'd think one of the popular sixel libraries would have some in unit tests, but no. So for the purpose of this thread (but maybe not forever, hence /tmp/),

    curl https://datatravelandexperiments.com/kps/tmp/example.sixel
    curl https://datatravelandexperiments.com/kps/tmp/example.osc1337
Those are such that output directly to the terminal will produce an image if that format is supported (and probably nothing if not, but I'm not making promises).
Re:Unicode-based scientific plotting for working in the term... by z3t4 on Saturday June 06, 2020 @02:39PM (#23441351)
I heard they have something similar at Cern and it also has clickable links and universal resource locators.