Camelia, the Perl 6 bug

IRC log for #mojo, 2011-12-10

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

All times shown according to UTC.

Time Nick Message
00:26 marcus from 1 blog post in 2011 to 2. blog post in december :) - http://marcus.nordaaker.com/2​011/12/beautiful-open-source/
00:30 sri marcus++
00:30 sri btw. i've thought a bit about a timeout event, it might make sense in Mojo::IOLoop::Stream
00:33 sri timeout logic would basically get moved from Mojo::IOLoop to Mojo::IOLoop::Stream
00:37 gshank_ joined #mojo
00:38 metaperl joined #mojo
00:38 xaka whether the stream should be aware of keepalive timeout?
00:39 marcus to get a timeout event?
00:39 marcus seems like a good idea
00:42 sri it switches internals a bit around
00:43 sri every stream would have a recurring timer
00:43 sri instead of one to watch all timeouts
00:43 sri but we get rid of default read/write events that watch activity
00:44 sri gonna profile a bit and see if it costs anything
00:47 marcus cool
00:50 xaka btw, ruby's EventMachine has cool sugar stuff. $reactor->start { ... }. i think mojo could have the same: $ioloop->start(sub {  init/subscribe/connect/whatever}), or even support $ioloop->start(timeout => sub { ... })
01:20 sri doesn't look like the changes cost much, if anything
01:21 sri but if i make them i want a quick release
01:21 sri since the timeout syntax changes
01:21 sri Mojo::IOLoop->stream($self-​>connection)->timeout(300)
01:22 sri instead of Mojo::IOLoop->timeout($self->connection => 300)
01:31 crab and the change buys us a timeout event on the stream?
01:34 sri yes
01:34 sri old syntax is of course just deprecated
01:35 metaperl|2 joined #mojo
01:37 sri the timeout event may be used for better log messages
01:39 crab cool.
01:40 * xaka is vodking... (vodka)
01:41 sri client timeout is rather easy, since we just store it in the transaction
01:41 sri not sure what to for the server one though
01:41 sri *+do
01:41 sri we could just write a generic log message
01:42 sri like [debug] Connection "abc12345def" timed out.
01:43 xaka i'd write "Connection ... dropped by server (timed out after ... seconds)"
01:48 xaka hm, anyway "timed out" sounds strange when the reason is slow controller, not the client which is just waiting for response. Mb "your controller super slow, bla-bla" should be used in such case
01:49 xaka so people could understand real reason of dropping. everyone happy
02:09 noganex joined #mojo
02:11 maluco joined #mojo
02:12 memowe joined #mojo
02:12 mire joined #mojo
02:12 alpha6 joined #mojo
02:12 plu joined #mojo
02:12 Nickeeh joined #mojo
02:12 marty joined #mojo
02:12 janus joined #mojo
02:12 elb0w_ joined #mojo
02:12 mike_ joined #mojo
02:12 bj5004 joined #mojo
02:12 nicomen joined #mojo
02:12 BinGOs joined #mojo
02:12 garu joined #mojo
02:21 crab xaka: it's a logfile, not a novel
02:21 sri hehe, yea
02:22 crab i wouldn't go further than saying "client timeout" vs. "server timeout" or so. and the number of seconds will always be the same, so it's just noise.
02:23 sri client timeout is not logged
02:23 sri just stored in the transaction
02:50 sri hmm
02:50 sri in the end it will be 14 more lines of code
02:54 yaxar joined #mojo
02:54 xaka joined #mojo
02:56 * marty waves
02:57 marty I've been mostly afk for the last week.  Been moving our warehouse to a larger facility.  Yea!  almost done.   Tomorrow is the last day (I hope), then back to Mojolicous fun.  :)
02:58 * sri waves
03:01 GitHub49 joined #mojo
03:01 GitHub49 [mojo] kraih pushed 1 new commit to master: http://git.io/CotdDw
03:01 GitHub49 [mojo/master] made connection timeout handling more user-friendly - Sebastian Riedel
03:01 GitHub49 left #mojo
03:01 sri ok, please review
03:04 sri the user agent timeout has been increased to make it less random which one of the two times out first
03:04 sri just in case
03:04 purl Break glass, retrieve shotgun.
03:04 sri MOJO_LOG_LEVEL=debug perl -Ilib -Mojo -E'a("/" => sub {})->start' get /
03:05 sri here's a simple command line test case
03:09 sri connection timeout tracking sure is an expensive feature, judging by line numbers
03:09 sri not 100% sure if it's worth it
03:11 yaxar joined #mojo
03:13 yaxar sri after about 5 min the base gives me this error …. do you know how i should fix it? http://pastebin.com/cC0DZVTe
03:16 yaxar here is the code … https://gist.github.com/1454455
03:20 yaxar sri are you on?
03:22 yaxar is marcus on?
03:30 yaxar is anyone on? yes purl i already know what u are going to answer so you don't have to
03:30 yaxar i guess purl didn't answer :)
03:34 yaxar no one else answered either so i imagine that no one is on?
03:36 * crab looks
03:38 crab i don't know what the problem is, but: what is it that is sent as application/octet-stream? use tcpdump or something to find out?
03:39 yaxar okay
03:40 yaxar thanks
03:40 yaxar :)
03:40 yaxar um i don't have access to tcpdump...
03:56 yaxar crab the thing is is that on the event part of the script it is outputting text/event-stream as header....
04:02 yaxar okay crab went off...
04:31 yaxar is anyone on?
04:34 crab i don't understand what you just said.
04:34 crab oh, are you just saying that the code sets text/event-stream? i saw that.
04:35 crab but you need to figure out what gets actually sent if you want to debug the problem.
04:35 crab if you can't use tcpdump, maybe you can use firebug or something similar in the browser to see the http transaction?
04:35 crab that's probably easier anyway.
04:37 yaxar um firefox gives this error instead
04:37 yaxar http://pastebin.com/g04QaPaj
04:40 GitHub60 joined #mojo
04:40 GitHub60 [mojo] kraih pushed 1 new commit to master: http://git.io/r1ZEdg
04:40 GitHub60 [mojo/master] do not log timed out websocket connections - Sebastian Riedel
04:40 GitHub60 left #mojo
04:40 yaxar sorry for not responding earlier
04:41 yaxar is their a way i can send you a pic of the firebug?
04:42 crab hm. can't establish connection. weird.
04:45 yaxar maybe it is some special events error...
04:50 yaxar lgksjdglkj
04:50 yaxar aglkdsja
04:50 yaxar oops
04:50 yaxar :)
04:56 yaxar i found out what i think is the error :)
04:56 yaxar now i am continually ponging the browser :) and it has not died on me :)
05:14 crab so the problem was periods of silence?
05:24 marcus hi
05:25 marcus yaxar: Probably some sort of timeout.
05:31 mire joined #mojo
05:42 * marcus does not want to be awake now
05:46 GitHub196 joined #mojo
05:46 GitHub196 [mojo] kraih pushed 1 new commit to master: http://git.io/Qtb2hg
05:46 GitHub196 [mojo/master] changed default WebSocket timeout of Mojo::UserAgent from 300 to 305 seconds - Sebastian Riedel
05:46 GitHub196 left #mojo
05:47 sri hah, now it's less lines of code than before my timeout patch :)
05:48 sri 305 is a strange number though, but i want something slightly bigger than the 300 seconds the server uses
05:50 sri anyway, please review and whoever won the fight earlier upload a new release!
05:50 * sri does not want to be awake either
05:55 yaxar left #mojo
05:56 yaxar joined #mojo
05:57 crab what do i have to do? just make a tarball from the latest git and upload to cpan?
05:57 crab also tag v2.37 i guess
06:04 crab i have to go out to the market. i'll do it in a couple of hours.
06:10 Vandal joined #mojo
06:33 sherr joined #mojo
07:30 tempire I won!
07:32 tempire but I need instructions
07:36 tempire crap
07:36 tempire dzil has ruined me.  I don't even know the manual steps.
07:38 tempire I guess I can just upload a tarball via the pause http interface.
07:39 * tempire chooses to wait for guidance, and not risk messing anything up
07:44 marcus I prefer using the cpan-upload script -- https://metacpan.org/module/cpan-upload
07:46 marcus Normally, you start by git status to check that you don't have any crap lying around, up the version in lib/Mojolicious.pm, edit Changes and set timestamp, perl Makefile.PL, make manifest, make disttest, make dist, cpan-upload <distfile>
07:47 marcus oh, and commit, and tag, before the perl Makefile.PL step
07:47 marcus or tag after make disttest if you so prefer
07:52 marcus tempire: Also, please make sure you have COPYFILE_DISABLE set, since you're a mac user.
09:21 mmcleric joined #mojo
09:23 Ivan joined #mojo
09:39 MojoGuest626 joined #mojo
09:39 MojoGuest626 From: http://www.google.com.tw/url?sa=t&amp;rct=j&amp;q=​irc+websocket&amp;source=web&amp;cd=4&amp;ved=0CDg​QFjAD&amp;url=http%3A%2F%2Fdev.xantus.org%2F&amp;e​i=2ijjTqKlG43ImQWi2PSNBQ&amp;usg=AFQjCNGw6nZv0wO42​uzUnHhWcD0vcKNULg&amp;sig2=Qt2F9x4imvQwY3eaJpELiw (1 hits)
09:45 abra__ joined #mojo
10:42 vervain joined #mojo
11:27 chansen joined #mojo
12:09 Foxcool joined #mojo
12:23 alnewkirk joined #mojo
12:48 mojobot7947 joined #mojo
14:07 sugar joined #mojo
14:15 sri what marcus said
14:16 sri you could also upload with "mojo cpanify"
14:17 sri steps are basically "check distribution, update files if necessary, make tarball, tag in git, upload to cpan, tweet release"
14:35 sri tempire/crab: everything should be up to date though
14:47 sri now i'll add another test first though
14:47 sri so you have to wait ;p
14:55 sri oh, now i even have to fix a bug
14:58 mire joined #mojo
15:11 Vandal joined #mojo
15:17 Vandal joined #mojo
15:31 Psyche^ joined #mojo
15:48 sri hmm, actually ignore me
15:50 sri everything should be just fine for the release
15:58 GitHub83 joined #mojo
15:58 GitHub83 [mojo] kraih pushed 1 new commit to master: http://git.io/ZCQxXA
15:58 GitHub83 [mojo/master] changed default WebSocket timeout of Mojo::UserAgent back to 300 seconds - Sebastian Riedel
15:58 GitHub83 left #mojo
16:02 sri websocket timeout handling in general could use a review
16:03 sri i think it is not as user-friendly as it could be
16:03 sri but i don't care enough atm
16:58 mire joined #mojo
17:04 alnewkirk joined #mojo
17:09 atomqi joined #mojo
17:09 yaxar joined #mojo
17:11 atomqi hi
17:11 atomqi can I somehow cause a redirect for "/some/url" to "/some/url/" such as apache does on directories?
17:21 yaxar hi all
17:22 j3nnn1 joined #mojo
17:23 MojoGuest786 joined #mojo
17:23 MojoGuest786 From: http://networkedblogs.com/33Knp (15 hits)
17:33 kaare joined #mojo
17:59 metaperl joined #mojo
18:05 xaka joined #mojo
18:08 tempire ok, here I go
18:08 tempire tagging v2.37...
18:09 tempire looks like everything is indeed updated for 237
18:11 tempire export COPYFILE_DISABLE=1; perl Makefile.PL; make manifest; make disttest; make dist
18:15 tempire mojo cpanify -u ***** -p ***** Mojolicious-2.37.tar.gz
18:15 tempire sri/marcus: someone confirm my steps before I press enter
18:16 sri tempire: looks ok
18:16 sri also push the tag to github
18:17 yaxar hi sri can you help me with this pastebin.com/j11GAp5Q ?
18:17 yaxar http://pastebin.com/j11GAp5Q
18:17 tempire uploaded!
18:17 atomqi btw, now that you require perl 5.10, can you switch Mojolicious::Controller::signed_cookie to use sha1 instead of md5?
18:17 sri yaxar: it's weekend sorry, i'm kinda drunk
18:18 yaxar okay :)
18:18 tempire although I just found a bug in mojo cpanify
18:18 tempire guess that means I have to fix it now
18:18 * tempire feels the weight of responsibility
18:18 sri you find it you keep it!
18:19 yaxar temp ire can you help me?
18:19 yaxar temire
18:19 yaxar *
18:19 sri you type like i drive
18:20 tempire yaxar: I have no idea how you got that error
18:20 tempire post the code
18:20 yaxar http://pastebin.com/vYq9cAGi
18:21 yaxar the last line is the problem….
18:22 yaxar i think
18:22 tempire I think you left out some of the file...
18:22 sri tempire: you also need to tweet the release
18:22 sri with link to tagged changes file
18:22 yaxar okay oops here is the whole file http://pastebin.com/vTJa7ZhW
18:23 tempire pushing tag to master...
18:25 yaxar :)
18:25 sri no tag, did you forget --tags?
18:26 sri and there it is :)
18:26 tempire the … means I was waiting 2 minutes for a "NO!!!"
18:26 sri YES!!!
18:26 tempire always a good practice the first time you do something :)
18:27 tempire everything looks good
18:27 tempire hooray to me!
18:27 sri hooray for tempire
18:28 tempire I still get scared pushing to other folks' repos, 'cause of the first time I tried, I rebased to master without knowing what I was doing.
18:29 tempire even though I have a clue nowadays, I still remember that fear
18:29 * tempire hides
18:29 sri best to just use a feature branch when you're working on a feature, not much to go wrong then
18:29 tempire yep.  best part of git
18:30 sri yea, git rocks
18:30 yaxar do you know what the problem would be? tempire
18:30 tempire yaxar: haven't looked yet, give me a bit
18:30 yaxar okay :)
18:31 sri tempire still needs to tweet the release
18:31 tempire looking at changes file to come up with wording...
18:31 yaxar :)
18:31 sri user-friendly timeout handling is the main change imo
18:32 tempire what's this!  sri didn't tweet the 2.36 release!
18:33 sri too minor i think
18:34 sri or i was just slacking
18:34 * sri hides
18:34 * tempire wonders if he should drop @tempiretech and consolidate to @tempire
18:35 * sri would do it
18:35 mire joined #mojo
18:35 tempire some folks have a lot of personal stuff on their tweets that clutters up the feed.  I didn't want to do that.
18:35 tempire But I keep most personal stuff on fb anyway
18:36 tempire Well, I'm a core developer now.  Time to set an example!
18:36 * tempire consolidates
18:44 sri MOJO_EVENTEMITTER_DEBUG=1 MOJO_LOG_LEVEL=debug perl -Ilib -Mojo -E'a("/" => sub {})->start' get /
18:44 sri not sure why, but i really like watching the event flow :)
18:44 xaka joined #mojo
18:46 tempire "Released #mojolicious 2.37, with a more user-friendly useragent timeout, and fun new core developers! :) https://github.com/kraih/mojo/blob/7483dc8​ec872793ced12548a2854728db14ea6ad/Changes"
18:46 sri it's not just user agent
18:46 sri both sides report connection timeouts now
18:47 tempire oh, you're taking about the event
18:47 sri nono
18:47 sri just run the oneliner above and watch log messages ;)
18:47 sri log messages are all from the server side
18:47 sri [Sat Dec 10 19:43:54 2011] [error] Connection timeout.
18:48 sri server will tell you if a connection timed out while a transaction was active
18:49 sri MOJO_LOG_LEVEL=debug perl -Ilib -Mojo -E'a("/" => sub {})->start' get /
18:49 sri that's a better example
18:49 sri no event noise
18:50 sri you see how both sides react when the server decides the connection has timed out
18:51 sri http://pastie.org/2996996
18:51 sri for the slackers ;p
18:52 tempire ah, now I get what you were talking about yesterday
18:52 sri :D
18:53 tempire "Released #mojolicious 2.37, with user-friendly timeout reporting, and fun new core developers! :) https://github.com/kraih/mojo/blob/7483dc8​ec872793ced12548a2854728db14ea6ad/Changes #perl"
18:53 sri \o/
18:54 yaxar tempire the function is in the util file for any event irc....
18:55 tempire tweeted!
18:55 sri tempire++
18:56 yaxar am i not loading the util file correctily?
19:02 * tempire pings
19:04 tempire yaxar: what do you mean by the util file?
19:04 yaxar http://search.cpan.org/~elmex/AnyEvent-I​RC-0.9/lib/AnyEvent/IRC/Util.pm#SEE_ALSO
19:23 sri http://www.youhavedownloaded.com # lol
19:23 tempire isn't that great?
19:23 tempire love it
19:24 sri it's brilliant and scary
19:25 tempire I see only one, which is what I downloaded when I neglected to upload my block list
19:25 tempire good reminder to do that *every* time
19:26 * sri checks tempire's ip
19:26 mattastrophe joined #mojo
19:26 sri hmm, nothing for you irc ip
19:27 tempire ha!
19:27 tempire irc bouncer FTW!
19:27 sri indeed!
19:27 tempire lull.  I tried your ip, and the message is great
19:27 tempire http://www.youhavedownloaded.com/?q=213.133.102.53
19:27 tempire "Well, this IP in the clear. But look what others do"
19:27 sri :)
19:28 tempire somewhere on the internet, someone is downloading pr0n
19:28 tempire also, 1+1 = 2
19:29 sri i bet this is hilarious when you share wifi
19:30 sri why is everyone in this channel working for the RIAA?
19:37 yaxar how should i find the current date in mojo?
19:37 tempire yaxar: http://search.cpan.org/~drolsky​/DateTime-0.70/lib/DateTime.pm
19:38 Debolaz joined #mojo
19:42 cfedde joined #mojo
19:44 * tempire adds caterwaul to the list of languages to learn
19:45 atomqi can I somehow cause a redirect for "/some/url" to "/some/url/" such as apache does on directories?
19:46 tempire atomqi: for what reason?  mojolicious routes already account for the trailing /
19:47 atomqi I'd like for it to look like a directory. plus I get to use relative URLs that way.
19:49 sri routes don't care about trailing slash, but it is preserved in ->req->url->trailing_slash
19:49 sri do not use relative URLs, they are not worth it
19:50 sri just let mojolicious take care of it
19:55 atomqi thanks, that seems to be working
19:56 * atomqi needs to be read up on routing
19:57 atomqi $self->req->url->path->trailing_slash on my couple-of-months-old version, btw
20:01 sri right, it's was a path attribute
20:02 sri (didn't change, i just forgot)
20:03 yaxar pastebin.com/TATcATYv where would this create a file?
20:04 yaxar http://pastebin.com/TATcATYv
20:08 metaperl joined #mojo
20:15 al joined #mojo
20:26 tempire this is a fantastic js tutorial: https://github.com/spencertipping/js-in-ten-min​utes/blob/master/js-in-ten-minutes.pdf?raw=true
20:26 tempire should be required reading, I think
20:27 tempire particularly part 4: Gotchas
20:41 yaxar where would mojo logs  be?
20:42 tempire stout, or in log/ if it exists
20:42 tempire *stdout
20:45 inokenty joined #mojo
20:47 inokenty hi
20:47 yaxar okay
20:47 inokenty Please tell me why 'before_render' hook was removed
20:47 inokenty It was very useful for me
20:52 sri because nobody said the before_render hook was useful
20:52 inokenty Hmm
20:52 sri features don't survuve the experimental phase if nobody says anything
20:52 sri s/u/i/
20:52 inokenty OK, how to add some values to stash before template is rendered?
20:53 sri looks like you used it wrong anyway
20:53 sri http://mojolicio.us/perldoc/​Mojolicious/Controller#stash
20:54 sri in this case it's not just about feedback but also lack of sensible use cases
20:55 sri pretty much everybody used it wrong
21:00 inokenty I have a placeholders in layout like <% $left_sidebar %> or <% $footer %> and I don't wanna fill them in every action. They must be taken from DB (like breadcrumbs, meta tags and so on). So the 'before_render' hook was good for that =)
21:00 tempire inokenty: use a bridge
21:01 sri or just app->defaults as described in the documentation i linked above
21:01 Foxcool joined #mojo
21:01 yaxar is marcus on?
21:02 yaxar is rafl on?
21:02 sri marcus is drunk
21:02 tempire http://search.cpan.org/~tempire/Mojolicious-2.37/
21:02 tempire I must be really important
21:03 sri obviously, you're wearing sunglasses
21:05 sri time for more beer and pizza
21:05 atomqi is there a possibility to set default stash values relating to templates?
21:05 atomqi i.e. with a specific template I'd get $foo set if it wasn't previously
21:06 * atomqi is thinking of HTML::Mason's <%args> block
21:06 sri it's just perl, everything is possible somehow
21:07 atomqi I can use app-wide defaults I guess but that seems somewhat ugly.
21:21 tempire <%args> is just like setting them in the controller action
21:22 tempire if you're concerned about making it clean, though, you ideally want to separate your business logic into separate modules
21:23 atomqi they're not template-specific.
21:23 atomqi <%args> happens to be
21:23 tempire you can use template blocks as well
21:24 tempire http://mojolicio.us/perldoc/Mojo/Template#Blocks
21:24 atomqi that might work
21:25 * atomqi was mostly just bothered about the error page being shown if he forgot a stash value his template expected
21:26 atomqi and I couldn't use "$var || 42" in the template since the strictures would forbid that
21:27 tempire stash 'var'
21:27 atomqi yep, I was hoping I could just link that to the template logic itself
21:30 alnewkirk joined #mojo
21:33 j3nnn1 joined #mojo
21:36 yaxar how do i unlash something?
21:36 yaxar unhash
21:37 inokenty What do you mean?
21:38 yaxar i am getting as a variable AnyEvent::IRC::Client=HASH(0x7fe411d8ab90)
21:38 yaxar but i am wondering how to un hash that value...
21:39 inokenty Try to dump it with Data::Dumper )
21:39 yaxar okay
21:41 sri kinda strange people always have problems with uninitialized variables in templates
21:41 sri wonder if there's a way to make it more user-friendly
21:44 sri no strict 'vars'; seems like a rather bad idea
21:45 inokenty Agree, it's bad
21:45 sri in fact, most of the time i would consider those errors very valuable for tracking down bugs
21:53 yaxar tempire can you help me with this http://pastebin.com/JNi1Pth5
21:59 atomqi btw, can I somehow chain Mojolicious::Lite's under '/', sub {} things?
21:59 atomqi I'd like to append to the bridge I guess. push and pop from it.
22:00 atomqi sri, certainly valuable, but many times default values make sense
22:51 MojoGuest556 joined #mojo
22:51 MojoGuest556 From: http://blog.kraih.com/perl-is-ready-for-html5 (68 hits)
22:58 yaxar joined #mojo
23:15 yaxar can someone help me with this http://pastebin.com/d5zL9WgT
23:22 Foxcool joined #mojo
23:41 wose joined #mojo
23:43 wose hi, we have a student at #gci who is trying to build a mojolicious example app, can someone join and help him out thx
23:54 tempire yaxar: paste the code
23:55 yaxar http://pastebin.com/tLSAhpLf
23:55 yaxar :)
23:55 wose oic he already found you ;)
23:56 yaxar :)
23:56 tempire what problem are you having yaxar?
23:57 yaxar http://pastebin.com/biB3f8ey
23:57 tempire when does that happen?
23:57 yaxar that exact error happens when someone joins
23:57 yaxar but if someone changes his nick then the same type of error happens
23:58 yaxar here is the error that happens when a nick changes http://pastebin.com/d5zL9WgT
23:59 tempire I changed my nick, didn't get that error
23:59 sri yaxar: it's generally a bad idea to cross post between multiple channels
23:59 yaxar yes sri sorry
23:59 yaxar hmm
23:59 sri that error looks rather complicated i'm afraid

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