Camelia, the Perl 6 bug

IRC log for #mojo, 2013-07-13

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

All times shown according to UTC.

Time Nick Message
00:16 jberger joined #mojo
00:17 * jberger returns
00:17 jberger hi all
00:17 jberger its been a long few days, is there anything worth going back and reading the log for?
00:46 jnbek joined #mojo
00:56 cooper joined #mojo
01:01 perlite joined #mojo
02:24 tba joined #mojo
03:21 TitanOfOld joined #mojo
03:37 cooper joined #mojo
03:51 preflex_ joined #mojo
05:25 d4rkie joined #mojo
05:49 Britzel joined #mojo
06:03 cooper joined #mojo
06:38 Vandal joined #mojo
07:08 dotandimet joined #mojo
07:39 ask joined #mojo
07:42 D4RK-PH0ENiX joined #mojo
07:53 Vandal is it normal for hypnotoad to consume 3-4% of cpu without any load?
07:58 dotandimet joined #mojo
08:11 d4rkie joined #mojo
08:12 d4rkie joined #mojo
08:18 mrphilov joined #mojo
08:23 dod joined #mojo
08:42 ilbot2 joined #mojo
08:42 Topic for #mojo is now ūüé©, indubitably | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
08:51 dod joined #mojo
09:30 dp_ joined #mojo
09:32 dotandimet joined #mojo
09:55 basiliscos joined #mojo
10:12 dotandimet joined #mojo
10:12 nic Vandal: It depends what trade-off you choose
10:12 Vandal nic, what is trade-off?
10:12 nic You can go for higher responsiveness, higher load
10:13 nic or the opposite
10:13 Vandal I don't go anywhere
10:13 Vandal I just deployed it acording docs
10:15 Vandal I've just deployed it according to docs
10:17 nic http://mojolicio.us/perldoc/Mojo/‚ÄčServer/Hypnotoad#accept_interval
10:17 nic those docs?  :)
10:18 Vandal nope
10:18 Vandal wiki
10:18 trone joined #mojo
10:18 Vandal thak you, I'll try it
10:34 bowtie_ joined #mojo
11:43 russum joined #mojo
11:44 russum left #mojo
12:04 dotandimet joined #mojo
12:19 met joined #mojo
12:26 mrphilov joined #mojo
12:33 met is this channel open to silly questions, or just for mojo development? :)
12:34 met silly as in noob, not off-topic..
12:59 bc547 met: sure
12:59 met good! :)
12:59 met so.. i have a base controller where i placed some common code / actions
13:00 met and i would also like to provide some fallback templates in case any inheritors don't have one
13:00 russum joined #mojo
13:00 met but setting the template on the stack would prevent using the controller template, right?
13:00 russum left #mojo
13:00 met i guess my question would be what am i doing wrong :)
13:01 met btw, that is on a plugin.. so i reuse that on a few small personal sites
13:01 met a mini crud that just provides a shortcut and that base controller with a basic crud
13:03 met actually, is providing a base controller in a plugin a good idea?
13:25 asarch joined #mojo
13:46 marty met:  You might need to distill your question down to a simple pastie example so people can understand what you are trying to achieve.
13:46 marty btw, have you found the online documentation?  it's good stuff
13:49 marty met: the core helpers are great examples of how to write plugins. ¬† ¬† http://mojolicio.us/perldoc/M‚Äčojolicious/Plugin/TagHelpers
13:49 met yes, yes, i've been using mojolicious for a while :)
13:52 met i'll try to put together small example of what i'm trying to do in that plugin.. :/
13:59 basiliscos joined #mojo
13:59 dotandimet joined #mojo
14:03 met http://pastebin.com/MfajERnS
14:04 met doh, with routes->add_shortcut instead of just ->shortcut, amongst other mistakes, i guess :P
14:06 met in the controller there it doesn't render anything, but just populates the stack, with field definitions, and actual values, dbic lists, etc.
14:06 moltar joined #mojo
14:07 met on my side projects i then just provide the templates i really need to tune, sometimes overriding the action template, sometimes a form template, sometimes a single field template
14:07 met just an overcomplicated pile of crap that works for what i needed :/
14:11 hrupp_ joined #mojo
14:27 BeDa joined #mojo
14:31 sri met: set the default template in the stash with the route?
14:33 sri Vandal: no, newer versions of mojolicious (4.x) use pretty much no resources when idle
14:34 * sri is back from a quick trip to the netherlands
14:35 Vandal sri, thank you
14:35 tom joined #mojo
14:36 dvinciguerra joined #mojo
14:37 met i do that, yep, but if i set the template on the stash, then the default template for the inheriting controller is not used unless i manually call render passing the template, right?
14:38 met (other than stash(template => 'blah') complains on the logs unless i use stash->{template} = ..., that's why i think i am trying to do something wrong)
14:38 sri whatever goes through that route gets the same stash values
14:39 sri do you mean entirely new (user generated routes) routes, with a controller class inheriting from your controller class?
14:39 sri s/routes//
14:40 sri yea, marty is right, you need to explain it better
14:40 met on the application, i just have controllers inheriting the base one on the plugin, and providing some overrides of the shortcut actions and some new actions
14:44 met for the templates.. the default that comes in the base controller is good enough in some places, otherwise i can override the whole action template the regular way, but i need to explicitly call render( template => 'inheritingcontroller/action' ), or the 'template' value the plugin set on the stash overrides it
14:45 met sorry if i can't explain myself better :)
14:48 met would it make sense for a plugin to provide some sort of default template names to try, on top of the default logic on Renderer->_generate_template ?
15:07 russum joined #mojo
15:08 russum left #mojo
15:10 dotandimet joined #mojo
15:22 dod joined #mojo
15:31 dr joined #mojo
16:11 dotandimet joined #mojo
16:44 dotandimet joined #mojo
17:03 marcus_ woot, docker getting better web socket support - https://github.com/dotcloud/docker/‚Äčpull/1146#ref-pullrequest-16657837
17:04 marcus_ and with this, we get web consoles for everybody \o/ https://github.com/ehazlett/shipyard/pull/9
17:05 marcus_ Along with UDP support, docker is starting to get really good.
17:05 sri :o
17:22 tom joined #mojo
17:37 d4rkie joined #mojo
17:40 crab marcus: what is docker?
17:41 crab s/.$/ good for?/
17:43 tom joined #mojo
17:48 dotandimet1 joined #mojo
17:57 mst crab: think of it as the sweet spot between a chroot and a VM
17:58 mst crab: or think of it as 'a nice set of tools around the linux container API, which is approximately linux' answer to solaris zones'
17:59 crab so a nice little sandbox? ok, thanks. that helps.
18:00 sri crab: shut up and watch the video! http://www.docker.io
18:00 sri it managed to convince me instantly :)
18:11 crab that's pretty neat.
18:11 crab not sure i can think of a use for it myself, but it's pretty neat.
18:12 sri cloud stuff
18:23 whump joined #mojo
18:46 preflex_ joined #mojo
19:08 BeDa joined #mojo
19:29 marcus_ I've set up a new xen box with 18 xeon cores 60 gb ram, and docker inside a domain on the xen host.
20:27 moltar joined #mojo
20:29 asarch joined #mojo
20:47 rem_lex| joined #mojo
21:54 Moataz-E guys, i want to dynamically modify a form such that certain fields are shown depending on the value of the first select field?
21:54 Moataz-E how can this be achieved with mojo?
21:56 tba just been investigating the blocking problem I found a few days ago which breaks the event loop example in the docs (http://mojolicio.us/perldoc/Mojoli‚Äčcious/Guides/Cookbook#Event_loops)
21:57 tba turns out its a browser issue not a mojo event loop bug, browsers can't asynchronously make multiple requests to the same URL, so any attempt to prove that event loop thing using a browser fails
21:57 tba (browsers lock the cache for that URL, blocking any further requests)
21:58 tba is it worth it being mentioned in the docs? its cost me a few days working out why the example didnt work
22:00 sri tba: mention what exactly?
22:01 tba sri: if you try the event loop example from the docs, and open two tabs in a browser, then refresh them both at the same time, it appears that the event loop gets stuck
22:02 tba eventually discovered that only happens if both URLs are the same (see https://gist.github.com/ian-kent/5973339)
22:02 tba but it turns out to be a browser issue, that you cant load the same URL more than once simultaneously
22:03 tba (which appears to affect most browsers)
22:04 sri any links?
22:04 tba finally realised when I wrote this (https://gist.github.com/ian-kent/5992399) and it worked, thought to try multiple browsers and it was ok
22:04 tba havent looked too hard, but found http://stackoverflow.com/questions/9189‚Äč591/multiple-ajax-requests-for-same-url - seems to explain my problem
22:05 sri i mean specs, something substantial
22:05 jnbek joined #mojo
22:06 tba not atm but I'll have a look, though since it made us start considering preforked servers instead of event loop driven it seems fairly major
22:06 sri does it affect all browsers? how did all browsers agree on this?
22:06 tba accident? it seems to affect IE, chrome and firefox (latest versions of all)
22:06 sri it does not affect safari
22:08 tba wish it hadnt affected chrome, lost 3 days dev time :(
22:09 sri that sounds silly
22:09 tba which bit? was a fairly major thing for us, if we have any risk that one connection blocks another, we'll have to go preforked
22:09 sri first thing you do is look what goes over the wire
22:10 sri should have been clear within 5 mins
22:11 tba *shrug* it doesnt bother me any more, the times gone and we've found mojolicious to be ok (as expected tbh), but it may put other people off
22:12 sri they will run to node.js to experience the exact same problem?
22:12 tba by which time it may be too late (from a mojolicious userbase point of view)
22:14 tba either way, im just happy ive have an answer, and annoyed that major browsers suffer from such a stupid bug
22:14 tba *i
22:15 sri so it's a bug?
22:15 tba to me, yes. if I want to call the same URL twice at the same time, I expect my browser to do it, not pretend its doing it and then block subsequent requests
22:16 * sri is not a fan of guessing
22:16 * sri prefers cold hard facts
22:18 sri soooo... no, i don't think it should be documented unless we actually have all the facts
22:22 tba np, will see if I can find any solid info, but browser cache specifics aren't particularly well documented
22:36 sri btw. in case you've not discovered it yet, try MOJO_USERAGENT_DEBUG=1
22:37 sri and MOJO_DAEMON_DEBUG=1
23:49 Mike-PerlRecruiter_ joined #mojo
23:49 russum joined #mojo
23:50 russum left #mojo
23:52 KindOne joined #mojo

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