6macros: discussing the finer points of Perl 6 macros, Qtrees, and how to stay sane | irclog: irclog.perlgeek.de/6macros/today
Set by moderator on 28 July 2015.
02:48 ilbot3 joined 04:40 vendethiel joined 08:29 pdcawley joined 08:31 Ven joined
masak ok, next focus: unquotes. 09:14
make unquotes work *everywhere*! MWHAHAHA
Ven maybe we should at some point discuss of *how* we could break this hygiene :P 09:54
masak sure 10:03
synthetic Qtrees are already a way -- working today -- to break hygiene 10:04
but we might want to provide more ways than that, increasing convenience at chosen points 10:05
Ven well, for the two last commits, how do you break hygiene there? 10:19
masak same way. synthetic Qtree. the identifier in the operator would be contextless. 10:21
by the way, currently as things stand the default operator subclasses are a bit vestigial 10:22
but I find I don't want to remove them :)
Ven huh? 10:23
masak they used to contain the .eval methods for evaluating the operands 10:24
but that's now in the built-ins, for everything except infix:<=> and the postfixes 10:25
they used to specialize on $type, the role parameter
but that's now the $.ident attribute instead 10:26
11:16 Ven joined
Ven right, I meant the other thing 11:19
(unhygiene) 11:20
masak maybe that would be easier to discuss around a use case 11:30
Ven well, easy, `map({ $it * 2 }, @a)` 11:32
(yes, totally useless in perl6 as it stands, point still stands) 11:33
masak *nod* 11:41
oh, I thought you were asking specifically about unhygienic operators.
but what you want to do is intercept the parser so that it thinks it knows about $it
on another note: I've recently been made aware of martinfowler.com/bliki/FeatureToggle.html 11:55
I'm now more inclined to implement e.g. type annotations that way
(than using a separate longish-running branch)
12:48 Ven joined
Ven that's basically use;, right? 12:49
masak more like `if (%feature-enabled<foo>) { #`[foo-related stuff] }` 12:55
er 12:56
more like `if %feature-enabled<foo> { #`[foo-related stuff] }`
sorry, been coding Perl 5 today :P
Ven oke 13:47
16:15 Ven joined
masak "This plugin implements Design by Contract by <del>abusing</del> repurposing JavaScript labels." -- github.com/codemix/babel-plugin-contracts 16:36
cute idea.
17:57 vendethiel joined 20:00 vendethiel- joined
masak Q::Term::Quasi. Q::*Term*::Quasi 21:43
hm.
oh, wait.
I'm mixing up quasis and unquotes. quasis are always terms. never mind.
and Q::Unquote is already named right.
as you were.
vendethiel- ..cool :P 21:46
I'm glad I was named right :-).
masak :P 22:02
tonight, I tried to make `quasi { 2 {{{my_op @ Q::Infix}}} 2 }` parse and then DTRT 22:26
I am now much better informed of my previous ignorance of the difficulties involved