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.
01:48 ilbot3 joined 03:56 vendethiel joined 06:50 FROGGS joined 06:55 Ven joined 07:18 Ven joined 09:06 Ven joined 10:09 Ven joined 13:15 Ven joined 13:48 Ven joined 14:14 Ven joined 14:24 Ven joined 14:41 Ven joined 14:55 Ven joined 14:57 Ven joined 15:18 Ven joined 15:45 Ven joined 15:48 Ven joined
Ven mmh, obviously, ident-expr can't use identifier 16:08
that's an issue
actually, I probably can 16:10
"['<' <-[>]>+ '>']? " wat?
masak why couldn't it? 16:17
oh, that's for operators, like 'infix:<+>' 16:18
Ven ah, ok
well, it fails with "Variable 'a:' is not declared"
even though I use <identifier>, only <term:identifier> should do that. uh.. 16:19
aaah, ok, I get it.
my str-expr uses <expr>
but, <identifier> will eat the
":"... 16:20
masak yeah...
that sounds wrong
maybe the ':' should go inside the []
Ven and I can't use <term:str> directly :|
masak hold on, let me test a patch for that
no, but you can refactor term:str to call <str>, and then use that :) 16:21
Ven that's done already 16:24
masak then you can use <str>, no? 16:25
Ven yeah :-)
moar indirection!
it's not java, so I'm not gonna call it an abstraction... ;) 16:26
(yes, cheap shot, I know)
masak :P
I've already heard a lot of Java bashing today at work, so yours kind of pales in comparison :) 16:27
Ven :)
masak here you go. github.com/masak/007/commit/e82621...f1daef242d 16:28
Ven ok 1 - {} 16:32
ok 2 - {"a": 1}
ok 3 - {a}
Q::Identifier.new(name => "a")
ok 4 - {a : 1}
guess I'll just have to stuff that .name, like a savage? :D
16:33 FROGGS joined
Ven wtf. I lost my code 16:33
amazing... 16:34
wtf is git doing 16:36
it's trying to hook up the diff on parens 16:37
but you removed it 16:38
16:40 vendethiel joined
Ven ok. {a: 1} parses. 16:45
not to the right thing, probbly
it certainly pretends to..
git threw my stash away. ok 16:47
I give up for today. Fuck git. 16:48
git reset --hard 783e628 16:52
HEAD is now at 783e628 Fix conflicts with c8783f2bc07c62f7c7d16322d638cac8a7ccc5d6
what kind of drugs..
18:06 vendethiel joined
vendethiel [23:31] <masak> the $.key attribute will sometimes be a Q::Literal::Str and sometimes a Q::Identifier, that's all 18:07
sometimes a function
18:44 baldemar joined 19:43 vendethiel joined 19:57 Ven joined
Ven okay, I'm gonna try again. Rewrite this things 19:58
masak oki 20:04
I'm here, nearby
Ven actually, it refactored my code... it works like that... wut. 20:05
vendethiel my internet doesn't, tho.. 20:08
I don't get how the tests can work though.. 20:15
20:15 Ven joined
Ven > '{a: 1}' '(object (property (int 1) (int 1)))' 20:22
Test.pm is totally fine with that
I need to teach him more about property, maybe? 20:24
oooh, it uses .Str, doesn't it...
yay \\o/ 20:25
20:35 Ven joined
Ven make Q::Property.new(Q::Literal::Str.new(~$<identifier>), 20:40
$<identifier>.ast);
looks a bit ugly..
so. 20:45
masak sorry, got distracted by $stuff :) 20:47
looks OK to me
Ven oke :) 20:49
I just need to go about method, then
no idea on that one. Seems like Q::Statement::Sub won't do (as I had guessed)
sometimes I think perl6 should've done away with "class"es :P 20:52
well, parsing "{a}" with { <identifier> } works (yeah of course) 21:09
but parsing "{a()}" with { <identifier> '()' } doesn't (token OR rule)
I'll sleep on that one
masak hm 21:41
I don't see offhand why that wouldn't work