←back to thread

387 points shiomiru | 2 comments | | HN request time: 0.438s | source

A terminal-based web browser in Nim.[1] Has acceptable (YMMV) CSS rendering, some JS support, and inline images (sixel/kitty). It can also use various protocols other than http(s) such as (s)ftp, gopher, gemini, ...

Chawan started out as a w3m clone, and the UI still resembles it. However, the architecture has turned out quite different, with pages loaded in separate processes, and protocol/file type handling separated out into external binaries. An interesting result is that you can even register decoders for custom inline image formats, although practical use cases of this are rather minimal.

There is a gallery showcasing some websites being rendered here: https://chawan.net/gallery/index.html

[1]: https://nim-lang.org

1. onetom ◴[] No.44296227[source]
@shiomiru

What's the best resource (paid or free) in your opinion for learning about these TTY related concepts?

I'm aware of https://www.linusakesson.net/programming/tty/index.php for example, but that doesn't go into termcap/terminfo/curses.

one of the comments mentions http://www.amazon.com/termcap-terminfo-OReilly-Nutshell-Lind... though (online https://www.scribd.com/document/831486848/Termcap-and-Termin...)

replies(1): >>44297017 #
2. shiomiru ◴[] No.44297017[source]
chawan has a custom terminal module, so my knowledge about the standard X/Open curses is not that great.

That said, for the actual escape sequences, XTerm's ctlseqs.ms[1] is an invaluable resource. I also took many ideas from nick black's notcurses[2], and I especially recommend his notes on "sprixels".[3]

[1]: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html

[2]: https://nick-black.com/dankwiki/index.php/Notcurses

[3]: https://nick-black.com/dankwiki/index.php/Theory_and_Practic...