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