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

IRC log for #mojo, 2014-08-14

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

All times shown according to UTC.

Time Nick Message
00:01 sujithm joined #mojo
01:20 woz joined #mojo
01:37 laouji joined #mojo
01:46 klapperl joined #mojo
01:52 suy joined #mojo
01:53 woz joined #mojo
02:02 miked joined #mojo
02:02 jberger_ Skylos_: i haven't worked with these things in a while and I'm not by a computer to test, but try setting up the dotted version first
02:03 jberger_ Oh well
02:52 noganex_ joined #mojo
03:03 woz joined #mojo
03:18 basic6_ joined #mojo
03:26 sujithm joined #mojo
03:43 Eke- joined #mojo
03:47 Averna joined #mojo
04:04 woz joined #mojo
04:58 Eke- joined #mojo
05:06 woz joined #mojo
05:18 laouji joined #mojo
05:24 Vandal joined #mojo
05:28 agorman joined #mojo
05:43 chansen joined #mojo
05:47 Eke- joined #mojo
05:59 crab i wish there were a non-for variant of label_for so that i could generate <label>%= check_box blah ... %= $some_text</label>
06:07 woz joined #mojo
06:15 denis_boyun joined #mojo
06:16 trone joined #mojo
06:41 KCL joined #mojo
06:54 dp_ joined #mojo
06:58 voegelas joined #mojo
07:10 woz joined #mojo
07:21 Dandre joined #mojo
07:24 arthas joined #mojo
07:32 gatitskiy joined #mojo
07:33 jamesaxl joined #mojo
07:49 woz joined #mojo
07:52 jamesaxl joined #mojo
07:52 mishantil "Vault 113 - Hypnotic" at around 1:35 there is a "ALL GLORY TO THE HYPNOTOAD" not what I was expecting to hear.
08:01 gatitskiy joined #mojo
08:01 argh joined #mojo
08:24 dotan joined #mojo
08:28 marcus Never go full jberger
08:39 gatitskiy joined #mojo
08:45 Dandre joined #mojo
08:50 fhelmber_ joined #mojo
08:52 gatitskiy joined #mojo
09:13 gatitskiy joined #mojo
09:16 Dandre joined #mojo
09:25 gatitskiy joined #mojo
09:36 fukai joined #mojo
09:37 fukai_ joined #mojo
09:45 fukai_ hi!
09:46 fukai left #mojo
09:48 gatitskiy joined #mojo
09:53 iakuf joined #mojo
09:57 marcus hi fukai_
09:57 iakuf hi
09:57 purl privet, iakuf.
09:59 d4rkie joined #mojo
10:11 jamesaxl joined #mojo
10:24 gatitskiy joined #mojo
10:43 dotan joined #mojo
10:59 davido___ joined #mojo
11:27 d4rkie joined #mojo
11:29 jberger marcus: wtf :-P
11:32 D4RK-PH0ENiX joined #mojo
11:44 marcus jberger: <sri> it may often look very html-ish... but you could also go all jberger and fill a file with %=t div... lines :)
11:50 jberger I knew what you meant actually
11:51 jberger No worries
11:52 mr-foobar joined #mojo
11:53 marcus ;)
12:02 neilhwatson joined #mojo
12:03 nic MyApp is a subclass of Mojolicious
12:03 nic and its __DATA__ section is being read as if it was 'main'
12:03 nic Is that official behaviour (ie a feature) or accidental behaviour?
12:03 nic (I'm guessing this is part of perl I wasn't aware of)
12:04 nic I could put MyApp into $renderer->classes, but it looks like it's not necessary
12:06 crab what do you mean by "as if it was main"?
12:07 nic Well, the rendering guide says the default in ->classes is only 'main'
12:08 nic and a debug confirms that only 'main' was in there
12:08 nic It's just that i noticed that my tests pass when I hadn't finished the implementation and so I'm thinking the remaining bit (putting it in classes) is redundant
12:10 nic For now I'll assume it's a feature and if it breaks in the future, it's an easy fix
12:14 crab i'm a bit confused now about renderer->classes
12:14 crab i know for a fact that the renderer doesn't pick up inlined templates from controller classes that aren't added to ->classes
12:14 crab maybe the application class is special in some way, or it may be a coincidence. i don't know.
12:15 crab what confused me was that i was adding some class names to renderer->classes, but when i changed some other code that ensured they were require'd before i added them to ->classes (though they were loaded later by virtue of routing to an action in them), the renderer could no longer find those templates
12:16 crab it's possible that i just misunderstood how the mechanism worked the last time i looked at it, of course
12:16 crab fortunately i had meant to inflate those templates anyway, so i did and then adding the directory to renderer->paths worked fine
12:17 hesco joined #mojo
12:41 jamesaxl joined #mojo
13:00 sujithm joined #mojo
13:03 basiliscos joined #mojo
13:16 ryozi joined #mojo
13:40 argh joined #mojo
13:43 sri well... this is awkwards http://mojolicio.us/perldoc/Mojo/DOM#POD-ERRORS
13:46 sri gonna try updating Pod::Simple to see if that makes the problem go away
13:47 sri metacpan doesn't appear to have the problem
13:49 Eke- joined #mojo
13:52 sri hmm, no difference
13:55 marcus eek
13:58 mgrimes joined #mojo
14:08 _eugen joined #mojo
14:10 ghandi|work joined #mojo
14:18 crab so for templates that basically just renders the contents of an array, do people generally check in the controller if (!@$elements) and display a different message, or do tey put that logic in the template?
14:20 good_news_everyon joined #mojo
14:20 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vYbn1A
14:20 good_news_everyon mojo/master b8f5e98 Sebastian Riedel: adjusted Mojo::DOM examples for Pod::Simple::XHTML
14:20 good_news_everyon left #mojo
14:25 good_news_everyon joined #mojo
14:25 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/BTIGRQ
14:25 good_news_everyon mojo/master bc7ff7a Sebastian Riedel: adjusted another Mojo::DOM example for Pod::Simple::XHTML
14:25 good_news_everyon left #mojo
14:26 ghandi|work @crab: i go with the if-else-block in the template.
15:05 irq joined #mojo
15:11 sri if anyone wants to play with HTTP2... this looks like a decent way to get started until we have our own protocol implementation https://metacpan.org/release/Protocol-HTTP2
15:12 sri especially for experimentain with how we are going to integrate the handshake
15:23 odc Hi there. What is the best way to intercept 500 errors?
15:23 odc after_dispatch() ?
15:24 odc by "500 errors" i mean exceptions
15:26 Dandre joined #mojo
15:27 ccm joined #mojo
15:41 Eke- joined #mojo
15:46 stephan48 Nei: cool!
15:49 lb odc: look for "Rendering "exception" and "not_found" pages" in Mojolicious::Guides::Rendering
15:51 rwf joined #mojo
15:51 odc found it. Thanks lb
15:56 nic crab: I'd see it as a separation of what to display and how to display it
15:56 nic substituting in a different message feels like changing the 'what', so my instinct is to put it in the controller
15:57 Nei sri, timers/watches are bound to a script so when the script is unloaded those timers won't work any more. that seems like a possible reason why the ioloop needs to be reset don't you think
15:57 Nei or maybe why there should be one separate ioloop per script
16:43 sri Nei: no
16:43 sri oh wait, the accept timer might get lost
16:44 sri yea, that could be a problem
16:55 denis_boyun joined #mojo
17:07 babl_ joined #mojo
17:15 ccm left #mojo
17:16 axlrose joined #mojo
17:20 argh joined #mojo
17:22 hesco joined #mojo
17:31 Nei based on dumping IOLoop->singleton that seems to be the problem
17:36 sri Nei: umm, it seems to have no relation to any of your previously described problems
17:36 sri you said the port was kept open
17:37 sri anyway, this got way too confusing for me, i'm out of the discussion
17:39 Nei sri I said on the 2nd load of script the port is listening but not accepting connections
17:40 Nei now I think that might be because the accept timer got lost
17:40 Nei the port is always closed proper on $daemon=undef
17:45 Nei sri so can there be done anything to make mojo work in such a weird env where the accept timer is lost
17:57 Eke- joined #mojo
18:12 hesco joined #mojo
18:19 cfedde joined #mojo
18:31 sh4 joined #mojo
18:41 KCL_ joined #mojo
18:49 dexteruk_ joined #mojo
18:50 dexteruk joined #mojo
18:54 cfedde joined #mojo
19:07 GabrielVieira joined #mojo
19:11 disputin joined #mojo
19:18 argh joined #mojo
19:20 woz joined #mojo
19:23 good_news_everyon joined #mojo
19:23 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/K6OV1g
19:23 good_news_everyon mojo/master 961741a Sebastian Riedel: simplify application loading
19:23 good_news_everyon left #mojo
19:24 sri btw. i still want to know why metacpan doesn't have the formatting problems we have with stuff like <p>A</p> in code blocks
19:24 sri https://github.com/CPAN-API/cpan-api/blob/master/lib/MetaCPAN/Pod/XHTML.pm
19:24 sri maybe i'm overlooking something *shrugs*
19:51 woz joined #mojo
20:26 dvinciguerra joined #mojo
20:31 sri so python is getting type annotations :o
20:31 sri https://mail.python.org/pipermail/python-ideas/2014-August/028618.html
20:35 jamesaxl joined #mojo
20:42 davido_ joined #mojo
20:54 disputin joined #mojo
20:59 good_news_everyon joined #mojo
20:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/WJZtCg
20:59 good_news_everyon mojo/master b2068a1 Sebastian Riedel: mention specific HTTP methods
20:59 good_news_everyon left #mojo
21:02 woz joined #mojo
21:03 kthakore__ joined #mojo
21:03 kthakore__ hallo
21:04 kthakore__ I have a mojolicious server running. But strangely it shows 404 for certian broswers (IE11) and not for others. http://107.170.77.77/styles/main.854f2065.css
21:04 kthakore__ so weird
21:04 kthakore__ ugh ...
21:04 kthakore__ nvm
21:04 kthakore__ caching
21:04 kthakore__ I am gonna run away
21:05 good_news_everyon joined #mojo
21:05 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/C6dPEw
21:05 good_news_everyon mojo/master 9b7c1e2 Sebastian Riedel: be even more specific in method descriptions
21:05 good_news_everyon left #mojo
21:47 sri btw. the faster helper idea with $c->helpers->foo->bar works
21:47 sri https://gist.github.com/anonymous/955c9f9d73765e23c0d4 # this would be the patch
21:49 sri https://gist.github.com/anonymous/884dc809d8347582bece # benchmark comparing the two
21:49 sri about 400% faster
22:03 woz joined #mojo
22:15 sri might be worth it for the fact that you can call helpers that conflict with existing controller/app methods
22:16 sri $c->helpers->stash() to specifically call the helper and not the method
22:20 * sri pokes tempire, jberger, batman, marcus and crab
22:21 sri i suppose the documentation would mention it as the way to avoid conflicts
22:38 sri hmm, the patch has a little caching problem though... ->get_helper('') needs to be called for newly added helpers to be patched into the proxy class
22:39 sri if sub helpers doesn't cache the performance gain drops by half
22:40 sri 0.55s without caching in the controller object
22:41 neilhwatson joined #mojo
22:54 good_news_everyon joined #mojo
22:54 good_news_everyon [mojo] kraih created helpers_method (+1 new commit): http://git.io/Y9fC6A
22:54 good_news_everyon mojo/helpers_method 6c14c2a Sebastian Riedel: added helpers method to Mojolicious::Controller
22:54 good_news_everyon left #mojo
22:54 sri well, test it for yourself, patch should be complete
23:04 woz joined #mojo
23:07 sri hmm, i guess it improves safety for our helpers that call helpers
23:08 good_news_everyon joined #mojo
23:08 good_news_everyon [mojo] kraih pushed 1 new commit to helpers_method: http://git.io/JgJ98w
23:08 good_news_everyon mojo/helpers_method f2ae3c3 Sebastian Riedel: use helpers method for helpers that call other helpers
23:08 good_news_everyon left #mojo
23:12 good_news_everyon joined #mojo
23:12 good_news_everyon [mojo] kraih pushed 1 new commit to helpers_method: http://git.io/flotKg
23:12 good_news_everyon mojo/helpers_method 3564a9a Sebastian Riedel: mention more details in method description
23:12 good_news_everyon left #mojo
23:13 sri https://github.com/kraih/mojo/compare/helpers_method
23:36 good_news_everyon joined #mojo
23:36 good_news_everyon [mojo] kraih pushed 1 new commit to helpers_method: http://git.io/QMp2wQ
23:36 good_news_everyon mojo/helpers_method 676d421 Sebastian Riedel: less method calls for proxy classes
23:36 good_news_everyon left #mojo
23:43 D4RK-PH0ENiX joined #mojo
23:55 sri oh well, merged ;p
23:55 good_news_everyon joined #mojo
23:55 good_news_everyon [mojo] kraih merged helpers_method into master: http://git.io/T8eocw
23:55 good_news_everyon left #mojo

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