Camelia, the Perl 6 bug

IRC log for #november-wiki, 2009-08-14

| Channels | #november-wiki index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

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

| Channels | #november-wiki index | Today | | Search | Google Search | Plain-Text | summary