Camelia, the Perl 6 bug

IRC log for #mojo, 2011-01-04

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

All times shown according to UTC.

Time Nick Message
00:06 Akron left #mojo
00:06 perlrocks Twitter: "Mojolicious - Web framework for Perl http://www.findbestopensour​ce.com/product/mojolicious # FOSS" (no) --bestopensource http://twitter.com/bestopenso​urce/status/22081513692598272
00:18 tempire_ left #mojo
00:39 mattastrophe left #mojo
00:53 tardisx joined #mojo
00:55 ispy_ left #mojo
01:09 pid left #mojo
01:20 curt left #mojo
01:21 mattastrophe joined #mojo
01:42 tempire is it just me, or has search.cpan.org been quite slow lately?
01:45 tempire sri: this code in client.t, generates a listening server
01:46 tempire and from there, I should be able to do a $client->get, using the correct loop.
01:46 tempire right?
01:46 tempire http://pastie.org/1427293
02:49 josh left #mojo
02:49 josh joined #mojo
02:53 daviddelikat1 joined #mojo
02:55 daviddelikat left #mojo
02:55 tempire ignore my previous questions
02:56 tempire Not sure Test::Mojo needs something for client tls auth
02:56 tempire I'm going to be using this in an app shortly, I guess I'll figure it out what's necessary in a real use case.
02:56 drewr joined #mojo
03:33 daviddelikat1 left #mojo
03:40 daviddelikat joined #mojo
04:04 tholen42 joined #mojo
04:05 tl left #mojo
04:27 drewr left #mojo
04:31 ispy_ joined #mojo
04:31 ispy_ left #mojo
04:33 tempire sri: I think Mojo::Client may need a ->timeout call, or something of the sort that hooks into Mojo::IOLoop->timer
04:34 tempire client certs that are not signed by the server's ca just hang, indefinitely, in spite of any timeout sent to IO::Socket::SSL
04:35 * sri yawns
04:36 sri that sounds more like a workaround than a solution
04:36 sri not saying a hard timeout for client (and possibly server) would be a bad idea
04:38 sri actually i would like those
04:39 tempire well, other than that, ->cert & ->key are done.
04:40 sri IO::Socket::SSL should never be able to use any kind of timeout btw
04:40 sri it doesn't do anything blocking
04:40 sri but you might have hit a bug where it doesn't fire its callbacks on a failed handshake
04:40 sri (just guessing)
04:40 tempire um...
04:41 tempire "If given the parameter "Timeout" it will stop if after the timeout no SSL connection was established. This parameter is only used for blocking sockets"
04:41 tempire From IO::Socket::SSL->start_SSL
04:41 sri exactly
04:41 sri we are 100% non blocking top to bottom
04:41 tempire oh, I thought you meant ssl was non-blocking
04:42 sri that sounds weird
04:42 tempire I don't even know what that would mean.
04:42 sri :)
04:43 sri well, feel free to add a hard client timeout
04:43 sri as long as it has tests i'm happy
04:43 sri wanted it anyway
04:45 tempire I'm scared of adding that.
04:46 tempire I guess it would have to be in ->start
04:46 tempire Also, I'm submitting my changes with KNOWN BUGS.  I have no futurama quotes.
04:56 tempire ack, ignore that last pull request
05:00 * tempire bites fingernails
05:01 sri tempire: is that the only known bug?
05:02 tempire unless you consider the hanging on requests with incorrectly signed certs to be a bug, yes
05:02 sri hmm
05:06 sri that could indeed be a showstopper
05:07 sri also some pod is missing or ignoring conventions
05:08 tempire which part?
05:08 sri second
05:08 sri actually both
05:09 sri i can fix that though, hanging is the real issue
05:10 sri is the case tested?
05:10 sri "# Fail - bad cert"?
05:10 tempire yes - added a timer to make it pass
05:10 sri it doesn't timeout on its own?
05:11 tempire nope
05:11 tempire just sits there.  mocking.
05:11 tempire not sure why
05:11 sri we do have a soft timeout for inactivity, weird
05:11 tempire what's the soft timeout?
05:11 sri 3 seconds or so by default
05:12 tempire yeah, I saw that.
05:12 tempire tried setting it lower just for kicks
05:12 tempire nothing
05:12 tempire My best guess is that it has something to do with the ssl auth process.
05:17 sri it should not be able to hang forever, so i'll investigate
05:18 sri tempire++
05:18 tempire \o/
05:18 sri first a lot of cleanup though ;p
05:18 tempire I figured as much.
05:19 tempire hack away
05:20 ispy_ joined #mojo
05:37 sri tempire: damn...
05:37 sri you forgot the step by step guide for generating the certificates
05:39 sri and i just applied the patches :S
05:40 sri tempire: do i have to revert everything or can you nopaste the list?
05:48 sri oh well, reverting :(
05:51 tempire The certs are valid until 2038
05:51 tempire I figured that would be long enough
05:51 sri doesn't matter, i need to be able to regenerate them
05:51 tempire k
05:52 tempire nopaste or pull again?
05:52 sri nopaste is fine
06:50 sri tempire: quite sure it's an IO::Socket::SSL error btw
06:50 sri SSL_error_trap does not fire
06:50 sri on the client side
06:58 sri have a workaround though
06:58 tempire !@#$
06:59 tempire I just realized that the badclient cert I'm specifying in the client_tls doesn't exist.
06:59 sri ?
06:59 tempire The file is badcert.crt/key, whereas the test is specifying badclient.crt/key
06:59 sri oh
07:02 sri i'm done with cleanup and fixing
07:03 tempire one thing...
07:06 sri the workaround might actually have more positive side effects
07:06 sri hup event is enforced now all the time
07:08 kaare joined #mojo
07:08 sri should be rather fool proof
07:11 tempire another test case:
07:11 tempire http://pastie.org/1427698
07:13 tempire commands to generate certs:
07:13 tempire http://pastie.org/1427701
07:14 tempire I'm off to bed
07:14 tempire waiting a couple minutes for questions/comments
07:15 sri commands look good at first sight, but i'll try them too
07:16 tempire It's hard to work with walls of text @ 2 in the morning, but I'm confident about 'em.  :s
07:16 tempire should just paste in, no prompts
07:18 sri test just passes btw
07:19 tempire \o/
07:19 tempire 1.1 tomorrow?
07:19 tempire (or later today)
07:19 sri end of the week maybe
07:19 sri this needs testing
07:19 tempire better plan
07:20 tempire night
07:20 sri nn
07:30 seb_ joined #mojo
07:31 Christian joined #mojo
07:31 Christian morning
07:34 * sri waves
07:39 GitHub1 joined #mojo
07:39 GitHub1 mojo: master Glen Hinkle * 8d3803c (4 files in 3 dirs): ssl client certificate authentication support in Mojo::IOLoop, Mojo::IOLoop->handle
07:39 GitHub1 mojo: master Glen Hinkle * 640db74 (2 files in 1 dirs): ->cert & ->key for client ssl auth
07:39 GitHub1 mojo: master Sebastian Riedel * 88c1a8b (7 files in 4 dirs): cleanup
07:39 GitHub1 mojo: master commits 306dd9c...88c1a8b - http://bit.ly/exYYZF
07:39 GitHub1 left #mojo
07:42 perlrocks Twitter: "Thanks to @tempiretech #mojolicious now supports TLS certificate authentication. :) http://bit.ly/hUBeMr #perl" --kraih http://twitter.com/kraih/status/22196055412051969
07:54 sri it's actually quite cool how simple those tests are
07:54 sri considering the complicated topic
07:58 GitHub177 joined #mojo
07:58 GitHub177 mojo: master Sebastian Riedel * b2d0177 (1 files in 1 dirs): cleanup - http://bit.ly/frYbzH
07:58 GitHub177 left #mojo
08:14 ysyrota joined #mojo
08:28 pid joined #mojo
08:30 kvorg left #mojo
08:41 yko hurray! tempire++
08:42 yko https://github.com/kraih/mojo/blo​b/master/lib/Mojo/Client.pm#L1202 <-- i don't know what should that mean but looks wrong
08:44 sri :)
08:45 GitHub162 joined #mojo
08:45 GitHub162 mojo: master Sebastian Riedel * c9a447c (1 files in 1 dirs): fixed typo - http://bit.ly/fnbMNy
08:45 GitHub162 left #mojo
08:45 yko ah... thank you for explanation
08:45 zipkid still no flash... :-(   https://gist.github.com/764547
08:45 * yko is so stupid
08:45 yko :) good morning sri
08:49 sri moin
08:55 yko just fyi, t/mojo/ioloop_tls.t fails against  IO-Socket-SSL 1.34 but passes against IO-Socket-SSL-1.37
08:56 zipkid uany idea about what i might be doing wrong with that flash?
09:11 sri zipkid: if nobody sees anything you might just have the wrong version
09:13 zipkid sri: version of?
09:14 zipkid i'm running mojo version :  4 Jan 2011 08:58:20 GMT+01:00
09:14 zipkid recent enough?
09:14 zipkid This is perl, v5.10.0 built for darwin-thread-multi-2level
09:18 su-bzero joined #mojo
09:26 mmcleric left #mojo
09:26 yko zipkid: i know what is your problem
09:27 zipkid yko: Great! :-)
09:29 GitHub62 joined #mojo
09:29 GitHub62 mojo: master Sebastian Riedel * e9bf008 (5 files in 4 dirs): updated IO::Socket::SSL requirement - http://bit.ly/fFqOW2
09:29 GitHub62 left #mojo
09:30 mmcleric joined #mojo
09:31 yko :)
09:31 arthas joined #mojo
09:31 zipkid is it a secret?
09:32 yko for sure :)
09:32 yko you see, $c->req->url always contains relative url
09:32 sri maybe he's drawing the answer
09:33 yko how do you think, what would be relative path for url '/' ?
09:33 yko solution is to use $c->req->url->to_abs->path or $c->req->url->to_abs at all
09:34 zipkid hmm... i may be wrong but i don't see how the correctness of the url matters.... the flash is set first and not there later, no matter what the content is... ????
09:34 yko did you try to set flash just a string?
09:35 zipkid yko: no, i'll try that...
09:37 zipkid yko: same problem... i dont think it has to do with the url ...
09:37 zipkid $c->flash( login_redirect_path => '/JustAnyThing' );
09:37 zipkid still  no flash by that name...
09:37 sri zipkid: maybe it is time for a small scale test
09:38 zipkid sri: tell me...
09:38 sri lite app, minimal test case
09:38 yko zipkid: https://gist.github.com/764591 <-- that how such test should be done
09:39 yko just a visual exampe
09:39 sri right
09:40 zipkid Welcome to Mojolicious! You came from: /
09:41 zipkid that works :-)
09:42 crab hi.
09:44 yko zipkid: now you may add 'under' to mock up your situation and make sure it works. and then it would be much easy to find error in your code (or report a bug)
09:44 zipkid busy doing that...
09:46 sri zipkid: try "$c->redirect_to( 'login' ); return;"
09:46 sri i suspect the part you're not showing screws it up
09:46 sri bridges have to return false to block dispatching
09:50 perlrocks Twitter: "Mojo and Dancer are respectively second and third most forked #perl projects on GitHub! Modern Web FTW! https://github.com/languages/Perl" --sukria http://twitter.com/sukria/status/22228407257407488
09:51 sri "Tue Jan  4 09:42:12 2011 debug Mojolicious::Routes:421 [13533]: Dispatching Ds::Controllers::Customers->index."
09:51 sri that line doesn't make any sense
09:51 zipkid hmm
09:53 zipkid why not?
09:53 zipkid there is an index sub...
09:54 sri umm, it happens after you called redirect_to
09:54 sri if thats really what you intended ok...
09:56 zipkid get /customers -> not auth -> login form -> post login -> auth ok -> /customers
09:56 zipkid that is the flow somewhat.
09:58 sri in a normal app "return $c->redirect_to( 'login' );" does not belong in a bridge
09:59 sri it returns true, which makes no sense
10:00 zipkid then i should base my code on a better example
10:07 Christian can i encode my url for example in 'welcome.html.ep' or it is not possible?
10:08 sri don't understand the question, but you can
10:09 Christian i want to encode the uri in the template file and not in the controller or in a helper package
10:10 Christian uri = url
10:12 yko zipkid: you may like it https://gist.github.com/764609
10:13 yko also i know where you flash disappear
10:15 yko if there's no login info, you render login form. when user submit form he already has no flash, you need to renew it
10:15 zipkid yko: the flash is not there when the login form gets displayed.. before the submit..
10:16 yko maybe. i don't like to debug your code :)
10:17 zipkid yko: i understand.... sorry
10:17 yko np. but you may look at my example - it just works
10:17 zipkid aparently i have bad style...
10:17 zipkid yko: i'm doing that.
10:19 zipkid i'm not sure what 'return unless my $redirect = $c->flash('redirect');' is there for in get '/login'
10:21 yko you may replace that to if ($c->flash('redirect')) { $c->flash('redirect' => $c->flash('redirect')) }
10:21 yko redirect redirect redirect redirect .... STOP THAT!!! no flash? just render template!
10:22 zipkid k :-)
10:23 yko you should understand that if you don't call $c->render* family in your action corresponding template will be rendered
10:23 yko so you can just return from action at any point
10:29 zipkid yep, that i know.
10:34 rhaen hello world
10:35 zipkid Goodbye cruel world...   ;-)
10:35 rhaen :)
10:38 perlrocks Twitter: "http://goo.gl/grQ6h - Sebastian Riedel argues over what to mojolicious work on. We offer our options!" (ru) --mcsseifer http://twitter.com/mcsseife​r/status/22240491269521408
10:43 seb__ joined #mojo
10:44 seb__ left #mojo
10:44 seb__ joined #mojo
10:47 zipkid yko: thx for the example!
10:48 yko works?
10:48 zipkid yes
10:48 yko than you owe me wiki page :D
10:48 zipkid hmm....
10:48 zipkid ?
10:51 yko write wiki page about using flash!
10:51 * yko cracks the whip
10:52 * moritz wipes the crack
10:52 zipkid hmm... actually, i think i can not write about flash because i (we) don't know what ate it... i think a login form example should be more usefull (using flash)
10:52 yko yep, that's what i mean
11:03 zipkid where?
11:04 * zipkid wonders what crack moritz is wiping... (or kissing ;-)
11:04 * moritz just exchanged two words
11:05 * moritz whistles innocently
11:06 yko zipkid: where? > https://github.com/kraih/mojo/wiki there :)
11:30 perlrocks Twitter: "Taking a look at Mojolicious this morning - an MVC framework in Perl http://mojolicio.us #perlRocks" --martharotter http://twitter.com/martharot​ter/status/22253640026685440
11:35 GitHub159 joined #mojo
11:35 GitHub159 mojo: master Sebastian Riedel * fb2d8d3 (1 files in 1 dirs): cleanup - http://bit.ly/htUx4H
11:35 GitHub159 left #mojo
11:36 Akron joined #mojo
11:38 sri hmm, now i'm confused, wasn't V canceled?
11:38 sri season 2 seems to start today
12:19 forwardever joined #mojo
12:25 zipkid yko: very quick version... https://github.com/zipkid/mojolicious-login
12:32 yko there's no tests!
12:32 zipkid Aaaargh!
12:32 zipkid Kill Kill Kill !
12:32 yko :)
12:32 zipkid Pfff... You annoyingly demanding git!
12:32 zipkid :-)
12:36 * zipkid has to take 2 teenage girls to their friends house and that is MUCH MORE important NOW!!!! :-) cya
13:11 marcus "static dispatcher would eat the flash" <- I read that as eat the flesh"
13:12 marcus sri: 1.01?
13:13 sri marcus: end of the week, just merged in tls patches
13:14 sri hehe, flesh eating dispatchers
13:34 daviddelikat1 joined #mojo
13:38 daviddelikat left #mojo
13:44 rhaen sri?
13:44 rhaen SRI!
13:46 rhaen We need support for FoxPro databases and firebird support!!
14:02 zipkid Why not dBaseIV?!
14:13 drewr joined #mojo
14:13 rhaen zipkid: yea! And dbase, too!
14:14 rhaen I think that's nonsense. databases are for whimps!
14:14 rhaen real men do store data in ram only (tm)
14:19 zipkid rhaen: what do woman progammers do then?
14:27 rhaen zipkid: they use joins and write to disk
14:27 rhaen it's not webscale
14:29 fhelmberger joined #mojo
14:29 fhelmberger left #mojo
14:30 fhelmberger joined #mojo
14:33 avkhozov joined #mojo
14:40 marcus awesome
14:40 * marcus has his own office now
14:40 marcus so happy
14:40 zipkid Pics or....
14:53 kaare left #mojo
14:59 su-bzero left #mojo
14:59 su-bzero[A] is now known as su-bzero
15:05 zipkid Darn... the documentation is a tad terse at times....
15:07 zipkid http://mojolicio.us/perldoc?Mojol​icious/Plugin/TagHelpers#Helpers -> link_to... ? what are the options ... what is that foo in the 3rd example?
15:13 DaTa zipkid: ?id=foo
15:14 zipkid DaTa: ah, ok...
15:15 zipkid admit it is not very clear... the 'foo' is not to be found in the result shown in the next table...
15:15 yko zipkid: rly?
15:15 zipkid yko: rly? not? Am i blind?
15:15 yko input id="foo"
15:16 yko second line
15:16 DaTa no, link_to example i was wrong :)
15:16 su-bzero_ joined #mojo
15:16 zipkid yko: where?
15:16 su-bzero_ http://showmetheco.de/articles​/2011/1/15-years-of-cpan.html
15:17 yko zipkid: https://github.com/kraih/mojo/blob/master/​lib/Mojolicious/Plugin/TagHelpers.pm#L365
15:18 zipkid yko: hmm.... i'm taling about link_to
15:19 zipkid https://github.com/kraih/mojo/blob/master/​lib/Mojolicious/Plugin/TagHelpers.pm#L457  -> result  https://github.com/kraih/mojo/blob/master/​lib/Mojolicious/Plugin/TagHelpers.pm#L469
15:19 yko ah... sorry
15:20 yko as i understand first hashref goest to stash when rendering url.
15:20 yko obious route 'index' has url like '/path/to/index/:foo'
15:20 DaTa zipkid: the ':foo' parameter in the route index is replaced with bar
15:21 yko and ye, it's a little unobvious :) i didn't know that i can pass stash values to route in link_to, thank you :))
15:22 zipkid Data, yko, Pretty much everything could use a bit more explanation besides the bare code examples....
15:23 yko https://github.com/kraih/mojo/blob/master/l​ib/Mojolicious/Guides/CodingGuidelines.pod says:
15:24 yko Documentation belongs to the guides, module POD is just an API reference.
15:24 yko so you can consider TagHeleprs as undocumented :)
15:24 yko which may be actually true because whole plugin marked as EXPERIMENTAL
15:24 zipkid But what is an API ref without reference to params....????
15:25 zipkid by 'reference to params' i mean, say what the do/mean
15:25 kaare joined #mojo
15:31 tholen42 left #mojo
15:35 tholen joined #mojo
15:50 drewr left #mojo
15:56 seb__ left #mojo
16:06 omega they don't need ram, they have intuition
16:06 omega women programmers that is
16:06 omega seems I was scrolled up :p
16:08 zipkid :-)
16:17 Christian cu all
16:18 Christian left #mojo
16:34 mattastrophe left #mojo
16:37 josh left #mojo
16:45 marty I'm calling subroutines from my actions like this....some_subroutine($self)  is that the best way to get $self in the called subroutines?
16:45 marcus zipkid: http://instagr.am/p/3LKp/
16:46 yko yay! great!
16:46 marcus we now operate a 500m2 coworking facility in oslo
16:46 marcus in case anyone ever need some office space ;)
16:47 marty marcus:  You got your own office dude!   Exxxccccceeeeelllent!  congratulations!
16:48 marcus marty: Thanks!
16:48 marty Looks comfy and warm.....and sooo neat and tidy. :)
16:48 marcus for now :)
16:52 zipkid :-)
17:03 marcus but actually having a door is awesome.
17:09 Zaur joined #mojo
17:10 kvorg joined #mojo
17:18 ysyrota left #mojo
17:18 josh joined #mojo
17:21 ispy_ left #mojo
17:26 mattastrophe joined #mojo
17:33 pid left #mojo
17:54 Akron left #mojo
17:55 josh left #mojo
18:04 achromic joined #mojo
18:09 ua joined #mojo
18:11 josh joined #mojo
18:15 ua Is there a way to globally change both route prefixes and generated URL's? I'd like to deploy to different directories in our different deployment environments (e.g. /dev, /test, and /production).
18:27 yko gnerated urls are relative so you may want place <%= base_tag %> in your <head>
18:31 ua Hmm, wonder if <base href="<%= base_tag =%>"> would take care of that
18:33 yko ua: just <%= base_tag =%>
18:33 yko http://mojolicio.us/perldoc?Mojol​icious/Plugin/TagHelpers#Helpers
18:35 yko i'm not sure about deployment in subdirs. i dealed with that long time ago, but afaik it must be much simplier now
18:38 ua Oh, I see
18:39 yko as i said before, there will be different solution for different environments. CGI, nginx, etc
18:39 ua *nod*
18:40 ua thanks for the help mate
18:41 fhelmberger left #mojo
19:01 avkhozov left #mojo
19:02 avkhozov joined #mojo
19:12 daviddelikat1 left #mojo
19:13 su-bzero1 joined #mojo
19:14 su-bzero_ left #mojo
19:24 su-bzero is now known as zero-tolerance
19:31 daviddelikat joined #mojo
19:38 al left #mojo
19:38 achromic_ joined #mojo
19:41 achromic left #mojo
19:47 al joined #mojo
20:09 marty I think I've read this before in the docs but I cannot find it now.  :(  Is there an easy way to test for a defined stash value in a template?
20:09 marty % if (defined $error) does not work
20:15 seb_ left #mojo
20:16 yko marty: % dfined stash('foo')
20:17 yko *defined
20:18 mattastrophe left #mojo
20:24 marty yko: Thank you very much, works perfectly
20:28 perlite_ joined #mojo
20:32 perlite left #mojo
20:32 perlite_ is now known as perlite
20:52 seb_ joined #mojo
21:05 avkhozov left #mojo
21:05 avkhozov joined #mojo
21:12 forwardever testing mojo in cgi mode, it takes around 0.55 sec to display the welcome page (using Time::Hires) on my VPS, using a very specialized dispatcher in combination with CGI::PSGI and xslate, it takes around 0.08 sec, although with less functionality (just wanted to provide some facts on yesterday's cgi discussion...)
21:29 avkhozov left #mojo
21:33 marcus Cosimo from Opera has testet Mojolicious and thinks "it is wonderfull"
21:36 mattastrophe joined #mojo
21:40 zamolxes_ (sorry if I asked this before) how do you handle forms and sql?
21:46 marty samolxes: Can you be more specific?
21:48 marty question for the group.  Are you guys all doing strict OOP in your apps or are you using a mix of both procedural and OOP?
21:48 marty I'm still switching from a non OOP background and trying to figure out when it makes sense to use OOP.
21:52 yko mostly oop. Mojolicious forces :)
22:10 forwardever left #mojo
22:15 ispy_ joined #mojo
22:23 cosimo marcus: true that, mojolicious kicks ass
22:24 cosimo :)
22:30 xantus mojolicious kicks chuck noriss' ass
22:31 xantus 56smidk3
22:31 xantus fucking windows
22:32 yko xantus: was that a combo from mortal combat?
22:33 xantus the old password for the box I was logging into
22:33 xantus heh
22:34 yko oh... i'm sorry
22:35 yko loosing passwords that way thats so disgusting
22:35 xantus yeah, good thing it was old
22:35 yko :)
22:36 yko few pass i still use were in past passes to ISP dailup accounts. ill never forget them
22:49 arthas left #mojo
22:51 kaare left #mojo
23:46 sri zipkid: help writing!
23:47 sri marcus: nice office
23:52 perlrocks Twitter: "Submitted Mojolicious 1.0, MVC web-framework in Perl from the creator of Catalyst: http://opennet.ru/29156/" (ru) --motonarola http://twitter.com/motonaro​la/status/22440257890816000

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