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

IRC log for #mojo, 2017-02-17

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

All times shown according to UTC.

Time Nick Message
00:12 Bloke joined #mojo
00:13 Bloke how do I disable Mojolicious::Plugin::EPRenderer? do I just delete it from ->renderer->handlers->{...} in my plugin?
00:13 Grinnz disable why?
00:14 Grinnz if you don't have .ep templates then it wouldnt be used
00:14 Bloke I have some, but I want my .html.<othercruft> extension to be preferred
00:14 batman joined #mojo
00:14 Grinnz https://metacpan.org/pod/Mojoli​cious::Renderer#default_handler
00:15 Bloke that didn't seem to change it
00:15 Grinnz what are you trying to do that isn't working?
00:16 Bloke Writing a renderer
00:16 Bloke so far I just want it to call my handler
00:17 Grinnz how did you try setting default_handler?
00:17 Bloke in startup
00:17 purl somebody said in startup was MyApp::Model::CDBI::Bookmark loaded?
00:17 Grinnz should be $self->renderer->default_handler('my_handler') in startup, or app->renderer->default_handler('my_handler') in a Lite app
00:18 Bloke umm, yes. that.
00:18 purl hmmm... yes. that is info about a (small) wooden building in the garden
00:20 Grinnz hmm. if you mean you have both some_template.html.ep and some_template.html.other, then yeah that probably won't work right
00:21 Bloke I sure do.
00:21 Grinnz it will choose one based on whichever ends up second in this loop https://metacpan.org/source/SRI/Mojolicio​us-7.26/lib/Mojolicious/Renderer.pm#L187
00:21 Grinnz so don't name them the same
00:21 Grinnz or remove the conflicts
00:21 Bloke my first question was about removing the conflicts ;)
00:21 Grinnz oh wait, no it should add each handler
00:22 Grinnz but it will return the first one https://metacpan.org/source/SRI/Mojolicio​us-7.26/lib/Mojolicious/Renderer.pm#L146
00:22 howitdo joined #mojo
00:22 Grinnz i meant, remove the conflicting files
00:26 Bloke Well, it complains about misisng handlers, and then says nothing was rendered... which seems like what would happen with my renderer
00:27 jberger joined #mojo
00:30 kgoess_ I'm seeing conflicting information about running in the foreground and hot-deployment
00:30 kgoess_ Hypnotoad has to run in foreground (-f switch) so the daemon watcher knows it's still alive. That's why hot deployment isn't enabled.
00:30 kgoess_ https://github.com/kraih/mojo/wiki/Uberspace
00:30 kgoess_ Because we are keeping the manager in the foreground, running hypnotoad manually after an app update for a hot deployment will not break the upstart process - status, stop and restart will all still work correctly
00:30 kgoess_ https://github.com/kraih/mojo/wiki/Upstart
00:32 Bloke Grinnz: is there not supposed to be a way to disable the default renderers?
00:33 kgoess_ not to complain, but I was curious if one of them was more or less true than the other
00:33 Grinnz Bloke: not that i know of
00:34 Grinnz kgoess_: hot deployment is not compatible with running in the foreground, i don't recall the exact reason
00:34 Grinnz but it's because of how it works
00:35 kgoess_ I think because it wants to give the listener socket to a new process
00:35 Grinnz kgoess_: oh, those are quotes from the links, i was confused :)
00:35 kgoess_ sorry, yeah, should have quoted them
00:36 Grinnz kgoess_: if you have systemd, the end of https://metacpan.org/pod/Mojolic​ious::Guides::Cookbook#Hypnotoad contains a unit file that will correctly monitor hypnotoad through hot deployments
00:36 Grinnz (as long as you are using a recent enough Mojolicious)
00:37 Grinnz the changes to make that work should also make it behave better for other watchers, hopefully
00:37 kgoess_ cool, I'll read that, thanks
00:38 Grinnz the Type=forking is what tells systemd that hypnotoad backgrounds itself
00:38 Grinnz so that it can keep track of the process properly
00:39 Grinnz if other watchers don't have an option like that, then it'll be more difficult
00:40 aborazmeh joined #mojo
00:42 kgoess_ ship it jz
00:42 kgoess mischan
02:02 sugar joined #mojo
03:00 coolo joined #mojo
03:00 foursixnine joined #mojo
03:01 asthman joined #mojo
03:20 Trelane joined #mojo
03:22 Trelane So I'm reading the documentation for url_for here: https://metacpan.org/pod/Moj​olicious::Controller#url_for
03:22 Trelane my $url = $c->url_for('test', {name => 'sebastian'});
03:22 Trelane So does this mean I can pass a second argument to url_for to get the url for a named route with get parameters?
03:23 Trelane ...because it doesn't seem to be working for me
03:32 jberger Not for get parameters
03:32 jberger Placeholder values
03:32 jberger For get parameters you can just use the Mojo::URL methods to add them
03:34 noganex_ joined #mojo
03:35 Trelane Hmm.  That should be documented.
03:35 Trelane to the editor!
04:31 PopeFelix joined #mojo
04:48 sh14 joined #mojo
05:04 dboehmer_ joined #mojo
05:05 coolo joined #mojo
05:05 foursixnine joined #mojo
06:30 blumbi joined #mojo
06:31 dod joined #mojo
06:55 Vandal joined #mojo
07:00 dod joined #mojo
07:02 dod joined #mojo
07:04 dod joined #mojo
07:10 Crisewng joined #mojo
08:25 trone joined #mojo
08:36 AndrewIsh joined #mojo
08:36 sri not considering this a bug https://github.com/kraih/mojo/issues/1059
08:38 marcus no child left behind!
08:50 rshadow joined #mojo
08:51 foursixnine joined #mojo
08:59 trone joined #mojo
09:34 coolo joined #mojo
09:37 sugar joined #mojo
09:41 sri -.-
09:42 sri i mean, could we send a kill -9 on destruction?
09:43 sri it's a bit of a philosophical discussion though
09:45 sri leaving it open, in case someone here cares and wants to propose something https://github.com/kraih/mojo/issues/1059
10:05 someguy joined #mojo
10:06 someguy I'm trying to find an example of a streaming template plugin (that is, one that controls when things are flushed / generated), can anyone point me in the right direction?
10:07 someguy maybe i'm just missing a bit in the pod some place.
10:28 andrew_ joined #mojo
10:35 irqq joined #mojo
10:46 rshadow joined #mojo
11:11 dhg joined #mojo
11:18 tchaves joined #mojo
11:25 coolo joined #mojo
11:39 sugar joined #mojo
12:08 sugar joined #mojo
12:20 itaipu joined #mojo
12:28 blonewolfs joined #mojo
13:12 dantti_laptop joined #mojo
13:16 sugar joined #mojo
13:48 itaipu joined #mojo
14:18 gizmomathboy joined #mojo
14:30 blonewolfs joined #mojo
14:34 dhg joined #mojo
14:35 sugar joined #mojo
14:36 kes joined #mojo
14:40 rshadow joined #mojo
14:40 kes How better pass to &auth function required user level for target route?
14:40 kes http://paste.scsys.co.uk/553222
14:45 jabberwok re #1058: The Routing guide mentions ::Lite as a domain-specific language, but that term is not used or defined in the ::Lite pod; instead "micro framework" is used. How about a sentence in ::Lite's DESCRIPTION to tie that together?
14:50 kes I have found. I should use $c->match->stack
14:51 jabberwok Lite is a bit more than a micro framework, since it has the templating engine; and not really a DSL, being actually syntactic sugar over ordinary Perl.  Hmm
14:53 Ryoga joined #mojo
15:07 sri marcus++ # first post on our new blog https://twitter.com/kraih/​status/832607042556792832
15:17 rshadow joined #mojo
15:19 sh14 joined #mojo
15:26 stryx` joined #mojo
15:28 itaipu joined #mojo
15:36 foursixnine joined #mojo
15:42 stryx` joined #mojo
16:17 dhg joined #mojo
16:32 Dandre Hello,
16:32 Dandre I don't know where to ask mys question so sorry if it is rather off topic
16:32 Dandre I am using mojolicious, and a perl template renderer to show a list of items. This list is quite big so I want to show only the fist items but I'd like to dynamically grow this list while the user scrolls down.
16:32 Dandre How cold I do that?
16:33 spicyjack javascript
16:33 purl i guess javascript is a language built entirely out of umbrellas or for people not from Oregon or hard to freakin' test properly or a symlink to broken or testbed at http://jsfiddle.net or http://666.is/link/5932 or a dynamic computer programming language
16:35 jberger Dandre you want to look for javascript infinite scroll libraries
16:35 jberger I don't know which one is recommended these days
16:35 jberger but the idea is that background ajax calls are made to add content to the bottom of the page
16:35 jberger triggered by scrolling
16:37 batman Dandre: du you use jquery or some other "framework"?
16:37 batman *do
16:42 Dandre Yes I use jquery
16:44 Ryoga joined #mojo
16:47 kes It is not obvious that route name should be last argument. It is documented in source code but not mentioned in DOC
16:48 kes This did not work: $r->any( '/test', 'route_name', { action => 'xxx' } )
16:48 Dandre I have found jscroll for jquery, I will try it
16:49 kes Please add corresponding NOTE into the DOC: http://mojolicious.org/perldoc​/Mojolicious/Routes/Route#any
16:52 kes batman: ^
16:53 jberger kes: (although now you've left) yes, it is documented, at the link you posted
16:54 jberger not sure why you highlighted a random core member, nor why you gripe then part
16:54 batman Dandre: https://ssl.thorsen.pm/paste/cb5866fcb305 <-- you could have a look at this
16:54 batman i extracted that code from convos...
16:55 batman I wonder what kes meant...
16:55 Dandre ok
17:06 blonewolfs joined #mojo
17:12 blonewolfs joined #mojo
17:13 disputin joined #mojo
17:14 itaipu joined #mojo
17:16 howitdo joined #mojo
17:17 Grinnz oh https://github.com/kraih/mojo-pg/pull/39 is a good idea, i didn't realize SQL::Abstract didn't default to this option
17:20 rshadow joined #mojo
17:24 PryMar56 joined #mojo
17:25 dave Dandre: you might also look at "occlusion scrolling"...it may or may not be what you want but it's worth a look
17:37 sugar joined #mojo
17:57 stryx` joined #mojo
18:00 good_news_everyon joined #mojo
18:00 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vDQTY
18:00 good_news_everyon mojo/master e0a149d Sebastian Riedel: add a GROWING section to Mojolicious::Lite
18:00 good_news_everyon left #mojo
18:01 sri http://mojolicious.org/perld​oc/Mojolicious/Lite#GROWING
18:01 sri also emphasizing the point that Mojolicious::Lite is a DSL
18:06 dod joined #mojo
18:06 rshadow joined #mojo
18:06 good_news_everyon joined #mojo
18:06 good_news_everyon [mojo] kraih pushed 2 new commits to master: https://git.io/vDQkf
18:06 good_news_everyon mojo/master 13df2af Lee Johnson: document that around_action can be called more than once...
18:06 good_news_everyon mojo/master 9cb0485 Sebastian Riedel: Merge pull request #1056 from leejo/leejo/around_action_called_more_than_once...
18:06 good_news_everyon left #mojo
18:08 good_news_everyon joined #mojo
18:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vDQk8
18:08 good_news_everyon mojo/master 504b09e Sebastian Riedel: nested routes are the only reason
18:08 good_news_everyon left #mojo
18:10 jabberwok excellent
18:13 rshadow joined #mojo
18:15 sri still don't know what to make of this https://github.com/kraih/mojo/issues/1059
18:17 itaipu joined #mojo
18:17 jberger my first question is, shouldn't they die?
18:18 jberger I guess I don't understand processes well enough
18:18 jberger I guess if they did then double-forking wouldn't work, right?
18:19 sri no, they don't die
18:21 sri this makes tests fail btw. :) https://gist.github.com/anonymous​/35ea6d9b1fb709fea7dcca8fd349168d
18:21 jberger IMO, if the forks behave as fork in perl normally do, then I think its a "won't fix"
18:22 kgoess that's apropos of a question I was just about to ask--is there any benefit to running hypnotoad under Server::Starter or daemontools or one of those?
18:27 dod joined #mojo
18:36 sugar joined #mojo
18:38 rshadow joined #mojo
18:43 jberger joined #mojo
19:01 sugar joined #mojo
19:10 stryx` joined #mojo
19:11 jberger kgoess I personally don't
19:11 jberger and I haven't had a problem yet
19:11 jberger but I'm probably not the best one to answer on the topic of deployment
19:11 * kgoess nods
19:13 irqq joined #mojo
19:13 marty joined #mojo
19:14 lluad kgoess: Hypnotoad is good at doing hot updates. Dunno if running it under a process watcher would break that.
19:14 kgoess it can break it--it looks like most/many of them would require hypnotoad to run in the foreground
19:17 msestak joined #mojo
19:20 msestak joined #mojo
19:30 Grinnz systemd manages it fine
19:33 msestak joined #mojo
19:53 zach what's the default log level for hypnotoad?
19:55 sugar joined #mojo
19:56 Grinnz https://metacpan.org/pod/Mojolicious#log
19:57 Grinnz hypnotoad's mode defaults to production, so unless you've set the mode, info
20:08 Pyritic joined #mojo
20:09 zach ugh, I missed that one Grinnz , I was looking in hypnotoad stuff. I think the hypnotoad and morbo notes should mention that one sentence as well
20:09 zach thanks though
20:15 orev joined #mojo
20:38 rshadow joined #mojo
21:14 dikim joined #mojo
21:25 rloveland joined #mojo

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