Camelia, the Perl 6 bug

IRC log for #mojo, 2010-09-03

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

All times shown according to UTC.

Time Nick Message
00:04 jawnsy left #mojo
00:12 jawnsy joined #mojo
01:04 sri skaurus: won't work
01:04 sri skaurus: we do not write a response immediately
01:05 sri thats not possible without blocking writes
01:07 sri redirect_to is the same as render, you will have to use return $self->render at times too
01:08 sri i don't think magically making render/redirect_to throw exceptions to immediately stop everything like catalyst does is such a good idea
01:08 sri xantus: sup?
01:16 skaurus sri: okay, thanks. So other question - best way to extend Mojo in such a way that it would be propagated to Mojolicious and further?
01:16 sri ?
01:17 skaurus um... I need to add method to Mojo and Mojolicious and Mojolicious::Controller should have it too
01:17 sri subclass
01:18 skaurus but i will need to edit Mojolicious.pm then, right?
01:18 sri why?
01:18 skaurus use base 'NewMojo' ?
01:19 sri why does it have to be on all layers?
01:19 skaurus it's just nifty) $self->method and I'm ok
01:19 sri you could always push something into @Mojo::ISA
01:20 skaurus oh, right
01:20 sri not that i would suggest it
01:42 MojoGuest422 joined #mojo
01:42 MojoGuest422 From: http://www.google.com.ar/search?client=safari&​rls=en&q=websocket+demo&ie=UTF-8&oe=UT​F-8&redir_esc=&ei=c1KATIWnMYH48Aaq8L3ZAQ (1 hits)
01:43 MojoGuest422 left #mojo
01:47 tempire If a controller action does not return true, is http status code set in the stash supposed to be ignored?
02:03 sri automatic rendering picks up the status
02:03 sri i don't think it's affected by return value, unless it's a bridge
02:03 sri bridges don't get automatic rendering afair
02:04 tempire What if I render manually?
02:04 sri it should pick up the status value
02:08 tempire cpan does.  github doesn't.
02:08 tempire actually, no, correction
02:11 tempire rendering manually with latest github picks up the status.  automatic rendering does not.
02:31 sri sounds right
02:31 tempire I'm thinking this should report status 403
02:31 tempire http://pastie.org/1135182
02:31 tempire But instead, it reports 200
02:32 tempire With a debug warning, 'Waiting for delayed response, forgot to render or resume?'
02:33 sri thats correct
02:33 sri you need $self->rendered
02:33 tempire that's because of the pause/resume stuff you removed several days ago, I guess.
02:34 sri exactly
02:34 sri unless you tell mojolicious you are done it will expect async stuff
02:35 tempire does $self->rendered exist in the cpan distribution?
02:35 sri dunno
02:35 sri possibly
02:35 janus left #mojo
02:36 sri oh no
02:36 sri doesn't
02:38 tempire That's unfortunate.  Breaks the basicauth plugin.
02:38 tempire Have to choose one or the other.
02:38 sri hmm
02:39 sri next release should be out soon
02:41 sri does it work with the latest cpan version?
02:41 tempire yes
02:41 y0j left #mojo
02:41 tempire It seems it's the assumption of async that breaks it.
02:42 janus joined #mojo
02:42 sri strange, teh latest auto render changes should have broken it
02:43 sri oh, then you were just lucky
02:43 tempire that's generally true.
02:43 tempire I didn't pay attention to the async conversation, but is it really necessary to assume async?
02:43 sri unless you find a better solution
02:44 sri pause/resume was a mess
02:46 sri generally people just use a render method to finish their response, so the current design seems like the perfect choice
02:46 tempire that's true.  I'm just bitter because I had to sit and figure out what was going on.
02:46 sri you can also just use render
02:47 sri $self->render(data => '', status => 403) or so
02:47 sri thats imo the correct way to handle it
02:49 sri we now simply assume that people signal that they are done by calling ->rendered, ->render, redirect_to...or any of the other response generators
02:51 sri btw. if the check passes i don't think you should do anything besides returning true
02:52 sri 200 will be take care of by the renderer
02:52 sri *taken
02:52 sri or actually false
02:52 sri no true :)
02:54 sri tempire: btw. there is no need to decode userinfo yourself
02:55 tempire your're speaking of the basicauth code?
02:55 sri $req->url->to_abs->userinfo should just work
02:55 sri ye
03:00 sri btw. the most important async case for me is client requests
03:00 sri http://github.com/kraih/mojo/blob/m​aster/t/mojolicious/lite_app.t#L364
03:01 sri this is where the new design shines
03:01 sri you can just fire off async client requests and render later in the callback
03:02 sri it will just work
03:03 tempire Still within the timeframe of the original request, though, right?
03:04 sri no response gets sent before it is rendered
03:04 sri it just waits and handles other requests in the meantime
03:05 tempire ah, so that process isn't locked
03:05 sri ye
03:05 tempire huh
03:05 tempire that seems quite useful.
03:06 sri it makes latency not matter much
03:07 sri especially if you're querying couchdb for example
03:09 sri and if the environment doesn't support non blocking (like CGI) it will simply fallback to blocking
03:18 GabrielVieira2 joined #mojo
03:19 GabrielVieira left #mojo
03:48 tempire Can you link to versions of a module with pod?
03:48 tempire As in L<Module::Name 0.02> instead of L<Module::Name>
03:49 tempire apparently not.
04:01 yakudzo joined #mojo
04:03 tl joined #mojo
04:05 tholen42 left #mojo
04:21 perlrocks left #mojo
05:47 koban joined #mojo
06:04 dynax60 joined #mojo
06:04 dynax60 hi.
06:04 dynax60 could anyone tell me how to render json response for using jsonp (with callback function)?
06:05 dynax60 i.e. request from JQuery will be smth like: http://url/?foo=bar&amp;callback=test
06:06 dynax60 It must be in response body: test({"key":"val"})
06:10 sri $self->render(data => $json, format => 'json');
06:11 sri or actually format => 'js' i guess
06:11 sri we don't have a special helper for jsonp
06:11 sri you just use Mojo::JSON to encode your structure and add a wrapper yourself
06:13 sri my $json = $self->render(json => {key => 'val'}, partial => 1); $self->render(data => "test($json)", format => 'js');
06:13 sri something like that
06:16 dynax60 I will try. Thanks.
06:28 dynax60 left #mojo
06:28 sri i'm really awful at starcraft 2 :S
06:29 sri or maybe zerg are just too weak...
06:30 dynax60 joined #mojo
07:13 marcus hmm
07:13 marcus I should probably not buy starcraft 2
07:14 omega I bought it
07:15 omega but the downloader doesn't want to work in thailand :p
07:15 omega or refused to work in the hotell
07:15 omega will have to try in the new appartment
07:18 marcus maybe it's firewalled :D
07:18 omega :p
07:20 marcus omega: feel moar healthy now?
07:21 omega much better today, thank you :)
07:21 omega even ate my whole lucnh
07:33 ysyrota joined #mojo
07:34 ltriant left #mojo
07:37 MojoGuest825 joined #mojo
07:37 MojoGuest825 From: http://www.google.com/search?client=ub​untu&amp;channel=fs&amp;q=Mojolicious+​+websockets&amp;ie=utf-8&amp;oe=utf-8 (1 hits)
07:37 MojoGuest825 test
07:37 MojoGuest825 left #mojo
07:40 dynax60 sri: thanks for help! jsonp works fine now! whoo!
07:43 spleenjack joined #mojo
07:46 jest joined #mojo
07:47 marcus omega: nice
07:52 sri marcus: it's quite fun
07:53 marcus sri: that's what I am afraid of
07:53 sri zerg are underpowered though...
07:53 marcus :(
07:53 marcus my favorites
07:54 marcus NEED MOAR OVERLOARDS
07:54 sri :D
07:54 marcus I actually waste enough time with words with friends, chess with friends and carcassone
07:55 marcus even tho omega has bailed on me :p
07:57 sri yay, i'm in the silver league now -.-
07:58 omega ai marcus, sorry :p
07:58 omega been sort of "out of that" since early july I suppose
07:58 sri terrans are stupid...spam marines and win
08:02 sri i'll switch to protoss because i'm nonconformist!
08:08 yakudzo marines lose of time psy storms and collosus win them very easily
08:09 yakudzo banshee + vikings good selectoin (:
08:13 marcus omega: I guess so :) I still play with arne tho
08:19 omega good
08:35 crab «The agency's personal identification expert Jens Bender said the card was secure and called the combination of an integrated chip with a PIN number a "significant security improvement compared to today's standard process of user name and password." »
08:35 crab Bender!
08:47 sri ALL GLORY TO THE HYPNOTOAD!
08:47 crab none to bender?
08:47 marcus http://r33b.net/
08:49 sri X_x
08:55 sri oh, vox.com is dead
08:55 sri one of the first big catalyst sites
08:55 marcus also, a big spam hole for the last years
08:56 sri i never was a fan
08:57 sri still sad
08:59 marcus yeah
09:00 marcus I think it was meant to be a blog platform for housewives
09:00 marcus or something
09:01 sri sixapart really screwed up when they made movable type commercial back in the days
09:02 sri they should have just offered hosting
09:02 marcus they did that too, tho
09:02 marcus with typepad
09:02 sri later
09:02 marcus but yeah
09:03 marcus mt for pay was a big fuckup
09:03 sri i tried typepad before posterous, usability is horrible
09:03 sri feature creep
09:03 marcus mm
09:04 marcus We have no wordpress killer for perl atm, imo
09:04 marcus even if the wordpress codebase is horrible
09:06 sri is there still a market for selfhosted blogs?
09:06 marcus wordpress is huge in Norway at least
09:06 sri wordpress or wordpress.com?
09:06 marcus wordpress
09:06 sri hmm
09:07 marcus and a lot of people hack it to do cms like sites
09:45 arthas joined #mojo
09:47 koban left #mojo
09:53 koban joined #mojo
10:08 jest left #mojo
10:17 esskar_ left #mojo
10:28 yakudzo left #mojo
10:56 su-bzero_ joined #mojo
10:56 su-bzero left #mojo
10:57 GabrielVieira joined #mojo
10:57 MojoGuest104 joined #mojo
10:57 MojoGuest104 From: http://www.google.com/search?aq=0&amp;oq=web+soc​ket+dem&amp;sourceid=chrome&amp;client=ubuntu&am​p;channel=cs&amp;ie=UTF-8&amp;q=websocket+demo (1 hits)
10:57 MojoGuest104 left #mojo
11:01 GabrielVieira2 left #mojo
11:06 jest joined #mojo
11:14 dynax60 left #mojo
11:28 su-bzero_ left #mojo
11:28 su-bzero joined #mojo
11:34 Foxcool joined #mojo
12:13 MojoGuest764 joined #mojo
12:13 MojoGuest764 From: http://www.google.nl/search?sourceid=ch​rome&amp;ie=UTF-8&amp;q=websocket+demo (1 hits)
12:13 MojoGuest764 left #mojo
12:42 skaurus left #mojo
12:49 janus hmm, if i read rfc 3986 correctly, a path can have empty path segments after an initial non-empty segment
12:50 janus /foo//bar would be valid whereas //foo//bar wouldn't
12:54 janus test + patch: http://gist.github.com/563843
12:54 janus oops, broken test
12:55 janus there, changed
12:56 janus RFC 3986 3.3., just for the record
12:57 janus now back to my initial idea before i saw this old patch :)
13:11 janus neat... pg9 having json as explain output format and Mojo::JSON on the other side :)
13:13 sri janus: well, we are not very strict there, just supporting the URL subset, not sure if it's valid there too
13:14 sri is there an actual use case?
13:14 janus actual in useful or actual in existing? :)
13:14 sri both? :)
13:15 sri ignoring empty parts seems more like a feature i would want
13:15 janus get /things/:id/:action # when action is ``add'' there's probably no id
13:16 sri :id is ([^\/\.]+)
13:17 sri this would never work
13:17 sri would you actually want to do that?
13:17 sri seriously?
13:17 sri /things//add
13:19 janus i've done it at least... not that i think it's nice
13:20 janus was more of an requirement
13:23 Foxcool left #mojo
13:25 sri safari supports it, guess we should too
13:26 sri you broke quite a few tests though
13:30 Foxcool joined #mojo
13:31 GitHub198 joined #mojo
13:31 GitHub198 mojo: master Sebastian Riedel * 748ef37 (5 files in 5 dirs): improved RFC3986 compliance of Mojo::Path - http://bit.ly/dhlL3c
13:31 GitHub198 left #mojo
13:31 janus mh, the dark side of TEST_FILES=... ;)
13:33 sri /wildcards/1/http://www.google.com very interesting path
13:33 sri now valid
13:34 janus great, one step closer to a porting effort :)
13:42 koban sri: i have '$self->routes->route('/:id')->to('main#index', id => qr/\d+/)', request for '/test' shouldn't be dispatched to Main::index?
13:42 koban right&
13:42 Foxcool left #mojo
13:42 koban /&/?/
13:43 sri wrong
13:43 sri ->route('/:id', id => qr/\d+/)->to(...)
13:43 sri thats what you want
13:43 koban oops, thank you!
13:44 sri :)
13:52 Keiths joined #mojo
13:55 tempire I just accepted a F/T position in Malaysia.
13:56 * tempire wonders if he's crazy for being someone's real employee again
13:57 janus tempire: imho not if you're coming from an even more crazy environment
13:58 tempire The problem with companies is they always want you to program for their projects.
13:59 janus problem or reason? :)
14:02 janus actually... code written under enough pressure isn't really what i think should be necessarily public
14:03 Keiths left #mojo
14:03 awnstudio_ left #mojo
14:06 su-bzero left #mojo
14:24 chansen left #mojo
14:56 ysyrota left #mojo
14:57 koban left #mojo
14:59 MojoGuest283 joined #mojo
15:01 MojoGuest283 left #mojo
15:13 koban joined #mojo
15:26 jest left #mojo
15:33 Alias__ left #mojo
15:33 Alias__ joined #mojo
15:35 chansen joined #mojo
15:54 marcus /win 30
16:05 janus /lose 1
16:09 Keiths joined #mojo
16:17 Keiths left #mojo
16:28 spleenjack left #mojo
16:40 chansen left #mojo
16:44 MojoGuest913 joined #mojo
16:44 MojoGuest913 From: http://www.google.com/url?sa=t&amp;source=web&​amp;cd=2&amp;sqi=2&amp;ved=0CB0QFjAB&amp;url=h​ttp%3A%2F%2Fdev.xantus.org%2F&amp;rct=j&amp;q=​websockets%20demo&amp;ei=2yWBTJvTE4L-8Aa4noT6A​Q&amp;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg (1 hits)
16:44 MojoGuest913 left #mojo
16:44 MojoGuest554 joined #mojo
16:44 MojoGuest554 From: http://www.google.com/url?sa=t&amp;source=web&​amp;cd=2&amp;sqi=2&amp;ved=0CB0QFjAB&amp;url=h​ttp%3A%2F%2Fdev.xantus.org%2F&amp;rct=j&amp;q=​websockets%20demo&amp;ei=2yWBTJvTE4L-8Aa4noT6A​Q&amp;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg (2 hits)
16:45 MojoGuest554 left #mojo
16:51 sri http://twitter.com/itunes10icon # lol
17:06 Alias joined #mojo
17:09 Alias__ left #mojo
17:13 arthas left #mojo
17:38 spleenjack joined #mojo
17:41 marcus :D
17:41 Outlaw joined #mojo
17:45 GabrielVieira left #mojo
17:59 Keiths joined #mojo
18:01 GabrielVieira joined #mojo
18:03 Keiths left #mojo
18:28 Outlaw left #mojo
18:36 chansen joined #mojo
18:41 arpadszasz joined #mojo
18:43 arpadszasz left #mojo
18:56 MojoGuest744 joined #mojo
18:56 MojoGuest744 From: http://www.google.com/url?sa=t&amp;source=we​b&amp;cd=4&amp;ved=0CCUQFjAD&amp;url=http%3A​%2F%2Fdev.xantus.org%2F&amp;rct=j&amp;q=webs​ocket%20demo&amp;ei=H0SBTNOyJsWCOJzx4IkO&amp​;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg&amp;​sig2=1BJbSicu9qx4IIBTAysB-g&amp;cad=rja (1 hits)
18:57 MojoGuest744 left #mojo
18:57 MojoGuest207 joined #mojo
18:57 MojoGuest207 From: http://www.google.com/url?sa=t&amp;source=we​b&amp;cd=4&amp;ved=0CCUQFjAD&amp;url=http%3A​%2F%2Fdev.xantus.org%2F&amp;rct=j&amp;q=webs​ocket%20demo&amp;ei=H0SBTNOyJsWCOJzx4IkO&amp​;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg&amp;​sig2=1BJbSicu9qx4IIBTAysB-g&amp;cad=rja (2 hits)
18:57 MojoGuest207
18:57 MojoGuest207 left #mojo
19:03 chansen left #mojo
19:03 chansen joined #mojo
19:08 koban left #mojo
19:20 chansen left #mojo
19:20 chansen_ joined #mojo
19:29 Htbaa joined #mojo
20:08 GabrielVieira left #mojo
21:08 stephen left #mojo
21:08 stephen joined #mojo
21:10 vel joined #mojo
21:31 Keiths joined #mojo
21:34 Keiths is now known as keithjohnson
21:36 keithjohnson left #mojo
21:50 forwardever joined #mojo
22:00 MojoGuest981 joined #mojo
22:00 MojoGuest981 From: http://news.ycombinator.com/item?id=1277067 (49 hits)
22:01 MojoGuest981 left #mojo
22:02 vel left #mojo
22:04 forwardever left #mojo
22:29 GabrielVieira joined #mojo
22:46 spleenjack left #mojo
22:47 spleenjack joined #mojo
23:29 MojoGuest150 joined #mojo
23:29 MojoGuest150 From: http://www.google.com/url?sa=t&amp;source=web&am​p;cd=2&amp;sqi=2&amp;ved=0CB4QFjAB&amp;url=http%​3A%2F%2Fdev.xantus.org%2F&amp;rct=j&amp;q=WebSoc​kets%20demo&amp;ei=t4SBTKrMLI2osAPjwfX2Bw&amp;us​g=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg&amp;cad=rja (1 hits)
23:29 Htbaa left #mojo
23:34 plouf joined #mojo
23:34 plouf From: http://www.google.com/url?sa=t&amp;source=web&am​p;cd=2&amp;sqi=2&amp;ved=0CB4QFjAB&amp;url=http%​3A%2F%2Fdev.xantus.org%2F&amp;rct=j&amp;q=WebSoc​kets%20demo&amp;ei=t4SBTKrMLI2osAPjwfX2Bw&amp;us​g=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg&amp;cad=rja (4 hits)
23:35 MojoGuest150 left #mojo
23:35 piet joined #mojo
23:35 piet From: http://www.google.com/url?sa=t&amp;source=web&am​p;cd=2&amp;sqi=2&amp;ved=0CB4QFjAB&amp;url=http%​3A%2F%2Fdev.xantus.org%2F&amp;rct=j&amp;q=WebSoc​kets%20demo&amp;ei=t4SBTKrMLI2osAPjwfX2Bw&amp;us​g=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg&amp;cad=rja (6 hits)
23:36 piet left #mojo
23:36 plouf left #mojo
23:50 spleenjack left #mojo

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