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

IRC log for #mojo, 2016-05-24

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

All times shown according to UTC.

Time Nick Message
00:10 sri jberger: curious
00:19 sri oh, this is clever http://code.saghul.net/index.php/2016/05/24/libuv-internals-the-osx-select2-trick/
00:20 odc joined #mojo
00:20 sri if only we had a decent libuv binding :S
00:47 bpmedley https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Controller.pm#L214 <-- Is it a huge issue to swap lines 214 and 215?
00:48 bpmedley I'd like to call $c->tx->res->to_string in an after_dispatch hook; however, that seems to cause issue with cookies, or somesuch.  I'm not 100% sure what is going on.
00:49 bpmedley https://gist.github.com/brianmed/6a905072d2d1354c9f1ff0bfb1d382ea
00:51 disputin joined #mojo
00:59 jberger bpmedley: we've previously seen this i think
01:00 bpmedley Sorry, I don't recall that..
01:00 jberger You can't change the response after it has been written iirc
01:00 jberger Setting cookies is part of the response
01:01 jberger And you might want to alter the session in the hook
01:01 jberger So I think you might be out of luck
01:01 bpmedley Aha, that make sense.. Any way I can save the response to disk (at least the headers)?
01:02 jberger Why do you need the headers in finalized form?
01:03 jberger What are you trying to achieve?
01:04 bpmedley jberger: I just wanna archive them on disk
01:05 bpmedley I don't mind if I miss the session cookie.
01:09 sri was about to say call ->clone on the repsonse, but we only support that for requests
01:24 bpmedley Not urgent.  I can save the request, which is mostly all I need..
01:26 jberger Are there events to listen to as the response is written?
01:26 jberger I don't know the answer to that off hand
01:31 bpmedley jberger: I'm not seeing anything viable.  Good idea, tho..
01:53 zivester joined #mojo
02:06 disputin joined #mojo
02:09 slobo_ joined #mojo
02:19 disputin joined #mojo
02:26 Gedge joined #mojo
02:26 zivester_ joined #mojo
02:32 zivester__ joined #mojo
02:51 mcsnolte joined #mojo
02:53 noganex joined #mojo
02:55 zivester joined #mojo
03:06 odc joined #mojo
03:10 Gedge_ joined #mojo
04:05 inokenty-w joined #mojo
04:10 Che-quest joined #mojo
04:34 kitsune joined #mojo
05:30 disputin joined #mojo
05:38 VVelox Just looking at sitting down and starting work writing my first application. If I put most of it together as a module and pack the templates into the modules, will the template overrides be read based on the module path or current working directory when it comes to external templates?
06:09 dod joined #mojo
06:14 dod joined #mojo
06:22 Foxcool joined #mojo
06:26 Vandal joined #mojo
07:05 ivi joined #mojo
07:22 trone joined #mojo
07:27 cpan_mojo Mojolicious-Plugin-RenderCGI-0.05 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RenderCGI-0.05
07:29 AndrewIsh joined #mojo
07:32 Grinnz joined #mojo
07:35 Nei left #mojo
07:56 cpan_mojo Mojolicious-Plugin-RenderCGI-0.06 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RenderCGI-0.06
08:01 osfabibisi joined #mojo
08:17 dhg joined #mojo
08:32 cpan_mojo Mojolicious-Plugin-RenderCGI-0.07 by MCHE https://metacpan.org/release/MCHE/Mojolicious-Plugin-RenderCGI-0.07
09:05 dod joined #mojo
09:19 bpmedley VVelox: i believe public overrides embedded templates
09:21 VVelox right, just wondering if that is based off of the current directory, the directory the script is in, or the directory containing the file with the embedded templates... going to be testing that soon most likely though
09:22 VVelox although likely not an issue, was pondering trying to wrap an app up as nearly all a CPAN module, but sort of deciding against it.
09:24 VVelox hmm... actually when it comes to packaging up a mojolicious app, any guides for doing that and publishing to CPAN?
09:25 nic I've never used it, but perhaps take a look at cpanify.pm
09:32 bpmedley VVelox: Sorry, I it's early.  One sec.  http://mojolicious.org/perldoc/Mojolicious/Renderer#paths
09:41 VVelox awesome, thanks, sorry for being such a pain, just learning my way around with it
09:41 bpmedley We love questions and are friendly.
09:42 bpmedley VVelox: http://bmedley.org/mojo.pdf <-- If you have time would you peruse this?
09:43 VVelox also looking at the growing guide, it looks like publishing it as a module should not be a problem... just use build in templates
09:43 VVelox nice, taking a look
09:46 dod joined #mojo
10:58 dvinciguerra joined #mojo
11:43 cpan_mojo Mojolicious-Plugin-StaticLog-0.03 by FRANKC https://metacpan.org/release/FRANKC/Mojolicious-Plugin-StaticLog-0.03
11:46 Vandal joined #mojo
11:58 rabbit joined #mojo
11:59 rabbit I would like to find out what the most common (that is, recommended) web server is to use with Mojolicious and how to configure that.
11:59 rabbit For development, I am using morbo
12:01 pink_mist using hypnotoad as backend server and *any* server that supports proxying to a backend as frontend
12:01 pink_mist nginx and apache come to mind
12:01 pink_mist there are configuration snippets in the Mojolicious Cookbook for both of those options
12:02 bpmedley rabbit: do you need web sockets?
12:02 pink_mist both apache and nginx supports proxying web sockets to hypnotoad, so ...
12:03 bpmedley I see, i just thought nginx did
12:03 rabbit If I want to configure multiple domains, is there some way to do that, equivalent to Apache virtual hosts?
12:03 pink_mist rabbit: yes. use apache as the frontend
12:04 pink_mist lol
12:04 pink_mist there might be other ways, but why not just use apache?
12:04 bpmedley rabbit: you can also use the mount plugin in mojo
12:04 pink_mist again, the cookbook shows you how http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Apache-mod_proxy
12:08 tchaves joined #mojo
12:09 disputin joined #mojo
12:10 zivester joined #mojo
12:47 CW joined #mojo
13:03 futurefaster joined #mojo
13:05 ramortegui joined #mojo
13:11 jberger nginx also does virtual hosts (server directives) or there is toadfarm
13:20 marty joined #mojo
13:21 dotan joined #mojo
13:23 zivester joined #mojo
13:23 kaare joined #mojo
13:41 gryphon joined #mojo
13:44 gizmomathboy joined #mojo
13:59 futurefaster joined #mojo
14:01 sri VVelox: http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Making-your-application-installable
14:06 iamb joined #mojo
14:11 PopeF joined #mojo
14:11 disputin joined #mojo
14:12 disputin joined #mojo
14:13 sri i don't understand this https://github.com/kraih/minion/issues/36
14:13 sri the description is really bad
14:16 sri what does "and if someone already waiting this pid, than waitpid" mean?
14:16 sri unless someone else can clear it up i'll have to close it for bad english i guess
14:19 kaare joined #mojo
14:20 jberger is he just blocking the ioloop with the sleep?
14:25 genio sri: I took a stab at fixing his grammar.  If it's still not making sense, I'd definitely say close it until he can better describe it to you.
14:27 sri your description doesn't appear to match the code
14:28 genio Yea, I think his "waiting for the pid" means his calls to sleep, which seems wrong to me.
14:29 sri ok, i guess nobody gets it then, time to close
14:35 kaare joined #mojo
14:38 rabbit bpmedley: no on web sockets. I do have a question. It is reasonable to pass all static content via Apache, and only pass dynamic through the bank end server (e.g. hypnotoad). To me, that would be very smooth.
14:38 sri joined #mojo
14:40 jberger rabbit: that is a common pattern for reverse proxy
14:44 rabbit to me it would solve a lot of problems, because I'm serving many different virtual hosts, and most of that is static stuff
14:44 vicash rabbit: what jberger said is the recommended way.. nginx/apache serves up static assets and your perl program serves up the dynamic pages
14:45 vicash this way you can leverage the inbuilt caching that nginx/apache implement for serving static assets and it is just faster anyway
14:47 jberger this looks like an interesting nginx solution I hadn't seen before: http://stackoverflow.com/a/15467555/468327
14:47 jberger try_files with a fallback to a named server block that does the proxy
14:48 jberger otherwise you have to do some kind of regexp (or file extension) filter to direct the requests to static content server block or proxy server block
14:49 vicash that is cool
14:49 rabbit jberger, vicash (pink_mist), thanks.
15:00 jberger sri: I was curious about that issue though
15:00 jberger so I tried it
15:00 jberger if you dequeue the job outside of the enqueue event it seems to work
15:01 sri i'm not looking into it anymore
15:02 jberger that's fine
15:08 jberger he responded too, I actually think there is something strange going on here
15:08 jberger the question is, what is reaping the zombie for that job
15:09 cpan_mojo Mojolicious-Plugin-TweetButton-0.0004 by RENEEB https://metacpan.org/release/RENEEB/Mojolicious-Plugin-TweetButton-0.0004
15:21 lluad joined #mojo
15:29 jberger ha! EV is eating it
15:32 dhg joined #mojo
15:33 jberger sri: it may not have bothered you but it bothered me :-P
15:43 jberger Great so you can't trust waitpid in any process that loads EV
15:44 jberger https://metacpan.org/pod/EV#CHILD-WATCHERS---watch-out-for-process-status-changes
15:49 sri ok, that really doesn't bother me
16:03 osfabibisi joined #mojo
16:14 punter joined #mojo
16:25 dantti_laptop|2 joined #mojo
16:30 sri haha, macbook pro rumors are getting crazy
16:31 sri can't imagine an oled touch bar instead of function keys above the keyboard would be nice to use
16:36 jberger thinner at all cost
16:41 sri guess i wouldn't mind a row of configurable oled keys, but a flat touch sensitive display...
16:42 sri heh, lenovo had one of those before http://core0.staticworld.net/images/article/2014/04/lenovocarbonx1_5-100258974-orig.jpg
16:58 disputin joined #mojo
17:02 disputin joined #mojo
17:09 jlaffaye joined #mojo
17:11 jlaffaye I found on internet some references to $Controller->req->json, but I cant find the json sub on the Request object
17:11 sri base class
17:14 abra_ joined #mojo
17:41 dod joined #mojo
17:53 bobkare joined #mojo
18:06 itaipu joined #mojo
18:46 bpmedley jlaffaye: try $c->tx->req->json
18:47 sri bpmedley: why ->tx?
18:49 bpmedley I debated if a newbie should learn the tx object, of if shortcuts are desirable..
18:50 bpmedley I take it you believe the shortcut is better initially?
18:52 sri what is he supposed to learn from your recommendation to use $c->tx->req->json?
18:53 bpmedley Just that tx exists?
18:53 sri and that helps locating the json method how?
18:54 bpmedley Hrm.  Perhaps i mis-read.  One sec.
18:55 bpmedley jlaffaye: Are you visually inspecting code on github or somesuch?
18:59 jberger bpmedley: the important part of the documentation is this here: http://mojolicious.org/perldoc/Mojo/Message/Request#METHODS
19:00 jberger jlaffaye: ^^
19:00 jberger if a class doesn't implement a method but it has a base class, look at it
19:01 bpmedley jberger: I think i mis-read the statement/question..
19:02 kaare joined #mojo
19:57 odc joined #mojo
20:11 jlaffaye jberger: yeah, I dont usually look at all the bases classes. should definitly do that.
20:13 sri definitely
20:13 jlaffaye meh :)
21:08 itaipu joined #mojo
21:14 disputin joined #mojo
21:17 batman joined #mojo
21:18 disputin joined #mojo
21:19 disputin joined #mojo
21:42 disputin joined #mojo
21:43 PryMar56 joined #mojo
21:51 disputin joined #mojo
22:44 absolut_todd joined #mojo
22:59 zivester joined #mojo
23:27 disputin joined #mojo
23:28 disputin joined #mojo
23:34 disputin joined #mojo
23:34 disputin1 joined #mojo
23:37 punter joined #mojo

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