Perl 6 - the future is here, just unevenly distributed

IRC log for #6macros, 2017-12-19

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

All times shown according to UTC.

Time Nick Message
03:02 ilbot3 joined #6macros
18:54 Ven`` joined #6macros
19:16 Ven joined #6macros
19:17 Ven``` duh.
19:22 Ven``` masak: would you be available to re-read my advent post before it goes live?
20:24 Ven`` joined #6macros
20:49 masak Ven``: sure!
20:50 masak (though I can't re-read it without first having read it a first time) :P
20:53 Ven`` I read it once for you :-).
20:54 Ven`` masak: https://gist.github.com/vendethiel/ca0ea82f29d288da8ab0e848bc6d16bb
20:55 * masak reads
20:55 Ven`` ty!
20:56 masak s/and experiments/and experiment/
20:56 masak s/shed away/shy away/
20:56 masak er, "shy away from", I think
20:57 masak there's been some massive copy-paste activity before the `name()` macro actually shows up
20:58 masak roughly, the post up until then has been duplicated a few times
20:58 masak s/an usable language/a usable language/
20:59 masak ...looks good. I'll be happy to review it again after the above has been fixed
21:00 masak two worthwhile things to know about the last/best example, infix:<ff>
21:00 masak (a) it's not merged *yet* (I'm planning to look at it tonight)
21:01 masak (b) with the implementation as outlined, it doesn't have the proper clone-with-surrounding-sub semantics (which jnthn called me on right away when I described the code to him)
21:03 masak oh, you might have actually meant "shed away" above. perhaps in that case it's better to say "It does, however, shed some parts of it." -- or maybe s/shed/omit/
21:03 Ven`` I did mean shed away
21:04 Ven`` oh, wow, that copypaste
21:04 Ven`` probably a vim thing
21:05 masak was thinking vim
21:05 masak <n> i
21:05 Ven`` copy pasting under vim without :paste, never again :P
21:05 masak o.O
21:06 Ven`` well, I used instead: "here's a milestone 007 should reach in time for christmas (currently sitting in a branch)"
21:06 Ven`` It's totally hopeful, and isn't going to happen, but fits well :P
21:07 masak I'm not comfortable with making projections, even short-term ones :/
21:07 masak they don't age well
21:07 Ven`` Well, that's a projection I know we aren't going to make :P
21:07 Ven`` I just want to spirit of it.
21:08 masak it's more the thing where a blog post publicly promises something on the project's behalf...
21:08 masak :/
21:08 Ven`` Ok, fair enough :-)
21:08 masak thanks for understanding :)
21:08 masak I do hope to overdeliver, but... privately
21:09 Ven`` "here's a milestone 007 should reach some time after christmas"
21:09 masak *sigh* :)
21:09 Ven`` how about that one? \o/
21:09 masak well, it *is* the next milestone I hope we reach, but
21:09 Ven`` Settled for "ere's a milestone 007 wants to reach that's currently sitting in a branch"
21:09 Ven`` here*
21:09 masak +1
21:10 masak by the way, you can experience it yourself, because everything's pushed to that branch
21:10 masak if you run the tests, you'll get an error in t/examples/ff.t
21:10 masak Variable 'v' is not declared
21:10 Ven`` (updated gist)
21:11 masak briefly, because macro *arguments* don't get wrapped in a Q::Expr::BlockAdapter right now
21:11 masak and so they have the wrong lexical context
21:11 masak ISTR I already solved that in Rakudo once, ages ago
21:14 masak Ven``: did you see https://github.com/masak/007/issues/273 ? any thoughts?
21:14 Ven`` I think my next tuits will go towards regex captures
21:14 masak nice
21:15 masak inching closer to `is parsed` :)
21:15 Ven`` currently mentally debating whether I wnat an extra arg or some dynamic scoping :).
21:16 masak oh, you mean in implementation code...
21:18 masak Ven``: para after Fizzbuzz now begins "hat?"
21:19 masak you've turned your editor up one notch too high... :P
21:20 masak s/One of the most important <(feature)>/features/
21:21 masak the "an usable language" typo still prevails
21:22 masak the indentation in the `macro statement:<whoa>` example seems off
21:23 masak might want to link to 007 somewhere
21:25 Ven`` Fixed that one already :P
21:25 masak Ven``: if you have some time to discuss a tradeoff I just ran into...
21:26 masak so, I need to provide the macro arguments with lexical context as I pass them in
21:26 Ven`` for sure :-)
21:26 masak typically these are Q::Expr, so currently I need to wrap them in Q::Expr::BlockAdapter
21:27 masak (#273 suggests using Q::Context instead, which would be nicer and slightly more transparent)
21:27 masak but
21:27 masak either way, the problem is now
21:28 masak that something like `macro name(expr)` and the expectations associated with that one fail to work
21:28 masak because everything that comes in will now be a Q::Expr::BlockAdapter or equiv
21:31 masak this feels like a bummer
21:31 Ven`` oh, ouch.
21:31 Ven`` shouldn't all arguments be in the same context, though?
21:31 Ven`` mh. maybe stupid but:
21:31 Ven`` is a context for a macro the same as the self for an object?
21:32 masak ok, getting concrete so we're on the same page:
21:32 masak `if v == "B" ff v == "B" {`
21:32 masak the infix:<ff> is the macro call
21:33 * Ven`` nods
21:33 masak `v == "B"` and `v == "B"` are the two operands; they're both subtypes of Q::Expr
21:34 masak the *context* I'm talking about is the surrounding loop body, which holds the currently iterating value `v`
21:34 masak i.e. that loop block's current frame
21:35 * Ven`` nods
21:35 masak right now the branch doesn't pass the tests, because 007 doesn't find that `v`, *because* it's looking in the quasi's context
21:35 masak so I just need to fix that
21:35 masak and I can
21:35 masak but the price will be that name.007 breaks
21:36 masak and possibly more things that expect direct access to the type of the macro arg
21:36 Ven`` right
21:36 Ven`` my point was
21:37 masak I think all arguments will be in the same context, yes
21:37 Ven`` can't we get that as the macro's """invocant"""
21:37 masak even considering pile-on effects like macro calls in macro calls
21:37 Ven`` "reverse COMPILING::"
21:37 masak ah
21:38 masak yes, possibly
21:38 masak but
21:38 masak macros and quasis are orthogonal
21:38 masak this is somehing we need to fix in the quasi
21:38 Ven`` yup.
21:38 masak is it reasonable to apply that fix to all unquotes, without knowing whether the thing is a macro parameter?
21:38 Ven`` we have several options
21:39 Ven`` the first of which is "fake that the quasi's OUTER:: is our calling scope"
21:39 Ven`` which isn't going to please you
21:39 Ven`` since it totally breaks hygiene =P
21:40 Ven`` 2) we can create a fake OUTER:: with only the macro arguments
21:40 Ven`` 3) we can probe the quasi and try to find argumet names that havnt been changed
21:40 Ven`` 4) we can provide some sort of auto-unwrapping proxy
21:41 masak yep, this is totally going to be the pillow I sleep on tonight
21:42 masak thanks for laying out the options, though. it helps.
21:42 * Ven`` goes to publish his post
21:42 Ven`` I totally forgot to push the button. oops
21:42 masak :)
21:43 Ven`` I'm happy to have gotten a post in this year
21:43 masak Ven++
21:43 * Ven`` wishes he could've gone to some perl meeting that didn't conflict with school
21:48 masak 5) provide Q nodes with some kind of property that allows them to transparently dislocate its frame
21:48 masak their*
21:50 Ven`` also an issue
21:50 Ven`` but quite a burden
21:51 Ven`` and means creating Q nodes from userland quite the ride...
21:52 Ven`` joined #6macros
22:03 masak well, it'd simply mean they don't set that property
22:04 masak or, I'm not sure if it means that
22:10 sergot joined #6macros

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