tbrowder \o\ … /o/ rah rah.!!! 00:12
gnight, and thnx! 00:13
i'm back. some pod2 questions for experts: can a pod node structure be considered a data tree structure? if so, what type of tree? if not how can it be described? 02:03
08:29 sena_kun joined 08:51 sena_kun left 08:55 sena_kun joined 08:56 sena_kun left 11:52 [Coke]_ left
tbrowder [Coke]: with the code working now, i can try again to eval the pod tree and establish absolute parent/child relationships. my previous attempt failed due to unknown nodes. 12:07
[Coke] sounds good 12:09
tbrowder my naive approach includes giving each node a unique id starting from 1 with the first child of $=pod. those children have a parent = 0; i add a :parent! arg to walk: sub walk($node, : 12:12
sub walk($node, UInt :$parent) {} 12:13
[Coke] Each parent already knows about its children (otherwise the walk wouldn't work) - you want to be able to take a given node and reverse the walk, up to the top? 12:15
tbrowder i keep a hash of nodes keyed by the unique id, value is parent and i create the child part from that 12:16
so at least two passes, throwing in a class Node {...} to capture all info on each node. 12:18
that's the skeleton 12:19
one of the attrs i want was level on the bombed attempt but i'm now thinking it properly should be something like "generation", incrementing by 1 during the walk 12:21
that gives me the info for most node types relative y placement on a pdf page which is my main interest, but applicable to other uses 12:23
and i tested using pod2 that i can use a (=config :page-break) when needed 12:26
whadda ya tink? 12:27
[Coke] I've been more interested in what the happens in the to::text rendering, but this seems neat, interested to see what you can do with this. 12:28
tbrowder well the text rendering, at least on pdf! 12:29
will have some generic attrs, but that should be part of the pod2 rendering i think. pdf use will have much more need of special behaviors. 12:31
finanalyst and dwarring are discussing such now. dwarrring and i will be working on To::PDF 12:33
that To::Text is important, too, for sure: definitely needs some base node classes to extend for to::X 12:35
at least as i see it... 12:36
not sure where the to::pdf repo will be, but probably under Raku/RakuDoc-GAMMA 12:40
or a new base repo finanalyst and others create 12:41
20:19 sena_kun joined 22:38 sena_kun left