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

IRC log for #mojo, 2014-05-16

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

All times shown according to UTC.

Time Nick Message
00:11 btyler joined #mojo
00:37 laouji joined #mojo
00:42 gregf joined #mojo
00:43 shmuel joined #mojo
01:00 xmerlin joined #mojo
01:13 klapperl_ joined #mojo
01:28 laouji joined #mojo
01:28 laouji joined #mojo
01:31 D4RK-PH0ENiX joined #mojo
01:34 good_news_everyon joined #mojo
01:34 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/_lgu1w
01:34 good_news_everyon mojo/master a58c184 Sebastian Riedel: simplify how Morbo checks for file changes
01:34 good_news_everyon left #mojo
01:35 good_news_everyon joined #mojo
01:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Yjq2Xg
01:35 good_news_everyon mojo/master 55895d3 Sebastian Riedel: mention when Morbo is restarting
01:35 good_news_everyon left #mojo
01:45 fhelmber_ joined #mojo
01:53 hrupp joined #mojo
01:56 good_news_everyon joined #mojo
01:56 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/yI30QQ
01:56 good_news_everyon mojo/master fd2e74f Sebastian Riedel: renamed check_files method to check
01:56 good_news_everyon left #mojo
01:56 Su-Shee_ joined #mojo
01:59 d4rkie_ joined #mojo
02:08 good_news_everyon joined #mojo
02:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/TjY3OA
02:08 good_news_everyon mojo/master 3fe6d20 Sebastian Riedel: mention that command line arguments are passed through
02:08 good_news_everyon left #mojo
02:56 d4rkie joined #mojo
02:57 ashleydev joined #mojo
03:25 good_news_everyon joined #mojo
03:25 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/_RFijw
03:25 good_news_everyon mojo/master 831ad37 Sebastian Riedel: updated jQuery to version 2.1.1
03:25 good_news_everyon left #mojo
03:37 hrupp joined #mojo
03:48 gregf_ joined #mojo
03:50 panshin joined #mojo
03:58 basic6_ joined #mojo
04:07 abhishekisnot1 joined #mojo
04:13 zivester joined #mojo
04:29 ryanc joined #mojo
04:32 ryanc joined #mojo
04:42 wolf_ joined #mojo
05:09 laouji joined #mojo
05:15 wolf_ joined #mojo
05:22 laouji joined #mojo
05:26 denis_boyun joined #mojo
05:46 fhelmber_ joined #mojo
05:54 laouji joined #mojo
06:10 Eke- joined #mojo
06:19 Negor joined #mojo
06:19 d4rkie_ joined #mojo
06:20 Lee joined #mojo
06:33 dod joined #mojo
06:37 dexteruk joined #mojo
06:41 babl joined #mojo
06:45 Vandal joined #mojo
06:47 igorsutton joined #mojo
06:52 basiliscos joined #mojo
07:01 shmuel joined #mojo
07:15 eseyman joined #mojo
07:15 igorsutton any emacs users here that write mojo lite apps?
07:16 igorsutton i wonder how you deal with the crappy indentation you get with inline templates
07:17 mishantil igorsutton: I use emacs. Do you mean indentation of the finished html, or just in the template files?
07:17 igorsutton i mean, emacs tries to indent the html bits as perl code
07:17 igorsutton i know it is weird, but that gets into my nerves
07:18 igorsutton in the template files
07:18 mishantil I had some attempts at using multi-web-mode to be in html-mode outside <% %> and be in cperl-mode inside <% %>
07:18 igorsutton I wish cperl-mode wasn't that smart and just allowed me to indent myself.
07:19 mishantil So if I had a multi line <% %> block then indentation would only be semi-retarded
07:19 igorsutton I mean, inline as in the @@ template.html.ep section
07:19 mishantil Ah!
07:20 mishantil You could use multi-web-mode for that
07:20 mishantil In mwm you define a regex that defines the blocks that can separate multiple modes, and mwm switches for you.
07:21 mishantil so you could switch to json mode if you were inside @@ foo.json.ep  or html mode if you were inside @@ foo.html.ep
07:24 igorsutton Error in post-command-hook (mweb-post-command-hook): (wrong-type-argument stringp nil)
07:25 igorsutton oh well
07:25 igorsutton i'll look into it another time
07:31 igorsutton eh, web-mode works with mojo templates
07:34 igorsutton but not inline
07:35 denis_boyun joined #mojo
07:38 igorsutton mishantil: web-mode works nicely with mojolicious templates
07:47 d4rkie joined #mojo
07:54 trone joined #mojo
07:55 fhelmber_ joined #mojo
07:59 maxhq joined #mojo
08:04 arthas joined #mojo
08:06 cmihai joined #mojo
08:34 Caldrin joined #mojo
08:34 Caldrin Hi!
08:35 Caldrin I use Mojolicious::Lite to build a web API. The code in question is similar to https://github.com/tapper/Tapper-MCP-MessageReceiver/blob/master/bin/tapper-mcp-messagereceiver
08:36 Caldrin Now I want one of these functions to have 'JSON' be the default renderer. All others should stay with the default of HTML.
08:36 xmerlin joined #mojo
08:37 Caldrin Is there anything similar to  $self->app->renderer->default_format('json'); that only applies to one function?
08:37 Caldrin Is there any other way I could achieve my goal?
08:38 dabudabu Well, you could end that function with something like return $self->render(json => ...)
08:38 dabudabu Unless I'm missing something?
08:41 Caldrin dabudabu: One function (testrun-start) responds to both 'json' and 'any'. I need both because the 'any' answer is human readable. The 'json' answer needs to be the default if the user does not explicitly request a format (for historic reasons)
08:43 Caldrin So I have a $self->respond_to(json => {..}, any => {..}); I need to make sure json is used when nothing is specified.
08:43 Caldrin Does that explanation make sense to you?
08:50 cmihai joined #mojo
08:51 arthas joined #mojo
08:54 dabudabu The documentation says: "The best possible representation will be automatically selected from the Accept request header, format stash value or format GET/POST parameter and stored in the format stash value."
08:55 dabudabu So you'll have to set the format stash value I suppose. Dunno if that helps.
08:56 dabudabu Also I've never used respond_to
08:56 Caldrin Yes, I know. As I said, historic reasons. My API is called by tools that do not set this header :-(
08:57 Caldrin I have no control over these tools and can not change them.
08:58 Caldrin Well, one does not set it at all, the other (wget) sets Content-Type: application/x-www-form-urlencoded
08:59 Caldrin dabudabu: I thank you for your help.
09:00 dabudabu If you ever feel like getting useless help again, just give me a ring
09:01 Caldrin Well, getting a friendly answer that does actually help is far better than getting no answer at all. I appreciate your effort.
09:02 dabudabu Depends. Maybe someone more competent would have answered if I hadn't butted in.
09:07 panshin joined #mojo
09:13 d4rkie joined #mojo
09:14 Caldrin :-D
09:15 Caldrin More competent people, you can answer now ;-)
09:29 nic Caldrin: Doesn't it work to simply do "->render(format => 'json', ...)" ?
09:30 nic I mean, I haven't read back, and haven't checked the docs, but while rushing past thought I'd check if you've tried that :)
09:31 nic oh, you want to support the req overriding that with other formats
09:32 * nic leaves it to more competent people
09:35 nic ->stash->{format} //= 'json' ?
09:35 denis_boyun joined #mojo
09:36 meshl joined #mojo
09:36 mishantil Morbo watches inot changes when looking for when to reload?
09:50 panshin joined #mojo
09:56 panshin joined #mojo
10:02 panshin joined #mojo
10:06 neyasov_ joined #mojo
10:18 zrusilla joined #mojo
10:26 panshin joined #mojo
10:34 zrusilla Hi!
10:36 mishantil Hi
10:37 zrusilla first foray into the channel.  I have a question...
10:37 zrusilla ...Am wondering if I am thinking about my problem wrong, and would appreciate feedback
10:37 zrusilla are you game?
10:39 firnsy zrusilla: enough with the foreplay
10:39 zrusilla I am porting an existing app to Mojo
10:40 zrusilla It involves managing a pool of Firefoxes configured with the extensions Firebug and either PageSpeed, YSlow or Netexport
10:40 zrusilla The app puts a webservice front end on a request for a front end performance analysis using one of these tools
10:41 zrusilla Accomplishing this involves starting a Firefox with MozRepl (omitted important detail)
10:42 zrusilla connecting to it via telnet, loading via JS command, and awaiting the output via HTTP post
10:42 zrusilla I have one controller to handle the user request, and another to accept the output from Firefox, and need to synchronize the two.
10:43 zrusilla I am not sure how to do that, or if that's the way I should be thinking of it the problem
10:43 ver joined #mojo
10:52 * batman <3 delay
10:54 zrusilla yep, was looking at delay.  wondering about using it to coordinate two different controllers though
10:55 * batman never coordinate two controllers
10:55 zrusilla I'm thinking subclassing Mojo::Transaction and using delay on that is the better idea
10:55 zrusilla ?
10:56 batman what? do you want to make your controller a subclass of Mojo::Transaction??
10:56 zrusilla Oh no no.
10:56 zrusilla Subclassing Mojo::Transaction to handle the Firefox part: load URL/get output
10:57 * batman can't help you
10:57 onur joined #mojo
10:57 zrusilla OK. Thank you anyway for your time
10:58 sugar__ joined #mojo
11:13 onur hi, how can I print 'checked' in template if checkbox is checked on request? I tried <% print 'checked' if param 'my_checkbox'; %> But didn't worked
11:20 stephan48 Caldrin: please try ->to('controller#method', { format => 'json' }) in your route definition. i did not test that but i have a feeling that it might work
11:21 batman onur: %= "this will be 'printed'"
11:21 batman onur: there's no print() in mojolicous. that's probably CGI.pm stuff...
11:21 batman <%= param('my_checkbox') ? 'CHECKED' : 'NOPE' %>
11:25 onur it doesn't print anything, neither 'CHECKED' nor 'NOPE'
11:26 stephan48 you made sure that you included the "=" after "<%"?
11:26 onur yes
11:28 onur <% if (param 'server_httpd') { %>checked<% } %> is worked but I am not sure its best way to do this
11:28 onur your solution is much better but it doesn't work
11:34 neilhwatson joined #mojo
11:46 batman onur: it works.
11:46 batman you're not telling us the whole truth. use a pastebin if you want to tell us more about the template
11:46 batman http://p.thorsen.pm
11:46 batman pastebin?
11:46 purl pastebin is probably see nopaste. or see shadowpaste
11:49 onur ok I will let me use your code again
11:50 onur wth I was using without parentheses param 'my_checkbox' ? ...
11:50 onur it worked with parantheses
11:56 waltman joined #mojo
12:02 Caldrin stephan48: Unfortunatelly, I don't have a ->to route definition. Mojolicious::Lite takes care of this for me.
12:12 igorsutton why the behavior of Mojo::Collection 'c' from the "controller" iis different than at the template?
12:12 bluescreen joined #mojo
12:14 igorsutton never mind, was being stupid
12:26 sri \o\
12:26 sri /o/
12:27 lb chewie, we have two tie fighters on our six
12:28 * moritz fires
12:28 sri RRRRRRRRAAAAAAAAAHHHHHHHHH
12:34 cmihai joined #mojo
13:07 neyasov__ joined #mojo
13:08 zivester joined #mojo
13:52 asarch joined #mojo
13:55 btyler joined #mojo
14:08 sh4 joined #mojo
14:20 dotandimet joined #mojo
14:24 gryphon joined #mojo
14:29 babl_ joined #mojo
14:32 dotandimet joined #mojo
14:42 irq joined #mojo
14:51 dotandimet joined #mojo
14:59 igorsutton joined #mojo
15:07 neyasov___ joined #mojo
15:12 davido_ joined #mojo
15:12 genio joined #mojo
15:15 rem_lex| joined #mojo
15:21 tianon joined #mojo
15:21 tianon joined #mojo
15:22 cpan_mojo Mojolicious-Plugin-Args 0.05 by AMIRITE - http://metacpan.org/release/AMIRITE/Mojolicious-Plugin-Args-0.05
15:22 cpan_mojo Mojolicious-Plugin-Nour-Config 0.09 by AMIRITE - http://metacpan.org/release/AMIRITE/Mojolicious-Plugin-Nour-Config-0.09
15:22 cpan_mojo Mojolicious-Plugin-PDFRenderer 0.08 by AMIRITE - http://metacpan.org/release/AMIRITE/Mojolicious-Plugin-PDFRenderer-0.08
15:36 d4rkie joined #mojo
15:36 dotandimet joined #mojo
15:42 tianon joined #mojo
15:52 tianon joined #mojo
15:56 neilhwatson Using mojo::command, should I be able call another sub, from inside run(), when the sub is in the same pm file?  My sub call seems to be ignored in testing.
15:58 tianon joined #mojo
16:03 beyondcreed joined #mojo
16:08 neyasov___ joined #mojo
16:13 denis_boyun joined #mojo
16:18 dotandimet joined #mojo
16:33 sri oooooh... i want this for atom! http://blogs.perl.org/users/ovid/2014/05/automatic-variable-highlighting-in-vim.html
16:34 tempire sweet
16:35 neilhwatson cool
16:36 zrusilla left #mojo
16:38 disputin joined #mojo
17:00 dotandimet joined #mojo
17:05 cosimo joined #mojo
17:09 basiliscos Hi! It seems I've found an bug: http://bpaste.net/show/281154/ ?
17:10 basiliscos in some of previous version it worked as expected, while on v4.99 it behaves wrong.
17:14 ua left #mojo
17:25 dotandimet joined #mojo
17:28 dod joined #mojo
17:33 sri basiliscos: where is that documented?
17:36 basiliscos Well, ->query(a => [2, 3]); seems to be very similar to ->query([a => [2, 3]]), the documented difference is that 1st form replaces, while the 2nd merges.
17:36 sri so it's not documented
17:36 sri then it can't be a bug
17:37 basiliscos It seems strange, that merge form could accept different form of values.
17:37 sri that's a whole different issue, you're welcome to propose it as a feature
17:38 basiliscos ok, I agree. Seems you are right
17:39 zrusilla joined #mojo
17:40 disputin joined #mojo
17:43 zrusilla1 joined #mojo
17:43 Eke- joined #mojo
17:47 voegelas joined #mojo
17:51 dod joined #mojo
17:52 D4RK-PH0ENiX joined #mojo
17:54 tempire hmm
17:54 tempire atom is looking pretty nice
17:54 tempire especially after looking at the mojolicious syntax highlighting
17:54 tempire so easy
18:04 mishantil tempire: How does it do generally on perl-highlighting?
18:04 tempire I've only used it a time or 2
18:04 sri same as sublime and textmate
18:04 tempire but it seems fine
18:04 tempire sri uses it full time, I believe
18:06 sri i do
18:07 tempire Ovids latest vim-related blog post is fantastic
18:08 good_news_everyon joined #mojo
18:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/CUdXZg
18:08 good_news_everyon mojo/master 2f52d22 Sebastian Riedel: improved Mojo::Parameters to consistently accept arrays
18:08 good_news_everyon left #mojo
18:08 sri basiliscos: feature request accepted :)
18:09 sri fun fact, Mojolicious::Controller::param already did accept it, but it was undocumented
18:09 basiliscos sri: Very well! Thank you!
18:19 irq joined #mojo
18:27 mport left #mojo
18:29 hummeleBop joined #mojo
18:39 sri would be great if atom highlighting worked on websites too... then we could replace prettify.js with it in mojolicious :)
18:55 zrusilla joined #mojo
18:59 punter joined #mojo
19:07 trone joined #mojo
19:22 irq joined #mojo
19:37 genio cpan-outdated -p | findstr /V /I mysql | cpanm
19:37 genio oops.  wrong window
19:56 zrusilla joined #mojo
19:57 Kulag joined #mojo
19:58 genio sheesh Windows is slow with cpan-outdated and cpanm
20:11 * tempire totes forgot about cpan-outdated
20:12 fhelmber_ joined #mojo
20:16 cpan_mojo Mojolicious-Plugin-AppCacheManifest 0.02 by Simon Bertrang - http://metacpan.org/release/JANUS/Mojolicious-Plugin-AppCacheManifest-0.02
20:27 dotandimet joined #mojo
20:31 alnewkirk joined #mojo
20:44 disputin joined #mojo
21:07 * sri does "cpan-outdated | cpanm" all the time
21:24 jwang joined #mojo
21:24 Eke- joined #mojo
21:27 meshl joined #mojo
21:30 zrusilla joined #mojo
21:43 dotandimet joined #mojo
21:47 zrusilla joined #mojo
22:28 onur joined #mojo
22:47 yko joined #mojo
22:55 LordVorp joined #mojo
23:09 zrusilla left #mojo
23:18 bluescreen joined #mojo
23:23 sugar joined #mojo

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