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

IRC log for #mojo, 2014-03-21

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

All times shown according to UTC.

Time Nick Message
00:07 marty joined #mojo
00:07 jack joined #mojo
00:09 spoot joined #mojo
00:10 spoot joined #mojo
00:41 marty joined #mojo
00:46 d4rkie joined #mojo
00:51 marty joined #mojo
01:10 jhg_ joined #mojo
01:11 marty joined #mojo
01:15 btyler joined #mojo
01:39 marty joined #mojo
01:42 dvinciguerra joined #mojo
02:25 rem_lex|pivo joined #mojo
02:46 klapperl joined #mojo
04:17 kanishka joined #mojo
04:46 Vandal joined #mojo
05:03 malikai joined #mojo
05:04 disputin joined #mojo
05:17 alnewkirk joined #mojo
05:49 sleigner joined #mojo
05:59 jack joined #mojo
06:03 dotandimet joined #mojo
06:06 sujithm joined #mojo
06:19 batman mudler: thanks :)
06:36 mattastrophe joined #mojo
06:39 sujithm joined #mojo
06:59 Adura siri is gone.
07:07 sujithm joined #mojo
07:15 sujithm_ joined #mojo
07:20 Eke- joined #mojo
07:41 dod joined #mojo
07:47 basiliscos joined #mojo
07:51 nicomen joined #mojo
07:55 eseyman joined #mojo
07:58 hummeleBop joined #mojo
08:07 dpetrov_ joined #mojo
08:17 Adurah joined #mojo
08:18 bjoernfan batman: Nice!
08:23 trone joined #mojo
08:26 batman :)
08:34 denisboyun joined #mojo
08:39 edestler joined #mojo
08:42 alnewkirk joined #mojo
08:45 rawler joined #mojo
09:06 meshl joined #mojo
09:49 sujithm joined #mojo
09:49 spoot joined #mojo
09:52 ver joined #mojo
09:55 spoot joined #mojo
10:03 sujithm_ joined #mojo
10:04 sujithm__ joined #mojo
10:25 denisboyun joined #mojo
10:50 Jonneh joined #mojo
10:51 mire_ joined #mojo
11:28 dvinciguerra joined #mojo
11:33 jack joined #mojo
11:50 mattastrophe joined #mojo
11:52 spoot joined #mojo
11:53 neilhwatson joined #mojo
11:57 sujithm joined #mojo
12:18 cassanova joined #mojo
12:26 d4rkie joined #mojo
12:35 nicomen how can I use a regexp in a route definition nad capture it?
12:40 cpan_mojo Test-Mojo-More 0.05 by Aleksandr Kuznecov - http://metacpan.org/release/COOLMEN/Test-Mojo-More-0.05
13:07 jberger_ joined #mojo
13:08 jberger_ nicomen: does a restrictive place holder work for you?
13:08 nicomen could be, not sure what that means
13:09 jberger_ sri: come back! We miss you!
13:09 maxhq joined #mojo
13:09 nicomen bascailly I wanted something that maps all /\d+ to its respective templates/\d+.html.tt
13:09 jberger_ http://mojolicio.us/perldoc/Mojolicious/Lite#Restrictive_placeholders
13:10 jberger_ On another note
13:10 * jberger_ gets on soapbox
13:11 jberger_ I want to encourage all the core devs and regulars on this channel to re-read the docs, top to bottom
13:12 jberger_ When sri comes back, I really want to lighten his load for basic questions
13:13 jberger_ I want him thinking about process and job queues and new Nonblocking paradigms
13:14 jberger_ Having lots of us who can help with basic questions is really the least we can do
13:16 jberger_ And when the answer really is RTFM, we need to point them to the relevant documentation and ask them nicely if they have read it and do they understand
13:16 nicomen jberger_: might almost consider having a mojo-dev channel perhaps?
13:17 jberger_ Perhaps
13:17 nicomen jberger_: [restrictive placeholder] I think it's hard to get my head around how ::Lite definitions map to full routes (and vice-versa)
13:17 jberger_ There do seem to be two functions of this channel, support and core dev
13:18 nicomen [core-dev] I think it is not about hiding or keeping it closed, just setting an expectation level
13:18 jberger_ Placeholders can be used on the route method or any named routing method (any get etc)
13:19 jberger_ Agreed
13:19 jberger_ But we would have to commit to attending it
13:20 jberger_ even if we get little out of it
13:20 nicomen it complicates thing of course, but I've seen many topic-related channels having a public/private division, on the other hand one of the cool things with mojo is that it is so flat
13:20 jberger_ Well, we could still discuss non core development there
13:20 nicomen but ti doesn't necessarily scale
13:21 jberger_ Or own apps and modules
13:22 jberger_ The thing is that I know it frustrates sri
13:22 nicomen "stupid questions", and "people that don't get it" ;-)
13:23 jberger_ Some hot head joins, asks an easy question which they would understand if they read the docs
13:23 nicomen yup
13:23 nicomen common irc problem
13:24 nicomen but sometimes, these "idiots", if you win them over (with patience and careful guidance), you get a lojal follower for life.... sometimes ;)
13:24 jberger_ Sure
13:24 jberger_ And I think we should help them
13:24 nicomen (but yeah shielding people is good)
13:24 jberger_ As frustrating as it might be
13:25 jberger_ But there are enough of us who can take that hit
13:25 nicomen me too, I'm a sucker
13:27 punter joined #mojo
13:27 jberger_ So let's all re-read the doc, and be ready for the next question
13:28 * jberger_ gets off soapbox
13:29 jberger_ sri: When you get back, I (we?) have got your back
13:43 spoot joined #mojo
13:55 gryphon joined #mojo
13:56 ua_ joined #mojo
13:57 spoot joined #mojo
14:00 btyler joined #mojo
14:15 phips|mac joined #mojo
14:28 rihegher joined #mojo
14:45 cpan_mojo Mojolicious-Plugin-Qooxdoo 0.5 by Tobias Oetiker - http://metacpan.org/release/OETIKER/Mojolicious-Plugin-Qooxdoo-0.5
14:48 spoot joined #mojo
14:51 rihegher left #mojo
14:52 mattastrophe joined #mojo
14:54 Eke|| joined #mojo
14:56 sh4 joined #mojo
14:57 Jim joined #mojo
15:03 mire_ joined #mojo
15:08 denis_boyun_ joined #mojo
15:09 rem_lex joined #mojo
15:20 jack joined #mojo
15:28 sh4 joined #mojo
15:34 Eke- joined #mojo
15:51 sh3 joined #mojo
16:08 spoot joined #mojo
16:19 bluescreen joined #mojo
16:21 abhishekisnot joined #mojo
16:48 jontaylor joined #mojo
16:50 tempire is there a way to catch an inactivity timeout?
16:51 tempire I want to render something before the connection is closed
16:59 nemux tempire: you have a jquery plugin or something like that...
16:59 nemux you have to use
16:59 nemux for example https://github.com/ehynds/jquery-idle-timeout
17:03 ua_ joined #mojo
17:04 disputin joined #mojo
17:07 nemux joined #mojo
17:07 jontaylor I want to be able to extend my Airbrake plugin to capture errors for shell scripts that use the mojolicious $app. Its pretty easy to make sure it appears in the log by wrapping the script in an eval and piping the exception into the error log using $app->log->error($@)
17:08 jontaylor The problem I have is i'm using a Mojo::IOLoop to send the request off 2 seconds later, but the script finishes before it can as far as I can see
17:10 tempire Hmm.
17:10 tempire There doesn't seem to be a way to adjust the query timeout in Mango when using a non-blocking call.
17:26 DaniBunn1 joined #mojo
17:28 DaniBunny left #mojo
17:29 DaniBunny joined #mojo
17:35 hesco what exactly does it mean to register a plugin in Mojolicious?
17:37 batman hesco: My::Plugin->new->register($app, \%config);
17:38 batman that's pretty much what happens when you do $app->plugin('My::Plugin');
17:38 hesco right, I've seen the syntax, but what does that do?
17:39 batman it will allow the plugin to add hooks or helpers to the mojo $app
17:39 hesco seems like I'd want to handle the configuration in scripts/my_app ; right?
17:39 batman the My::Plugin has a method register() which receives the $app object, so it can do -anything- with it
17:41 hesco I'm trying to sort out how to inject a configuration into my application, keyed off an environment variable I can use to switch between dev, uat, prod, etc.
17:45 dod joined #mojo
17:47 jontaylor hesco: $self->plugin('Config', {file => "config/" . $self->mojo_mode . ".conf"});
17:48 jontaylor use the env variable MOJO_MODE to change env
17:48 hesco perfect, thanks jontaylor,
17:48 hesco that was right on time
17:49 spoot_ joined #mojo
17:49 jontaylor it might be ->mode() instead of mojo_mode()
17:49 jontaylor I free typed that, so double check it
17:50 hesco still trying to sort out which file to put it in though
17:50 jontaylor your main application file
17:50 mire_ joined #mojo
17:50 jontaylor in the startup method
17:50 hesco I'm invoking srcipts/my_app, which is handing things off to lib/MyApp.pm
17:50 hesco ah, ok, thanks
17:50 jontaylor then sub startup {} in MyApp.pm :p
17:51 throughnothing joined #mojo
17:56 denis_boyun joined #mojo
18:00 jontaylor I've tracked down my Airbrake plugin bug, it wasn't recording errors in production, because I had accepts => 1 configured for Hypnotoad
18:02 jontaylor I'm not sure how to avoid this bug without doing something really hacky, I could choose not to use the IO Loop for sending the request, or I could put a hack in to increment IOLoop->max_accepts whenever an error occurs
18:07 jontaylor or, perhaps I could hack Hypnotoad or its base class to independently record the number of requests, instead of relying on the IOLoops counter
18:13 denis_boyun_ joined #mojo
18:16 jberger_ jontaylor you need to use a delay and add the delay wait portability logic
18:16 jberger_ Otherwise the command-line doesn't wait on the ioloop
18:17 jontaylor jberger_: thanks, that would solve my command line problem nicely
18:18 spoot joined #mojo
18:18 jontaylor jberger_: but the other hypnotoad problem will persist, if you try and catch exceptions, and send them off using the useragent with a callback (so its async), it wont work if accepts is set to 1, or if you happen to be hitting the very last request a worker will accept
18:19 jontaylor since the max requests seems to just rely on the number of accepters the IOLoop has remaining
18:20 jberger_ Hmm you're beyond my knowledge there
18:20 jontaylor I might be barking up the wrong tree, i'm going to put together a test case
18:20 jberger_ But that doesn't sound right to me
18:42 jontaylor I'm really struggling to work out what the config values for hypnotoad mean, i've constructed a really basic Lite app that just outputs how many times its been hit, and with accepts set at 10, it seems to allow 8 connections before restarting
18:49 jontaylor ahh, up to half the value gets subtracted randomly
18:49 hesco I need to access my config from inside my test suite, where I do not have a $self->app handy.  I can still read the MOJO_MODE from the environment.  Is there some other way of directly accessing the INIConfig plugin?
19:00 cpan_mojo Mojolicious-Plugin-TtRenderer 1.51 by PLICEASE - http://metacpan.org/release/PLICEASE/Mojolicious-Plugin-TtRenderer-1.51
19:15 moritz hesco: do you use Test::Mojo?
19:15 moritz hesco: if yes, $t->app
19:15 hesco I do have that in many of the test scripts, thanks, will try that.
19:15 hesco thanks moritz
19:27 punter joined #mojo
19:40 hesco moritz:  thanks, I had not been aware that was available.  That resolved all but one of the issues with my test suite.  and now everything is running fine again.
19:41 hesco I'm wondering if I can somehow feed the port I run the application on from the config hash as well:  Mojolicious::Commands->start_app('TFC', 'daemon', '-l', 'http://*:8007');
19:57 basiliscos joined #mojo
20:14 lb hesco: untested, but maybe $ENV{MOJO_APP} = "TFC"; my $app = Mojolicious::Commands->new->app; $app->start(qw/daemon -l/, $app->config->{listen});
20:15 hesco thanks lb, will test that out.
20:15 lb based on the very short Mojolicious::Commands::start_app
20:20 dotandimet joined #mojo
20:28 beyondcreed joined #mojo
21:02 spoot joined #mojo
21:18 jberger_ Why are you manually starting the app?
21:18 jberger_ hesco: ^^
21:19 hesco jberger: usually my puppet agent or my ci server starts the app, except in development
21:20 edestler joined #mojo
21:20 hesco I want to put the listen port to bind to into the configuration, chosen from the $ENV{MOJO_MODE}
21:37 Jim joined #mojo
21:43 dotandimet joined #mojo
21:45 mire_ joined #mojo
21:48 Eke- joined #mojo
21:49 meshl joined #mojo
22:04 spoot joined #mojo
22:17 beyondcreed_ joined #mojo
22:22 jberger_ Sorry you caught me at a bad time
22:22 jberger_ Anyway, the test class can start a local copy of the app
22:23 jberger_ Then there's no reason to worry about ports
22:48 spoot joined #mojo
23:03 spoot joined #mojo
23:07 Adurah As abrasive as siri can be here, I do appreciate his work. Wonder when he'll come back...
23:46 sri :o
23:46 sri everyone comment on what I just added
23:46 sri You only have 1 hour
23:46 sri otherwise I'm going to remove it
23:46 sri GO!
23:48 vygr joined #mojo
23:50 freman joined #mojo
23:50 freman hahahahahahaha
23:50 purl LOLCON 7 reached.
23:51 Adurah Oh, he came back.
23:52 jberger I don't see it :o
23:57 freman joined #mojo
23:58 freman mojo dead now?
23:58 freman assholes
23:58 purl assholes is at http://www.gopostal.net/GoPostal.html or at http://www.whitehouse.gov or at http://www.mastercard.com or at http://www.manpages.com/ or http://www.whitehouse.com or no longer at http://goatse.cx or at http://www.bezeqint.net or at http://www.netvision.net.il
23:59 jnbek lol

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