Camelia, the Perl 6 bug

IRC log for #mojo, 2011-12-12

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

All times shown according to UTC.

Time Nick Message
00:15 vel joined #mojo
00:21 * alnewkirk pokes tempire
00:30 chansen joined #mojo
00:35 * xaka pokes tempire
00:39 yaxar joined #mojo
01:09 tempire alnewkirk, xaka.  take a look at the aforementioned issue, let me know if you think I was unreasonable.
01:15 mattastrophe joined #mojo
01:26 xaka tempire: it was i believe, i didn't find any usefull information, at least which one test had failed
01:55 mattastrophe joined #mojo
02:09 noganex joined #mojo
02:19 tempire sri: so is Mojo::IOLoop->listen not used anymore?
02:19 sri tempire: deprecated
02:19 tempire I mean for internals
02:20 sri nothing deprecated can be used for internals
02:20 sri Mojo::IOLoop->server replaced it
02:24 tempire ooooooh.  Mojo::IOLoop::Server->listen must be the listen that's being referenced.
02:25 sri what are you working on?
02:25 tempire poking about
02:25 sri ah, good
02:25 tempire I'm a core developer after all
02:25 tempire :)
02:25 sri good boy
02:25 purl :)
02:27 yaxar tempire: i am getting this error do you know what the problem is ? [Sun Dec 11 18:09:34 2011] [error] Can't call method "tx" on an undefined value at log.pl line 70.
02:27 tempire you're probably calling ->tx on an undefined value.
02:27 tempire maybe a $self that isn't what you think it is
02:27 xaka mb one weak reference?
02:29 yaxar http://pastebin.com/0JRqYv8f
02:29 yaxar this is the whole function ….
02:29 tempire you need to check $self
02:30 tempire make sure it is what you think it is
02:31 yaxar how should i check it?
02:32 tempire print ref $self
02:32 tempire if it's an object, it will tell you the type of object
02:32 yaxar okay :)
02:32 tempire and whatever that object is, it probably doesn't have a ->tx
02:32 tempire but you can check the object docs using perldoc Object::Name
02:32 tempire or on cpan
02:33 yaxar okay thanks :)
02:37 tempire hmm.  where is the event subsystem detected?
02:38 tempire As in, determining whether to use Mojo::IOWatcher as opposed to AnyEvent
02:38 yaxar tempire print ref $self doesn't output anything…..
02:38 tempire that's your problem, then
02:39 yaxar but self = shift ....
02:39 yaxar is shift not anything?
02:39 tempire shift is the first argument of whatever was passed to the subroutine
02:39 tempire so if you didn't pass anything…there's nothing there.
02:39 xaka yaxar: how do you call this subroutine?
02:40 yaxar um waitr();
02:40 xaka yaxar: is it part of package?
02:40 sri tempire: Mojo::IOWatcher->detect, and it happens in Mojo::IOLoop->iowatcher
02:41 yaxar what package?
02:41 purl package is perldoc -f package or lexicaly scoped
02:41 yaxar no i don't think so
02:42 tempire I see that, but I was under the impression that AnyEvent was used if it was loaded…which wouldn't set MOJO_IOWATCHER
02:42 sri tempire: through EV, that stuff happens in AnyEvent
02:42 tempire ok
02:42 xaka yaxar: do you use Mojolicious or Mojolicious::Lite?
02:42 yaxar mojolicious::lite
02:42 purl i guess mojolicious::lite is just the one file dealy right?
02:43 sri yaxar: you want $self->waitr()
02:43 tempire lulz
02:43 tempire go purl
02:43 sri yaxar: or waitr($self)
02:43 xaka yaxar: ok, can you show us the whole file where "waitr" is used?
02:43 yaxar but i am calling it from another subroutine which doesn't have $self
02:43 yaxar yes
02:45 yaxar https://github.com/yaxar/ircl​ogbotperl/blob/master/log.pl
02:45 yaxar oops actually
02:45 yaxar https://gist.github.com/1464414
02:46 xaka yaxar: you should pass $self to changeserver and then to waitr
02:46 yaxar like?
02:47 xaka yaxar: your project is getting complex so i'd start use mojolicious, not lite
02:47 yaxar okay...
02:47 yaxar how should i go about changing it?
02:47 xaka yaxar: changeserver($self, ...) -> waitr($self, ...)
02:47 yaxar okay
02:53 xaka tempire: hm, probably you should have to ask him provide more information, like "test log", not just close the issue
02:54 sri http://perladvent.org/2011/2011-12-11.html
02:57 sri that reminds me, ca certificate support for the useragent might be a good wishlist item
02:57 sri tempire: maybe something for you to hack on :)
02:58 tempire rock on.  brian d foy, that's a hefty recommendation
02:59 tempire which, he promised to buy me some cookies that I have yet to see
02:59 * tempire peers outside waiting for cookies
03:00 sri not a bad idea
03:01 * sri goes to get some chocolate cookies with chocolate coating and chocolate chips
03:03 sri my precious
03:05 tempire apparently Alias made the same decision.
03:06 yaxar how do i make the application never timeout?
03:06 yaxar i.e something like this Mojo::IOLoop->stream($self->​tx->connection)->timeout(0);
03:06 yaxar ?
03:09 xaka yaxar: nope, you can't. Why do you need it?
03:10 yaxar um because it always disconnects when the function is don...
03:10 yaxar the change server function
03:10 xaka how long does it work?
03:10 xaka 15s?
03:10 purl 15s is OK, but it's just nowhere near as enjoyable as 7's.
03:11 yaxar the function is ended in like 2 seconds but i want it to keep alive so that it doesn't connect...
03:11 yaxar disconnect
03:11 purl disconnect is probably broken in 0.45. It's been fixed since then. Dunno about topic events.
03:12 xaka purl: are you insane?
03:12 purl i haven't a clue, xaka
03:13 yaxar i believe that purl dost not have a brain and is controlled by computers :)
03:13 yaxar actually i think he is a bot
03:13 yaxar :)
03:18 yaxar anyway so i can't keep the function from ending?
04:00 arpadszasz joined #mojo
04:01 yaxar sri: i can't find out a way that they can change the server…
04:01 yaxar because i need to connect to the server before the file is rendered …
04:01 yaxar i.e. outside of a function
04:22 GitHub85 joined #mojo
04:22 GitHub85 [mojo] kraih pushed 1 new commit to master: http://git.io/fgLvlA
04:22 GitHub85 [mojo/master] removed environment variable that does not exist anymore from cheatsheet - Sebastian Riedel
04:22 GitHub85 left #mojo
04:25 MojoGuest181 joined #mojo
04:25 MojoGuest181 From: http://www.reddit.com/domain/dev.xantus.org/ (1 hits)
04:25 MojoGuest181 left #mojo
04:26 MojoGuest433 joined #mojo
04:26 MojoGuest433 From: http://www.reddit.com/domain/dev.xantus.org/ (3 hits)
04:26 MojoGuest433 /server irc.rizon.net
04:43 guest2560 joined #mojo
04:43 guest2560 left #mojo
04:44 yaxar hi all
04:48 guest2568 joined #mojo
04:48 guest2568 left #mojo
04:48 yaxar hi all
04:49 MojoGuest65 joined #mojo
04:49 MojoGuest65 From: http://news.ycombinator.com/item?id=1277067 (169 hits)
04:49 bot joined #mojo
04:49 bot left #mojo
05:01 gshank joined #mojo
05:26 tempire sri: you removed support for a ca?
05:27 sri tempire: we never really had it
05:28 sri tempire: you should know best, you wrote most of the tls code and tests :)
05:29 * tempire tries to remember
05:29 tempire ca is still supported for the server
05:29 sri for a short time we had a small hack i think, but never really working or tested
05:29 sri yea, works great with the server
05:30 sri adding it should be like 2-3 lines of code
05:30 sri tests are the hard part as usual ;p
05:30 tempire haskell just keeps getting cooler
05:30 tempire the more I get into the book
05:30 sri in this case mostly copy pasta and figuring out how to generate the right certificates though :)
05:31 * sri hides tempires haskell book
05:45 crab tempire: which book?
05:58 gshank joined #mojo
06:03 tempire http://learnyouahaskell.com
06:07 guest21064 joined #mojo
06:08 guest21064 joined #mojo
06:08 alanhaggai joined #mojo
06:09 guest21064 joined #mojo
06:19 alanhaggai Test.
06:22 Vandal joined #mojo
06:39 batman joined #mojo
06:43 vel joined #mojo
06:45 espent joined #mojo
06:55 tempire it would be cool to have a mojolicious workshop at one of the perl events.
06:56 tempire but not just mojolicious top level stuff
06:56 tempire but include how events work
06:56 tempire and have people able to hack on the internals of mojolicious upon exiting the workshop
06:58 tempire I'm still convinced evented programming can be taught in short term
06:58 tempire just needs the right explanation.
06:59 tempire learn mojolicious: upgrade your general knowledge of how parallel processing is done.
06:59 tempire er
07:00 tempire concurrent is more accurate, I guess
07:01 koban joined #mojo
07:06 sugar joined #mojo
07:08 plu morning
07:08 plu I've got some HTML that is causing leaks in Mojo::DOM
07:08 plu I'll show it in a second
07:10 plu unfortunately Devel::Cycle::find_cycle does not show anything
07:17 plu https://gist.github.com/1465594
07:17 plu at the end there's also a short perl script demonstratingt the leak
07:17 plu the 200 iterations cause a memory consumption of about 210mb
07:31 marcus plu: any chance you could reduce that html and still produce a leak?
07:31 marcus also, make a github issue?
07:31 plu I can try
07:31 marcus thanks
07:36 plu issue created: https://github.com/kraih/mojo/issues/240
07:36 plu trying to reduce the HTML now, I'll keep the Gist and the issue updated
07:37 plu I've also tried to wrap it in Test::LeakTrace leaktrace{}, but that thing just never ends. It's running since 12 minutes, causing 100% CPU load and no result yet
07:37 plu (on one iteration, not 200)
07:41 sugar joined #mojo
08:09 plu it's still quite big... :(
08:09 plu https://gist.github.com/1465594
08:10 plu I have the feeling it's the nested ul, li, ul, li tags
08:10 plu if I remove them, the leak goes away
08:10 batman joined #mojo
08:20 berov joined #mojo
08:45 spleenjack joined #mojo
08:50 plu I'm done
08:50 plu now the HTML is tiny: https://gist.github.com/1465594
08:54 cosmincx joined #mojo
09:14 marcus interesting
09:16 plu I'm on perl v5.12.4 btw
09:17 marcus plu: I can't test it, because Memory::Usage is linux only ;)
09:17 plu yea I know sorry :(
09:18 plu just comment those bits out and do a: watch -n1 'ps auxww|grep memleak.p[l]
09:18 plu '
09:18 plu ups
09:18 plu in case you have watch installed :)
09:18 marcus seems I do
09:18 plu yay :)
09:19 DaTa on perl 5.14.2 it leaks too
09:20 plu thanks :)
09:20 plu for testing
09:21 d4rkie joined #mojo
09:21 marcus yupp, confirmed
09:21 plu thanks :)
09:22 plu now that the HTML is kind of small, Test::LeakTrace can find something
09:22 plu Devel::Cycle cannot
09:22 plu the Test::LeakTrace output is still giving me no real clue though
09:22 judofyr joined #mojo
09:22 cosmincx joined #mojo
09:23 judofyr sri: so, when will Mojo support the final WebSocket spec?
09:25 plu the interesting thing is that the Test::LeakTrace output is pointing to several lines, all of them are either regex executions or getting data from @+{...}
09:26 marcus yeah
09:30 holton joined #mojo
09:31 Foxcool joined #mojo
09:31 heytrav joined #mojo
09:32 plu weird
09:32 plu seems to be the @+{qw(...)} slice
09:32 plu if you use (@+)[0..5]; instead, the leak is gone
09:32 plu just need to verify now that everything else is still working :)
09:32 plu my ($text, $pi, $comment, $cdata, $doctype, $tag) = (@+)[0..5];
09:33 plu instead of = (@+{qw/text pi comment cdata doctype tag/});
09:33 plu in Mojo::DOM::HTML
09:34 judofyr what kind of Perl magic is this @+?
09:34 plu see LAST_MATCH_END in perldoc perlvar
09:34 judofyr yeah, I thought so
09:34 judofyr but what about @+{…}?
09:34 judofyr it's an array no?
09:35 atomqi looks like a hash slice to me
09:35 plu seems to be some magic for the named captures of the regex
09:35 heytrav joined #mojo
09:35 * judofyr reads about hash slice
09:36 DaTa LAST_PAREN_MATCH is the english for that thing
09:36 DaTa it's a hash :)
09:36 plu see %LAST_PAREN_MATCH
09:36 plu yep :)
09:36 plu and just a slice for it
09:36 plu DaTa++
09:37 judofyr ah
09:37 judofyr thanks
09:39 judofyr plu: doesn't that look like a Perl leak?
09:39 plu it kind of does, yes
09:39 plu might also be the reason why Devel::Cycle could not see anything
09:39 plu because there's no cycle :)
09:42 plu that 0..5 is wrong, of course
09:43 judofyr plu: what about $+{foo}, $+{bar}…
09:45 plu good idea, but still leaking :(
09:45 judofyr now that's weird
09:45 abra__ joined #mojo
09:47 DaTa i fail to reproduce a leak with a simple regex, maybe the regex itself is part of the problem?
09:48 judofyr regex + the data it matches?
10:06 plu I'm lost
10:06 plu https://gist.github.com/1466347
10:06 plu is leaking too
10:07 plu if you comment out line 70, it's not leaking
10:22 plu https://gist.github.com/1466347
10:22 plu still leaking
10:25 plu asking on #p5p now
10:32 judofyr plu: good work on a reduced test case!
10:34 plu thanks :)
11:10 judofyr joined #mojo
11:19 cosmincx joined #mojo
11:21 espent_ joined #mojo
11:21 chansen_ joined #mojo
11:21 ladnaV joined #mojo
11:21 alnewkirk joined #mojo
11:21 spleenjack joined #mojo
11:30 preflex_ joined #mojo
11:45 alanhaggai_ joined #mojo
11:53 cosmincx joined #mojo
12:17 crab is there any worthwhile perl wiki software?
12:17 crab something simple to setup and use, i don't care too much about features.
12:17 crab (if it actually uses mojo, so much the better)
12:22 DaTa i use oddmuse, it's not modern perl but it like it somehow :)
12:51 marcus crab: I wrote one, it's about the opposite of what you want :)
12:52 marcus crab: there's a GCI project to write a simple wiki example tho.
13:07 lammel2 joined #mojo
13:11 Foxcool joined #mojo
13:53 lammel2 joined #mojo
14:03 jnap joined #mojo
14:11 preflex_ joined #mojo
14:23 cosmincx1 joined #mojo
14:28 cosmincx joined #mojo
14:41 Andrei666 joined #mojo
14:41 Andrei666 i have an issue with mojo
14:42 Andrei666 ...when I run morbo, it tells me that it can't find the template..although the template is there..
14:42 Andrei666 did someone encountered this?
14:44 amoore joined #mojo
14:46 marcus no
14:46 marcus Andrei666: are you calling render, or using the automatic rendering?
14:47 marcus Andrei666: nopaste your error?
14:56 Andrei666 the error is:  Template "/test/Test1/index.html.ep" not found.
14:56 Andrei666 and i'm callling it like     return $self->render( template => '/test/Test1/index' , partial=>1 );
14:57 koban left #mojo
14:57 crab do you really have a directory named /test/Test1?
14:57 Andrei666 yes I do..
14:57 Andrei666 that's the part that I find weird...
14:57 crab or is it something like /home/andrei666/myapp/templates/test/Test1?
14:58 Andrei666 the whole address is:  Template "//var/www/html/Web_Core/nmsweb/te​mplates/test/Test1/index.html.ep" not found.
14:59 Andrei666 nmsweb being the mojo app
14:59 marcus Andrei666: try using template => 'test/Test1/index'
14:59 Andrei666 without the forward slash in front of it?
14:59 crab yes.
14:59 Andrei666 i've tried that.. and i get the same error...
15:00 Andrei666 the weirdest part is.. that I got this error after I moved the folder from templates/Test1/    to templates/test/Test1/
15:01 Andrei666 and morbo is looking for both of them
15:01 Andrei666 for the long one because I specifically gave it to him and for the short one because it was there before i made the change..\
15:01 Andrei666 for the long one because I specifically gave it to him and for the short one because it was there before i made the change..
15:03 inokenty joined #mojo
15:05 mojobot10057 joined #mojo
15:05 marcus Andrei666: just tested, it works fine
15:05 marcus $self->render('test/Test1/index');
15:06 marcus renders templates/test/Test1/index.html.ep
15:06 marcus using morbo
15:07 Andrei666 :(
15:07 Andrei666 Template "test/Test1/index.html.ep" not found.
15:08 Andrei666 and also Template "Test1/index.html.ep" not found.
15:08 Andrei666 the second address is the location where it used to be
15:08 Andrei666 if I put it back there it renders it...
15:10 marcus Andrei666: you are doing something wrong, at any account.
15:10 marcus Andrei666: I just made the file, and call render on it, and I get back 'Hello world'
15:11 Andrei666 well, yes...in simple app it works fine..
15:11 Andrei666 but i don't know why ..on my app it's not working properly..
15:12 Andrei666 i guess I'm doing something wrong..
15:12 KayT3 joined #mojo
15:13 marcus yes
15:13 marcus gotta start debugging, I guess :)
15:13 Andrei666 i know :)
15:13 marcus would start by putting a simple file there first to make sure it's not something with your template
15:14 Andrei666 you mean the content of the template?
15:14 Andrei666 mine it's pretty easy...
15:14 Andrei666 i mean simple
15:14 Andrei666 stuff like <%= $foo %>
15:14 marcus hmm
15:15 Andrei666 and <%= $var %> and 'text in index'
15:15 Andrei666 just to check if it gets the variables from the controller..
15:15 marcus sounds simple enough.
15:15 Andrei666 yup
15:15 marcus are you using layouts?
15:16 Andrei666 in the template?
15:16 marcus to wrap the template?
15:16 Andrei666 well, i'm part of a team building a big app
15:17 Andrei666 so in the templates/test/ forlder
15:17 Andrei666 we have
15:17 Andrei666 a generic.html.ep
15:17 Andrei666 and in there we have
15:17 Andrei666 % layout 'default';
15:17 Andrei666 % title 'Test Page';
15:17 Andrei666 <%== ui $testitem %>
15:17 Andrei666 that's all
15:18 lammel2 Seem line WebSockets finally see the light of day: http://www.ietf.org/mail-archive/web​/ietf-announce/current/msg09663.html
15:18 lammel2 as the offical RFC 6455
15:25 Andrei666 thanks marcus
15:26 Andrei666 i've managed to make morbo get it
15:26 marcus Andrei666: was it related to your layout?
15:26 Andrei666 well it was from a html file
15:26 Andrei666 i have multiple controllers added in another controller
15:27 Andrei666 and i needed to modify the html.ep file of the 'big' controller
15:27 Andrei666 and add a namespace there...
15:27 marcus sounds complicated :)
15:28 Andrei666 for the moment i don't receive a error saying that it can't find the file
15:28 Andrei666 but it doesn't render it either :D
15:28 Andrei666 yes, it is complicated...and i'm a junior in perl and mojo also..
15:28 Andrei666 and I don't have the proper language.. :)
15:29 Andrei666 maybe it isn't for some experienced guys, if I had the vocabulary :P
15:30 marcus :p
15:31 marcus Andrei666: russki?
15:31 Andrei666 romanian :)
15:31 Andrei666 why ? :p
15:31 Psyche^ joined #mojo
15:32 marcus just asking. Andrei sounds russian to me :)
15:32 Andrei666 well, yes, sounds eastern european...
15:32 Andrei666 in polish i guess it is Andrej
15:33 Andrei666 and there are some other versions...with different spelling :)
15:33 Andrei666 but basically pronounced the same. :)
15:33 Andrei666 and you?
15:33 purl well, you is what you am
15:33 Andrei666 ?
15:33 marcus Andrei666: Norwegian.
15:33 purl norwegian is nicer than swedish. or french for "durnk"
15:33 crab marcus is from the frozen arctic wastelands.
15:34 Andrei666 marcus??? your norwegian??/
15:34 Andrei666 nice :D
15:34 Andrei666 jag talar lite svenska :)
15:34 Andrei666 :op
15:34 marcus jag talar oxo lite svenska :p
15:34 Andrei666 jag likke norsk ackso :P
15:34 Andrei666 :D
15:34 marcus det er bra :)
15:34 Andrei666 min flickven talar norsk :P
15:34 marcus crab: More like the arctic slush
15:35 Andrei666 varifran norge aer du
15:35 Andrei666 ?
15:35 marcus Andrei666: Oslo
15:35 Andrei666 nice \m/
15:35 marcus 6 degrees and rain here today. :-/
15:35 marcus after snow last week
15:35 Andrei666 :D
15:35 judofyr D:
15:35 Andrei666 i guess..
15:35 crab my daughter was complaining the other day that she's never seen proper snow.
15:36 marcus crab: bring her to norway :)
15:36 Andrei666 we had some very cold weather in here...at the end of november, but still no snow
15:36 Andrei666 it will snow on christmas, though.. :)
15:36 lammel2 *before* global earth warming hits norway ;-)
15:36 crab marcus: then she'll complain about the cold. she can be a contrary creature.
15:36 Andrei666 crab: where are you from?
15:36 crab andrei: india
15:37 Andrei666 :)
15:37 marcus crab: :-/
15:37 marcus I don't mind the cold, but I am not a fan of the Oslo winter.
15:37 MojoGuest470 joined #mojo
15:37 MojoGuest470 From: http://www.google.com/url?sa=t&amp;rct=j&amp;q=m​ojolicious%20websocket%20fallback&amp;source=web​&amp;cd=10&amp;ved=0CFkQFjAJ&amp;url=http%3A%2F%​2Fdev.xantus.org%2F&amp;ei=hB_mToj7KISisQKujY2FB​g&amp;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg (1 hits)
15:37 marcus I much prefer Lillehammer. Cold and dry and lots of snow.
15:37 marcus here we have one day of snow, then two days of rain, and then snow again
15:37 marcus it sucks
15:38 judofyr sucks indeed
15:38 marcus but at least it gets dark before you leave work anyways, so it's not like you can do anything outside ;-)
15:39 Andrei666 :)
15:39 Andrei666 i've never been in scandivia..
15:39 Andrei666 but I sure want to move there :D
15:43 marcus :)
15:48 mercutioviz joined #mojo
15:51 sri judofyr: we already do
15:52 judofyr sri: ah, good
15:53 sri plu: that looks like a weird leak
15:54 sri plu: did you try if @+ in general doesn't leak?
15:56 marcus sri: did you see his minimal test case? @+ in general seems to leak
15:56 marcus sri: https://gist.github.com/1466347
15:59 sri hmm
15:59 sri that sucks
15:59 purl The rock is now off.
16:00 marcus yes
16:03 sri do we have to get rid of named matches?
16:03 judofyr is $+{} the only way to access named matches?
16:04 judofyr Ruby actually allows you to get named matches through local variables…
16:04 sri we use named matches in many places :S
16:05 judofyr but does all named matches leak? :S
16:05 judofyr I can't really believe that…
16:06 sri the minimal test case above is scary
16:07 marcus %+ ?
16:07 purl it has been said that %+ is a good name
16:08 sri even with 5.14.2 it is leaking
16:08 judofyr marcus: but does every Mojo::DOM parsing leak? or just the example you found?
16:09 sri Mojo::DOM leaks
16:09 inokenty panic
16:09 marcus plu claimed it stopped leaking if he removed the nested uls
16:09 marcus but his minimal use case clearly leaks here.
16:10 marcus using 70 mb now.
16:10 marcus 115 now
16:10 marcus it grows for a while, then it's reduced, then grows again
16:11 marcus but always increasing
16:11 arpadszasz joined #mojo
16:15 sri yea, leak is definitely confirmed
16:19 judofyr sri: WHY U LEAK PERL? :(
16:20 marcus IN SOVIET RUSSIA, PERL LEAKS U!
16:22 inokenty Im from Russia )
16:23 marcus heh
16:23 marcus https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=78266
16:24 marcus seems this has been known for a long time
16:24 inokenty But still not fixed (
16:24 sri oh damn
16:25 judofyr wow
16:26 judofyr even older: https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=64646
16:27 sri :(
16:28 marcus this one claims it was fixed in bleedperl
16:32 marcus sri: guess we have to get rid of named captures :(
16:34 sri yea, too bad
16:34 marcus rjbs says it could go into the next 5.14 and 5.16 if it's fixed soon.
16:34 marcus but still.
16:34 sri we have to support 5.12 at least for a few more years
16:35 marcus I'm not qualified to even start looking for it.
16:35 * marcus & dinner time.
16:38 crab how annoying.
16:40 judofyr I know! let's rewrite everything in JavaScript!
16:41 inokenty Ruby
16:41 inokenty rubylicious
16:42 crab inokenty smoktunovsky?
16:42 yaxar joined #mojo
16:43 inokenty crab: You know me? ))
16:46 crab well, if you're innokenty smoktunovsky, i'm a big fan.
16:48 yaxar is marcus on?
16:49 judofyr noe
16:50 yaxar can someone help me with making a makefile or is that only for none mojolicious lite apps?
16:51 judofyr yaxar: perl Makefile.PL
16:51 purl perl Makefile.PL is generating for me
16:52 yaxar no i mean like generating a makefile.pl
16:52 yaxar ...
16:53 judofyr yaxar: here's out Makefile.PL: http://pastie.org/private/l2leljoozvwzlybcxsqtg
16:53 xaka joined #mojo
16:53 yaxar okay thanks :)
17:01 GitHub14 joined #mojo
17:01 GitHub14 [mojo] kraih pushed 1 new commit to master: http://git.io/Etj_Fw
17:02 GitHub14 [mojo/master] updated credits - Sebastian Riedel
17:02 GitHub14 left #mojo
17:02 sri great, for the important commit the github bot fails -.-
17:02 sri https://github.com/kraih/mojo/commit/69​28a3363d285284ccb407ed915191c87dfaa024
17:02 sri named captures are gone :/
17:02 judofyr :/
17:03 xaka heh, i remember leaks are fixed in 5.14.x at least, nope?
17:04 sri leak is confirmed in 5.14.2
17:05 sri named captures are unusable for a few more years
17:07 yaxar sri is it necessary to generate a makefile.pl for none lite apps?
17:07 yaxar for lite apps *
17:15 mire_ joined #mojo
17:37 batman joined #mojo
17:38 xaka sri: http://mojolicio.us/perldoc/Mojo/UserAgent#app (there is no link to app class doc, would be usefull to have)
17:38 marcus yaxar: if your module uses non-core perl modules, a makefile.pl is useful. You just need to change the reference to lib/Myapp.pm to your script
17:39 marcus yaxar: in the future we might be able to drop the makefile.pl and just use miyagawa-san's cpanfile instead tho
17:39 * marcus ( https://github.com/miyagawa/cpanfile )
17:40 xaka situation: i have route handler which works longer than 15s (default timeout) and i have mojo test. I can change timeout for UA in Test::Mojo, but how can i change timeout for server?
17:41 xaka right now my test fails not because of UA timeout, but server (we were discussing it few days ago)
17:42 xaka in case of morbo i could use --keepalive option, but what about tests?
17:43 marcus xaka: set the timeout it on the app ioloop?
17:43 xaka marcus: i believe there is no such anymore after last commits?
17:44 xaka at least deprecated :-P
17:44 xaka anyway i have to know connection id to do it
17:45 * xaka still thinks that handling server response timeout on server is bad idea (it's up to client)...
17:47 marcus xaka: I guess only sri knows this for sure, but what about app->ioloop->stream->timeout ?
17:48 xaka marcus: it could be workaround, but where can i get the stream (from server side, not UA) to change the timeout?
17:48 sri marcus: it's documented
17:49 marcus sri: where?
17:49 xaka could you provide the link please? because i went through Test::Mojo and down to whatever, didn't find
17:50 sri marcus: http://mojolicio.us/perldoc/​Mojolicious/Controller#write # here for example
17:50 sri increasing the timeout is mentioned in multiple places that discuss long polling
17:50 yaxar okay
17:51 marcus sri: that makes sense. clearer than the documentation for the stream method itself.
17:51 marcus Maybe duplicate that example to IOLoop.pm as well?
17:51 sri sure
17:51 marcus I'll do it
17:52 yaxar marcus to or from?
17:52 xaka hm, i.e. controller decides how long it (probably) will handle the request
17:52 marcus yaxar: hmm?
17:52 sri marcus: i think it should be below the stream method description
17:52 yaxar right now i changed it to point to log.pl
17:52 yaxar ...
17:52 marcus yaxar: that should be fine
17:53 yaxar okay
17:53 yaxar can you review it again ? http://www.google-melange.com/gci​/task/view/google/gci2011/7115317
17:54 sri marcus: don't use $self->tx->connection though
17:54 xaka marcus: btw, why don't make "connection" be Stream object so we wouldn't hardcode on Mojo::IOLoop in controller logic? $self->tx->connection->timeout(...) looks better
17:55 marcus I love how sri and xaka is having a conversation via me.
17:55 xaka or even $self->tx->timeout(...) (sounds like transaction timeout, make sence)
17:55 xaka marcus: he said discuss with one of you guys, not with him :) and then go back to him after i've got the result
17:55 xaka so i'm just keeping his suggestion :-P everyone happy
17:57 marcus xaka: well, we will continue to look at the API, but meanwhile you have your answer for how this works, and I'll try to add an example to the stream method
17:57 marcus I agree some shortcut might be useful tho
17:57 marcus but that's just syntax sugar
17:59 marcus sri: I'll just use $tx->connection in the example.
17:59 sri marcus: hmm, don't like that
17:59 marcus why?
17:59 marcus it's the same example you use for write
17:59 sri ioloop and tx have no relationship
18:00 sri that's a different layer
18:00 marcus well, the point is people don't know how to get a connection to pass to the stream method
18:00 marcus based on your current documentation
18:00 sri Mojo::IOLoop->stream($id)->timeout(300);
18:00 marcus I mean, they have no idea what $id is
18:00 sri that would be an example appropriate for the context imo
18:00 marcus or where they can et one
18:00 purl one is easy to fix, one is hard to fix or in NSW, only about 130km from Wagga Wagga.
18:01 sri $id is used all over the ioloop documentation
18:01 marcus for different things
18:01 * sri really doesn't like mixing the layers
18:02 sri marcus: what different things?
18:02 purl different things are different and the code should reflect this.
18:03 xaka if you dont like it then $tx->timeout(...) should be the solution, nope? "transaction timeout" sounds well, nope? controller works on transaction level, not connection
18:03 marcus sri: like timers. I guess it's the same kind of id tho
18:03 sri marcus: it is
18:03 xaka such way removes depds on ioloop and connection
18:05 marcus xaka: transaction doesn't really know about the ioloop tho
18:05 yaxar marcus is everything looking good for http://www.google-melange.com/gci​/task/view/google/gci2011/7115317 ?
18:05 sri mojolicious documentation on the mojo layer just feels very wrong to me
18:05 marcus sri: Mojo::Transaction is not mojolicious documentation tho
18:05 sri ioloop knows nothing about transactions though
18:06 marcus sri: what about including both a $tx example and a $id example? Even tho your current example mentions id a lot already.
18:06 sri and vice versa
18:06 marcus sri: true, but it's an example of a way to get a transaction id
18:06 xaka so mb make sence make connection be stream?
18:06 marcus using another api about the same level.
18:06 sri which is built in server specific
18:06 xaka $tx->connection->timeout(...)
18:07 * sri pokes tempire and crab
18:08 xaka marcus: btw, http://mojolicio.us/perldoc/Test/Mojo#app is under methods, but its behaviour like property (the same for http://mojolicio.us/perldoc/Mojo/UserAgent#app) + it doesn't have link to app class doc. could you fix it?
18:08 marcus xaka: app is a method, check the source.
18:09 xaka hm, but $t->app (returns app), $t->app(...) (set new app)
18:09 xaka (from docs)
18:09 marcus xaka: it also has further functionality. it will default to ENV MOJO_APP, for instance
18:09 marcus set it even
18:10 marcus xaka: Test::Mojo::app is mostly a proxy for the UA method tho.
18:10 xaka what about link to app class doc at least?
18:11 marcus which class?
18:11 purl i think which class is good for noobs?
18:13 xaka http://mojolicio.us/perldoc/Mojo/UserAgent#app. It returns some object which has "log", "secret", ... props/meths. Which class it based on? i'd like to see link to such parent class
18:13 marcus xaka: you mean http://mojolicio.us/perldoc/Mojo/UserAgent#app should link to L<Mojo> ?
18:13 xaka yeap
18:14 marcus 'Should be set to some subclass of L<Mojo>?'
18:14 xaka people see examples ($ua->app->log(...)) but they don't know what else it supports because they dont know what app is
18:14 marcus xaka: well, that can be different based on what app you are testing.
18:15 sri marcus: the more i think about it the less i actually care if usage examples mix up layer, hmm
18:15 marcus it's your application class.
18:15 marcus sri: I agree it's not so good for the Mojo layer to be tied to the Mojolicious layer tho
18:15 sri marcus: in the end usage examples should be based on what our users actually need
18:15 sri marcus: not so much correctness
18:16 marcus sri: I think so too
18:16 marcus which is why I don't think documentation needs to be DRY like code :)
18:17 sri marcus: for descriptions i think it should be DRY and rather link
18:17 marcus mm
18:17 sri descriptions get updated all the time
18:17 sri examples not so much
18:17 xaka marcus: i think it's really bad idea dont use Mojo as base class for your app if you want to provide yourself so link to Mojo is still required
18:18 marcus sri: you agree about that? The requirement for UserAgent->app is that it is some Mojo subclass?
18:18 sri marcus: no
18:19 xaka marcus: again, the problem is that people see (From example) "say $ua->app->secret;" - what the secret? what the log? where they comes from? docs should answer on this question if such examples there
18:19 sri i usually append something like ", which is usually a L<Mojo::Transaction::HTTP> or L<Mojo::Transaction::WebSocket> object."
18:19 marcus sri: what is the requirements for setting UserAgent->app, then?
18:20 xaka either examples should be changed or link to Mojo should be added
18:20 marcus sri: that's fine
18:20 marcus usually a L<Mojo> or L<Mojolicious> subclass"
18:20 sri object
18:20 sri or subclass
18:20 marcus I can use object
18:21 sri object much more commonly
18:24 GitHub167 joined #mojo
18:24 GitHub167 [mojo] marcusramberg pushed 1 new commit to master: http://git.io/AI_9dA
18:24 GitHub167 [mojo/master] Improve documentation - Marcus Ramberg
18:24 GitHub167 left #mojo
18:25 * marcus phears
18:25 sri TYPO!
18:25 marcus also, it should not be 'current transaction'
18:25 sri indeed
18:26 sri L<Mojolicious
18:26 xaka omg omg omg
18:27 guest30652 joined #mojo
18:27 GitHub77 joined #mojo
18:27 GitHub77 [mojo] marcusramberg pushed 1 new commit to master: http://git.io/OvBMlg
18:27 GitHub77 [mojo/master] Fix typos - Marcus Ramberg
18:27 GitHub77 left #mojo
18:28 sri marcus: that doesn't sound right either -.-
18:28 marcus sri: omg omg omg
18:28 xaka how long does it docs to be updated?
18:29 sri marcus: it is the timeout of the connection not the transaction
18:30 marcus sri:   # Increase timeout for a transaction's connection to 300 seconds
18:30 marcus bettar?
18:30 xaka marcus: it's my fault, not your, i was initiator of changes :) soooorrryyy
18:30 sri isn't is "transactions connection"?
18:31 sri s/s/t/
18:31 marcus sri: trantactions connection? :p
18:32 * xaka is looking for cover...
18:32 marcus sri:   # Increase timeout for the connection of a transaction  to 300 seconds  # avoiding the problem
18:33 marcus connection to a transaction even
18:33 sri to a sounds wrong again ;p
18:33 marcus english hard :-/
18:33 sri inded!
18:34 * xaka pokes tempire (teacher, where are you)
18:39 sri "# Increase timeout for the connection of a transaction to 300 seconds" imo
18:42 GitHub136 joined #mojo
18:42 GitHub136 [mojo] marcusramberg pushed 1 new commit to master: http://git.io/yd12WA
18:42 GitHub136 [mojo/master] Fix typos - Marcus Ramberg
18:42 GitHub136 left #mojo
18:42 sri \o/
18:42 yaxar left #mojo
18:43 yaxar joined #mojo
18:47 GitHub178 joined #mojo
18:47 GitHub178 [mojo] kraih pushed 1 new commit to master: http://git.io/2KIgYg
18:47 GitHub178 [mojo/master] updated changes with description of Perl bug - Sebastian Riedel
18:47 GitHub178 left #mojo
18:52 sri time for beer and pizza
18:58 xaka marcus: morbo and other daemons support "listen" option, but right now it's not easy to use it, you can't just specify the port number, you have to write all stuff like "http://*:port". --listen=4000 really cool
18:59 marcus xaka: I kinda like http://*:port - means you can bind it to an ip.
18:59 xaka marcus: how often do you use it? i mean in 51% cases only port is required
19:00 marcus xaka: 90% of all statstics are made up.
19:00 marcus statistics even
19:00 marcus xaka: I use it when I deploy to freebsd jails
19:01 marcus xaka: but I usually never change the port of morbo at all
19:02 marcus xaka: and I usually set 'listen' once, in hypnotoad.conf
19:02 xaka btw, it was feature request :-p. if i need diff ip i'll use a long syntax, if i need only port - i dont all this sht. people are lazy, dont force them hurt their fingers :)
19:03 marcus xaka: I think it's just bloat. better to have one consise syntax for both use cases.
19:06 marcus sri: http://static.fjcdn.com/pictures/bee​rrrrrrrrrr+beertits_d3087f_76553.jpg#.png
19:07 sri AAAAAAAAAAAAAAAAH
19:07 sri i better disable autopreview
19:07 marcus muhaha
19:27 sri https://github.com/kraih/mojo/issues/241 # wonder why people get this wrong so often
19:29 sri think unicode and garbage collection are the perl problems that come up most often
19:29 xaka marcus: you're doing well in russian!
19:30 marcus xaka: spasibo
19:30 marcus sri: or garbage collecting unicode!
19:30 sri /o\
19:30 xaka ^^^ looks like a dron from start wars
19:31 xaka *star wars
19:32 marcus xaka: I watch Маша и Медведь :)
19:32 marcus http://www.youtube.com/watch?v=CSdGB_r6ZkQ
19:34 xaka yeah, i saw it. kids really like this movie. it's full of fun and insane things. they could do the same for adults with a minor changes - add vodka & balalayka :-D bear is already there
19:35 marcus haha
19:35 marcus yeah, my daughter really enjoys it.
19:35 marcus and I enjoy sleeping while she watches it in the morning :p
19:36 * xaka has 3 weeks old daugther and haven't sleep yet for all that time
19:37 marcus haha
19:37 marcus Mine is almost 3 years. I have another one on the way tho :p
19:38 xaka the gas problem is coming? ;)
19:38 marcus ;)
19:59 abra joined #mojo
20:31 jnap joined #mojo
21:00 mire_ joined #mojo
21:07 xaka oh, why mojo::collection does the conversion to string? unexpectable and can't be passed to mojo::json::encode
21:09 xaka as a workaround i have to do [@{collection}] which has some memory footprints
21:19 yaxar joined #mojo
21:25 yaxar joined #mojo
21:34 perlite_ joined #mojo
21:43 jnap joined #mojo
21:45 sri marcus: latest simpsons episode was indeed awesome!
21:45 sri btw. scm status in textmate2 is cool
21:47 marcus agree
21:48 marcus I think I will just keep the sidebar for scm status
21:48 marcus I just use cmd-t to get the files anyways
21:48 sri file navigation is a bit weird
21:48 marcus yeah
21:50 sri hmm, wonder how to update the mojo bundle
21:50 xaka marcus: any ideas about mojo::collection and that it overrides '' operator?
21:51 xaka if i pass such collection (with hashes inside) to encode, i've got "HASH(xxx)\nHASH(xxx)" instead of json '[{...}, ...]'
21:52 marcus xaka: heh, collections are objects, if you turned of the stringification, it still would not work the way you suggest.
21:54 xaka marcus: it's just blessed array so it should work as array. actually it does, but somehow '' operator is called when i do encode
21:55 xaka it's not funny convert array to collection and back when i've done with it just to encode it
21:56 marcus xaka: it's not fun to play with the internals of objects either.
21:56 marcus xaka: what if we decide to change the internal structure of Mojo::Collection later?
21:57 marcus will you be crying about it then? :p
21:58 xaka em, i believe discussion went into wrong direction. i talking about '' operator and that sri, probaly, didn't expect it could affect in this way
21:58 xaka sri: if you're agree with such behaviour, i close the topic
22:00 * sri agrees with marcus
22:00 xaka ok, i'll just use @{...}
22:01 marcus xaka: that's not guaranteed to continue working
22:01 sri marcus: it is
22:01 xaka marcus: experimental is removed :-p
22:01 sri not true
22:02 marcus sri: so you guarantee I can delete $self->req->{params}; too then? :p
22:02 sri the object can change, just working as an array is part of the stable Mojo::DOM api
22:02 xaka ups, not yet )
22:02 sri marcus: just in the Mojo::DOm case :)
22:02 sri *uc()
22:02 jwang joined #mojo
22:03 sri soooo…. if you're using Mojo::Collection alone then it is not guaranteed, as part of Mojo::DOM it is
22:05 sri it's just the way it has grown
22:05 marcus sri: are there tests/docs for it being an arrayref?
22:05 sri yes
22:06 marcus ah, in the DOM, because it was a unblessed arrayref first
22:06 * sri nods
22:07 sri documentation mostly says …->[1]->text and the like
22:07 sri it's all over the place, pretty much no chance to ever change that
22:08 sri (not that i wanted to)
22:09 marcus I wouldn't mind providing a method to access the collection as an arrayref tho
22:09 sri [$collection->each]
22:09 marcus yeah, but that adds an unneccessary deref. not that I care
22:10 xaka i think docs should say which operators are overriden so people will know what to expect
22:11 marcus I love the new textmate search so much.
22:18 yaxar joined #mojo
22:22 marcus sigh, we have no germans who care about german teenagers. # http://www.google-melange.com/gci​/task/view/google/gci2011/7116332
22:23 marcus but we do have an almost complete set of german translations of the guides tho.
22:27 metaperl joined #mojo
22:38 MojoGuest933 joined #mojo
22:38 MojoGuest933 From: http://www.reddit.com/r/html​5/comments/bt76k/irc_client/ (20 hits)
22:40 * sri pokes the german lurkers
22:42 foomator *lurk*
22:42 * sri pokes foomator
23:00 jnap joined #mojo
23:01 yaxar_ joined #mojo
23:04 yaxar_ joined #mojo
23:05 yaxar_ joined #mojo
23:14 yaxar_ joined #mojo
23:14 yaxar_ joined #mojo
23:15 yaxar_ joined #mojo
23:15 yaxar_ joined #mojo
23:16 sri marcus: i actually tried proofreading, but am literally falling asleep after two sentences
23:19 memowe <german>Sollte der Leser in deutschen PODs direkt angesprochen und dann gesiezt werden?</german>
23:19 sri skimming through it looks ok
23:19 sri memowe: hmm
23:20 memowe To me it looks strange. But I'm not used to german docs.
23:22 sri neither am i actually :)
23:23 memowe However, the german docs need proofreading: "Er besitzt viele modernste Spaßfunktionen" usw.
23:24 memowe I could help.
23:24 sri that would be great
23:24 * sri pokes marcus
23:24 memowe Does the author have an IRC nickname?
23:25 sri don't think so
23:25 sri http://www.google-melange.com/gci​/task/view/google/gci2011/7116332
23:25 sri all i know is that link
23:25 memowe I'll open some issues to start discussion.
23:27 sri memowe++
23:33 memowe https://github.com/leezu/German-trans​lation-of-Mojolicious-guides/issues/2
23:45 memowe https://github.com/leezu/German-trans​lation-of-Mojolicious-guides/issues/3
23:49 memowe Enough for today, good night! :)
23:53 sri nn

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