Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
nine rakuast now passing 83 test and 585 spectest files 09:29
Nicholas Christmas is coming
timo test files here means t/* except t/spec/*? 11:01
nine timo: yes 11:07
timo cool
jnthn vrurg: I think the QAST compiler only cares about them on QAST::Stmt and QAST::Stmts 11:23
ah, and QAST::Block
Well, not sure about QAST::Block. But certainly attaching it on statements is the important thing 11:24
vrurg: Didn't have time to look at the PRs for now, but it occurs to me that "source" is probably better than "origin" if a simpler name than the original proposal is wanted. 11:25
origin risks a bit of confusion with .orig
(On a Match)
Which I was trying to avoid. More generally, the thinking is that in normal compilation mode we'll just attach integer char offsets, but in cases where we really would want to be able to map in detail onto original source, there's the NFG-style negative integers plus looku 11:27
(Like when building a formatter, for example)
Since RakuAST is abstract, it erases for example which exact quotes were used in a quoting construct
Which one might want to know in certain non-compilation use cases 11:28
jnthn Some sad news for the VM community twitter.com/jnthnwrthngtn/status/1...8722257920 13:55
lizmat weekly: twitter.com/jnthnwrthngtn/status/1...8722257920 13:59
notable6 lizmat, Noted! (weekly)
gfldex We are not made to last. But we can make things that outlast us. 14:14
vrurg jnthn: As to the naming – it's better be left off for the PR comments. As to the keeping indexes in a table, I've been there, experimented a lot and came down to requiring a tree structure. There is a problem about nodes like where there are gaps in the source between children nodes. The best search algorithm for them would be a tree traversal anyway. 14:29
As to the quoted string and alikes, we do know their exact from/to positions in the source anyway. So, we can use them. Or the strings must be wrapped into a helper node, defined by do_nibbling. 14:32
japhb vrurg: Well, if you're compiling from source, as opposed to generated AST ... 15:51
vrurg japhb: And? ;) 15:53
japhb: BTW, the origin attribute on node is optional in my model. It could also refer to different sources. 15:54
With regard to strings and alikes, the wrapper node could be optional too and be a non-code generator. Or the optional data could be part of the string node. In either case, do_nibbling rule knows the exact location of the string and we can use that info. 15:56
vrurg jnthn: will the current structure of RakuAST CompUnit remain the same, with no <unit-outer>? Backtrace doesn't work with it. 21:24
jnthn I think <unit-outer> was a bit of a hack; it was to hold references to symbols from the real outer to keep QAST compilers happy. 22:43
(The better compiler startup time is largely thanks to avoiding shoving all the setting symbols into that) 22:44
Could potentially reinstate it as an empty block, but nicer if we can just be rid of it 22:45
vrurg Ok, I will adapt Backtrace. Thanks! 22:49