Perl 6 - the future is here, just unevenly distributed

IRC log for #6macros, 2015-07-19

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

All times shown according to UTC.

Time Nick Message
06:46 vendethiel joined #6macros
07:36 vendethiel joined #6macros
08:29 vendethiel joined #6macros
10:20 * masak re-reads http://strangelyconsistent.org/blog/mac​ros-progress-report-after-a-long-break and is filled with the enthusiasm of the original vision
10:26 masak as to parsing, I think we should be asking "what's the simplest thing that could possibly work?" and then do that for starters
10:26 masak maybe explicitly considering it a first prototype
10:26 masak having access to the grammar's own rules seems essential to doing this in a good way
10:27 masak there's no way I'll go and re-implement <variable>, have you seen that thing?
10:27 masak or <EXPR>, for that matter.
10:28 masak and thinking ahead with slangs, it's not really Perl6::Grammar that we should be given access to, it's $~MAIN
10:28 vendethiel [12:26] <masak> there's no way I'll go and re-implement <variable>, have you seen that thing?
10:28 vendethiel [12:27] <masak> or <EXPR>, for that matter.
10:28 vendethiel you mean, in v5?
10:29 vendethiel or rather, in our own grammar
10:29 masak let's assume for the purpose of that question that we accepted `is parsed` wholesale
10:29 masak then I should be able to write `<variable>` inside the `is parsed` regex, and it should resolve.
10:30 vendethiel well, a big different between how I see macros and how you see macros is that
10:30 vendethiel you "believe" in "is inside(&other-macro)"
10:30 vendethiel whereas I believe more in codewalkers
10:37 masak I think that's a difference we can very well overcome.
10:37 masak I definitely believe in codewalkers, too.
10:37 masak but keep in mind that, at least absent parsing shenanigans, if you pass a block to a macro, that block has to be already parsed.
10:38 masak that's just the way Perl 6 rolls.
10:38 vendethiel yep, but that's a pretty issue
10:38 vendethiel as in, mixing levels like that makes it much harder everywhere.
10:39 vendethiel and it's not like there's another solution
10:40 * masak re-read http://strangelyconsistent.org/blog​/macros-allowing-two-terms-in-a-row
10:41 masak "The Perl 6 chorus today sings about *grammars*, and sometimes action methods. But the `is parsed` trait still mumbles about its regexes, making itself a bit of an embarrassment, to be honest. It hasn't gotten the memo that all the rest of us are doing structured language parsing, not just text munging."
10:41 masak I'm mulling about this one today.
10:41 masak I realized that not having action methods in a macro is not such a show-stopper after all.
10:42 vendethiel well, the macro itself is
10:42 masak but what we do want is something like a simple way to cast `Q::Var($<variable>)`
10:42 masak so you can really easily get the Qtrees out of your parsed elements.
10:43 vendethiel yeah, but...
10:43 vendethiel all the code I wrote had some variable shenanigans
10:43 masak interestingly, something like <xblock> doesn't have a Qtree. you have to unpack it yourself. that's fair, I guess.
10:44 masak yes, the variable shenanigans are *very important* to get right, I agree.
10:44 masak I think if we sat down and thought hard-ish about it, we could reduce it to five or so orthogonal use cases that simply have to work.
10:44 masak maybe that's a good thing to do at Swiss
10:45 vendethiel also, more brains! :P
10:45 masak braaaaaaaains
10:45 * vendethiel still needs to finish his talk, but got a better angle now
10:46 masak that blog post hypothesizes that the action methods of the original grammar will still run as usual.
10:47 masak I'm not 100% sure that's a good idea, but... I think it could work out.
10:47 masak that'd just mean that the Qtrees are already there, in the $/.ast attributes
10:49 masak ah, you said I believe in `is inside` because of this post: http://strangelyconsistent.or​g/blog/macros-nesting-macros
10:50 masak I'm not married to that solution.
10:50 vendethiel yes, I did
10:52 vendethiel also, I'd like to see a gist example of what you're talking about here :)
10:52 masak me too :)
10:55 masak "the most generic macro in P6 is going to look a lot like a parsing rule with an AST maker for its action closure, which may or may not build the returned AST out of quasis, that may or may not refer to the bits parsed by the parse rule, presumably by the same name they were parsed under"
10:55 masak I like that sentiment (by TimToady)
13:26 vendethiel joined #6macros
15:41 Ven joined #6macros

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