🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
lizmat I've gathered my thoughts around supporting =table in RakuAST in gist.github.com/lizmat/02ac012fe1a...e31d9d151b 11:30
comments / suggestions etc welcome 11:31
ugexe will we be able to parse all the pod out of a rakumodule file on install and save it somewhere (preferably precompiled) once that stuff is done? 11:55
lizmat yes 11:56
several options: serialize the RakuAST tree, with only the RakuAST::Doc objects in it 11:57
s/serialize/precomp 11:58
or serialize the RakuAST tree in any other format: markdown / man comes to mind
nine all of the above :) 11:59
lizmat yup
patrickb are column headings possible? i.e. the first column is the header, not the first row. (what about first column and row as headers?) 12:02
lizmat column headings are just the way you fill the first column, no? 12:03
score | 42 | 666
age | 18 | 66
patrickb It's the divider that determines whether something is a header, right? 12:04
lizmat if the first and second row divider do not use the same character, then the first row is a header
that's my understanding of it
patrickb right. is the same possible with the first column?
lizmat I'm afraid I don't understand, could you gist an example ? 12:05
patrickb will do
nine In HTML this would be <table> <tr> <th>Primary:</th> <td>1</td> </tr> <tr> <th>Secondary:</th> <td>2</td> </tr> </table> 12:11
lizmat ok, so you'd need a column to be marked to use <th> instead of <td> 12:15
I guess we could do this if the first column separator is different from the second 12:16
patrickb I just read up a tiny bit on Pod(docs.raku.org/language/tables.html). According to that page column headers are not a thing.
lizmat indeed, they are not at the moment 12:17
patrickb THen I guess "Do we want to?" is a good question. "No" is an allowed answer. ;-)
lizmat well I think we do want to 12:18
patrickb Do we want to be able to deparse a table char identical? 12:19
lizmat I want it to be good enough to roundtrip
looks like this:
a | b + c
=========
x | 0 + y
is currently valid table pod 12:20
patrickb Cells in the table are always identical width in a given column and identical height in a given row, right?
lizmat they don't need to be
the number of dividers should be the same 12:21
patrickb oooh
a | b | c
lizmat a | b + c
=========
x | 0 + y
is the same as the above
patrickb ok
but we can' mess with the row height at least? 12:22
lizmat yes, you can, if you use explicit row dividers
patrickb Wut?
lizmat yes, the magic world of pod6 tables :-) 12:23
docs.raku.org/language/tables.html..._practices see Heading and single- or multi-line content
patrickb OK. But not something evelish like: 12:24
a | b | c
a ----- c
--| d | c
lizmat a ----- c is not a valid row divider 12:25
so I guess that would be interpreted as a row with a single column
patrickb According to that page it is.
lizmat ? 12:26
patrickb 5. For tables with no header and multi-line content, use one or more contiguous hyphens ('-') as the row separator in the content portion of the table. For example,
lizmat well, the wording may be confusing there: you cannot have anything else apart from contiguous - and whitespace around it 12:28
afk for a few mins
patrickb I get it. So the height of cells in a given row will always be identical.
lizmat yes 12:53
Geth rakudo/main: 4b69dd51e1 | (Elizabeth Mattijsen)++ | 2 files
RakuAST: add some hooks for =table support development

Add a few multi methods that will be called by default. This allows a script to augment these classes to put in the real version of the methods without needing to re-compile the whole core setting over and over again.
15:15
[Coke] I have pressed the button to change master to main on MoarVM/MoarVM 19:13
[Tux]: ^^
jdv: ^^