Camelia, the Perl 6 bug

IRC log for #mojo, 2011-03-24

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:00 stephen left #mojo
01:03 tempire_ huh
01:03 tempire_ thinkgeek is a perlshop
01:06 sri it has always been
01:09 fhelmber_ joined #mojo
01:10 xris left #mojo
02:09 tempire_ they're hiring a senior perl dev
02:10 tempire_ left #mojo
02:11 tempire joined #mojo
02:43 perlrocks Twitter: "blog updated. Mojolicious in WebSocket ☞ Try http://am6.jp/fcBZqf" (ja) --hid_tgc http://twitter.com/hid_tgc​/status/50749568496840704
02:54 diegok sri: talk was really good. Today was the assistance record for madrid.pm, many new faces :-)
02:55 diegok Thank you for your help and support, and... mojo :-)
03:22 crab sri: oh, i didn't realise the entire message payload has to be xored, i thought it was a handshake thing (maybe i should actually read the draft now :-)
03:24 crab perl -le '$input="abcddcbabdaccdabef";@key=split //, "abcd";$i=0;print join "", map {$_^$key[$i++%4]} split //, $input'
03:31 crab but this is better:
03:31 crab perl -le '$input="abcddcbabdaccdabef";$key="abcd";while(len​gth($_=substr($input,0,4,""))==4){$output.=$_^$key​;};substr($key,length)="";$output.=$_^$key;print $output'
03:37 crab but doing bigger blocks makes it much faster, so it's a tradeoff.
03:40 crab time perl -le '$input="abcddcbabdaccdabef"x2000000;$ke​y="abcd"x128;while(length($_=substr($inp​ut,0,512,""))==512){$output.=$_^$key;};s​ubstr($key,length)="";$output.=$_^$key;'
03:40 crab perl -le   0.18s user 0.18s system 100% cpu 0.363 total
03:40 crab 512-byte blocks seems to make sense. beyond that the gain begins to drop off.
03:42 crab and the cost of storing half a kilobyte of key material doesn't seem worth bothering about either.
03:43 crab yes, i like this version.
04:57 crab yes, i do. i likes it, my preciousss.
05:42 marcio_ferreira joined #mojo
06:02 kaare joined #mojo
06:17 koban` joined #mojo
06:18 arpadszasz joined #mojo
06:31 crab boy, perlcritic is stupid.
06:36 gslin in Mojolicious/Plugin/EpRenderer.pm line 82, it may be $app->renderer->default_handler('name'); ?
06:36 gslin in Mojolicious/Plugin/EpRenderer.pm line 82, it may be $app->renderer->default_handler($name); ?
06:43 crab gslin: sounds ok
07:14 AmeliePoulain joined #mojo
07:49 Christian joined #mojo
07:49 Christian good morning
07:49 purl For you maybe.
07:55 breaker313 joined #mojo
08:29 ysyrota joined #mojo
08:38 marcus morning
08:41 crab hi marcus. how's the new apartment treating you?
08:44 marcus crab: very well! Still a lot of boxes to unpack tho
08:49 marcus got the roomba set up yesterday, and installed internet. Dad is coming this evening to help put together some furniture and hang lamps and stuff
08:58 baton8 joined #mojo
09:12 cosmincx joined #mojo
09:14 perlrocks Twitter: "The Markapl into Mojolicious a whole ... there should be many places to fix ... # https: / / github.com / gslin / mojolicious-plugin-markaplrenderer-perl" (zh-TW) --gslin http://twitter.com/gslin/status/50847833460445184
09:41 bosphorus joined #mojo
09:41 abra left #mojo
09:44 perlrocks Twitter: "Mojolicious-Plugin-MarkaplRenderer 0.1.0 by GSLIN - http://frepan.org/~gslin/Mojolici​ous-Plugin-MarkaplRenderer-0.1.0/" --cpan_new http://twitter.com/cpan_ne​w/status/50855616612274177
09:53 abra joined #mojo
09:57 marcio_ferreira left #mojo
10:08 cosmincx left #mojo
10:08 cosmincx joined #mojo
10:28 perlrocks Twitter: "U of A Mite Teru Mojolicious messing Web framework" (ja) --x86_64 http://twitter.com/x86_64/status/50866615218225152
10:31 fmerges joined #mojo
10:44 spleenjack joined #mojo
11:22 sri crab++ # last version looks good
11:25 Debolaz Hmm.. Trying to do $r->route ('/foo')->to ('foo#action')->route ('/bar')->to ('bar#action') only 'bar#action' seems to actually be called if I request /foo/bar
11:26 Debolaz Is this intended behavior?
11:29 jdixon joined #mojo
11:29 jdixon wow, this channel grows exponentially each time I visit. :)
11:29 perlrocks Twitter: "Catalyst PerlDancer and tried to Mojolicious" (ja) --x86_64 http://twitter.com/x86_64/status/50881960595304448
11:30 sri Debolaz: intended and documented
11:30 Debolaz sri: I'm having some problems reading the routing guide then, it's very confusing on this point.
11:31 Debolaz sri: Is waypoint the appropriate method to use instead for Catalyst-style chaining?
11:34 sri don't use waypoints, ever
11:34 sri just go with bridges
11:36 * Debolaz tries bridges
11:47 jdixon I'm using under() to check for api tokens and return a status => 401, json => $error if it's missing/invalid. But my tests keep returning a 404. Any clues?
11:48 jdixon that is to say, it's returning the correct content. just the wrong status code.
12:01 Debolaz sri: Bridges working. Danke.
12:06 jdixon sri: what's the easiest way to set a request header inside Test::Mojo?
12:07 jdixon I've fiddled with $tx->req->headers->header but not getting anywhere.
12:11 AmeliePoulain left #mojo
12:14 koban` jdixon: many method of Test::Mojo accepts headers hashref as second param
12:14 koban` $t->get_ok($uri, $headers)
12:15 jdixon hmm
12:15 koban` or $t->post_ok($uri, $headers, $body)
12:17 koban` sri: why we shouldn't use waypoints?
12:18 jdixon koban`: not working here afaict
12:20 koban` https://github.com/kraih/mojo/bl​ob/master/lib/Test/Mojo.pm#L276
12:21 koban` https://github.com/kraih/mojo/bl​ob/master/lib/Test/Mojo.pm#L417
12:21 jdixon yes, I believe you.
12:21 jdixon just not sure what I'm doing wrong.
12:22 jdixon $t->get_ok('/api/v1/user/profile', {'X-Foo-Token' => 'abc123'})->status_is(200);
12:22 jdixon oh hmm
12:23 jdixon removed the single quotes around the header key, worked
12:23 jdixon I guess that's worth of a "duh" but it still seems unexpected.
12:24 moritz jdixon: remember to return() a false value after you call ->render in an under()
12:24 moritz that nearly rhymes
12:26 jdixon moritz: interesting
12:26 jdixon I've been doing 'return $self->render()'
12:27 moritz jdixon: I did that too, and got some weird results (501 instead of 401, or something), and then re-read the documentation
12:27 moritz the examples in the lite docs explicltly return;
12:28 moritz ie return ();
12:28 jdixon yes, I'm not sure where I got into that habit from.
12:28 jdixon must have read some of your early examples. ;)
12:28 jdixon jk
12:28 koban` moritz: is it consider non lite app also?
12:29 moritz koban`: I can't parse that question, please rephrase
12:29 koban` i mean "concerned", of course
12:30 moritz koban`: I don't know, but I'd guess that they use the same underlying code
12:42 jdixon is there any way to check json_content_is() for only part of the content?
12:45 sri koban`: because most people get waypoints wrong
12:46 sri i might even deprecate waypoints, since they seem to do more harm than good
12:47 koban` oh no
12:48 sri if you like them you better say so ;)
12:49 koban` of course - i'm use them very often
12:52 koban` i configure my routes like "my $articles = $r->waypoint('/articles')->to('articles#list'); my $article = $articles->route('/:id')->to('#view');"
12:53 koban` i think it's very easy to read such code
12:53 sri agreed, good use
12:54 sri i guess deprecation is off the table
12:54 jdixon yay
12:54 koban` yahooo!
12:54 sri but we need better examples
12:54 jdixon (not that I use waypoints yet, but still)
12:54 koban` ;)
12:55 jdixon any ideas on extracting partial json content in Test::Mojo?
12:55 sri manually
12:58 marcus left #mojo
13:05 marcus joined #mojo
13:06 marcus koban`: that seems quite sensible
13:20 mattastrophe joined #mojo
13:22 sri chevy chase can be funny, who would have though
13:23 mattastrophe left #mojo
13:23 mattastrophe joined #mojo
13:39 perlrocks Twitter: "Catalyst vs. PerlDancer vs. Mojolicious" --x86_64 http://twitter.com/x86_64/status/50914590455906305
13:39 perlrocks Twitter: "Sense of chaos RT @ x86_64: Catalyst vs. PerlDancer vs. Mojolicious" (ja) --Loups_Garous http://twitter.com/Loups_Gar​ous/status/50914661629046785
13:53 GitHub42 joined #mojo
13:53 GitHub42 mojo: master Sebastian Riedel * 8d87d16 (1 files in 1 dirs): pod cleanup - http://bit.ly/eEpefc
13:53 GitHub42 left #mojo
13:55 mattastrophe left #mojo
14:02 perlrocks Twitter: "Mojolicious-Plugin-MarkaplRenderer 0.2.0 by GSLIN - http://frepan.org/~gslin/Mojolici​ous-Plugin-MarkaplRenderer-0.2.0/" --cpan_new http://twitter.com/cpan_ne​w/status/50920467468521473
14:49 marty koban:  great example.  I just added it to the wiki... https://github.com/kraih/moj​o/wiki/Helpful-Code-Snippets
15:06 duff left #mojo
15:24 arpadszasz left #mojo
15:34 mattastrophe joined #mojo
15:47 Christian cu all
15:47 Christian left #mojo
15:49 sri lol, Community gets really good towards the end of the first season
15:57 koban` left #mojo
16:11 cosmincx left #mojo
16:12 spleenjack left #mojo
16:14 spleenjack joined #mojo
16:28 sigue left #mojo
16:32 arpadszasz joined #mojo
16:57 xris joined #mojo
17:01 breaker313 left #mojo
17:31 fhelmbe__ joined #mojo
17:35 fhelmber_ left #mojo
17:35 fmerges left #mojo
17:47 fhelmbe__ left #mojo
18:05 mattastrophe left #mojo
18:10 arpadszasz left #mojo
18:14 crab sri: is that a comment about mojo? ;-)
18:15 sri crab: then we would need a really good cliffhanger for the start of the second season!
18:16 mattastrophe joined #mojo
18:17 crab sri: !
18:17 crab so koban's use of waypoints is good?
18:17 crab it's essentially what i wanted to do as well
18:18 crab (reading scrollback)
18:18 sri http://www.imdb.com/title/tt1439629/ # the show btw
18:24 bosphorus left #mojo
18:25 stephen joined #mojo
18:26 crab moritz: tell me more about this weird results with return $self->render?
18:48 moritz crab: under() continued to call the routes later in the file
18:48 moritz which lead to all sorts of nastinesses
18:57 sri does not sound weird at all
18:58 moritz sri: very weird if you expect something else :-)
18:59 sri adjust your expectations!
18:59 * sri expects cookies
19:00 moritz signed cookies?
19:00 sri cookies with milk
19:04 mattastrophe left #mojo
19:04 mattastrophe joined #mojo
19:11 marcus now I'm cookies with fire
19:12 mattastrophe left #mojo
19:16 mattastrophe joined #mojo
19:38 alnewkirk-away joined #mojo
19:39 spleenjack left #mojo
19:54 ysyrota left #mojo
20:20 arpadszasz joined #mojo
20:47 mattastrophe left #mojo
20:48 ok22_ left #mojo
20:50 ok22_ joined #mojo
20:57 ok22_ left #mojo
21:03 baton8 left #mojo
21:05 arpadszasz left #mojo
21:08 ok22 joined #mojo
21:38 kaare left #mojo
21:45 perlrocks Twitter: "Mojolicious-Plugin-Database v0.02 by MADCAT - http://frepan.org/~madcat/Mojo​licious-Plugin-Database-v0.02/" --cpan_new http://twitter.com/cpan_ne​w/status/51036941981978624
21:50 * tempire gives sri  a cookie
21:55 sri *munch munch munch*
22:39 stephen left #mojo
23:14 kvorg joined #mojo
23:17 kvorg hello there.
23:18 kvorg left #mojo
23:18 kvorg joined #mojo
23:51 Akron joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary