Camelia, the Perl 6 bug

IRC log for #mojo, 2011-01-26

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

All times shown according to UTC.

Time Nick Message
00:02 ispy_ left #mojo
00:22 bloonix left #mojo
00:28 bloonix joined #mojo
00:36 non left #mojo
00:40 ispy_ joined #mojo
00:42 ryan joined #mojo
01:25 ryan left #mojo
01:36 MojoGuest686 joined #mojo
01:36 MojoGuest686 From: http://news.ycombinator.com/item?id=1277067 (173 hits)
01:39 MojoGuest686 left #mojo
02:40 mateu left #mojo
03:28 bellair1 joined #mojo
03:29 bellair1 I'd like to suggest that the MOJO_NO_DETECT environment variable be documented. :)
03:31 bellair1 I had an issue earlier today.  Basically using FastCGI in a non-standard way, so that detection failed.  I assumed (wrongly) that passing "fastcgi" explicitly to Mojolicious::Commands->start() would work.
03:32 bellair1 However, auto-detection trumps whatever you pass to ->start() unless you set $ENV{MOJO_NO_DETECT} to a true value.
03:33 sri https://github.com/kraih/mojo/wiki # thats what the wiki is for ;)
03:33 bellair1 Agreed.  Where should that tidbit go?
03:34 sri somewhere under deployment
03:34 bellair1 kk, I'll add it.  Thanks!
03:34 sri detection has to trump everything because servers sometimes pass random arguments
03:35 sri apache cgi for example passes query strings to the script
03:36 sri myapp.cgi?fastcgi -> myapp.cgi fastcgi
03:36 sri was a funny security issue
03:38 bellair1 Gotcha.  That makes sense.  I'll put that in the wiki, too.
03:42 sri good
03:50 bellair1 Okay, it's in there.  Not sure why my link is underlined...
03:51 bellair1 Oh, github wiki followed links are underlined.  Cute.
03:54 bellair1 left #mojo
04:04 avkhozov joined #mojo
04:04 tl joined #mojo
04:06 tholen42 left #mojo
04:07 jdixon joined #mojo
04:08 jdixon sri: I think the Test::Mojo docs are wrong/out-of-date.
04:08 jdixon or I'm not reading them correctly.
04:08 jdixon docs say to use format:
04:09 jdixon $t->post_form_ok('/foo', {test => 123}, {Expect => 'fun'});
04:09 jdixon but for me it only works if all post params are in the same hashref.
04:09 jdixon for example:
04:09 jdixon $t->post_form_ok('/foo', {test => 123, Expect => 'fun});
04:12 avkhozov left #mojo
04:12 avkhozov joined #mojo
04:15 sri bellair++
04:16 sri jdixon: Expect is an http header
04:16 jdixon oh duh
04:16 jdixon the docs could be a little clearer then, imho
04:16 * sri nods
04:17 jdixon not a lot, just a little. ;)
04:17 sri it's equal to Mojo::Client though
04:17 jdixon will a test sequence maintain a session?
04:18 sri yes
04:18 jdixon cool
04:18 sri you can even tweak $t->client yourself
04:26 sri gonna improve it once i'm done with the client recipe for today :)
04:26 jdixon cool
04:26 jdixon s/cool/awesome/
04:26 jdixon need more variety in my responses ;)
04:29 sri shagadelic
05:15 Foxcool joined #mojo
05:47 Foxcool left #mojo
05:48 Foxcool joined #mojo
05:57 Foxcool left #mojo
06:02 GitHub175 joined #mojo
06:02 GitHub175 mojo: master Sebastian Riedel * f047f6c (13 files in 7 dirs): added cookbook recipe - http://bit.ly/gVMPzl
06:02 GitHub175 left #mojo
06:08 perlrocks Twitter: "The #mojolicious client recipe for today addresses a few common questions at once, enjoy! :) http://t.co/XBCoTyO #perl" --kraih http://twitter.com/kraih/status/30145067062661120
06:17 GitHub170 joined #mojo
06:17 GitHub170 mojo: master Sebastian Riedel * 7eea958 (1 files in 1 dirs): document MOJO_NO_DETECT - http://bit.ly/ftvgCP
06:17 GitHub170 left #mojo
06:18 ysyrota joined #mojo
06:24 GabrielVieira joined #mojo
06:52 kaare joined #mojo
06:53 MojoGuest613 joined #mojo
06:53 MojoGuest613 From: http://news.ycombinator.com/item?id=1277067 (174 hits)
06:56 MojoGuest613 left #mojo
06:58 pid joined #mojo
06:59 Foxcool joined #mojo
07:08 MojoGuest669 joined #mojo
07:08 MojoGuest669 test
07:09 MojoGuest669 left #mojo
07:14 ysyrota sri: here?
07:14 sri depends
07:14 ysyrota :)
07:15 ysyrota sri: it seems to me that the issue with "wonky" web server isn't fixed enough
07:16 ysyrota sri: your fix was not to set error status if HTTP header contain "Connection: close"
07:17 ysyrota sri: but in my environment (I go via proxy) I get "Proxy-Connection: close" in HTTP headers
07:18 sri yea the fix is not ideal
07:19 ysyrota sri: I tried to change M::Client in to consider "Proxy-Connection" header, and it started to work
07:19 Foxcool left #mojo
07:19 yko The Proxy-Connection field is NOT a standard HTTP header field and may not be supported by all clients. :(
07:19 sri now that would be very broken yea
07:19 sri not an option
07:20 sri but feel free to find a real fix
07:25 GitHub2 joined #mojo
07:25 GitHub2 mojo: master Sebastian Riedel * 890aae0 (1 files in 1 dirs): cleanup - http://bit.ly/foh5Vl
07:25 GitHub2 left #mojo
07:25 sri that might help a little, still not ideal though
07:28 yko sri: maybe something like this? https://gist.github.com/241bb8e81fe0afaedc2d
07:29 sri no fucking way
07:29 sri headers in general are just a hack
07:29 sri the root of the problem is that http parser and connection management are not really connected
07:30 sri they don't talk
07:30 sri accepting more headers is a bandaid fix for a bandaid fix
07:32 yko agree, it looks exactly like you said, just thinking how it can works, because looks like apache, squid and iis is known to send Proxy-Connection
07:33 Christian joined #mojo
07:34 Christian morning
07:34 sri connection is an hop by hop header, we do not care about Proxy-Connection
07:34 sri it does not matter
07:34 sri it is in fact very wrong
07:35 sri moin
07:38 sri actually your proxy must be completely broken :D
07:39 sri if it sends you a keep-alive header
07:41 GitHub170 joined #mojo
07:41 GitHub170 mojo: master Sebastian Riedel * 0429168 (1 files in 1 dirs): brought http parser and connection managemement a little closer together - http://bit.ly/g4j5u2
07:41 GitHub170 left #mojo
07:41 sri that might actually help
07:48 koban joined #mojo
07:53 xantus[] I love the new exception tpl, and the favicon
07:54 xantus[] I've been away for a while
07:54 sri check the not_found one too ;)
07:54 xantus[] ooo
07:55 sri oh, and of course the new http://mojolicio.us
07:55 xantus[] hot butta
07:55 sri :D
07:56 xantus[] you could add some websocket stuff to add more of those connection things
07:56 xantus[] for each person on the site
07:57 xantus[] great work
07:58 xantus[] I'm using mojo again for a home project
08:00 xantus[] I setup a caching proxy using mojo, it injects js into some sites
08:00 xantus[] and that js connects back to mojo via websocket
08:00 xantus[] and adds functionality to the site
08:01 xantus[] kind of like my own greasemonkey
08:06 Foxcool joined #mojo
08:06 GitHub114 joined #mojo
08:06 GitHub114 mojo: master Sebastian Riedel * 0daf5af (1 files in 1 dirs): cleanup - http://bit.ly/dHBVoQ
08:06 GitHub114 left #mojo
08:06 sri that might help even more
08:07 sri xantus[]: sounds quite fun
08:07 sri you really need to blog about that stuff
08:14 duff left #mojo
08:20 AmeliePoulain joined #mojo
08:25 xantus[] yeah I do
08:26 xantus[] ugh, damn couchdb
08:26 xantus[] I added the ppa for ubuntu one, and installed couchdb 1.0.1, it crashes
08:27 marcus but if perl6 was mature, it would be raheh
08:27 marcus tugh
08:27 marcus incomplete sentence
08:28 sri damn
08:29 perlrocks Twitter: "is finding time for some http://mojolicio.us (Mojolicious) projects (smileydance) http://plurk.com/p/ad7are" --zakame http://twitter.com/zakame/status/30180455777046528
08:29 sri no idea how to handle "HTTP/1.1 200 OK\r\n\r\n\r\n"
08:30 sri proxies like to send those after a successful CONNECT
08:30 sri a relaxed parser would wait for a content and connection close
08:31 sri grr
08:34 sri this is really bad :S
08:35 MojoGuest53 joined #mojo
08:35 MojoGuest53 From: http://dev.xantus.org/ (40 hits)
08:35 MojoGuest53 test
08:35 xantus[] pass
08:35 MojoGuest53 left #mojo
08:45 xantus[] the upgrade failed to stop the previously running couchdb
08:47 sri yko, ysyrota: don't think we can handle it better
08:47 AmeliePoulain I try to add helper for site menu, but I've got an exception "Can't use string ("FW::Core::Controller::Contents") as a HASH ref while "strict refs" in use at /usr/local/share/perl/5.10.​1/Mojolicious/Controller.pm line 704". WTF? Code: http://pastebin.com/3DzSCNtT
08:47 AmeliePoulain Direct call (localhost:3000/core/content/menu/0) seems work.
08:48 sri i can actually capture connection close events, but the parser problem mentioned above makes it unimportant
08:49 ysyrota sri: it doesn't work for me
08:49 sri i know how to make it work, but that breaks other cases
08:49 ysyrota sri: I'v elooked into LWP, they use the following approach: https://gist.github.com/ebe7a8292e4dcc2e7195
08:50 duff joined #mojo
08:51 sri lwp keep alive code sucks even more
08:52 sri anyway, that line is not the problem
08:53 sri https://github.com/kraih/mojo/blo​b/master/lib/Mojo/Content.pm#L165
08:53 sri that one is
08:53 sri it guesses which "wonky" response might have a body
08:54 sri in the client itself i could just use the real connection close events
08:54 sri but the guessing code has problems because of the case i mentioned above
08:54 sri "HTTP/1.1 200 OK\r\n\r\n\r\n"
08:54 sri this one really happens
08:55 sri i've only seen it as a response to CONNECT though
08:55 sri but who knows
08:55 purl and it's way past purl's bed time young man!
08:57 sri ysyrota: what Connection header does your proxy return?
09:00 ysyrota sri: here is the trace: https://gist.github.com/76524442e5f21a56507​a/3bd5834a9a2cca6d2c8c7cbd4f824fbd1c6a092e
09:01 sri interesting
09:05 fhelmber_ joined #mojo
09:11 sri hmm
09:14 sri great github bot dead again :S
09:15 sri https://github.com/kraih/mojo/commit/17​a8c122e36f8f2c692b668f54ac38d189633ad3
09:15 sri ysyrota: that will fix it, but i'm not sure it is the right thing to do
09:16 * sri hates the real world
09:34 non joined #mojo
09:34 xantus[] I hate real world mtv
09:35 arthas joined #mojo
09:35 Foxcool left #mojo
09:44 xantus[] awww, damnit
09:44 xantus[] Argument "3889, 3889" isn't numeric in subtraction (-) at mojo/lib/Mojo/Content/Single.pm line 89
09:47 snearch joined #mojo
09:47 Foxcool joined #mojo
09:47 xantus[] ah, all of my headers have doubled
09:49 xantus[] I'm parsing a client response into the server's response
09:49 xantus[] $self->res->parse( $r->res->to_string );
09:53 AmeliePoulain I'm doing "my $html = $c->render('contents/menu', partial => 1, items => $items);" but template was escaped (like <ul>). WTF?
09:55 memememomo_ is now known as memememomo
09:56 Foxcool left #mojo
09:57 xantus[] sri: still there?
09:57 purl or a puts method for strings or a Gay Males
09:58 * xantus[] punishes purl
09:58 * purl repents
09:58 memememomo is now known as memememomo_
09:59 sri xantus[]: unintended use, you're on your own there
10:00 xantus[] uhh
10:00 sri AmeliePoulain: the documentation has all the answers (i usually don't answer to WTF btw., if you want something answered ask nicely)
10:02 marcus amelie from WTF
10:03 marcus xantus[]: I just hate the real world.
10:03 AmeliePoulain When I'm trying to partial render menu template, I has all HTML tags escaped. Template content - only HTML tags
10:04 sri and the documentation will answer why thats the case
10:04 sri please read it
10:04 xantus[] oh, wait, its the 404 page
10:04 xantus[] if theres an error, all headers are doubled
10:04 marcus Oo
10:07 Foxcool joined #mojo
10:08 sri parsing and building with the same message instance is untested afair
10:09 sri there might be buffering issues, so i never bothered
10:10 xantus[] yeah, odd things are happening after I updated
10:10 marcus hmmhmm
10:10 xantus[] from like 2 days ago
10:10 marcus mojolicious apps can't be installed like catalyst ones, sri?
10:10 sri ?
10:10 marcus with make install
10:11 sri no idea
10:11 marcus seems it won't copy over public and templates
10:11 sri yea of course not
10:11 sri no way i'm going to use that hack ever again ;p
10:12 marcus hmm, weird, it works
10:13 marcus sri: means I can't use the package building system at $client
10:13 sri i'm sure you can use a sharedir hack and redefine app->home
10:13 marcus that generates debs from apps
10:13 xantus[] argggg
10:14 xantus[] I
10:14 xantus[] I'll revert
10:14 marcus I have no idea how it is finding home now :)
10:14 sri artifical intelligence
10:14 purl artifical intelligence is the best artificial intelligence is no match for natural stupidity.
10:15 marcus oh, it's because I have the source dir in $INC
10:15 marcus so it finds the .pm, and finds home based on that.
10:16 sri making catalyst apps installable was a nice try, but imo a complete failure in the end
10:17 marcus heh
10:17 marcus I know lots of people who depend on it
10:17 sri for the wrong reasons
10:17 marcus I disagree
10:17 marcus it's a weakness in mojolicious imo
10:17 sri it was intended to make people release web apps on cpan
10:18 marcus I did that too
10:18 sri which never worked out
10:18 sri yea there are like 3? :)
10:18 yko marcus: you can put all stuff in __DATA__ or so :p
10:18 marcus yko: die in a fire
10:18 purl HALP
10:18 * yko dances
10:19 marcus sri: there are like 10. Which is about half of the total open source apps out there :p
10:19 marcus open source perl apps even
10:20 marcus but there are a bunch of other use cases, like being able to make debs easily for your apps. very important in the enterprise :p
10:21 * sri disagrees
10:21 marcus well, it might be a deal breaker for this prototype
10:21 marcus just sayin
10:21 sri then use catalyst ;p
10:21 marcus ok
10:21 marcus guess we will
10:21 marcus the rest of the codebase is catalyst anyways
10:24 sri marcus: i wouldn't mind bundling it if it wasn't too much code
10:25 sri and of course it would have to be well tested
10:26 marcus sri: ok. I will consider it. If we're doing it, we should make it prettier than the way catalyst does it
10:26 marcus the paths catalyst use are horrible
10:26 sri just because it is not included doesn't mean you can't do it of course
10:26 sri File::ShareDir should just work
10:27 marcus sri: I might write a little mojo extension
10:27 sri you might even be able to make it a plugin ;p
10:27 marcus the only worry I have is the home dir detection
10:27 marcus yeah
10:27 sri you can override that
10:27 sri set public and templates manually
10:27 sri from the plugin
10:28 sri the ugly part would be the makefile i guess
10:29 sri but mojolicious intentionally doesn't touch that
10:30 sri you might just have to bundle your own makefile generator that uses Module::Install
10:32 sri hmm
10:32 sri actually i think you could make it even easier
10:33 sri just move public and templates into lib/MyApp
10:33 sri and have the plugin change both paths based on the location of MyApp.pm :)
10:35 sri or don't use a plugin at all
10:37 sri yea, you can make mojolicious apps installable already
10:39 sri boring
10:40 xantus[] I found what commit broke my stuff :/
10:40 xantus[] https://github.com/kraih/mojo/commit/83​2d45ddf3b4530e30dd669412b57d1a0211dd53
10:41 sri that does not at all look related to the issue you reported
10:41 avkhozov left #mojo
10:41 sri anyway, marcus and tempire made me do it, all complaints to them please :D
10:41 avkhozov joined #mojo
10:42 xantus[] I'm using wildcards
10:42 xantus[] the previous tree: https://github.com/kraih/mojo/tree/3b2​30ec9ded2692412b6138d84a0ce36a5a09350
10:42 xantus[] works for me
10:43 xantus[] I have to sleep, I'll invesigate more tomorrow
10:43 sri maybe you're using something untested
10:43 * sri shrugs
10:44 marcus fun times
10:44 sri but it is all marcus fault! :)
10:44 marcus glad to be of service.
10:45 xantus[] :(
10:45 marcus didn't say you had to deprecate wildcard routes tho :)
10:45 marcus just make them default
10:45 sri you might just have to add $self->render_later somewhere
10:45 sri i can imagine a few async cases that could go wrong otherwise
10:46 marcus I see that test added a render_later
10:46 marcus that commit
10:46 sri yes
10:47 sri thats the only case i can think of that might have side effects
10:47 marcus don't quite understand why name affects render_later
10:47 sri auto rendering
10:47 sri name = auto renderer looking for $name.html.ep
10:48 sri or actually $name.*.*
10:48 sri i told you about that!
10:48 marcus and name => '"' too?
10:48 marcus '*'
10:48 sri yes
10:48 sri once a name is there it will try to find a template if you didn't render anything
10:49 avkhozov left #mojo
10:49 sri which can result in an early 404 for async cases
10:49 sri thats the whole point of render_later!
10:49 sri it tells the auto renderer to lay back and relax ;p
10:50 sri thats what i warned about -.-
10:51 marcus actually, you warned about another issue :)
10:51 marcus and told me you wouldn't do it.
10:51 marcus so I am surprised you did it
10:51 sri that other issue was just a bug
10:52 sri but i warned about this one too
10:52 marcus fair enough
10:52 marcus you really should use render_later in these cases
10:53 sri thats exactly why i asked people to test the change
10:54 sri https://twitter.com/#!/krai​h/status/29274197943394304
10:54 sri https://twitter.com/#!/krai​h/status/29276746230534145
10:56 sri we have 3 alternatives now
10:56 perlrocks Twitter: "Death to #catalyst. All hail #mojolicious and the #hypnotoad." --perlninja http://twitter.com/perlninj​a/status/30217551912902657
10:57 * marcus gives a blank stare
10:57 marcus =)
10:57 sri 1) revert everything 2) accept that render_later is needed for async rendering 3) don't render 404 for non existent templates
10:57 marcus well, I actually met the render_later case even before this change
10:57 sri i'm so going to retweet that
10:58 marcus seeing as people name their templates for other reasons than autorendering
10:58 marcus might as well make it a custom to do render_later in all cases
10:59 marcus but actually, I like 3) the best
10:59 marcus I never liked the 404 for missing templates
10:59 marcus it doesn't seem useful.
11:00 marcus and it's almost always a surprise
11:01 sri interesting
11:02 sri it's actually a ep handler feature
11:02 sri so you might hit it again with tt and friends ;p
11:02 sri because of cargo culting
11:04 PerlNinja joined #mojo
11:07 marcus hurrah
11:07 PerlNinja no idea what we're hurrah-ing for but i'll second the hurrah.
11:08 PerlNinja *goes back to converting a catalyst app to a mojolicious app*
11:11 sri hurrah-ing is rather common around here :)
11:11 PerlNinja :D that's a good thing
11:11 PerlNinja I'll save up a bunch for later, first I need to regain my sanity and show the cat the door, driving me completely and utterly insane at the moment
11:12 PerlNinja (the cat being catalyst)
11:14 marcus PerlNinja:  it was a hurrah for cargo culting
11:14 marcus /Users/marcus/perl5/perlbrew/perls/perl​-5.10.1/lib/site_perl/5.10.1/auto/share​/dist/Startsiden-TVGuide-Web5/static/ SO UGLY :(
11:14 GitHub161 joined #mojo
11:14 GitHub161 mojo: master Sebastian Riedel * 5001e9f (6 files in 5 dirs): changed Mojolicious::Plugin::EplRenderer to not render 404 errors for missing templates - http://bit.ly/ibXhAw
11:14 GitHub161 left #mojo
11:15 sri lets see how it goes
11:15 sri a few test cases had to go since they simply hang now
11:15 sri (for obvious reasons)
11:16 marcus async ones?
11:16 sri everything is async
11:16 sri if you don't render it hangs
11:17 marcus right
11:18 PerlNinja oh, silly question maybe, but what revision of the websockets spec was the one supported in Mojolicious?
11:18 sri 76
11:19 otaviof joined #mojo
11:19 sri don't use websockets though
11:19 otaviof left #mojo
11:19 otaviof joined #mojo
11:19 otaviof left #mojo
11:19 sri the protocol will break completely
11:22 marcus also, most browsers have disabled it 'for security reasons'
11:24 PerlNinja yeah, and FF and Chrome are off on what they support too
11:25 PerlNinja kinda sucks, if people could just agree on what the heck they want, I'd be able to add snazzy eyecandy to my app... eyecandy make boss happy. happy boss pay happy me. now, no happy.
11:29 marcus go on a ninja killing spree instead
11:29 PerlNinja I would but I'd have to perl people to death
11:30 PerlNinja and there's so many ways to do that, I can't choose!
11:31 PerlNinja I'll settle for doing a total conversion from catalyst to mojolicious in under 6 hours... I got 6 cans of red bull and a pot of coffee, so it should work out. If later on I start acting weird(er), don't worry, I'm a professional!
11:35 marcus that is not my definition of a professional :p
11:37 PerlNinja professional caffeine addict :0
11:37 PerlNinja :)
11:38 PerlNinja I'm an oddball, if I need to do some serious work, caffeine, nicotine and loud music are required ingredients for a good day
11:38 GitHub72 joined #mojo
11:38 GitHub72 mojo: master Sebastian Riedel * 9a29c15 (4 files in 3 dirs): handle missing action error more gracefully - http://bit.ly/g6dagO
11:38 GitHub72 left #mojo
11:38 AmeliePoulain I wrote controller's method which must to return JSON (for AJAX). I tried this code but I had HTML page with a template instead of JSON. What I doing wrong?
11:39 AmeliePoulain $self->render(json => encode_json FW::Core::Model::Page->select({ page_id => $page_id })->hash());
11:39 AmeliePoulain *without encode_json
11:41 GitHub167 joined #mojo
11:41 GitHub167 mojo: master Sebastian Riedel * 94e1541 (2 files in 1 dirs): fixed typos - http://bit.ly/dRVMJe
11:41 GitHub167 left #mojo
11:52 Foxcool left #mojo
12:04 Foxcool joined #mojo
12:05 PerlNinja left #mojo
12:17 spleenjack joined #mojo
12:17 GitHub164 joined #mojo
12:17 GitHub164 mojo: master Sebastian Riedel * 198c258 (1 files in 1 dirs): added another cookbook recipe - http://bit.ly/eXo2yy
12:17 GitHub164 left #mojo
12:18 sri marcus: a little bonus recipe to make you stop whining ;p
12:18 * marcus whines
12:18 marcus squeal like a pig!
12:18 purl I don't see Ned Beatty anywhere, sorry.
12:18 * sri pokes marcus
12:19 avkhozov joined #mojo
12:19 * marcus peeks at sri
12:20 sri Oo
12:22 perlrocks Twitter: "By popular demand, here's a fun little bonus recipe. ;) http://t.co/RLVZVJy #perl #mojolicious" --kraih http://twitter.com/kraih/status/30239167623467008
12:23 marcus sri: cute!
12:23 marcus I like it.
12:23 marcus much less work
12:23 marcus and I can even symlink the dirs for convenience
12:23 sri oh
12:23 sri even better recipe :o
12:24 ltriant joined #mojo
12:24 sri but i'll leave that for the wiki :)
12:32 avkhozov left #mojo
12:33 avkhozov joined #mojo
12:38 marcus hmmmm
12:42 koban left #mojo
12:43 HSlayer joined #mojo
12:45 koban joined #mojo
12:46 Foxcool left #mojo
12:48 HSlayer|2 left #mojo
12:57 Foxcool joined #mojo
13:20 marcus Use of inherited AUTOLOAD for non-method Startsiden::TVGuide::Web5::dirname() is deprecated at urgh
13:20 marcus never mind that
13:20 marcus fucking tt renderer isn't respecting ->renderer->root
13:20 perlrocks Twitter: "@perlninja @vidluther Agreed. The simple stuff isn't quite so simple. Have them compare Mojolicious and see what comes out on top." --obfuscurity http://twitter.com/obfuscuri​ty/status/30253865857191936
13:22 sri aww
13:22 perlrocks Twitter: "@obfuscurity @vidluther catalyst: plenty lot of dependencies. mojolicious: no dependencies. Big difference in ease of deploying/updating" --perlninja http://twitter.com/perlninj​a/status/30254364144705536
13:24 GitHub24 joined #mojo
13:24 GitHub24 mojo: master Sebastian Riedel * b407192 (1 files in 1 dirs): fixed recipe - http://bit.ly/e19leO
13:24 GitHub24 left #mojo
13:24 marcus hmm, does svn not understand symlinks?
13:25 sri what's svn? ;p
13:25 sri there was no life before git
13:27 marcus I'm using git-svn at this client
13:27 marcus but it still sucks
13:27 marcus they need to update their build system before we can switch
13:28 marcus <3 git rebase -i HEAD^^
13:28 sri <3
13:30 * sri wonders if github is running on ec2
13:30 marcus I believe they have actual physical servers of their own
13:30 marcus they used to be hosted at engineyard
13:30 sri ah, rackspace now
13:30 marcus mm
13:31 marcus noticed as well
13:31 PerlNinja joined #mojo
13:32 PerlNinja back again... quick question, if you're doing user authentication and stuff, where's the best spot to deal with loading/storing the session and picking up the user from it? hook it somewhere or override the process sub and sledgehammer it in?
13:33 sri hell no
13:33 sri just use under/bridge
13:34 sri the sledgehammer would be a hook actually
13:34 PerlNinja okay, can i render templates from a bridge cb without things going a bit cuckoo?
13:34 sri nobody overloads anymore
13:34 sri sure
13:35 PerlNinja ok, and what's the "best practice" for keeping a user object around? stick it in the stash or poke in an accessor in the app class?
13:35 sri stash
13:35 sri app class is persistent
13:35 sri don't put stuff in there
13:35 sri (request specific stuff)
13:36 PerlNinja ok, makes sense
13:36 PerlNinja well that solves that :D thx!
13:41 jdixon under/bridge? I grab my user session data in app->hook(after_static_dispatch).
13:42 PerlNinja I guess both work, because only the stuff that needs auth is stuck under the bridge, maybe saves a trip to the db for some requests no? unless i fail at how routes work..
13:45 jdixon what is "under/bridge"?
13:46 marcus water/under/bridge
13:46 marcus jdixon: read the routing guide?
13:46 esskar left #mojo
13:46 jdixon yeah, but I usually just nibble at it. :)
13:46 jdixon I try to stay in Lite.
13:47 marcus anything under under will only run if under returns true
13:47 sri http://mojolicio.us/perldoc?Mojolicious/Lite#Under
13:48 sri it's the swiss army knife of routing
13:48 esskar joined #mojo
13:48 PerlNinja speaking of.. can you do a bridge under a bridge?
13:48 sri as many as you like
13:49 sri in a tree structure
13:49 jdixon sri: thanks, that's a good example
13:50 PerlNinja rockin
13:51 jdixon I still like being able to tell it exactly when to run, e.g., after static dispatch.
13:52 sri that runs for absolutely everything though
13:52 sri outside of routes, even for static files
13:53 sri it's the sledgehammer
13:53 jdixon what does? under or static dispatch?
13:53 jdixon under
13:53 jdixon yes, I know
13:53 sri hooks
13:53 marcus under will not run for static dispatch
13:54 jdixon hmm
13:54 jdixon ok
13:54 sri under can be as specific as you make it
13:55 sri under '/auth' => sub {...};
13:55 sri it is part of the routing tree
13:55 sri while hooks work around it
14:02 jdixon ok
14:07 Foxcool left #mojo
14:21 Foxcool joined #mojo
14:31 dekimsey left #mojo
14:31 dekimsey joined #mojo
14:32 breaker313 joined #mojo
14:43 kaare left #mojo
14:54 ysyrota sri: the patch fixed the issue with closed connections, thanks!
14:55 sri not sure yet if it is a good solution
14:55 sri guess we'll see
15:11 PerlNinja if it didn't blow up any servers and devour any small pets, it should be okay
15:19 GabrielVieira left #mojo
15:21 koban left #mojo
15:22 Foxcool left #mojo
15:28 kaare joined #mojo
15:34 Foxcool joined #mojo
15:41 sri :)
15:42 Puddles joined #mojo
15:47 AmeliePoulain left #mojo
15:56 perlrocks Twitter: "Why I chose to build a #Plack framework instead of using #Mojolicious http://tinyurl.com/46zvjt5 #perl" --vtivti http://twitter.com/vtivti/status/30293093521559552
15:57 Foxcool left #mojo
16:00 Christian cu all
16:00 Christian left #mojo
16:03 Akron joined #mojo
16:09 Foxcool joined #mojo
16:11 pid left #mojo
16:17 bellaire joined #mojo
16:18 snearch left #mojo
16:19 Akron left #mojo
16:20 avkhozov left #mojo
16:21 avkhozov joined #mojo
16:23 tempire_ joined #mojo
16:26 * tempire_ devours a small pet
16:26 PerlNinja osnap
16:27 PerlNinja question, mojolicious app, $self->plugin('tt_renderer'); .. got a template in templates/auth/login.html.tt - and i can't seem to convince it to be rendered; in a controller action: $self->render(template => 'auth/login', handler => 'tt') does not seem to do the trick, what am I doing wrong?
16:29 tempire_ wow, vti definitely has some opinions.
16:30 PerlNinja yeah was kinda surprised at that
16:30 * tempire_ still loves vti
16:30 * tempire_ and remains a huge fan of mojolicious
16:30 PerlNinja now if we're comparing plack and catalyst he might have a bunch of very good points but i don't see it with mojo
16:30 perlrocks Twitter: "The Painful Truth: RT @ vtivti Why I chose to build a # Plack framework instead of using # Mojolicious http://tinyurl.com/46zvjt5 # perl" (ru) --spleenjack http://twitter.com/spleenja​ck/status/30301681933623296
16:32 PerlNinja see, now ^ that ..
16:32 PerlNinja is not a good opinion :D
16:33 PerlNinja anyway uhm, anyone have any seriously brilliant ideas as to why i can't seem to get my TT templates to render? :D
16:36 yko PerlNinja: i'm afraid there's not too much people using TT with Mojolicious
16:37 dekimsey We are using it, I'm fairly new to Mojolicious, but I can try to help what's the problem?
16:40 tempire_ I used to use tt, but switched to ep shininess.
16:40 dekimsey @PerlNinja does it generate any errors, like template not found or the like?
16:42 yko PerlNinja: it just works: https://gist.github.com/8e2872cb29507f8a2378
16:42 PerlNinja dekimsey, yeah
16:43 PerlNinja Mojolicious::Controller:473 [11968]: Resource "auth/login.html.ep" not found.
16:43 PerlNinja it's the .ep bit that's got me a bit stumped, if I use $self->render(template => 'foo/bar', handler => 'tt') that should work no?
16:44 dekimsey Frankly, not sure. We've simply set 'tt' as the default handler. We don't actually do anything special in our actions to specify the templates.
16:44 bellaire You do have MojoX::Renderer::TT installed?
16:45 yko bellaire: he uses plugin, so should be so
16:45 PerlNinja ah, dekimsey, how did you set tt as the default handler :D
16:45 PerlNinja yeah I do bellaire, came along with the plugin :)
16:45 yko PerlNinja: https://gist.github.com/8e2872cb29507f8a2378 <-- just try that
16:45 perlrocks Twitter: "Sign up for our Mojolicious event kicking off fashion week on February 12th 2011. 100 dollars per ticket. includes... http://fb.me/E2KSx1TJ" --bibisalonnyc http://twitter.com/bibisalon​nyc/status/30305303350222848
16:45 dekimsey $self->renderer->default_handler('tt');
16:45 PerlNinja ok lemme see what that does
16:46 yko just try ./tt.pl get /
16:46 PerlNinja that did the trick
16:46 PerlNinja default handler set to tt
16:46 PerlNinja and render('auth/login') got it to work
16:47 PerlNinja weird
16:47 PerlNinja oh well
16:57 Foxcool left #mojo
17:01 gizzlon Whats up with vti? That rant seemed higly emotional ..
17:01 gizzlon Maybe sri tried to kiss him or something .. =/
17:02 bellaire There's more than one way to rant.
17:03 gizzlon :)
17:03 PerlNinja wait, sri tries to kiss people?
17:05 * PerlNinja backs away slowly
17:05 gizzlon dunno.. but something or somebody made vti mad
17:06 gizzlon PerlNinja: your on irc... it's saf :d
17:06 gizzlon +e
17:06 purl 2.71828182845905
17:08 Foxcool joined #mojo
17:09 breaker313 left #mojo
17:12 PerlNinja and yeah i dunno, vti sounds a little peeved
17:16 ysyrota left #mojo
17:26 bellaire I notice that it's possible to embed templates inside individual controller classes, if we like, provided the controller calls $self->{template_class} = __PACKAGE__ prior to rendering.
17:27 Foxcool left #mojo
17:27 bellaire But I'm not sure of how to set that outside of the action method itself... Can it be done from a before_dispatch hook?
17:29 yko bellaire: you can take tempaltes from any class at all. See https://github.com/kraih/mojo/blob/master/​lib/Mojolicious/Plugin/PodRenderer.pm#L23
17:29 yko and line 120 of the same file
17:30 PerlNinja any way to do things like, using the AgentCondition to only allow access to a certain set of browsers, and to redirect the others to another page?
17:33 yko PerlNinja: http://mojolicio.us/perldoc?Mojolic​ious/Plugin/AgentCondition#SYNOPSIS
17:33 yko i think if you add another get '/' below, you will catch all other browsers
17:33 PerlNinja yuak
17:33 PerlNinja i keep forgetting there's cool docs now
17:33 yko feel free to try and share your experience with us :)
17:35 bellaire yko: I'm not sure I follow.  This is done from inside a register() method, but do controllers have such a method?  Or do I have to subclass Mojolicious::Plugin to get the templates "known"?
17:37 yko > done from a before_dispatch hook, ye?
17:37 Foxcool joined #mojo
17:38 yko in hooks you have controller instance as a first argument
17:38 bellaire Hmm, when I tested, the class of the first argument was Mojolicious::Controller, not my subclass...
17:38 bellaire Maybe I was doing it wrong, I'll try again. :)
17:39 yko no it's ok
17:39 yko is there any difference for you? you want just render some template from some class, don't you?
17:39 PerlNinja nyum.. i think... doing a route('/')->over(thegood) and a route('/')->over(thebad) might work but that's just guessing right now :p
17:40 bellaire Well I want the templates specifically from the controller class that's handling the dispatch.  Basically so I can write one-off templates inline with the controllers for quick work.
17:42 bellaire If I set $self->{template_class} = __PACKAGE__ from within the action, in the controller, then the template_class is "App::C::Test", for example, which is where the inline template is actually defined.
17:42 bellaire Which is fine, I just didn't know if there was a place I could go to set that behavior up once for all controllers.
17:43 yko bellaire: you need all templates in one controller?
17:44 bellaire No, I want to have the template for App::C::Main in Main.pm, the ones for App::C::Test in Test.pm, and so forth.
17:45 bellaire I see the default_template_class which would do it if I put them all in one place :)
17:46 yko not sure it's possible to do waht you want to do
17:46 bellaire Okay.  Like I said, it works with adding that line to each action, so I'll do that for now...
17:47 yko why don't you use temlpates in files/
17:47 yko it's much easier to edit, especially if you don't have mojo.vim :D
17:48 bellaire I will, eventually, for most things.  I'm thinking this is for quick development.  So I write a controller and I set up a quick template to just show me some basic output while I work before I go and work on making the "real" version.
17:48 yko mojolicious::lite is for quick develompent! >_<
17:48 yko mojolicious is for quick development also, but in a bit other way :)
17:49 esskar left #mojo
17:49 bellaire Right, and mojolicious::lite uses default_template_class = $caller to do its thing.
17:49 dekimsey i think he simply wants the mojolicous::lite auto-detect DATA block functionality available to his mojolicious controller's.
17:52 yko something like that.
17:52 yko i see few ways to do that but each is a bit hackish.
17:53 perlrocks Twitter: "Why I chose to build a Plack framework instead of using Mojolicious / No time to wait http://dlvr.it/F85Wh" (ja) --RtestR http://twitter.com/RtestR/status/30322319352139776
17:53 bellaire Yes... *muahahahahahaa*
17:53 yko if i do so, i would have own controller base class (i anyway have own base controller class for each my application)
17:53 bellaire And overload ->new?
17:53 bellaire er...
17:53 yko no. render
17:53 bellaire Render is better than new. :)
17:54 yko sub render { my $self = shift; $self->stash(template_class => __PACKAGE); $self->SUPER::render }
17:54 yko there's few typos, but you can see idea
17:55 bellaire Oh ya... looks good.  I think I'll do that.  Do you think vti knows about subclassing?
17:55 yko when sebastian came back he will punish me for that hack :D
17:55 bellaire Hey, I was about to do the same to new(), so it's not that bad. :-)
17:55 yko well, you can go and ask him
17:56 bellaire No, I won't want to make people angry with me.  I dont like it.
17:56 yko bellaire: oh. dont forget to pass @_ to render.
17:57 bellaire Yes, thx.
17:57 yko and you know, all that stuff is a bit non-default and in end yoll have to inflate that classes one day
17:58 yko for sure it's easy with mojo inflate --class=Foo::Bar but anyway you should do it in the end
17:59 yko so i don't see reason not to do it from start (only if you are using some non-functional text editor
17:59 bellaire Yeah, this is just a nifty new idea.  Been working with templates in files for years, we rolled our own (or rather dekimsey did) sharedir-based solution for keeping templates close to their applications in a CGI::App based setup.
17:59 bellaire It's just a little trick to save a little time in the early stages.
18:00 yko well, you are warned
18:01 bellaire I am warned.  Thanks.
18:06 Foxcool left #mojo
18:06 bellaire Maybe I'll add a check so that it only works if MOJO_MODE is "development" and not "production" ;)
18:09 tempire_ left #mojo
18:16 bellaire Works great.  And only if  (defined $ENV{MOJO_MODE} and $ENV{MOJO_MODE} eq 'development')
18:16 yko bellaire: it can be painfull
18:17 yko one day you will remove template from data but it will exists in templates/ ...
18:19 Foxcool joined #mojo
18:19 bellaire Aren't I supposed to put them in templates/ when I remove them from data?
18:24 snearch joined #mojo
18:30 yko imagine: inflated for producition and than removed from __data__ or so. ignore me, i'm a bit paranoid sometimes
18:40 otaviof joined #mojo
18:40 otaviof left #mojo
18:56 Foxcool left #mojo
18:59 fhelmber_ left #mojo
19:00 spleenjack left #mojo
19:07 Foxcool joined #mojo
19:08 dekimsey Some deeper parts of my application rely on libraries that use Exception::Class objects being thrown... it looks as though Mojo's wrapping them in its own exception object and as a result mangling the libraries exception detection logic. Any suggestions on how to approach this? First thought I've had is patching Mojo to be able to understand Exception::Class objects
19:10 marcus :o
19:10 * marcus just read vti's latest blogpost.
19:10 marty Ya me too.  wow
19:15 marty It's an interesting opinion.  Personally, I'm still a big mojolicous fan.  I'm not half as good a programmer as vti so in my case, having things done for me is a gooood thing.  Keeps me out of trouble.  :)
19:20 perlrocks Twitter: "Why I chose to build a Plack framework instead of using Mojolicious / No time to wait http://dlvr.it/F8LS9" (ja) --RtestR http://twitter.com/RtestR/status/30344242521972736
19:27 PerlNinja mmm, he has a valid point from an abstract view, but using mojolicious is about as far away as you can get from being locked in to a way things work. Mojolicious's guts are much more accessible and malleable than Catalyst for example
19:28 perlrocks Twitter: "http://bit.ly/gfGaN4 Why I chose to build a Plack framework instead of using Mojolicious / No time to wait I've invested a lot of time i.." (ja) --recenturl http://twitter.com/recentur​l/status/30346259881529344
19:38 marcus Well, he has a point from a framework-builder perspective.
19:39 marcus Not so much from a web developer perspective.
19:40 marcus I actually don't care so much since i am not trying to write a web framework on top of mojo.
19:41 Foxcool left #mojo
19:41 ispy_ left #mojo
19:42 perlrocks Twitter: "Why I chose to build a Plack framework instead of using Mojolicious / No time to wait http://bit.ly/i6S2iS" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/30349773491929088
19:45 pid joined #mojo
19:45 bellaire So, dekimsey is dying to know (pun intended), is nobody else having an issue with the fact that _walk_stack sets $SIG{__DIE__} in such a way that it mangles other types of exception objects?
19:53 Foxcool joined #mojo
19:54 tempire_ joined #mojo
19:54 tempire_ I'm with you, marcus
19:54 tempire_ it's possible what drew vti to mojolicious in the first place was the Mojo namespace.
19:54 tempire_ sri seemed to move away from that when the catalyst community wasn't interested in it.
19:55 tempire_ I don't know for sure, but I'd say vti is on a building kick.
19:55 tempire_ boose is an indicator of that.
19:56 tempire_ if that's the case, mojolicious doesn't make much sense for him.
19:56 tempire_ I personally like that mojolicious has "one" or near to one right way to do things.
19:57 marcus I just dislike the bitter feeling of the post,
19:57 tempire_ It's something Perl needs if it's going to draw attention from other language developers.
19:57 tempire_ Yeah, I agree.
19:57 tempire_ But I'm choosing to believe I'm just reading too much into it.
19:57 marcus And the code examples aren't very fair either.
19:58 tempire_ We don't really know what went when he disappeared.  I was encouraged that sri 'thanked him dearly' in the pod, though.
19:58 tempire_ I think the important thing here is for everyone involved in mojolicious not to take it personally.
20:02 marcus True
20:03 Foxcool left #mojo
20:10 ispy_ joined #mojo
20:15 Foxcool joined #mojo
20:19 perlrocks Twitter: "Document yon'm Mojolicious" (ja) --yasutaka http://twitter.com/yasutak​a/status/30359230322053120
20:32 avkhozov left #mojo
20:49 non left #mojo
21:00 PerlNinja i can has stupid question; $r->route('/foo/:something')->to('foo#index') -- what i want index to do, is render a template from templates/foo/<something> ... self->render don't do it right (wants index.html.tt), self->render(template => $self->stash('something')) also doesn't pick it up ... how to go about this?
21:05 tempire_ PerlNinja: what template is it looking for when you do self->render(template => $self->stash('something'))?
21:06 yegor joined #mojo
21:06 PerlNinja I actually do $self->render(template => sprintf('foo/%s', $self->stash('something'))) but it looks for foo/index.html.tt
21:06 dekimsey left #mojo
21:06 PerlNinja it gets the something right in the stash though
21:07 tempire_ what template does it look for when you do $self->render( template => 'avalue' );
21:13 PerlNinja left #mojo
21:40 Foxcool left #mojo
21:51 Foxcool joined #mojo
22:03 bellaire left #mojo
22:27 perlrocks Twitter: "Sweet -- Mojolicious is available via ppm for ActivePerl." --kjwcode http://twitter.com/kjwcode​/status/30391510985867264
22:32 arthas left #mojo
22:36 stephen joined #mojo
22:38 Foxcool left #mojo
22:46 snearch left #mojo
22:50 Foxcool joined #mojo
22:50 perlrocks Twitter: "Why I chose to build a Plack framework instead of using Mojolicious:  http://bit.ly/e0QLnB" --hnfirehose http://twitter.com/hnfireho​se/status/30397314929528833
22:59 kaare left #mojo
23:13 * sri punishes yko for that hack
23:17 sri must be the three letter nicks -.-
23:18 sri "Do you like self explanatory code and hate overused comments?"
23:19 sri nuff said ;p
23:25 pid perl community is awesome :-)
23:27 ltriant left #mojo
23:29 pid left #mojo
23:50 Foxcool left #mojo

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