Hacker News new | ask | show | jobs
Show HN: The worst ANSI renderer, except for all the others (hpjansson.org)
71 points by hpjansson 2722 days ago
8 comments

see also: squeezing 1024 colours out of a 1981 IBM 5150 with a CGA display:

https://trixter.oldskool.org/2015/04/07/8088-mph-we-break-al...

Explanation & pictures of how some of the techniques work:

https://int10h.org/blog/2015/04/cga-in-1024-colors-new-mode-...

Should try rendering some of this. http://blocktronics.org
Oh, that's the stuff.
You can get even better rendering quality if you are willing to use Unicode 9.0 characters: https://github.com/daleroberts/tv
I'm already using the Unicode block range, and a little from the symbols, geometry, math and braille ranges. You can turn ranges on/off and combine them in different ways.

There's ASCII too in some of the examples because I think it works pretty well as a complement to blocks, when used for dithering only (--fill ascii).

I'm always looking for more Unicode symbols to put to use, though. I think PETSCII and Teletext symbols are supposed to make it into the standard soon, if they haven't already.

Edit: Forgot to mention TV looks very good, an actual useful tool for big geo images.

Edit 2: Here's the PETSCII etc. proposal: https://www.unicode.org/L2/L2017/17435r-terminals-prop.pdf

Will be a blast when/if it gets adopted and font support catches up.

Are those Unicode 9 and later? It looks like those were all supported since Unicode 3.2.
I can't see any mention of video there.
This is great, I've been working on something that tries to do something similar among other things. ANSI's going to come back in a big way - I got a hunch!
Now I can finally stop using AcidDraw to build my web site graphics and start using Chafa instead. More colors to boot!
Here's what I made, but I'm keeping it stealth this month. I did make an editor/Converter, it's not great, but it makes ANSI's, and 256 colors as well. It's what I did with those ANSI's that's interesting - I stored them in the blockchain as non-fungible and created a neural network based off them. It's done, it's coming. Just don't want it all to come too fast.
ANSI what? They have overseen many many standards.
ANSI X3.64 plus almost 30* years of oddball extensions. For a long time, "ANSI codes" or even just "ANSI" was almost synonymous with that (increasingly loosely defined) standard, at least in the context of terminal graphics.

Now I'm not sure that still holds, but I decided the post title didn't need to be even longer and more arcane :)

* Edit: That should be 40, actually. Time flies.

You could always add tek4xxx overlay support.
As someone who has played around with the ASCII/ANSI output (and knows nothing about the matter) that's really impressive.
So how long will it be before someone puts a gui desktop in a terminal?
You can get halfway there if you combine Xvfb's -fbdir option and Chafa's --watch option. Chafa supports the XWD format Xvfb puts out.

Have to do input with xdotool, though :)

Background for anyone unfamiliar:

https://en.m.wikipedia.org/wiki/ANSI_art

I would’ve killed for this in 1985.