Perl 6 - the future is here, just unevenly distributed

IRC log for #6macros, 2015-12-14

| Channels | #6macros index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
03:11 vendethiel joined #6macros
07:56 FROGGS joined #6macros
08:29 Ven joined #6macros
08:48 pdcawley joined #6macros
10:54 Ven_ joined #6macros
14:04 masak coming back to my question about `quasi @ Q::Infix { + }`
14:05 masak and your answer "well, obviously, I expect a [Q::Infix]"
14:05 masak that's the interesting bit, see
14:06 masak because a Q::Infix object has two properties: lhs and rhs
14:06 masak and they usually hold the operands, when this operator is sitting somewhere in the middle of an expression tree
14:06 masak but this `+` kinda doesn't
14:06 masak it's a leaf node, more like
14:07 masak as far as I can see, this doesn't happen with any other grammatical cateogry, only with pre/in/postfixes
14:07 masak because they parse funny -- in the sense that they don't textually contain all their constituent parts, but rely on precedence/associativity instead
14:12 Ven joined #6macros
14:22 Ven joined #6macros
14:39 Ven joined #6macros
17:57 vendethiel joined #6macros
17:58 vendethiel yeah, but the very confusing is that
17:58 vendethiel I want a Q::Infix
17:58 vendethiel and there's already an infix in there
17:58 masak and the parser is poised to parse an infix
17:59 vendethiel how does it know which rule is associated? :P
17:59 masak now let me drop the other shoe for you:
17:59 masak this *already happens* inside the parser
17:59 vendethiel mapping from a Q type to a grammar rule?
18:00 masak no, passing around degenerate Q::Infix values
18:00 masak here's one end: https://github.com/masak/007/blob/maste​r/lib/_007/Parser/Actions.pm#L473-L480
18:00 vendethiel okay, but then that wasn't what I meant
18:00 masak and here's the other: https://github.com/masak/007/blob/ma​ster/lib/_007/Parser/Actions.pm#L240
18:01 masak er, eternal links for the backlog: https://github.com/masak/007/blob/f08​031b3ce0677d97bbdd2843e60f0d79b23db09​/lib/_007/Parser/Actions.pm#L473-L480 and https://github.com/masak/007/blob/f0​8031b3ce0677d97bbdd2843e60f0d79b23db​09/lib/_007/Parser/Actions.pm#L240
18:01 masak vendethiel: what did you mean?
18:01 vendethiel > mapping from a Q type to a grammar rule?
18:01 vendethiel i.e. "how, there's an Q::Infix here, lemme use that one parsing rule"
18:02 masak disregarding the fact that 007 doesn't yet do this...
18:02 vendethiel exactly
18:02 masak ...I assume there'll be an actual hash somewhere that knows what grammar rule to invoke with each Q type
18:03 masak a bit like the has we use with the Lisp-y syntax, but in reverse :)
18:03 masak hash*
18:04 vendethiel 'thought about that as well
18:06 masak anyway, "this already happens" in the parser was the big eye-opener for me.
18:06 masak in that the presence of macro constructs exposes parser internals
18:24 FROGGS joined #6macros
20:12 vendethiel- joined #6macros
20:32 vendethiel- https://github.com/mindeavor/es-pipeline-operator hehe, what a proposal
20:36 masak cute.

| Channels | #6macros index | Today | | Search | Google Search | Plain-Text | summary