💾 Archived View for rawtext.club › ~sloum › geminilist › 004674.gmi captured on 2023-09-08 at 17:38:52. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
zwatotem at gmail.com zwatotem at gmail.com
Sun Jan 3 15:06:41 GMT 2021
- - - - - - - - - - - - - - - - - - -
First of all, **Hello**, as it's my first message here.I like the original idea to some extent. It bothers me, that what is meantto be a row doesn't actually lay in one line. I immediately wanted topropose usage of TSVs as they are pretty human readable and have a goodsupport in many text parsers. I don't want explicit support for tables, butrather making TSV inside a preformatted block a *best practice* forpresenting data of tabular form. Fancy clients could have support for atechnique of HT rendering known as [elastictabstops](https://nickgravgaard.com/elastic-tabstops/) (tl;dr render tabs inblocks of neighboring lines to the same stop point, widening ones that aretoo short, if needed). But then simple terminal-based clients aiming tobenefit from one-scan-to-render feature of text/gemini would suffer with allthe usual problems we know from attempts to display TSV in the terminal.
Example data (pure TSV):```Name Age AddressPaul 23 1115 W FranklinBessy the Cow 5 Big Farm WayZeke 45 W Main St```
Elastically rendered (using more tabs here, for illustration):```Name Age AddressPaul 23 1115 W FranklinBessy the Cow 5 Big Farm WayZeke 45 W Main St```
Solution could be to implement elastic tabstops in a greedy manner (align tothe widest cell so-far). I think that greedy renderer is a good midpointbetween naive aligning to nearest multiples of 4 (or 8 or whatever) and fullelastic tabstops rendering. With this we could encourage users to make atable header containing cells of maximum needed length (for example bypadding the remaining width with spaces). Obvious flaw of this solution isrequiring text author to know the maximum widths of their columns (which canpotentially be big raw data impossible to look up). But then TSV will looklike table no matter what.
Greedy/semi elastic render (without padded header) (`Name` column made widerafter encountering Bessy the Cow cell):```Name Age AddressPaul 23 1115 W FranklinBessy the Cow 5 Big Farm WayZeke 45 W Main St```Now that I think about it, this has little to nothing to do with spec (maybeI should send it to [tech] as well, or instead) as all of this can be put inbest practices or even emerge as non-written standard forformulating/rendering documents. However, I think this is an interesting useof an uncommon text rendering technique to make plaintext capable ofpresenting tabular data. Let me know, what you think about that.
Grzegorz Przybylski aka Zwatotem