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:13 vendethiel joined
masak ven: review: 05:37
github.com/vendethiel/007/commit/b...0921b3R188 looks like the result of a faulty conflict resolution. you're undoing the <statementlist> -> <block> change that happened in master on term:quasi.
github.com/vendethiel/007/commit/b...82ed2dR135 -- I don't think Q::Property is a Q::Literal. to qualify as a literal, you have to be able to occur freely in an expr. property syntax is specific to the object literal DSL. (because everyone wants the colon.) 05:40
github.com/vendethiel/007/commit/7...82ed2dR123 -- should be `does Q::Term` nowadays 05:42
github.com/vendethiel/007/commit/7...82ed2dR419 -- what would it take to fulfill this TODO? it looks like you're already doing `die` if we get back an undefined value. 05:44
github.com/vendethiel/007/commit/7...82ed2dR420 -- should be `$.ident.name` just like 3 lines down, no? 05:45
do you have tests for property lookup? like, one for successful lookup and one for failing lookup? I only see the former. 05:46
github.com/vendethiel/007/commit/7...85e83c3R85 -- should be `?%.properties` 05:50
maybe we should have two tests for object boolification, too ;) 05:51
EOR
two latecoming comments (neither of them blocking acceptance/merge): 06:43
github.com/vendethiel/007/commit/7...85e83c3R81 -- it's good that you're sorting, since we want stringification to be predictable. I keep being tempted to show the keys in "source order" (which would require an additional array with that information in Val::Object), but I'm a bit wary about unknown consequences of such a design decis 06:45
ion.
decision*
of note, JavaScript seems to have built source order into their objects early on, and then regretted it for various reasons, for example optimization. 06:46
the only reason I'm even considering it is that in some class declaration, there *is* a logical order. for example: Q::Postfix::Call ($.expr, $.argumentlist). Q::Statement::My/Constant ($.ident, $.expr). Q::Statement::If ($.expr, $.block). 06:49
looking at github.com/vendethiel/007/commit/7...85e83c3R79 with fresh eyes, I'm thinking maybe the quoting logic in Val::Str.quoted-Str should be extracted into a global sub, and then used from both places. 06:52
...maybe. :) it does create another dependency, but maybe that's nicer than creating that Val::Str on-the-fly just to get at one of its methods.
both uses are in Val.pm, so it could still be a lexical sub. 06:57
masak goes back to injecting comments in the examples/ scripts before 007 has comments implemented 06:58
07:38 FROGGS joined 08:34 pdcawley joined 09:49 Ven_ joined
Ven_ o/ 09:50
github.com/vendethiel/007/commit/b...0921b3R188 -- oops!
github.com/vendethiel/007/commit/7...82ed2dR123 whoops :) 09:51
github.com/vendethiel/007/commit/7...82ed2dR419 I guess it should be cleaned? Is a bare die okay?
github.com/vendethiel/007/commit/7...82ed2dR420 well, it's "bolted on". In this case, .ident is a Str (the key) 09:52
github.com/vendethiel/007/commit/7...85e83c3R85 this definitely warrants test :)
lastly -- irclog.perlgeek.de/6macros/2015-11-09#i_11505116 I did that because I knew you argued for it in #perl6 :) 09:53
masak yes, I remember us talking about it. and I won't inflict my current vascillation about *how* to sort on your PR, so please keep it the way it is ;) 09:55
re "bare die" -- I think it's fine the way it is. that is, the TODO can probably go away. 09:56
what we usually do in the source though is to insert an `# XXX` comment asking for the string to be promoted to an X:: exception
by the way -- when I review, I first do a squash of all the commits, just to make sure I'm not commenting on a change that is undone by a later commit. 11:26
it might be worth considering squashing the commits into a single one at some point :) modulo some "preparatory changes", like the term:str -> <str> refactor. 11:28
another reason to prefer source ordering of object attributes: initialization order. 14:10
basically, a class declaration is like a function body, and an instantiation is like invoking that function. all the attribute declarations run, in order. 14:11
18:27 FROGGS joined 18:54 vendethiel joined 21:07 Ven_ joined 21:08 Ven__ joined
Ven__ masak: re irclog.perlgeek.de/6macros/2015-11-09#i_11505661 - does this not bother you? 21:13
21:21 Ven_ joined
Ven_ all of my tests fail with this: 21:22
# - Q::Statement::Expr Q::Term::Object [Q::Property<4342195016>]
# + Q::Statement::Expr Q::Term::Object [Q::Property<4344858216>]
that happened when I removed Q::Property being Q::Literal 21:25
heh, do I need a `if` for boolification? 21:28
that's the only way I can see from grepping the tests
whoops, there's a fix missing with my commit 21:29
21:51 Ven_ joined