The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2015-03-22

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

All times shown according to UTC.

Time Nick Message
00:06 good_news_everyon joined #mojo
00:06 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hDNi
00:06 good_news_everyon mojo/master 98db489 Sebastian Riedel: better title for section about the include helper
00:06 good_news_everyon left #mojo
00:08 good_news_everyon joined #mojo
00:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hDNb
00:08 good_news_everyon mojo/master ed5556c Sebastian Riedel: include sounds better than including
00:08 good_news_everyon left #mojo
00:09 batman sri: the short answer: Mojo::mysql will most probably stay close to Mojo::Pg. meaning as is.
00:09 batman i will give the long answer when i have more information
01:14 mattastrophe joined #mojo
01:15 good_news_everyon joined #mojo
01:15 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hyIw
01:15 good_news_everyon mojo/master 89d2696 Sebastian Riedel: generate a little less code in Mojo::Base
01:15 good_news_everyon left #mojo
01:22 OmarOthman joined #mojo
01:23 wingfold joined #mojo
01:35 mattastrophe_ joined #mojo
01:51 mattastrophe joined #mojo
02:05 asarch joined #mojo
02:10 klapperl_ joined #mojo
02:10 tianon joined #mojo
02:21 irq joined #mojo
02:23 woz joined #mojo
02:53 good_news_everyon joined #mojo
02:53 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hyC4
02:53 good_news_everyon mojo/master 413320b Sebastian Riedel: improve Mojo::Base performance slightly
02:53 good_news_everyon left #mojo
02:54 good_news_everyon joined #mojo
02:54 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hyC0
02:54 good_news_everyon mojo/master 718e0d7 Sebastian Riedel: MOJO_BASE_DEBUG is not used anymore
02:54 good_news_everyon left #mojo
02:54 sri it makes no sense to me, but it's faster
02:55 sri even with 5.21 and the new deref op
02:55 sri small but measurable even in real apps
02:57 sri you'd think $_[0]{'foo'} was faster than $_[0]{$attr}
02:57 woz joined #mojo
03:11 noganex joined #mojo
03:15 Grinnz hmm
03:20 sri i hate adding code... but it's just better
03:20 sri for our cgi users the startup time also got a tiny bit better :D
03:20 Grinnz lol
03:23 Zoffix yey!
03:43 absolut_todd joined #mojo
03:47 cpan_mojo WWW-Lipsum 1.001012 by Zoffix Znet - http://metacpan.org/release/ZOFFIX/WWW-Lipsum-1.001012 (depends on Mojolicious)
04:01 good_news_everyon joined #mojo
04:01 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hy02
04:01 good_news_everyon mojo/master 0044fbf Sebastian Riedel: use monkey_patch consistently
04:01 good_news_everyon left #mojo
04:02 mattastrophe joined #mojo
04:06 jberger oh no
04:06 jberger I missed this
04:06 jberger http://weblog.bulknews.net/post/113186012659/friendfeed-is-shutting-down
04:06 * jberger weeps bitterly
04:07 jberger that was one of my very favorite modules
04:07 jberger and also what powers cpan_mojo
04:08 Zoffix :(
04:11 jberger Zoffix: https://github.com/jberger/Mojo-FriendFeed/blob/master/lib/Mojo/FriendFeed.pm#L57
04:11 jberger so <3
04:13 Zoffix Too drunk to understand that code.. But I'm guessing it's trivial to change it to a new source of updates? :)
04:13 jberger who knows
04:13 purl and it's way past purl's bed time young man!
04:14 jberger that was specific to how it did it's subscriptions though
04:14 jberger its
04:14 jberger twas one of my favorite hacks
04:15 Zoffix http://i.imgur.com/ahzenL6.jpg
04:15 jberger nice
04:16 jberger yeah that's too many tip understand my hack
04:16 Zoffix :)
04:16 jberger s/tip/to/
04:17 jberger but you'll like it in the morning
04:21 Zoffix You're making a non-blocking GET that repeats itself once its done?
04:24 Zoffix What I don't get is why this is here: https://github.com/jberger/Mojo-FriendFeed/blob/master/lib/Mojo/FriendFeed.pm#L53
04:24 Zoffix wouldn't line 51 crap out before that anyway?
04:25 bwf joined #mojo
04:29 bwf joined #mojo
04:30 jberger hmm maybe
04:30 jberger that stuff has gone thorough a few iterations and might not be necessary anymore
04:31 jberger yeah its at line 41 too
04:34 jberger Zoffix: and yes that is the purpose, I just love that it looks like recursion but isn't
04:34 Zoffix :D
04:34 * Zoffix is happy he figured that out
04:35 jberger well done, you are a truly capable drunkard
04:35 Zoffix \o/
04:36 jberger anyway nn all
04:36 bwf joined #mojo
04:36 Zoffix night
04:41 bwf joined #mojo
04:45 bwf joined #mojo
04:50 basic6_ joined #mojo
04:51 bwf joined #mojo
04:54 absolut_todd joined #mojo
04:56 bwf joined #mojo
05:01 bwf joined #mojo
05:02 good_news_everyon joined #mojo
05:02 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hya5
05:02 good_news_everyon mojo/master d6e8b30 Sebastian Riedel: make tests a little more boring
05:02 good_news_everyon left #mojo
05:06 bwf joined #mojo
05:08 juikuen joined #mojo
05:09 tianon joined #mojo
05:11 sri is it just me or is chrome getting worse with every release now?
05:11 bwf joined #mojo
05:11 sri scrolling on http://mojolicio.us flickers like crazy
05:11 sri and buttery smooth in firefox and safari
05:14 sri canary is better but still terrible... guess i might give the firefox dev edition a try after all :o
05:17 bwf joined #mojo
05:17 Zoffix Buttery smooth in Chrome 41.0.2272.89 m... (/me updates)... "Update failed (error: 7)"
05:17 Zoffix Yeah.. um... works fine :)
05:18 Zoffix Updated.  41.0.2272.101 m. No flickers.
05:20 vmbrasseur joined #mojo
05:21 bwf joined #mojo
05:21 Zoffix The top nav flickers about 50% of the time when I start to scroll from the top on http://mojolicio.us/perldoc That's all I notice
05:22 Grinnz looks fine to me
05:26 bwf joined #mojo
05:31 bwf joined #mojo
05:32 cpan_mojo Mojolicious-Plugin-AntiSpamMailTo 1.001003 by Zoffix Znet - http://metacpan.org/release/ZOFFIX/Mojolicious-Plugin-AntiSpamMailTo-1.001003
05:33 uma joined #mojo
05:34 tianon joined #mojo
05:36 bwf joined #mojo
05:41 bwf joined #mojo
05:46 bwf joined #mojo
05:51 bwf joined #mojo
05:56 bwf joined #mojo
05:59 tianon joined #mojo
06:01 bwf joined #mojo
06:07 bwf joined #mojo
06:12 bwf joined #mojo
06:16 bwf joined #mojo
06:21 bwf joined #mojo
06:25 Oleg joined #mojo
06:27 bwf joined #mojo
06:31 bwf joined #mojo
06:34 woz joined #mojo
06:37 bwf joined #mojo
06:43 irq joined #mojo
06:44 bwf joined #mojo
06:58 bwf joined #mojo
07:00 avkhozov Hi
07:00 avkhozov I have a question not directly related to mojo
07:00 avkhozov How you indicate specific versions of modules in cpanfile?
07:00 dotandimet joined #mojo
07:02 avkhozov I have a problem with DBD::Pg, I can install specific version via "cpanm TURNSTEP/DBD-Pg-3.2.1.tar.gz" for example, but can't specify this into cpanfile
07:03 avkhozov For 3.0.0 this "requires 'DBD::Pg', '== 3.0.0';" and "requires 'DBD::Pg', '>= 3.0.0, < 3.2.1';" does not work
07:03 avkhozov Log https://gist.github.com/avkhozov/d48cd49e4cca9b5d7405
07:08 bwf joined #mojo
07:18 d4rkie joined #mojo
07:30 uma Hi guys, do you have any source code repo that is similar to openqa.opensuse.org
07:30 buu You mean.. like the one on github?
07:30 uma yes
07:30 buu well
07:30 buu Its the one on github
07:31 uma i am running windows, so i couldnt install that openqa on my machine to test and understand .ep
07:31 uma so i am looking for any other alternate application that i could install on windows
07:32 buu why.. are you asking us..
07:33 buu You want an example mojo application?
07:33 uma exactly
07:34 uma i am learning to build web app for my existing perl code based on Mojo
07:35 buu Well, https://api.metacpan.org/source/OLEG/Bootylicious-1.07/bootylicious
07:35 buu This is an exampel of something
07:37 uma Interesting, i will check it
07:38 uma However, looking for a fully made webapp like openqa, Nevertheless it is helpfuk
07:38 uma helpful*
07:38 buu uma: https://github.com/kraih/mojo/wiki/Example-applications
07:51 uma excellent, Thanka buu
07:52 uma have you checked out bootylicious by any chance, i am unable to inflate them
07:53 uma no files are generated by mojo when i do >mojo inflate bootylicious
08:05 buu Heh, no, I just googled it
08:13 Vandal joined #mojo
08:20 uma joined #mojo
08:27 dotandimet joined #mojo
08:57 mattastrophe joined #mojo
09:02 berov joined #mojo
09:12 marcus uma: did you look at convos?
09:12 marcus http://convos.by/
09:19 sh4 joined #mojo
09:33 cpan_mojo Mojolicious-Plugin-StripePayment 0.02 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-StripePayment-0.02
09:56 punter joined #mojo
10:05 cpan_mojo Ado 0.85 by Krasimir Berov - http://metacpan.org/release/BEROV/Ado-0.85 (depends on Mojolicious::Plugin::OAuth2)
10:08 berov there is something wrong with cpan_mojo. Ado Does not require MP OAuth2 now
10:09 berov it was only recommending it before
10:11 woz joined #mojo
10:12 alnewkirk joined #mojo
10:40 woz joined #mojo
10:58 batman berov: the problem is that metacpan is not updated when cpan_mojo sees a new package
12:12 OmarOthman joined #mojo
12:41 woz joined #mojo
12:41 tianon joined #mojo
13:15 Oleg joined #mojo
13:32 trone joined #mojo
13:47 jnbek joined #mojo
13:50 berov batman: understand, thanks!
13:52 basic6_ joined #mojo
14:00 juikuen joined #mojo
14:38 mattastrophe joined #mojo
14:40 irq joined #mojo
14:54 amon joined #mojo
14:56 Zoffix joined #mojo
14:57 vmb joined #mojo
14:57 asarch joined #mojo
15:27 absolut_todd joined #mojo
15:36 zivester joined #mojo
16:07 dotan joined #mojo
16:17 woz joined #mojo
16:25 meshl joined #mojo
16:33 meshl joined #mojo
16:35 meshl joined #mojo
16:41 meshl joined #mojo
16:43 meshl joined #mojo
16:46 meshl joined #mojo
16:52 meshl joined #mojo
16:56 meshl joined #mojo
16:56 good_news_everyon joined #mojo
16:56 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hHYx
16:56 good_news_everyon mojo/master 4d0f723 Sebastian Riedel: use a more generic Mojo::Base example
16:56 good_news_everyon left #mojo
17:29 meshl joined #mojo
17:38 meshl joined #mojo
17:48 meshl joined #mojo
17:53 juikuen joined #mojo
17:56 meshl joined #mojo
17:58 woz joined #mojo
18:03 meshl joined #mojo
18:09 meshl joined #mojo
18:32 Zoffix joined #mojo
18:41 PanzerBjorn joined #mojo
18:42 PanzerBjorn Howdy folks. Quick question: I'm upgrading some older Mojo sites to 6.03 today and running into a problem with GET/POST params always being empty.
18:42 PanzerBjorn I suspect it may have something to do with replacing bridge with under.
18:43 Grinnz what version are you upgrading from?
18:43 PanzerBjorn Can old bridge calls just be replaced verbatim with under instead? Or are there other considerations? I'm upgrading from 5.4 to 6.03
18:44 PanzerBjorn May have actually been a 5.3 site, no way to tell now!
18:45 PanzerBjorn I've been having to do a lot of conversions in the code, esp from render_* to reply->*
18:46 PanzerBjorn And render( partial => 1) to render_to_string
18:46 Grinnz well the major difference regarding GET/POST params would be that param() now only returns the last param, yuou need every_param to get multiple params with the same name; and param() no longer can be used to get the param names
18:47 PanzerBjorn Got that all cleaned up and much of the site is working now, just not getting any GET or POST parameters. The $self->param is always returning a single element that is an empty string.
18:47 Grinnz without any arguments, yeah thats no longer supported
18:47 PanzerBjorn Ahhh, that's where my trouble is then. I am using my @names = $self->param; to get the param names and loop over them!
18:48 PanzerBjorn So how do you get the param names now?
18:48 Grinnz $self->res->params->names
18:48 PanzerBjorn Beaut!
18:48 Grinnz makes a lot more sense, i think ;)
18:48 tianon joined #mojo
18:48 Grinnz also, its returned as an arrayref
18:49 PanzerBjorn I wouldn't diagree. =) Was not intuitive to call the same method without a param to get an array. ;)
18:49 Grinnz yeah that was mostly a holdover from CGI.pm i think
18:49 PanzerBjorn Ah, okay, so wrap it in @{}, good to know.
18:50 PanzerBjorn Hmm, Perl claims that the Response object doesn't have a definiteion for "params". =/
18:52 PanzerBjorn Are you sure that shouldn't be on the req instead of res?
18:52 Grinnz ah, yes thats right
18:52 PanzerBjorn Works now. ;)
18:52 PanzerBjorn $self->req->params->names like a charm, thanks much!
18:54 jberger if you had partial you were coming from pre 5.0 at least
18:55 OmarOthman left #mojo
18:55 PanzerBjorn Well, there you go then. ;)
18:56 PanzerBjorn One of my much larger sites that has insane activity compared to the ones I'm converting now has a whole system of passing a partial flag across classes and redirects. That's going to be a fun one to rewrite.
18:57 jberger passing across classes? why would you even need that?
18:58 PanzerBjorn BTW Mojo is handling high-volume, high-throughput traffic on that site very gracefully and super stable. Mojo is by far the smoothest contemporary web platform I've seen. My wife is constantly frustrated with CodeIgniter and Laravel.
18:58 jberger \o/
18:59 PanzerBjorn Because I'm not doing something right, and being a turd about cheating the redirect system. ;) I have a lot of methods on controllers that can return either full HTML pages or JSON or an AJAX custom template depending on how they are called.
19:00 PanzerBjorn So some methods return a string OR a page depenidng on the state of the partial flag.
19:00 PanzerBjorn It's a hack that should likely be undone when I'm updating the code anyway.
19:02 jberger PanzerBjorn: do you know about respond_to ?
19:02 PanzerBjorn Anyway, woohoo! First site successfully converted from pre-5.0 to 6.03! More to come.
19:03 PanzerBjorn Hmmm, doesn't ring a bell.
19:04 PanzerBjorn Ah, that responds to a format, sure. I still have to do various logic for detection of XHS and all that jazz.
19:06 sri you could use template variants http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Template-variants
19:07 PanzerBjorn The reason for the weirdness is that I have a lot of views with lazy-loaded fold-out content. GET/POST params can tell the view to pre-load the fold-out instead of lazy-loading it. Rather than have separate methods for the pre-load and lazy-load of that particular sub-view, I use the partial flag to tell it whether to redner to an AJAX response or a string to be included in the html.ep template.
19:07 sri hook before_dispatch => sub { $_[0]->stash(variant => 'xhr') if $_[0]->req->is_xhr };
19:08 PanzerBjorn Oooh, that's elegant. =)
19:09 PanzerBjorn In full app code that would be $self->hook(01before_dispatch => sub { $_[0]->stash(variant => 'xhr') if $_[0]->req->is_xhr }01); correct?
19:09 PanzerBjorn Or does the hook go on a route/bridge?
19:09 PanzerBjorn Sorry, route/under now.
19:10 PanzerBjorn I've written so many apps using bridges, going to be a while to replace that pattern in my brain with under.
19:13 sri it's just a name, not a different pattern
19:13 zivester joined #mojo
19:14 PanzerBjorn Right. So under and bridge are identical in function? No other considerations need to be made when replacing bridge with under?
19:17 PanzerBjorn Oh, another quick question: I've been looking around for a simple way to redirect any requests on port 80 of my instance to port 443 instead. Can't find any examples of doing that online.
19:18 PanzerBjorn I'm listening to both ports with Mojo, not sure how to filter routes by port.
19:19 PanzerBjorn For the big site behind an nginx reverse proxy I just handle that at the nginx level but I run some smaller Mojo sites on a single server setup.
19:20 stephan48 check the base url, it should contain the port. not sure what would be the best place for doing the redirect then, one possibility would be a under() checking the port before passing to other routes
19:35 jberger btw I'm not likely to be as responsive the next few days
19:36 jberger I'm visiting family
19:57 woz joined #mojo
20:29 sri jberger: i'll blame you anyway :)
21:26 punter joined #mojo
21:35 punter joined #mojo
21:49 trone_ joined #mojo
22:45 kaare joined #mojo
22:53 Zoffix :( _method ain't working
22:54 Zoffix "None of these routes could generate a response for your POST ", even though I'm also passing _method=PUT
22:58 Zoffix Hm. It works, but only if form is set to GET :/
22:59 Zoffix This is sorta limited, since I've got a giant form and I wanna PUT it. Would be neat if I could "POST" it, but PUT with _method
23:00 asarch joined #mojo
23:02 cpan_mojo XML-Loy 0.37 by Nils Diewald - http://metacpan.org/release/AKRON/XML-Loy-0.37 (depends on Mojolicious)
23:08 jberger Zoffix: that's how it's supposed to work
23:08 Zoffix Oh :(
23:10 jberger do you have the route defined as get?
23:12 Zoffix Hm... Yeah
23:13 Zoffix I need to read HTTP spec to learn what all the GET/POST/PUT/whatever is about
23:18 good_news_everyon joined #mojo
23:18 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hQ5F
23:18 good_news_everyon mojo/master 4738e36 Sebastian Riedel: another form_for example
23:18 good_news_everyon left #mojo
23:33 woz joined #mojo
23:33 good_news_everyon joined #mojo
23:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hQb2
23:33 good_news_everyon mojo/master cd85ee8 Sebastian Riedel: split up section on application embedding
23:33 good_news_everyon left #mojo
23:38 good_news_everyon joined #mojo
23:38 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/hQNI
23:38 good_news_everyon mojo/master ad6da78 Sebastian Riedel: more consistent titles
23:38 good_news_everyon left #mojo
23:53 jb360 joined #mojo

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