Camelia, the Perl 6 bug

IRC log for #mojo, 2013-10-22

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

All times shown according to UTC.

Time Nick Message
00:07 fhelmber_ joined #mojo
00:34 saurabh_abhishek joined #mojo
00:35 saurabh__ joined #mojo
00:41 jwang joined #mojo
00:49 saurabh_abhishek joined #mojo
00:53 bpmedley_ joined #mojo
00:57 memowe joined #mojo
01:04 laouji joined #mojo
01:13 bpmedley Wow, I've never been more excited about perl.  Sparky can be installed, started, and viewed in three steps.  Woohoo.
01:17 laouji_ joined #mojo
01:35 good_news_everyone joined #mojo
01:35 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Spi-rQ
01:35 good_news_everyone mojo/master 94f3052 Sebastian Riedel: small optimizations
01:35 good_news_everyone left #mojo
01:35 sri woohoo :)
02:12 good_news_everyone joined #mojo
02:12 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/QP8aYg
02:12 good_news_everyone mojo/master 5e4f41a Sebastian Riedel: documentation tweaks
02:12 good_news_everyone left #mojo
02:40 sri hmmm, i'm starting to understand why i was having trouble refactoring connect proxy support
02:40 sri it's on the wrong layer... too high
02:40 sri a proper connector layer needs to be below http
02:43 sri i have to turn _connection into a module https://github.com/kraih/mojo/blob​/master/lib/Mojo/UserAgent.pm#L276
02:44 sri starting with the last part, the actual socket connect
02:45 sri once that's modular, fitting everything else into the api won't be too hard
02:46 D4RK-PH0ENiX joined #mojo
02:48 Mad_Dud joined #mojo
02:50 d4rkie joined #mojo
03:00 d4rkie joined #mojo
03:02 D4RK-PH0ENiX joined #mojo
03:15 D4RK-PH0ENiX joined #mojo
03:17 tudorconstantin joined #mojo
03:37 jnbek joined #mojo
03:38 preflex_ joined #mojo
03:52 punter joined #mojo
03:52 KindOne joined #mojo
03:54 Mad_Dud joined #mojo
04:03 KindTwo joined #mojo
04:05 KindOne joined #mojo
04:31 dqw18 joined #mojo
04:54 memowe_ joined #mojo
05:04 D4RK-PH0ENiX joined #mojo
05:12 Kundun joined #mojo
05:27 rem_lex|pivo joined #mojo
05:38 D4RK-PH0ENiX joined #mojo
05:42 damaya joined #mojo
05:42 damaya Hi,'
05:43 damaya I am trying to put a non-blocking parallel IO loop inside an EventSource loop, but for some reason it is not working. I only get "Inactivity Timeout" in the morbo debug output.
05:45 damaya http://pastebin.com/Uu5EJiTw
05:46 damaya That is my code
05:57 dod joined #mojo
06:01 fhelmber_ joined #mojo
06:04 marcus sri: putting proxy support on the connection level makes sense.
06:04 marcus sri: saw the comments on travis? Apparently you can make the irc details 'encrypted' to discourage forks
06:04 marcus from announcing here
06:07 damaya Interesting, think I figured it out.
06:07 damaya If I set it to 30 it will never work. I guess it times out before it can actually do anything on the first go round.
06:08 damaya It doesn't kick off immediately, i.e., it waits 30 seconds before the first emit.
06:08 damaya However, if I set it to something lower (e.g., 5 seconds), then it works.
06:11 bpmedley damaya: Mojo::IOLoop->stream($self->t​x->connection)->timeout(300);  <-- Will that help?
06:11 denis_boyun joined #mojo
06:12 damaya And I feel like an idiot. I was going off sri's HTML5 hack of the day, in which he does not increate the inactivity timeout (most likely because the loop runs every second). Looking at Mojolicious::Guides::Cookbook I see that I must increase timeout value.
06:12 damaya bpmedley, that is exactly what worked :)
06:17 Vandal joined #mojo
06:26 dod joined #mojo
06:51 denisboyun joined #mojo
07:12 hlin_ joined #mojo
07:15 basiliscos joined #mojo
07:20 dod joined #mojo
07:22 hlin joined #mojo
07:38 trone joined #mojo
07:38 fhelmber_ joined #mojo
08:14 themage joined #mojo
08:14 hrupp joined #mojo
08:23 mire joined #mojo
08:33 maxhq joined #mojo
08:38 iSlug joined #mojo
08:43 mire joined #mojo
08:46 ver joined #mojo
09:02 maxhq joined #mojo
09:15 mire joined #mojo
09:16 basic6 joined #mojo
09:17 D4RK-PH0ENiX joined #mojo
09:26 gedge_ joined #mojo
09:28 cfedde joined #mojo
09:32 gedge joined #mojo
09:48 marty joined #mojo
09:52 D4RK-PH0ENiX joined #mojo
09:54 maxhq joined #mojo
10:03 maxhq joined #mojo
10:09 tba joined #mojo
10:14 D4RK-PH0ENiX joined #mojo
10:15 d4rkie_ joined #mojo
10:16 denisboyun joined #mojo
10:45 iSlug joined #mojo
10:49 basiliscos joined #mojo
10:57 bpmedley joined #mojo
11:19 punter joined #mojo
11:35 dpetrov_ joined #mojo
11:39 good_news_everyone joined #mojo
11:39 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/JcnpCA
11:39 good_news_everyone mojo/master 9dc2fed Sebastian Riedel: cleaner deprecations
11:39 good_news_everyone left #mojo
11:40 sri marcus: now the question is how the api for connection level proxy support should look like
11:40 sri i guess nobody has a problem with Mojo::UserAgent::Proxy
11:54 sri or does anyone think this is not enough code to be its own module? https://github.com/kraih/mojo/blob/​master/lib/Mojo/UserAgent/Proxy.pm
11:54 sri $ua->proxy->http(...) is also a sweet api
12:02 russum joined #mojo
12:05 nic batman: http://www.bbc.co.uk/news/uk-en​gland-south-yorkshire-24622710
12:07 batman cool :)
12:08 iSlug joined #mojo
12:16 marcus sri: I have no problem with that.
12:32 sri \o/
12:35 sri hard part about making a connector api is the stream object and its events :S
12:38 sri specifically this part https://github.com/kraih/mojo/blob​/master/lib/Mojo/UserAgent.pm#L197
12:38 sri it connects all the internals
12:46 fhelmbe__ joined #mojo
12:49 fhelmbe__ joined #mojo
13:00 * sri wonders if the mailing list has always been a bit shallow
13:11 sri stupid apple event... i want my nexus 5!!!
13:21 kwa When is it looking like the Nexus 5 will be out? Going to buy one for the misses.
13:33 Caldrin_ joined #mojo
13:33 Caldrin_ Hi! Is there any way to tell Mojolicious to print errors as plain text instead of HTML?
13:37 jpn joined #mojo
13:37 dqw18 joined #mojo
13:38 saurabh_abhishek joined #mojo
13:40 * sri expected the nexus 5 yesterday
13:46 btyler joined #mojo
13:49 asarch joined #mojo
13:58 bluescreen joined #mojo
14:05 arthas joined #mojo
14:05 denis_boyun joined #mojo
14:09 denis_boyun__ joined #mojo
14:09 Dandre joined #mojo
14:13 sri hmm
14:13 * sri wonders if adding Mojo::UserAgent::AppServer would be a good idea
14:13 sri would have to pass around the current ioloop
14:14 sri $ua->app_server->restart('https')
14:14 denis_boyun joined #mojo
14:14 sri my $url = $ua->app_server->url;
14:15 sri i guess app_url and app could be moved too
14:15 sri $ua->app_server->app(Mojolicious->new)
14:17 saurabh_abhishek joined #mojo
14:28 saurabh_abhishek joined #mojo
14:29 fhelmber_ joined #mojo
14:30 saurabh_abhishek joined #mojo
14:31 saurabh__ joined #mojo
14:31 denis_boyun_ joined #mojo
14:35 fhelmber_ joined #mojo
14:38 beyondcreed joined #mojo
14:40 highflying joined #mojo
15:01 basic6__ joined #mojo
15:06 d4rkie joined #mojo
15:09 sh4 joined #mojo
15:11 ryozi joined #mojo
15:19 sh4|2 joined #mojo
15:21 d4rkie joined #mojo
15:45 denis_boyun joined #mojo
16:01 saurabh_abhishek joined #mojo
16:09 basiliscos joined #mojo
16:14 dqw18 joined #mojo
16:21 dvinciguerra joined #mojo
16:23 KindOne joined #mojo
16:34 fhelmbe__ joined #mojo
16:42 dqw19 joined #mojo
16:48 fhelmber_ joined #mojo
17:25 bpmedley http://www.slideshare.net/bpmedley/webrtc-mojo  <-- Slideshare for small introdction to WebRTC and Perl with Mojolicious
17:52 jim joined #mojo
17:53 trone joined #mojo
18:00 thomason joined #mojo
18:01 thomason Hi all. Is there a good place/way I can wire into all routes and intercept/change a format?
18:01 thomason Specifically, I'd like to create a format (.ehtml - "embedded html") and just let mojo globally rewire if a request comes in for it so that it should actually render as format "html", but with no layout.
18:02 thomason I was hoping I could do this in a before_hook, but if I can I don't think I got it quite right. Is it possible? Any pointers?
18:02 thomason (I can do it on a per action method basis, with respond_to(ehtml =>...), but that's a very redundant way to set a few flags.
18:05 bowtie_ joined #mojo
18:08 mire joined #mojo
18:29 sri hmm, no mavericks yet
18:36 iSlug joined #mojo
18:37 gtodd node-webkit ... surprisingly finicky to get going ...  I wonder how many node-webkit example applications could just be mojo sqlite and browser based
18:37 btyler joined #mojo
18:39 gtodd and then just fatpacked .... leaving installation of perl as an experience for the user
18:47 thomason aha. Got it. Technique was fine, just needed to add it as an around_action hook instead of a before_dispatch. gtg
18:49 jim still regading the little app i am working on.. I have a success page whose link I email to a few people, and they will access the page from the link provided in the email. The success page will have different content each time. Do I need to save the success page to a static html file and name each static html file to a unique name and url and then email out? or is there something within mojolicious that enables me do that?
19:03 KindTwo joined #mojo
19:03 punter joined #mojo
19:05 sri neat, i have a working Mojo::UserAgent::AppServer
19:07 dod joined #mojo
19:08 gtodd sri: on cpan yet ?  ;-)
19:08 sri not even close
19:10 gtodd sri: what does it do?  create a web app version of a useragent?
19:11 sri it doesn't do anything new, just moves some stuff out of Mojo::UserAgent
19:16 Mike-PerlRecruiter_ joined #mojo
19:19 thomason "Mojo::UserAgent::AppServer - Same as it always was. But now more so!" ;-)
19:25 sri perhaps Mojo::UserAgent::Server would look better
19:25 sri $ua->server->app and so on
19:29 sri yea, i like how that looks
19:39 mire joined #mojo
19:51 Kundun joined #mojo
20:14 dam joined #mojo
20:16 good_news_everyone joined #mojo
20:16 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/pDJNbQ
20:16 good_news_everyone mojo/master 81e12da Sebastian Riedel: added module Mojo::UserAgent::Server
20:16 good_news_everyone left #mojo
20:16 sri hope nobody has a problem with this one either
20:18 vaewyn joined #mojo
20:20 vaewyn Hey guys...  I see that sub *_mode is now deprecated in the app...  what's the new "right way" to do instance tied code setup? My google foo just keeps finding "it's deprecated' and not "do this instead.. it's better"  :)
20:22 good_news_everyone joined #mojo
20:22 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/rlM5ow
20:22 good_news_everyone mojo/master 0725198 Sebastian Riedel: small optimizations
20:22 good_news_everyone left #mojo
20:23 sri vaewyn: see lite tutorial
20:32 vaewyn sri: confused now...  I use to use it to set the log paths (my devel and production log paths are VASTLY different) prior to startup... since startup would sometimes log errors etc... the tutorial I see that the log is mode aware for the default output level... but how can I change the location? (I also did a bunch of monkeying with $ENV for external crud depending on the mode but I think I know a way outside of mojo to modify that)
20:33 vaewyn or am I looking at the wrong place in the tutorial?  Reading http://mojolicio.us/perldoc/Mojolicious/Lite#Mode
20:34 lukep joined #mojo
20:36 sri i don't understand the question
20:38 denisboyun joined #mojo
20:43 vaewyn sri: I use to do something like http://pastebin.ca/2470013  and get my logging in the 2 different places...  if I do that now in like startup {} I seem to get a couple lines in the default log location... and then it switches to the log files I have specified... presumably when it has actually processed that direction in startup {}  ... how do I get the old behavior under the new paradigm with no *_mode subs?
20:43 vaewyn s/direction/directive/
20:44 sri vaewyn: you're imagining things
20:44 sri *_mode ran right before startup, nothing happened in between
20:45 sri https://github.com/kraih/mojo/bl​ob/master/lib/Mojolicious.pm#L94
20:45 sri absolutely nothing
20:46 vaewyn sri: correct... but for some reason I am now getting "Server available at https://127.0.0.1:3011."  in the default log location... and a couple "use Module::..." warnings also...  but then everything starts in the correct place after I do a log->path(...  in startup
20:46 vaewyn I use to get all of that logged in the correct location... and I am confused as to why... but it worked :)
20:49 vaewyn with my luck though it is nothing in Mojo and I just have one of these PoS legacy modules kicking me upside the head
20:51 good_news_everyone joined #mojo
20:51 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/zAjjyA
20:51 good_news_everyone mojo/master e487f9a Sebastian Riedel: no need to pass along arguments
20:51 good_news_everyone left #mojo
20:52 damaya Hey guys, I just want to say that it's amazing the work you guys are doing, and I greatly appreciate having such an awesome framework in Perl. I finally finished my first mojo app and it goes into production tomorrow for thousands of employees at Oracle.
20:52 damaya I'm proud to say I did it in Mojolicious and it was an awesome learning experience. Thanks for all of your help along the way.
20:56 KindOne joined #mojo
21:02 vaewyn left #mojo
21:32 dvinciguerra joined #mojo
21:41 marty joined #mojo
21:48 marty finder tabs++
21:50 sri \o/
21:57 sri no xcode 5.0.1 yet :(
22:00 marcus it's on developer.apple.com
22:01 sri hmm, does getting it from there mess with the app store? or do future updates just work?
22:02 marcus no idea, sorry
22:02 marcus hrm, new keynote looks nice
22:06 sri :S
22:06 sri marcus: you ok with Mojo::UserAgent::Server too btw.?
22:07 marcus sri: Yeah. I guess it's a lot cleaner
22:07 marcus never really liked that in the main UA
22:08 sri \o/
22:09 sri only part that might be a little problematic is ioloop switching for blocking/non-blocking, but i don't think we'll get around that with future components like a connector either
22:10 marcus must kill it with fire
22:10 sri specifically these lines https://github.com/kraih/mojo/blob​/master/lib/Mojo/UserAgent.pm#L125
22:15 saurabh_abhishek joined #mojo
22:25 sri marcus: actually, xcode 5.0.1 is not on developer.apple for me :o
22:29 sri and i can't believe that apple once again shipped a 0.9 release of openssl
22:29 go|dfish joined #mojo
22:38 saurabh_abhishek joined #mojo
22:40 saurabh__ joined #mojo
22:46 jpn joined #mojo
22:59 sri haha, this socks module actually has a Mojo::UserAgent example ;p https://metacpan.org/module​/IO::Socket::Socks::Wrapper
23:02 dqw19 joined #mojo
23:05 saurabh_abhishek joined #mojo
23:07 saurabh__ joined #mojo
23:09 thomason joined #mojo
23:10 thomason Is there anyway from a mojo controller to get the actual file name of the template that'll be processed? So, if I know that my template is '/list', and my format is 'html', can I get the handler from somewhere? ('tt' in this case). I want to end up with 'list.html.tt', and I can either build it from individual parts or just call a method to get the built string back, if one exists...
23:11 BeDa joined #mojo
23:12 sri thomason: what's the use case?
23:13 sri the api is not public currently, if you want it to be i need a good one
23:14 thomason I want to be able to override a template with a custom one, and then have the custom template embed the default one. So the default can handle most of the layout in all cases, but a specific override template can set a few flags in it before rendering.
23:14 thomason So I was going to have my specially-overridden template include the default for its main layout, after changing a few of the values before handing off.
23:14 sri i can't even follow that
23:14 thomason Lemme whip up a pastebin for you.
23:15 sri i don't think there is much of a chance you can convince me with something that complicated
23:15 thomason It's trivially simple, actually. Lemme just write out an example.
23:19 sri neat how mavericks requires about 10gb less space
23:25 thomason example case: http://pastebin.com/C3wLEcG3
23:26 thomason I'm open to structuring it differently in terms of the templates, but I'd like to maintain a separation of concerns and keep the values set at the template level.
23:30 bpmedley thomason: Can you just do call $self->render with the template name?
23:33 thomason No, because that's happening at a different layer. I want one template to be able to directly include a different template (of the appropriate format and handler)
23:34 bpmedley Do layouts do what you want?  http://mojolicio.us/perldoc/Mojo​licious/Guides/Rendering#Layouts
23:34 sri yay, xcode 5.0.1 is out
23:36 thomason I don't think so, because the layout basically operates by rendering the template, taking that rendered value, and then stuffing it into a slot in the layout template. I want to pass data structures back and forth between 'em.
23:37 thomason Best I can come up with so far is to do a partial render of the specific template, and then embed and eval that value into the generic one. But that's not even quite what I want, since the specific template shouldn't HAVE to depend upon the generic one. Maybe it's a completely different display.
23:38 sri if others agree it's a good idea we can discuss making the api public
23:45 saurabh_abhishek joined #mojo
23:49 thomason sounds good to me

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