Re: Tables in Gemini

Liste des GroupesRevenir à ci gemini 
Sujet : Re: Tables in Gemini
De : sean (at) *nospam* conman.org
Groupes : comp.infosystems.gemini
Date : 23. Jul 2024, 02:59:35
Autres entêtes
Organisation : Conman Laboratories
Message-ID : <v7n2q7$t5nr$1@dont-email.me>
References : 1
User-Agent : tin/2.4.0-20160823 ("Octomore") (UNIX) (Linux/2.6.9-100.EL.plus.c4smp (i686))
It was thus said that the Great Namno <wed3009@yandex.ru> once stated:
Greetings. I think that gemtext would benefit from inclusion of tables
that are not ad-hoc constructs of pseudographics. I have written a blog
post (gemini://namno.duckdns.org/blog/2024-06-09.gmi) on how I would like
tables to be implemented in gemini, but I think it would be great if other
people gave some critique on my reasoning and markup.

  You expect people to hand format such a table?

  Here's an entry of mine with several tables:

gemini://gemini.conman.org/boston/2024/06/23.2

  I'm using a pre-text block to display the table, each row is one line,
each column separated by a TAB.  The first line, starting with "Table:", is
a table description.  The header and footer is separated by a line of
'----'.  Easy to hand write, and even easier to generate.  It's a
translation of this web page:

https://boston.conman.org/2024/06/23.2

  But an even easier format:  I'll make a copy of one of the tables in a
possible Gemini table format:

``` Table: port70 (gopher server)—Each sample counts as 0.01 seconds.
*% time *cumulative seconds *self seconds *calls *self seconds *ms/call *total ms/call *name
13.79 0.04 0.04 185781 0.00 0.00 luaV_execute
10.34 0.07 0.03 734588 0.00 0.00 index2value
6.90 0.09 0.02 398225 0.00 0.00 luaS_new
6.90 0.11 0.02 45028 0.00 0.00 luaH_newkey
3.45 0.12 0.01 1041939 0.00 0.00 yymatchChar
3.45 0.13 0.01 924394 0.00 0.00 luaG_traceexec
3.45 0.14 0.01 503889 0.00 0.00 yyText
3.45 0.15 0.01 260252 0.00 0.00 luaD_precall
3.45 0.16 0.01 245893 0.00 0.00 mainpositionTV
3.45 0.17 0.01 201753 0.00 0.00 auxgetstr
3.45 0.18 0.01 191931 0.00 0.00 yy_S
3.45 0.19 0.01 185373 0.00 0.00 equalkey
3.45 0.20 0.01 134088 0.00 0.00 yyDo
3.45 0.21 0.01 129432 0.00 0.00 yy_CHAR
3.45 0.22 0.01 101937 0.00 0.00 reverse
3.45 0.23 0.01 34759 0.00 0.00 luaH_getn
3.45 0.24 0.01 4473 0.00 0.00 getfirst
3.45 0.25 0.01 1625 0.01 0.01 traverseproto
3.45 0.26 0.01 834 0.01 0.01 strcore_wrapt
3.45 0.27 0.01 61 0.16 0.16 checkloops
3.45 0.28 0.01 2 5.00 5.00 deletelist
3.45 0.29 0.01 cclasscmp
0.00 0.29 0.00 924377 0.00 0.00 luaD_hook
0.00 0.29 0.00 391575 0.00 0.00 yymatchString
0.00 0.29 0.00 358374 0.00 0.00 luaH_getshortstr
0.00 0.29 0.00 261889 0.00 0.00 prepCallInfo
0.00 0.29 0.00 261296 0.00 0.00 luaD_poscall
*% time *cumulative seconds *self seconds *calls *self seconds *ms/call *total ms/call *name
```

There.  A client can recognize "``` Table:" as being a table.  The data
until the following "```" is tab-separated values.  If a value starts with a
"*" it's a header.  The client can then get the width of each value and
insure everything is lined up properly.  Multiple spans of rows and columns
is probably not worth it, but I'm sure there's some syntax that could make
it easy to do.  Maybe each trailing '-' in a value represents a multiple
column span, and each tailing '^' a multiple row span.  For example, your
table:

+---------+----/----+
|Character|Code     |
+         +-----+---+
|         |Old  |New|
+---------+-----+---+

Would be:

``` Table:
*Character^ *Code-
old new
```

No quoting necessary (unless you *really* want tabs in a value, which,
in my opinion, shouldn't happen).  Way less typing.  If you want full
backwards compatibility, then move the "Table:" header to the first line
within the pre-formated block, like I do.  It's still readable in my
opinion.

  -spc

Date Sujet#  Auteur
19 Jul 24 * Tables in Gemini19Namno
19 Jul 24 +* Re: Tables in Gemini11John McCue
20 Jul 24 i+- Re: Tables in Gemini1Ivan Farlenkov
21 Jul 24 i`* Re: Tables in Gemini9Rene Kita
21 Jul 24 i +* Re: Tables in Gemini7John McCue
22 Jul 24 i i+* Re: Tables in Gemini5rek2 hispagatos
22 Jul 24 i ii+* Re: Tables in Gemini2yeti
24 Aug 24 i iii`- Re: Tables in Gemini1Davinci
24 Jul 24 i ii+- Re: Tables in Gemini1John McCue
31 Jul 24 i ii`- Re: Tables in Gemini1Chris Narkiewicz
23 Jul 24 i i`- Re: Tables in Gemini1oldernow
7 Aug 24 i `- Re: Tables in Gemini1jmcbray
23 Jul 24 +* Re: Tables in Gemini2sean
24 Jul 24 i`- Re: Tables in Gemini1Computer Nerd Kev
30 Jul 24 +* Re: Tables in Gemini4news
7 Aug 24 i+- Re: Tables in Gemini1jmcbray
17 Aug 24 i`* Re: Tables in Gemini2Ivan Farlenkov
17 Aug 24 i `- Re: Tables in Gemini1jmcbray
6 Dec 24 `- Re: Tables in Gemini1Christopher Howard

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal