Perl 6 - the future is here, just unevenly distributed

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

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

All times shown according to UTC.

Time Nick Message
02:48 ilbot3 joined #6macros
10:26 andreoss joined #6macros
10:37 andreoss masak: for user-defined ops, neither Q::Infix or Q::Prefix are used. am i correct?
11:15 vendethiel joined #6macros
13:44 masak andreoss:
13:44 masak $ perl6 bin/007 -e='sub infix:<%>(l, r) {}; say(quasi @ Q::Infix { % })'
13:44 masak Q::Infix { lhs: None, rhs: None
13:44 masak }
13:45 masak perl6 bin/007 -e='sub infix:<%>(l, r) {}; say(quasi @ Q::Expr { 1 % 2 })'
13:45 masak Q::Infix {
13:45 masak lhs: Q::Literal::Int 1,
13:45 masak rhs: Q::Literal::Int 2
13:45 masak }
13:46 masak infixes are represented in the Qtree as Q::Infix, prefixes as Q::Prefix, etc
13:46 masak the built-in ops have their own subclasses of these. I'm not sure that design will survive, but I hope so
13:54 andreoss i see
13:54 andreoss also why there's no $.ident property for Q::Infix there?
14:26 vendethiel mmh
14:35 masak andreoss: that's a good question
14:35 masak andreoss: I have a refactor stashed away that's stalled on the answer to that question
14:35 masak the proximal reason, though, is that it's hidden by `attribute-order`
14:36 masak presumably it shouldn't be
14:36 masak let me try to switch it on :)
15:40 vendethiel joined #6macros
16:10 FROGGS joined #6macros
16:29 andreoss masak: regarding traits, is there an example of making one?
16:31 masak nope -- suggestions welcome
16:32 masak in the absence of any other ideas, we might simply copy Perl 6's trait model
16:32 andreoss you've mentioned `is wrapped` as i see it's NYI and i can guess it meand to be a kind of Python's decorators
16:32 masak yeah, something like that
16:34 masak I was just groping for an example
18:01 Ven joined #6macros
19:22 Ven joined #6macros
20:57 FROGGS joined #6macros
21:55 masak andreoss: just pushed a commit where $.ident is exposed in operator Q types :)
22:13 masak ...I think I need serious help thinking about quasis in quasis.
22:33 vendethiel maybe if you got an aspirin for me..
22:34 masak *pat pat*
22:53 masak `quasi { quasi { {{{foo}}} } }` will expand {{{foo}}} in the *outer* quasi. and there's no mechanism for expanding something in the inner quasi.
22:53 masak which means the inner quasi is just an expensive type of ordinary block.
22:53 vendethiel {{{ {{{ x }}} }}}
22:57 masak still doesn't even reach the inner quasi, that's the problem
22:57 masak cf, um, "foo {$x} \"{$y}\" bar"
23:09 vendethiel well
23:09 vendethiel {{{ }}}should be in the inner
23:09 vendethiel in the double-quasi
23:18 masak ok
23:18 masak we can make it work like that, of course
23:18 masak at least in 007 :)
23:19 masak we could also implement the crazy from S06: `quasi < quasi [ <<<foo>>> [[[bar]]] ] >` -- enabling explicit control over which quasi an unquote belongs to

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