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

IRC log for #mojo, 2014-04-22

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

All times shown according to UTC.

Time Nick Message
00:54 laouji joined #mojo
00:58 laouji_ joined #mojo
01:03 klapperl_ joined #mojo
01:10 btyler joined #mojo
01:32 Adurah joined #mojo
02:14 laouji joined #mojo
02:21 jhg joined #mojo
02:41 zivester joined #mojo
02:49 cpan_mojo Mojolicious-Plugin-RedirectHost 1.00 by Alex - http://metacpan.org/release/ALEXBYK/Mojolicious-Plugin-RedirectHost-1.00
03:11 tadegenb` joined #mojo
03:15 Adura joined #mojo
03:20 sujithm joined #mojo
03:32 zivester joined #mojo
04:34 macgorgar joined #mojo
05:07 laouji joined #mojo
05:12 sujithm joined #mojo
05:19 denis_boyun joined #mojo
05:22 laouji joined #mojo
05:24 laouji joined #mojo
05:32 Vandal joined #mojo
05:52 btyler joined #mojo
05:55 sujithm joined #mojo
05:56 neyasov__ joined #mojo
06:06 sujithm_ joined #mojo
06:15 laouji joined #mojo
06:20 cstamas joined #mojo
06:21 hummeleBop joined #mojo
06:25 laouji joined #mojo
06:30 yongbin joined #mojo
06:39 yongbin joined #mojo
06:46 cooper joined #mojo
06:46 rawler joined #mojo
06:46 denis_boyun joined #mojo
06:51 dod joined #mojo
06:55 davido joined #mojo
06:59 laouji joined #mojo
07:05 hummeleBop joined #mojo
07:10 hummeleBop joined #mojo
07:13 eseyman joined #mojo
07:14 igorsutton joined #mojo
07:14 sujithm joined #mojo
07:28 basiliscos joined #mojo
07:32 trone joined #mojo
07:48 fhelmber_ joined #mojo
07:53 btyler joined #mojo
07:53 laouji joined #mojo
07:54 rwp joined #mojo
07:54 dpetrov_ joined #mojo
08:11 laouji joined #mojo
08:15 maxhq joined #mojo
08:35 eseyman joined #mojo
08:41 denis_boyun joined #mojo
08:46 nic joined #mojo
08:46 neyasov__ joined #mojo
08:58 sugar__ joined #mojo
09:06 arthas joined #mojo
09:07 mire_ joined #mojo
09:25 ver joined #mojo
09:30 yongbin joined #mojo
10:02 sujithm joined #mojo
10:06 sujithm_ joined #mojo
10:18 d4rkie joined #mojo
10:23 dotan joined #mojo
10:25 dpetrov_ joined #mojo
10:27 disputin joined #mojo
10:33 d4rkie joined #mojo
10:38 lb joined #mojo
10:41 sujithm joined #mojo
10:48 sugar joined #mojo
11:16 mire_ joined #mojo
11:46 sujithm joined #mojo
11:54 yongbin joined #mojo
12:03 Negor joined #mojo
12:33 neilhwatson joined #mojo
12:35 eseyman joined #mojo
12:57 sugar_ joined #mojo
13:06 rem_lex|pivo joined #mojo
13:12 rem_lex joined #mojo
13:23 mire_ joined #mojo
13:24 * sri thinks some more about promises https://groups.google.com/d/msg/mojolicious/t_oSMzS-5v4/IQcIUJ1pMxMJ
13:27 sugar__ joined #mojo
13:42 bluescreen joined #mojo
13:47 gryphon joined #mojo
13:47 eseyman joined #mojo
13:48 btyler joined #mojo
13:52 jim joined #mojo
13:57 balazs joined #mojo
14:14 sh4 joined #mojo
14:22 sugar joined #mojo
14:46 sri it's strange how this channel gets more silent the more people are here
14:51 asarch joined #mojo
14:53 neilhwatson take it as a compliment :)
14:58 aggrolite joined #mojo
14:59 jim how can I do authorization and authentication for Get parameters? I need user A can access   /edit?file=fileA, user B can access /edit?file=fileB, but not vice versa. I usually use bridge and Plugin::Authentication to do authentications.
15:07 batman oh memory leaks.... the joy....
15:07 * tempire yells loudly
15:08 * batman wanna scream
15:09 batman https://github.com/marcusramberg/mojo-redis/blob/master/lib/Mojo/Redis.pm#L393 <-- i don't get how $self leaks when $handler is called
15:10 batman i'm probably wrong :(
15:10 * batman digs deeper down the rabbit hole
15:11 batman i don't even know if i should trust how i'm using Test::LeakTrace
15:15 batman anyone got a module for detecting leaks that they like?
15:18 igorsutton I don't like leaks. They're bad.
15:18 hesco How do I add a default value to a select_field ?
15:19 hesco I found no examples at:  http://mojolicio.us/perldoc/Mojolicious/Plugin/TagHelpers#select_field
15:20 batman hesco: % param 'foo' => 123 unless param 'foo'; %= select_field 'foo', [....]
15:20 hesco thanks batman, will try that
15:23 sri http://mojolicio.us/perldoc/Mojolicious/Plugin/TagHelpers#DESCRIPTION
15:27 igorsutton joined #mojo
15:27 cmihai_ joined #mojo
15:40 beyondcreed joined #mojo
15:45 punter joined #mojo
15:54 neyasov__ joined #mojo
16:02 mire_ joined #mojo
16:06 disputin joined #mojo
16:13 btyler joined #mojo
16:20 BeDa joined #mojo
16:24 cmihai joined #mojo
16:45 batman if my object gets DESTROY()'ed - can it still leak..?
16:48 sri normally not
16:48 davido__ joined #mojo
17:06 batman then i think i'm on the right track
17:06 batman thanks
17:10 asarch joined #mojo
17:17 basiliscos joined #mojo
17:19 abra joined #mojo
17:21 ua_ joined #mojo
17:23 hesco Thank you sri and batman.  Actually I finally realized that I was losing my params when I made a subsequent ajax call, that I needed to pass the required data to the ajax call.
17:25 hesco My next stumbling block seems to be:  Email::Sender::Simple tells me: [error] no recipients; even though I have:  $validation->required('prospect.email')->like( $RE{Email}{Address} );  using Regexp::Common::Email::Address.  Any idea why?
17:26 sujithm joined #mojo
17:26 sri does it pass the check?
17:34 hesco sri: I would assume so, as my $self->send_email_response( $prospect ); comes after a conditional on if( ! $validation->is_valid ){ which includes: return $self->render( template => etc.
17:35 batman i think someone should talk about memory leak on the mojo conf :P
17:36 hesco I logged $RE{Email}{Address} and it looks like a big ugly regexp, far more complex than any I would have crafted for the purpose.
17:36 batman hesco: haha. yes, it is :)
17:37 batman email validation is super complicated
17:37 hesco I usually leave it to Email::Valid
17:37 neilhwatson The regexes can look like obfuscation winners.
17:37 batman i never care about doing it right, i always just do qr{\.\@\.} :D
17:38 hesco batman: will try to simplify things with your simpler version and see if I get anywhere
17:38 batman i'm not saying that's a good idea though...
17:39 denis_boyun joined #mojo
17:39 * batman <3 vim
17:39 batman my setup has gotten so much better these days
17:40 hesco no, but my empty email field ought to fail your regex as easily as it ought to fail $RE{Email}{Common}.
17:40 batman :D
17:40 batman word
17:40 hesco batman: have you published your .vimrc by any chance?
17:41 batman no :/
17:41 * batman need to reboot demo.convos.by
17:41 batman *brb'
17:41 dod joined #mojo
17:45 hesco same [error] no recipients as before with $validation->required('prospect.email')->like( qr{\@} );
17:45 hesco I would think this would fail the required requirement and never make it to the regex
17:45 hesco I'm leaving the fiedl empty in my tests
17:46 batman joined #mojo
17:52 neyasov joined #mojo
17:55 batman hesco: http://home.thorsen.pm/files/tree/linux/vim
18:08 hesco thanks batman: will take a look at that.
18:09 batman no problem. not much fun in the actual vimrc, but i really like the bundles and some of the plugins
18:09 batman i like it all of course, but a lot of the rest is pretty basic i guess
18:09 * batman is a vim beginner
18:10 batman i've only used it for 11 years ;D
18:10 genio heh
18:10 batman but seriously - i haven't really /used/ vim until lately.
18:11 batman it's been notepad on steroids instead of tool in the toolbox :)
18:12 genio I very rarely use it anymore as we have samba shares to our dev machines or sshfs when required.  So all of my dev work is pretty much in GUI editors now (Sublime, Notepad++, or Atom.io).
18:13 batman yeah, i used sublime, but it's just *too much* compared to vim
18:13 batman would really like to try out atom, but ain't got no mac :(
18:13 neilhwatson The Vi Improved book really go me going with VIM.  You can find it online.
18:14 genio build a hackintosh
18:14 batman :P
18:15 dod joined #mojo
18:32 neyasov__ joined #mojo
18:33 tempire batman: Make sure you're using Vundle for plugins.
18:33 batman tempire: i'm using pahtogen instead. haven't gotten to vundle yet...
18:34 batman *pathogen
18:34 batman https://github.com/marcusramberg/mojo-redis/blob/bug/on-message-leaking/lib/Mojo/Redis.pm#L406 # can someone see any obvious reasons why this leak?
18:34 tempire pathogen was good idea, but the submodules are annoying.
18:34 tempire or sub-whatever-they are
18:34 tempire with Vundle, you just edit your vimrc, and run a vim command.
18:34 tempire not git mgmt
18:34 batman ok. i will keep that in mind the next time i'm installing a plugin
18:34 batman sounds sweet :)
18:35 tempire and the same with uninstalling
18:35 batman right now i'm trying to hunt down that *")(/&#¤&S leak
18:36 moritz batman: the error handling closure closes over $self
18:37 moritz and $redis is available from $self, so that's your cycle
18:37 batman moritz: that's not it. it's inside somewhere inside _message_protocol()
18:37 batman i'm doing weaken() so the error handling is just dandy
18:43 moritz batman: the $protocol->on_message(sub also closes over $self
18:44 batman yeah. but i still don't get how that can cause a leak :(
18:46 moritz $redis->{protcol}->{on_message}->sub->{connections}{$id}{connections}{$id} = $redis
18:47 batman warn Scalar::Util::isweak($self) ? 'WEAK' : 'NOOOO!'; # inside the callback says "WEAK"
18:47 moritz hrm, you're right
18:47 moritz what does Devel::Cycle say abou it?
18:48 batman i will check
18:48 neyasov__ joined #mojo
18:48 batman do you suggest putting it inside the on_message(..) callback?
18:48 batman nevermind
18:48 purl Well piss off then, batman
18:48 bzero joined #mojo
18:48 batman purl: shut up
18:48 purl Yes, sir.
18:49 moritz more like at the end of _on_message
18:49 moritz to check $self
18:51 batman it doesn't say anything
18:51 batman find_cycle $redis; # nada
18:52 neyasov__ joined #mojo
18:53 batman i think there's something nasty going on inside Protocol::Redis that i don't get.
18:54 batman the bad part is that Protocol::Redis::XS gives the same leak, so it's my code :/
18:56 hesco I just added jquery.validate.min.js to my project and am trying to sort out where the novalidate="novalidate" in my <form tag is coming from.  I should blame that on the new js, right?  Its not being introduced anyhow by mojo, is it?
18:57 batman hesco: where do you see it? using dev tools in your browser or looking at the source code?
18:57 hesco inspect element
18:58 batman right. check the source ctrl+u or something
18:58 hesco batman:  Something is rewriting that as: <form action="/concierge/application" id="tfc_concierge_form" method="POST" novalidate="novalidate">
18:59 hesco batman: you are right, source shows:  <form action="/concierge/application" id="tfc_concierge_form" method="POST">
18:59 batman hesco: just check the source (!)
18:59 hesco guess that was the js
18:59 batman i'm not just giving you the solution, i'm telling you how to figure it out yourself the next time
18:59 hesco thanks
18:59 batman (it could also be a browser plugin)
19:01 hesco this is my first project where the js has been left to me, prior to this I've only dabbled in debugging other folks js.  quite the learning curve here.  I usually hang out on the back end
19:01 neyasov__ joined #mojo
19:01 batman :)
19:01 * batman really like js
19:01 neilhwatson joined #mojo
19:02 batman if i wasn't doing perl, i would probably use node.js
19:02 fhelmber_ joined #mojo
19:03 sri my only problem with node.js is that it's all non-blocking
19:04 sri not so nice for quick hacks
19:04 batman hm... didn't think about that
19:05 moritz I want to try a statically typed language next
19:05 moritz when I started with perl, most of those sucked
19:05 moritz but now, C# looks nice, for example. Or golang.
19:05 sri Go is a fun statically typed language
19:08 sri although, my problem with Go is that nothing feels elegant
19:10 moritz also (on a completely different level), Rust looks interesting, though still a bit obscure
19:10 cfedde as compared to say... perl.
19:13 moritz obscure on a different level :-)
19:44 russum joined #mojo
19:45 davido_ joined #mojo
19:55 russum1 joined #mojo
19:58 aggrolite joined #mojo
20:04 Lee joined #mojo
20:14 alnewkirk joined #mojo
20:20 maxhq joined #mojo
20:30 tempire ooo
20:30 tempire https://goji.io/
20:31 espent joined #mojo
20:47 gryphon joined #mojo
20:48 meshl joined #mojo
20:51 rem_lex|pivo joined #mojo
20:52 zackiv31 joined #mojo
21:19 sugar_ joined #mojo
21:41 punter joined #mojo
21:42 punter Is it recommended to use Mojo::Redis, or should I use Redis?
21:43 punter Mojo::Redis is only non-blocking, right?
21:43 punter not good for me
21:45 punter batman, couldn't you detect whether you're in an event loop, and make all the methods blocking if you're not?
21:45 punter wouldn't that be a good idea?
21:46 punter marcus ^^
22:27 mire_ joined #mojo
22:33 d4rkie joined #mojo
23:08 sri it's odd, somehow i still want promises
23:09 sri of course as usual leaks are the biggest problem
23:10 sri $ua->aget('first.url')->then(sub { $ua->aget('second.url') })->then(sub { say shift->res->body })
23:11 sri $ua in this case would leak
23:16 sri punter: Mojo::Redis could just do what Mojo::UserAgent and Mango do
23:21 punter Yes, sri. I'll tell marcus and batman about it.
23:30 aggrolite joined #mojo
23:51 sri would be funny if i change everything in mojolicious to use promises in 5.0 and invalidate half of the mojoconf talks :D
23:59 yongbin joined #mojo

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