Camelia, the Perl 6 bug

IRC log for #mojo, 2013-05-04

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

All times shown according to UTC.

Time Nick Message
09:20 ilbot2 joined #mojo
09:20 Topic for #mojo is now Mangolicious! | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
10:02 sh4 joined #mojo
10:06 janus sweet, making ember integration even easier sounds good :)
10:07 janus whereas i have to say backbone w/ websockets is also pretty nice
10:10 suy joined #mojo
10:12 janus sri: thanks in any case - nails a topic we are chasing with a lot of details :)
10:34 denisboyun_ joined #mojo
10:56 hrupp joined #mojo
10:59 al802 joined #mojo
10:59 al802 Hi all
11:01 al802 Is there anything special i need to do to enable before_routes call
11:02 al802 currently I $self->hook(before_routes => sub{} but that is never called?
11:03 Britzel This hook is not called on static routes. What are you trying to render?
11:03 al802 I'm trying to gzip static content
11:04 Britzel Hm, after re-reading the docs I am not sure anymore when it is emitted and when not.
11:05 al802 I'd really like to intercept the call before static route
11:05 al802 so that I can serve a pre-gzipped file rather than gzip it
11:06 al802 so I'd think I need to look at transfer-encoding header then decide which to serve
11:06 al802 there is a call after_static_dispatch
11:06 al802 but it would be nice to have before_static_dispatch
11:10 al802 or is tehre another way to preprocess static files?
11:12 al802 so "before_routes" states "Emitted after the static file server determined if a static file should be served and before the router starts its  work."
11:14 al802 strange, tehre is no reference to "before_routes" in my distribution
11:16 al802 Ithink I'm running Mojolicious-3.76
11:17 bowtie joined #mojo
11:19 bowtie joined #mojo
11:19 al802 do you know if after_static_dispatch is available in the latest version 3.97 - I know it's been deprecated, but I rely on it
11:21 Britzel see http://mojolicio.us/perldoc/Mojolicious#hook
11:21 Britzel It has only after_static
11:23 al802 can I set my cached Expires headers from there?
11:26 al802 also, is there anything special I need to do to upgrade to the latest version? or just '# curl get.mojolicio.us | sh'
11:26 sh3 joined #mojo
11:37 maxhq joined #mojo
12:01 sh4 joined #mojo
12:18 abra joined #mojo
12:18 al802 After attempting an upgrade I got an error straight back saying "Successfully installed Mojolicious-3.97 (upgraded from 3.76)", I had to do a double take, impressive and painless, thanks guys.
12:22 jberger al802, :-)
12:22 jberger course, you're about to hit the mass of deprecations from 3.85 so don't thank us quite yet :-D
12:23 jberger https://metacpan.org/source/SRI​/Mojolicious-3.97/Changes#L119
12:26 rhaen joined #mojo
12:49 al802 The only think I need to re implement is the before_routes which is now being called correctly, otherwise everything else is working :)
12:52 rem_lex|pivo joined #mojo
12:55 jberger great
12:56 jberger I'm thinking about doing a mango version of this post: http://blogs.perl.org/users/joel_berger/2012​/10/a-websocket-mojoliciousdbi-example.html
12:56 jberger I've already written the script, its almost too easy
13:01 KindTwo joined #mojo
13:05 jberger https://gist.github.com/jberger/5517459
13:39 memowe joined #mojo
13:42 asarch joined #mojo
14:24 ynonp joined #mojo
14:27 sri jberger: ->attr is old school, use state :)
14:29 sri looks pretty good though
14:35 Britzel attr is old school? Where is state documented? I find only this: http://mojolicio.us/perldoc/Mojo/Base#attr
14:41 memowe joined #mojo
14:42 sri state is a perl feature, you find it in the growing guide
14:47 Britzel ah, that state, thanks.
14:54 batman sri: how is state and attr the same thing? i would say attr is pr. object, while state is more of a global feature
14:55 sri state is per object as well with helpers
15:01 batman how is that possible?
15:01 batman because it's only one..?
15:04 sri every instance has its own helpers
15:05 batman not sure if i follow... but what about this: i would say using state instead of attr inside a controller is dangerous
15:06 batman state will not work as a drop in if the attr was built using request data.
15:06 sri i never said you should do that
15:06 batman ok. good. just had to make sure i understood correctly.
15:21 denisboyun joined #mojo
15:57 tempire The default avatar for articles on perlr is now a raptor.
15:57 tempire More fitting, I think.
16:16 basiliscos joined #mojo
16:29 snaakje joined #mojo
16:53 denisboyun_ joined #mojo
16:58 sh3 joined #mojo
16:58 good_news_everyone joined #mojo
16:58 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/t2IQYQ
16:58 good_news_everyone mojo/master 1c342f9 Sebastian Riedel: mention which Mojo::DOM methods use the charset
16:58 good_news_everyone left #mojo
17:00 denisboyun_ joined #mojo
17:02 Britzel_ joined #mojo
17:05 good_news_everyone joined #mojo
17:05 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/QfHnnA
17:05 good_news_everyone mojo/master e25838a Sebastian Riedel: a few more notes for charset handling in Mojo::DOM
17:05 good_news_everyone left #mojo
17:09 d4rkie joined #mojo
17:22 good_news_everyone joined #mojo
17:22 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/lvZhrg
17:22 good_news_everyone mojo/master 1d21fef Sebastian Riedel: more documentation and tests for Mojo::DOM
17:22 good_news_everyone left #mojo
17:28 good_news_everyone joined #mojo
17:28 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/tpK47w
17:28 good_news_everyone mojo/master 4edccdf Sebastian Riedel: better example and description for replace_content
17:28 good_news_everyone left #mojo
17:32 * sri wonders if charset handling should be removed from Mojo::DOM
17:32 asarch joined #mojo
17:32 tempire why?
17:32 sri so it's consistently characters you're dealing with
17:33 sri half the methods now have a "Note that the HTML/XML will be decoded if a charset has been defined."
17:35 Zx3 joined #mojo
17:38 ynonp joined #mojo
17:46 dod joined #mojo
17:55 dod joined #mojo
17:58 ynonp joined #mojo
18:19 mrphilov joined #mojo
18:36 Mike-PerlRecruiter_ joined #mojo
18:38 mire joined #mojo
18:41 mire_ joined #mojo
18:49 denisboyun joined #mojo
18:55 sh3 joined #mojo
19:09 luvgalz joined #mojo
19:14 luvgalz Hi guys, i just begin to learn how to use Mojo. Could you explain please how to create dynamic parts in static template (header & footer havent to change, only content place have to render every time new divs)
19:19 mire_ joined #mojo
19:39 basiliscos1 joined #mojo
19:39 sweet_kid luvgalz: you can use layouts, templates
19:40 ynonp joined #mojo
19:40 sweet_kid or you can just use include to include your header-footer code
20:08 sh4 joined #mojo
20:14 good_news_everyone joined #mojo
20:14 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/L9e8UQ
20:14 good_news_everyone mojo/master 03f6d26 Sebastian Riedel: reduced idle CPU usage of Mojo::IOLoop further
20:14 good_news_everyone left #mojo
20:15 sri that should help Mojo::UserAgent/Mango standalone scripts a lot
20:28 basiliscos joined #mojo
20:42 kvorg_ joined #mojo
20:42 kvorg joined #mojo
21:12 luvgalz left #mojo
21:14 gryphon joined #mojo
21:30 denisboyun_ joined #mojo
21:36 Adurah joined #mojo
22:31 good_news_everyone joined #mojo
22:31 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/HV_79A
22:31 good_news_everyone mojo/master 1f76807 Sebastian Riedel: small optimizations
22:31 good_news_everyone left #mojo
22:49 zivester_ joined #mojo
22:50 zackiv31 joined #mojo
22:52 jberger o/
22:53 jberger I like `has` but yeah, `app->attr` looks odd
22:53 jberger and usually you still have to make a helper which does `shift->app->myattr`
22:53 jberger anyway, I updated the gists
22:54 jberger tempire, <3 perlr
22:59 ka2u joined #mojo
23:02 jberger hey the log is back!!
23:02 jberger \o/
23:17 jberger sri: is this line right? https://metacpan.org/source/SRI/Mojoli​cious-3.97/lib/Mojo/Reactor/EV.pm#L14
23:18 sri \o/
23:18 sri jberger: why wouldn't it?
23:18 jberger aren't both cases the same?
23:19 sri nope, different class
23:19 sri just the same constructor is used
23:19 jberger oh, right
23:19 jberger nm
23:20 * jberger was looking at making Mojo::Reactor::Prima again
23:48 al802 in http://mojolicio.us/perldoc/Mojolicious, in the first hook example it states "# Dispatchers will not run if there's already a response code defined"
23:48 al802 is this true for all hook?
23:49 good_news_everyone joined #mojo
23:49 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/1ElVXA
23:49 good_news_everyone mojo/master 1191b0e Sebastian Riedel: removed a few deprecated functions and methods
23:49 good_news_everyone left #mojo
23:49 al802 in my case I want to gzip dynamic content, but within my code if I set a response code, my after_dispatch code will not run? or have I got this wrong
23:53 mst al802: I think it's saying "if a before_dispatch hook sets a response code, the main dispatch cycle won't be run"
23:53 mst certainly that's what that sentence -sounds- like it means
23:54 mst why don't you try it and find out? :)
23:55 good_news_everyone joined #mojo
23:55 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Rc6xGA
23:55 good_news_everyone mojo/master 17d47f9 Sebastian Riedel: slightly better hook example
23:55 good_news_everyone left #mojo
23:57 * sri loves removing huge chunks of code
23:58 sri time for doctor who! \o/

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