2009 -- the year of November. <november-wiki.org> <github.com/viklund/november> <irclog.perlgeek.de/november-wiki> <nopaste.snit.ch>
Set by moderator on 10 August 2009.
01:37 ilbot2 joined
moderator 2009 -- the year of November. <november-wiki.org> <github.com/viklund/november> <irclog.perlgeek.de/november-wiki> <nopaste.snit.ch>
01:58 sri_kraih_ joined 02:50 ihrd left 03:20 ihrd joined 03:39 wayland76 joined 05:23 szabgab_ joined 08:12 ihrd left 10:20 omega_ joined 10:58 szabgab_ joined 11:40 masak joined 12:19 ruoso joined 12:30 masak joined 12:37 omega joined
arthur-_ masak: hi 12:56
masak arthur-_: o/
arthur-_ i added get '/say/*/to/*' => { } but we can't have get '/download/*.*' => { } yet because of some not-yet-implemented stuff with regex in rakudo 12:57
masak waitwait... what's the difference? 12:58
also, it's usually possible to work around regex deficiencies in Rakudo.
arthur-_ for /*/ , i worked around it by splitting the path and not using regexes 12:59
for anything more complicated, i need to do like in sinatra
masak ...which means...?
masak looks in Sinatra
arthur-_ and that requires string interpolation as regexes
masak arthur-_: ah. that's what I thought. :) 13:00
well, you can simulate string interpolation by using eval($home-made-regex)
arthur-_ didn't tought of that :)
masak and put a big fat '# RAKUDO' comment so that we remember to go back and fix it later. :)
arthur-_ ikll try
masak arthur-_++
arthur-_ thanks 13:01
masak arthur-_: you're welcome. I feel like I'm getting very little done relative to you right now, so it's nice to be able to help. :)
arthur-_ that wont last, i'll have real work to do soon ^^ 13:02
masak ah, that's what's holding me back. real work. yes, makes sense. 13:05
13:42 sri_kraih joined
arthur-_ ok 19 - path with several wildcards 14:00
masak \\o/
arthur-_ masak: worked :)
masak arthur-_++
arthur-_ now i have to do captures
masak arthur-_: do you blog?
arthur-_ masak: nope 14:01
wayland76 prepares nets and snares for capturing
masak arthur-_: mind if I do in your place?
arthur-_ masak: np
arthur-_ wants to get rid of astaire fast to do more serious mvc :) 14:02
masak :)
we should definitely start thinking along those lines. 14:04
I'm reading the Catalyst book as we speak. 14:05
arthur-_ love catalyst 14:12
wayland76 Although hopefully Web.pm will eventually put it in a (wait for it ... drumroll.... ) catatomb 14:13
masak zarah: slap wayland76
zarah submits wayland76's email address to a dozen spam lists
wayland76 Good thing I have pobox :) 14:14
Besides, it *is* after midnight here :)
masak :)
arthur-_ masak: for splat ( wildcard ) capture, i can't stick to the spec because rakudo doesn't implement passing a hash as named parameters 15:46
so for now on it looks likes that : 15:47
get '/this/has/stars/*/*.*' answers -> %a { %a{'splat'}.join(','); };
masak waitwait, Rakudo doesn't implement passing a hash as named parameters?
arthur-_ ( and it works :) )
masak please exaplain.
arthur-_ mmmh
this :
doit %pairs,1,2,3; # always a positional arg
doit |%pairs,1,2,3; # always named args
masak yes..? 15:48
arthur-_ second doesn't work
masak no?
arthur-_ no
masak rakudo: sub foo(:$named) { say $named }; my %h = named => "OH HAI"; foo(|%h)
p6eval rakudo 0d4fe0: OUTPUT«OH HAI␤» 15:49
masak worksforme.
arthur-_ maybe i did something wrong, i'll look
masak generally, parameter parsing works pretty well in Rakudo at this point.
arthur-_ ok 15:51
masak there are, however, subtleties in the parameter passing that I keep forgetting. they're all in the spec, but when writing a program I tend to forget them. 15:58
things like foo => 42 being a named parameter, whereas 'foo' => 42 is a pair. 15:59
arthur-_ rakudo: sub foo(:@named) { say @named.perl }; my %h = named => ( 1,2,3 ) ; foo(|%h) 16:00
p6eval rakudo 0d4fe0: OUTPUT«[1, 2, 3]␤»
arthur-_ mmh 16:01
masak looks good to me. 16:03
arthur-_ yeah, now i have to find the difference between that and my broken code 16:07
masak that's the fun part. :) 16:08
arthur-_ pastebin.ca/1529605 -> if you have any idea ... 16:11
masak looks
so you're essentially flattening and passing in a Match object? 16:12
arthur-_ masak: flattening like that : my @splat = @($match).map({ ~$_ }); 16:15
( and then %result{'splat'} = @splat; )
masak I was referring to the |%match thing you pass in. 16:17
I'm not sure that's going to fly.
arthur-_ ( I'm tryinq to push, but git hates me ^^ ) 16:18
masak it doesn't hate you, it's just difficult until you grok its underlying model. 16:19
if pushing is difficult, then perhaps you haven't pulled.
arthur-_ yep
masak this seems to work: 16:20
rakudo: regex foo { foo }; sub bar(*%_) { say %_.keys.perl }; "foo" ~~ /<foo>/; my %args = %($/); bar(|%args)
p6eval rakudo 0d4fe0: OUTPUT«["foo"]␤»
arthur-_ pushed, it's here : github.com/arthurwolf/web/blob/1f29...Astaire.pm
zarah arthur-_'s link is also tinyurl.com/me3z37
masak looks
you could do just `%result{'success'} = ?($match);` and you wouldn't need the 'if' statement. 16:24
other than that, it looks fine. does it work? :) 16:25
arthur-_ well, it works fine, but not with named arguments 16:26
masak oh.
is there a failing test that I could look at?
arthur-_ yep, the last one
masak goodie.
I'm leaving soon, so I'll pull down your changes and look at them.
arthur-_ ok
masak logging off for now. I'll probably resurface tonight. 16:28
hopefully with a solution.
thanks for the good progress so far.
o/
17:49 lichtkind joined 18:45 masak joined 19:05 szabgab joined
lichtkind szabgab: ping 19:07
szabgab ?
lichtkind szabgab: i loaded your 3 modules and im going to try to build something 19:09
szabgab which 3 modules ? 19:10
lichtkind szabgab: the wx::perl::Dialog[::*] from your trac 19:16
szabgab good, btw better fetch them from svn than from trac
lichtkind szabgab: its not the same? 19:18
szabgab in the end it is, just the svn is the original
lichtkind szabgab: is the some kind of time delay? 19:20
szabgab: i spoke also with alias, in the end would need some cpan rights
szabgab I guess not
can we maybe discuss this on #padre so we won't disturb the november people ? after all it is totally unrelated 19:21
on irc.perl.org I mean
lichtkind szabgab: yeah but there is nothing right now :) 19:22
szabgab not here on freenode but on irc.perl.org
masak you're not disturbing the november people; but it's possible more people will be able to assist and chime in over at #padre. :) 19:31
lichtkind hi masak
masak olà, lichtkind 19:32
19:41 lichtkind_ joined
masak arthur-_: fixed your bug. 20:28
arthur-_ masak: wow thanks
i pull
masak waitwait, I haven't pushed yet. :)
arthur-_ ^^
masak there, pushed. 20:30
you'll be pleased to know it now goes on to pass all tests from 1 to 18. 20:31
I've been thinking about the infix:<answers> operator, by the way. 20:32
I agree with the symptom (that '=> ->' is un-pretty), but I don't think I agree with the cure. 20:33
I would rather we change the spec to say '=> sub($params)' instead. 20:34
I think that would be good for other reasons as well.
arthur-_ ok 20:37
i'll change that 20:38
masak excellent.
in the meantime, I'll see if I can track down the bug that was causing the error you were seeing earlier today. (the "FixedIntegerArray" one) 20:39
arthur-_ ok 20:40
( test 18 is where testing of splat arguments begin )