Perl 6 - the future is here, just unevenly distributed

IRC log for #6macros, 2015-10-20

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

All times shown according to UTC.

Time Nick Message
05:56 FROGGS joined #6macros
06:45 Ven joined #6macros
07:08 * Ven 's trying to rebase etc
07:10 Ven nope, giving up again.
07:10 Ven it's making me fix the same conflict on <str> on the same line 10 times
07:11 Ven okay, I think I did it actually
07:15 Ven joined #6macros
07:57 Ven joined #6macros
08:26 Ven joined #6macros
08:34 Ven joined #6macros
09:12 Ven joined #6macros
10:07 Ven joined #6macros
10:16 Ven joined #6macros
11:13 Ven joined #6macros
11:19 Ven joined #6macros
11:21 Ven joined #6macros
11:23 Ven joined #6macros
11:27 masak joined #6macros
11:28 masak I got logged out. I think a hack.p6c.org might've rebooted or something
11:28 * masak backlogs
11:28 masak Ven: everything good rebase-wise?
11:29 Ven masak: look at the PR :P
11:29 masak oki
11:29 Ven and yes, moritz rebooted hack not too long ago
11:29 masak Ven: I'm currently working on property access, by the way.
11:29 Ven I just pushed the rebase
11:29 masak might mesh well with your PR :)
11:29 Ven I aborted the first rebase
11:29 Ven re-rebased
11:29 Ven and that one went well
11:29 Ven vOv
11:30 masak https://github.com/masak/007/pull/37
11:30 masak why does the Travis build fail?
11:32 masak hm -- https://github.com/vendethiel/007/commit/9b1657fb6e9b70494a1ccdbb6537105f044c293f#diff-9899783fe59fab654c1af1b0c082ed2dR105
11:32 masak stringification has moved from under you while you were working on that PR
11:32 masak it now looks like https://github.com/masak/007/issues/45
11:33 masak sorry 'bout the churn ;) lots of small stuffs happening on 007/master
11:33 Ven yeah, I know, I fixed it locally
11:33 Ven I didn't push it yet
11:34 masak I'd still recommend you call the grammar rule 'property', not 'pair'
11:34 masak but, again, not gonna mergeblock you over it -- just gonna change it after the merge ;)
11:37 * Ven renames stuff around
11:38 Ven tests are green! ship it!
11:40 * Ven is catching up on the CppCon videos as well
11:40 Ven were was I headed at with this, already? I think I need the runtime stuff, and it'd be done?
11:42 masak yeah
11:43 masak before I merge, I'm planning to write a short list of things that are related to object literals and that are enabled/necessary once we merge your PR
11:43 masak I might even stick the list as a comment on the PR
11:49 Ven wrt the blog post
11:50 Ven macro a { my $q = quasi { 3 }; quasi { say {{{ $a @ Expression }}};  }; a;
11:50 Ven 1) parse the quasi
11:50 Ven 2) splice $a in
11:50 Ven 3) replace the call to the macro with the spliced code
11:51 Ven 3) is uncontroversial
11:52 Ven only the order of 1) and 2) might be
11:52 Ven but if we do annotate the position, that's definitely to get this order
11:58 masak did you mean $q in both places?
11:58 Ven yeah. whoops :)
11:58 Ven qwerty, azerty,  probably
11:59 masak well, in the case of your code, you're lucky enough to have $q in the same scope as the unquote. in the cases where $q is a parameter, things have to be late-bound
11:59 masak and you have to do 1) first and 2) much later
11:59 masak that's basically the main point of the post
12:26 Ven joined #6macros
12:53 Ven joined #6macros
12:56 Ven yeah
12:56 Ven that's the 3-lines summary
12:56 Ven I don't think there's any other way to do it
12:57 masak right
12:57 masak hence, "abstract parsing"
12:58 masak you need to be able to, instead of feeding *text*/tokens to the parser, go "ok, let's say I gave you a... Q::Statement..."
12:58 masak and the parser would go "haode, then I would suddenly find myself in expect-the-next-statement mode"
13:22 masak $ perl6 bin/007 -e='my q = quasi { say("Three plus four is " ~ (3 + 4)) }; say(q.stmts()[0].expr().args()[0].rhs().lhs().value());'
13:22 masak 3
13:22 masak \o/
13:23 masak still got some cleanup to do, though...
13:32 Ven joined #6macros
13:44 Ven masak++
14:07 masak pushed.
14:08 masak it should be quite easy to wire up that property lookup syntax to arbitrary object values
14:27 Ven joined #6macros
14:43 Ven wrt "let's say I give you a <..>"
14:43 Ven wouldn't that mean you'd need to.. inject stuff to... fill in regexp?
14:43 Ven token sub { 'sub' <name> <body> }; sub.inject(name => Q::...)
14:43 Ven scary
14:48 masak yes, it's quite scary. the rabbit hole goes deep on this one.
14:48 masak like, #perl6 seems to agree that Qtrees will change action methods around a little. but this reveals that it'll change parsing around, too.
14:49 masak getting a good `is parsed` will probably necessitate that, as well
14:51 masak sometimes grammars feel like a slightly bad fit for this
14:51 masak but I don't see very clearly yet how it should all fit together
15:12 Ven joined #6macros
15:12 Ven well
15:12 Ven it reminds me of jnthn's Grammar::Generative
15:13 Ven but we only want to inject at some pos
15:13 Ven like
15:14 Ven [{has(Q::Block, 'block')} || <block>]
15:14 Ven dunno
15:29 masak so, we're holding off on merging until https://github.com/vendethiel/007/commit/9b1657fb6e9b70494a1ccdbb6537105f044c293f#diff-9899783fe59fab654c1af1b0c082ed2dR108 is in place, yes?
15:30 * masak writes that list of things to do after the merge
15:42 Ven lol
15:42 Ven student of mine said "I can write a json parser in 2 lines"
15:42 Ven I got the brightest of them all :-)
15:43 Ven I'm not sure how to go about eval, but I'll snoop around
16:02 FROGGS joined #6macros
19:07 vendethiel joined #6macros
23:49 masak I guess the eval from Val::Array is a bit close
23:49 masak let me know if you feel stuck, and I can help

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