Camelia, the Perl 6 bug

IRC log for #november-wiki, 2009-10-10

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

All times shown according to UTC.

Time Nick Message
06:24 arthur-_ joined #november-wiki
08:37 eiro joined #november-wiki
11:09 masak joined #november-wiki
13:24 ruoso joined #november-wiki
14:02 arthur-_ masak: hi
14:02 masak arthur-_: hi!
14:02 arthur-_ :)
14:02 masak how's business?
14:03 arthur-_ had no connection for 2 weeks
14:03 arthur-_ hell
14:03 arthur-_ back to normal now :)
14:03 masak that's something, I guess. :)
14:03 masak welcome back. :)
14:03 arthur-_ thx
14:03 arthur-_ had time to look at the blocking thing with astaire ?
14:04 masak had, perhaps. taken, no. :/
14:04 arthur-_ ok :)
14:04 masak I'm looking at the last email now.
14:05 masak ok, so there's an argument-passing error. that doesn't seem too hard to fix.
14:05 masak let me see if I can reproduce it.
14:05 arthur-_ ok
14:05 masak arthur-_: have you seen what I've done with Squerl?
14:05 arthur-_ yep
14:06 arthur-_ nice
14:06 masak it might be possible to combine Astaire and Squerl somehow.
14:08 arthur-_ definitely
14:10 masak now I've reproduced the problem.
14:10 masak so, it occurrs somewhere after test 18... hm...
14:13 masak ok, the error occurrs in connection with the line my $response = $astaire_app.call( Web::Request.new({ PATH_INFO => "/path/to/file/my_file.xml", REQUEST_METHOD => "GET" }) );
14:13 masak now tracing into that call.
14:13 masak by the way, we now have postcircumfix:<( )>, so we don't need to do .call if we don't want to. :)
14:14 arthur-_ .call is a perl6 keyword ?
14:15 masak no, it's a Ruby-specific special method.
14:15 masak I believe it was a temporary allowance while we couldn't define our own .() methods in Rakudo.
14:15 masak ...which we now can.
14:15 arthur-_ oh ok, i get it
14:16 masak I'm now inside Dispatch.dispatch. not surprisingly, the tracks lead there.
14:18 arthur-_ i'm probably doing someting strange there
14:18 masak it's this line:
14:19 masak $response.write( $code(|%match<splat>) );
14:19 masak my gut tells me it's the $code(|%match<splat> that complains about parameters.
14:19 masak but let me check that too.
14:19 masak oh, I think I know now.
14:19 masak this is the first time you have two asterisks, no?
14:20 masak that hash now contains ["my_file", "xml"]
14:20 arthur-_ yes i think so
14:20 masak and it flattens into two args.
14:20 masak and $code probably expects only one.
14:21 masak does that sound reasonable?
14:21 arthur-_ mmmh
14:22 masak now I'm going to transfer to you the general method for finding these bugs. :)
14:22 arthur-_ the astaire declarations in the tests ( the anonymous subs ) don't except anything
14:22 masak it's called the A/B method.
14:23 masak put "say 'A';" way before where the problem occurs, and "say 'B';" after. narrow them successively until they only surround one line.
14:25 arthur-_ actually, I did it back then, and got to the point we are now
14:25 masak I think the { "Starz"; } block takes one parameter.
14:26 arthur-_ but I lack rakudo debugging skill/perl 6 language knowledge to go further
14:26 masak rakudo: my $code = { "Starz"; }; say $code.arity
14:26 p6eval rakudo 1b8355: OUTPUT«0␤»
14:26 arthur-_ I supposed that I could pass just as may parameters as I wanted ( Perl5 style )
14:26 masak rakudo: my $code = { "Starz"; }; say $code(); say $code("OH HAI")
14:26 p6eval rakudo 1b8355: OUTPUT«Starz␤Starz␤»
14:26 masak rakudo: my $code = { "Starz"; }; say $code(1, 2)
14:26 p6eval rakudo 1b8355: OUTPUT«too many arguments passed (2) - at most 1 param expected␤in Main (src/gen_setting.pm:204)␤»
14:26 arthur-_ wow
14:26 masak ok, there's your error.
14:26 masak it takes one optional parameter.
14:27 masak think of it as having signature :($_?)
14:27 masak arthur-_: Perl 6 is a little stricter when it comes to passing parameters.
14:27 arthur-_ ok so we need to specify signatures, no Perl5-like-@_ ?
14:27 arthur-_ ok
14:27 arthur-_ did not know that
14:28 masak well, there are several possibilities here.
14:28 arthur-_ I'll correct it, thanks a lot
14:28 masak I'll be here most of the day. happy to discuss further if you want to.
14:28 arthur-_ have work, but I'll get back to you as sonn as I make progress
14:29 masak sounds good.
14:29 arthur-_ thanks for the help
14:29 masak now I can finally un-star an email in my inbox with good conscience. :)
14:29 masak happy to be of assistance.
14:29 arthur-_ ( rakudo needs to help me more ^^ )
14:29 masak yes, we call that LTA. Less Than Awesome (error messages).
14:29 arthur-_ :)
14:36 masak good luck with your other work. I'll also tune out now. I can be brought back by the strange magic of highlighting my nickname.
17:48 p6eval joined #november-wiki
22:36 ruoso joined #november-wiki
22:36 arthur-_ joined #november-wiki

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