Camelia, the Perl 6 bug

IRC log for #mojo, 2011-11-16

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

All times shown according to UTC.

Time Nick Message
00:06 MojoGuest336 joined #mojo
00:06 MojoGuest336 From: http://news.ycombinator.com/item?id=1277067 (120 hits)
00:07 MojoGuest962 joined #mojo
00:07 MojoGuest962 From: http://www.reddit.com/r/html​5/comments/bt76k/irc_client/ (7 hits)
00:20 MojoGuest67 joined #mojo
00:20 MojoGuest67 From: http://search.babylon.com/?q=WebSocket+demo&​amp;s=web&as=0&t=0&babsrc=SP_ss (1 hits)
00:22 gshank joined #mojo
00:29 jnap joined #mojo
01:14 jnap joined #mojo
01:23 chansen joined #mojo
01:37 SmokeMachine joined #mojo
01:53 Alias joined #mojo
02:03 GitHub28 joined #mojo
02:03 GitHub28 [mojo] kraih pushed 1 new commit to master: http://git.io/04T6fQ
02:03 GitHub28 [mojo/master] replaced servers method in Mojo::IOLoop::Resolver with servers attribute - Sebastian Riedel
02:03 GitHub28 left #mojo
02:06 mire joined #mojo
02:07 MojoGuest732 joined #mojo
02:07 MojoGuest732 From: http://news.ycombinator.com/item?id=1277067 (121 hits)
02:07 MojoGuest732 left #mojo
02:09 mattastrophe joined #mojo
02:31 elb0w joined #mojo
02:32 elb0w Question, is it better to write my own modules as helper functions which get included as new objects in and pass them the plugins I want to utilize thats already been loaded into mojo's self, or is it better to just make modules that separate out the creation of helper functions so I can classify them? (Im looking at an organizational standpoint, I don't want to have 200 lines of helper methods in the root program)
02:39 tempire "I don't want to have 200 lines of helper methods in the root program"
02:39 tempire I feel like you've already answered your own question.
02:40 elb0w lol
02:40 elb0w yeah but which strategy to use
02:40 elb0w eh
02:40 elb0w nvm
02:55 crab is this a lite app or what?
03:00 gshank joined #mojo
03:09 jnap joined #mojo
03:12 elb0w nah its a big one
03:12 elb0w its ok I'm just doing the helpers seperately
03:12 elb0w i like it like this
03:12 elb0w Is there no $self->json ?
03:22 reyjrar joined #mojo
03:23 reyjrar I just updated to 2.x and now I'm getting http://pastebin.com/Vk9jdwX3
03:23 elb0w didn't they get rid of fastcgi?
03:24 reyjrar well, that would explain it
03:24 elb0w http://groups.google.com/group/mojolicious/​browse_thread/thread/a2e0991fcca92b4e?pli=1
03:26 elb0w reyjrar: were you using fastcgi due to host?
03:26 elb0w I would rec hypo behind nginx if you could
03:27 elb0w awesome solution
03:27 reyjrar Hadn't played with Plack/PSGI on CentOS 5.x and mod_fcgid is code
03:27 reyjrar core too
03:27 elb0w and super simple
03:27 Alias left #mojo
03:27 reyjrar I'm on apache for the time being
03:31 reyjrar I just installed Mojo::Server::FastCGI
03:32 reyjrar I'm planning on moving off Apache and to something more interesting in the near future..
03:32 reyjrar entrenched in Apache and have zero free time..
03:32 reyjrar :)
03:32 reyjrar thanks :)
03:32 elb0w ok
03:32 elb0w but as a apache user myself
03:32 elb0w you will never want to use apache again
03:32 elb0w after nginx + hypo / morbo
03:32 elb0w hypno*
03:35 reyjrar I certainly understand.. Apache is super bloated..
03:35 reyjrar I'll take a look at that combo :)
03:36 elb0w yeah cool
03:36 elb0w and if you do loadbalancing
03:36 elb0w its simple
03:36 elb0w no mod_proxy bs
04:45 MojoGuest962 joined #mojo
04:45 MojoGuest962 From: http://networkedblogs.com/33Knp (1 hits)
04:46 MojoGuest289 joined #mojo
04:46 MojoGuest289 From: http://www.google.com/url?sa=t&rct=j&q=&a​mp;esrc=s&source=web&cd=1&ved=0CB4QFj​AA&url=http%3A%2F%2Fdev.xantus.org%2F&ei=​MUDDTsKyO8rr0gGntaTuDw&usg=AFQjCNGw6nZv0wO42u​zUnHhWcD0vcKNULg&sig2=gcjopGvPCNfVmpeHtW306g (1 hits)
04:48 alnewkirk joined #mojo
04:50 MojoGuest476 joined #mojo
04:50 MojoGuest476 From: http://xantus.tumblr.com/page/2 (9 hits)
05:10 MojoGuest3 joined #mojo
05:10 MojoGuest3 From: http://www.google.com/url?sa=t&rct=j&q=&a​mp;esrc=s&source=web&cd=5&ved=0CE0QFj​AE&url=http%3A%2F%2Fdev.xantus.org%2F&ei=​rEXDTuyrDIbZgAf10fGBDw&usg=AFQjCNGw6nZv0wO42u​zUnHhWcD0vcKNULg&sig2=26PDSMPhg3C6_cvYj3HlWQ (1 hits)
05:11 MojoGuest313 joined #mojo
05:11 MojoGuest313 From: http://www.google.com/url?sa=t&rct=j&q=&a​mp;esrc=s&source=web&cd=5&ved=0CE0QFj​AE&url=http%3A%2F%2Fdev.xantus.org%2F&ei=​rEXDTuyrDIbZgAf10fGBDw&usg=AFQjCNGw6nZv0wO42u​zUnHhWcD0vcKNULg&sig2=26PDSMPhg3C6_cvYj3HlWQ (2 hits)
05:22 GitHub89 joined #mojo
05:22 GitHub89 [mojo] kraih pushed 1 new commit to master: http://git.io/2M44bg
05:22 GitHub89 [mojo/master] added experimental hosts attribute to Mojo::IOLoop::Resolver and fixed many small memory leaks - Sebastian Riedel
05:22 GitHub89 left #mojo
05:24 GitHub114 joined #mojo
05:24 GitHub114 [mojo] kraih pushed 1 new commit to master: http://git.io/VUo2jg
05:24 GitHub114 [mojo/master] fixed typo - Sebastian Riedel
05:24 GitHub114 left #mojo
05:45 MojoGuest806 joined #mojo
05:45 MojoGuest806 From: http://www.google.com/url?sa=t&rct=j&q=&a​mp;esrc=s&source=web&cd=5&ved=0CE0QFj​AE&url=http%3A%2F%2Fdev.xantus.org%2F&ei=​rEXDTuyrDIbZgAf10fGBDw&usg=AFQjCNGw6nZv0wO42u​zUnHhWcD0vcKNULg&sig2=26PDSMPhg3C6_cvYj3HlWQ (3 hits)
05:48 xaka joined #mojo
06:40 koban joined #mojo
07:09 cosmincx joined #mojo
07:24 marcus sri: hai?
07:24 purl i guess hai is so coool IMHO or yes, but pronounced by prepubescent moon eyed girls
07:31 sugar joined #mojo
07:39 Vandal joined #mojo
08:03 batman joined #mojo
08:07 gbacon joined #mojo
08:16 MojoGuest87 joined #mojo
08:16 MojoGuest87 From: http://blog.kraih.com/perl-is-ready-for-html5 (26 hits)
08:19 berov joined #mojo
08:29 tholen_ joined #mojo
08:29 tholen__ joined #mojo
08:33 smpb joined #mojo
08:36 chansen_ joined #mojo
08:48 arthas joined #mojo
09:28 foomator joined #mojo
09:44 koban joined #mojo
09:58 spleenjack joined #mojo
10:43 berov joined #mojo
11:41 smpb_ joined #mojo
12:09 aptituz joined #mojo
12:12 Psyche^ joined #mojo
12:21 robinsmidsrod joined #mojo
12:22 marcus quiet here today
12:27 sri marcus: hai
12:28 Vandal drugs came in time to our ward today
12:29 marcus sri: Having some trouble with reverse proxying. I've an app running on nginx set up as https://nordaaker.no/foobar/ mapped to a hypnotoad on a high port. I'm wondering how to set it up so that it maps back and forth.
12:29 marcus sri: managed to get it to respond to the request by doing a rewrite of /foobar/ to /, but I'm not able to get url_for to work right.
12:31 marcus I've set the proxy=>1 flag in the hypnotoad conf, and I'm setting X-Forwarded-For and X-Forwarded-HTTPS and proxying Host
12:31 marcus not sure how to deal with the path tho. if the app root had been / it would be working fine. :)
12:31 sri there is nothing mojolicious could automatically do for that, you just rewrite the url properly with a base
12:32 sri base: http://127.0.0.1/foobar/ url: /whatever
12:33 sri should be pretty obvious
12:34 sri prolly just a push(shift()) on both path parts
12:35 * sri yawns
12:36 judofyr joined #mojo
12:36 judofyr hey hey #mojo
12:36 marcus sri: I could write a plugin to set the request url based on a http header?
12:37 marcus X-Forwarded-Path
12:37 marcus set the base of the request url even
12:37 sri you can do everything
12:37 marcus sri: don't encourage me, it won't end well :D
12:38 sri GO MARCUS, GO MARCUS!
12:39 * marcus goes to play squash.
12:40 * sri is disappoint
12:44 marcus I'll write the plugin too.
13:02 noganex joined #mojo
13:26 arthas joined #mojo
13:33 GabrielVieira joined #mojo
13:35 Foxcool joined #mojo
13:38 crab while playing squash? wow
13:49 koban left #mojo
13:50 jnap joined #mojo
13:52 mire joined #mojo
14:07 GitHub172 joined #mojo
14:07 GitHub172 [mojo] kraih pushed 1 new commit to master: http://git.io/geVAeA
14:07 GitHub172 [mojo/master] updated a few class descriptions - Sebastian Riedel
14:07 GitHub172 left #mojo
14:11 gbacon joined #mojo
14:12 cosmincx joined #mojo
14:15 GitHub135 joined #mojo
14:15 GitHub135 [mojo] kraih pushed 1 new commit to master: http://git.io/Zb0xTQ
14:15 GitHub135 [mojo/master] updated some more class descriptions - Sebastian Riedel
14:15 GitHub135 left #mojo
14:27 judofyr_ joined #mojo
14:39 chansen__ joined #mojo
14:47 judofyr joined #mojo
14:54 judofyr sri!
14:55 judofyr we're having some performance issues with an external API
14:55 judofyr it takes ~3 seconds before the callback run
14:55 judofyr when firing three requests to the same server
14:56 judofyr and I try to reproduce it outside of Mojo::UserAgent
14:57 judofyr but if I just run the requests with Ruby + ab
14:58 judofyr then it works fine
14:59 judofyr and fast
14:59 sjn Devel::NYTProf ftw? :)
15:08 judofyr sjn: ehm, you've tried Devel::NYTProf with Mojo?
15:09 judofyr I get tons of "Mojo::Base::__ANON__[(eval 100)[/Users/magnus/perl5/perlbrew/perls/perl-5.​14.1/lib/site_perl/5.14.1/Mojo/Base.pm:118]:7] has no caller subnames but a call count of 4738"
15:09 judofyr like, neverending about of that
15:11 judofyr hm…
15:11 judofyr it spends 2.95 secs in IO::Poll::_poll
15:12 judofyr # spent  2.95s making 147 calls to IO::Poll::_poll, avg 20.0ms/call
15:14 sri 3 seconds is the dns timeout, is your dns configured wrong?
15:16 judofyr sri: hm… what's the definition of "configured" wrong?
15:16 sri like not correct
15:17 sri MOJO_RESOLVER_DEBUG=1 or MOJO_NO_RESOLVER=1 might help
15:17 judofyr RESOLVE TIMEOUT (192.168.50.253)
15:17 sri voila
15:21 judofyr sri: hm… but why does the first request answer right away?
15:21 judofyr sri: it's the two last that's slow
15:21 judofyr I get one "ANSWER A 195.159.218.141"
15:21 sri don't ask me
15:21 judofyr then two "RESOLVE TIMEOUT (8.8.8.8)"
15:22 judofyr even when settig MOJO_DNS_SERVER=8.8.8.8
15:24 sjn judofyr: I haven't :)
15:24 judofyr sri: I'm asking you because (1) it happens with both 8.8.8.8 and the local DNS server and (2) I've only seen the issue in Mojo
15:24 jsleao joined #mojo
15:24 judofyr sri: also, you're a smart guy :)
15:26 judofyr but on the other hand, it only happens with one domain…
15:27 gbacon joined #mojo
15:27 judofyr sri: is there some DNS caching in Mojo::UserAgent/Resolver?
15:35 judofyr sri: can you run this on your machine/network? https://gist.github.com/60c8ed052f1150e99d1c
15:35 judofyr or someone else?
15:35 purl rumour has it someone else is the compiler
15:35 judofyr I get: START START START DONE (long delay) DONE DONE
15:36 judofyr MOJO_DNS_SERVER=8.8.8.8 MOJO_RESOLVER_DEBUG=1 perl t.pl
15:37 judofyr anyone? :-(
15:39 sri confirmed, might be a bug
15:40 judofyr so much for parallel requests :)
15:41 judofyr good
15:44 mattastrophe joined #mojo
15:50 sri not good
15:51 sri i'm actually considering the removal of the resolver
15:54 judofyr sri: this patch fixes it: https://gist.github.com/60c8ed052f1150e99d1c
15:54 judofyr not sure if it's the correct patch
15:55 judofyr it's more a general optimization
15:55 judofyr (don't run duplicate queries)
15:56 sri very wrong
15:56 sri you're masking the problem
15:58 judofyr I know
15:58 sri ...
15:58 judofyr :)
15:59 judofyr I'm not smart enough to know the real bug
16:02 judofyr sri: ehm, why is $CURRENT_SERVER a singleton?
16:02 sri it's not anymore
16:02 sri cpan version is old
16:03 judofyr pro-tip: git pull
16:03 purl somebody said git pull was not bringing anything down to me.
16:04 sri still not sure if it's better to fix or remove it
16:05 judofyr sri: what will you use in place of the Resolver?
16:05 judofyr is there already an event-driven one?
16:05 sri nope, blocking system resolver
16:05 judofyr ah
16:06 sri if someone really cared about resolver performance there would still be a method to overload
16:07 judofyr as long as the method takes a callback, that should work fine, yeah
16:07 sri not necessary
16:08 judofyr oh? how would you override "my $ans = resolve($adr)" to use an event-driven-thingie?
16:08 judofyr err, how would you override "resolve" in that case
16:09 sri …use base… sub connect { my $self = shift; MyResolver->resolve(sub { $self->SUPER::connect(...) }) }
16:09 judofyr yeah, that takes a callback
16:10 judofyr that was my point
16:10 judofyr :S
16:10 judofyr oh wait
16:10 judofyr sorry
16:10 judofyr of course
16:10 judofyr now that's pretty nifty
16:11 judofyr sri: okay, but what do you suggest to fix the 3s-bug in our code base right now?
16:11 sri MOJO_NO_RESOLVER=1
16:12 sri that enforces the system resolver
16:12 judofyr perfect
16:12 sri hmm, i'm unsure what to do
16:13 sri for talking to web services the system resolver will actually be faster, for large scale web crawling it will be a lot slower
16:13 judofyr why will it be slower for large scale web crawling?
16:14 judofyr because it blocks?
16:14 sri because every lookup blocks
16:14 sri for web services you benefit from caching
16:15 andrefs joined #mojo
16:26 judofyr sri: I think it's more common to talk to APIs than to crawl pages
16:26 judofyr sri: so I think that MOJO_NO_RESOLVER=1 should probably be default
16:28 jnap_ joined #mojo
16:29 jnap joined #mojo
16:33 sri judofyr: then we could just as well remove it
16:33 judofyr sri: wo-hoo!
16:40 * crab sighs
16:55 sri crab: where do you stand on the issue?
16:55 cosimo joined #mojo
16:56 tholen_ joined #mojo
17:07 grim_fandango joined #mojo
17:10 xaka joined #mojo
17:14 GitHub5 joined #mojo
17:14 GitHub5 [mojo] kraih pushed 1 new commit to master: http://git.io/y5F5DQ
17:14 GitHub5 [mojo/master] removed Mojo::IOLoop::Resolver - Sebastian Riedel
17:14 GitHub5 left #mojo
17:15 sri wonder if anyone will even notice it
17:17 KryDos joined #mojo
17:18 kaare joined #mojo
17:31 xaka why remove it? useless?
17:31 mattastrophe joined #mojo
17:32 sri too many complaints
17:32 sri too little gain
17:32 sri if someone wants the functionality i'll just provide the necessary hooks to make it work as a plugin
17:33 * elb0w_ waits for emails from list saying why doesnt this work anymore haha
17:33 sri whole thing was experimental, i couldn't care less ;p
17:33 xaka probably it'd be better extract it into separate github project like fastcgi?
17:34 sri this is exactly why we have experimental features
17:35 elb0w_ Think im gonna add a feature to pianobar and make it save mp3s
17:35 xaka 90% of mojo is experimental :)
17:35 sri that's bullshit
17:36 xaka :-P but who cares, it works
17:36 elb0w_ Mojo is the only reason I didnt use ruby / python/ scala for this mobile backend
17:36 sri it's closer to 5%
17:36 sri and marked as such
17:38 sri those scala folks are pretty good at marketing
17:39 sri http://typesafe.com/ # the company behind it just picked up the Play framework
17:39 elb0w_ id use scalatra probably
17:50 mercutioviz joined #mojo
17:50 smpb joined #mojo
17:56 elb0w_ wow
17:56 elb0w_ http://notionscapital.wordpress.com/20​11/11/16/congress-reaps-pizza-harvest/
17:57 sri rofl
18:09 hide joined #mojo
18:15 sri marcus/tempire/yko: thoughts about the Mojo::IOLoop::Resolver removal?
18:43 sri as expected :)
18:43 sri nobody will even notice it
18:50 batman joined #mojo
19:13 smpb joined #mojo
19:17 Quai joined #mojo
19:23 xaka who actually uses resolvers? what the purpose?
19:32 GitHub70 joined #mojo
19:32 GitHub70 [mojo] kraih pushed 1 new commit to master: http://git.io/gBFKaw
19:32 GitHub70 [mojo/master] deprecated Mojo::IOLoop->connect_timeout in favor of timeout argument - Sebastian Riedel
19:32 GitHub70 left #mojo
19:32 gabriel joined #mojo
19:41 MojoGuest847 joined #mojo
19:42 GitHub10 joined #mojo
19:42 GitHub10 [mojo] kraih pushed 1 new commit to master: http://git.io/v8FIag
19:42 GitHub10 [mojo/master] small documentation tweaks - Sebastian Riedel
19:42 GitHub10 left #mojo
19:46 bj5004 joined #mojo
19:48 MojoGuest717 joined #mojo
19:48 MojoGuest717 From: http://www.xydo.com/toolbar/32347902 (2 hits)
19:48 MojoGuest823 joined #mojo
19:48 MojoGuest823 From: http://tumblr.dustinwhittle.com/post/53386​0686/mojo-websocket-demo-extjs-irc-client (1 hits)
19:49 MojoGuest136 joined #mojo
19:49 MojoGuest136 From: http://tumblr.dustinwhittle.com/post/53386​0686/mojo-websocket-demo-extjs-irc-client (2 hits)
19:55 MojoGuest274 joined #mojo
19:55 MojoGuest274 From: http://tumblr.dustinwhittle.com/post/53386​0686/mojo-websocket-demo-extjs-irc-client (3 hits)
19:55 MojoGuest183 joined #mojo
19:55 MojoGuest183 From: http://tumblr.dustinwhittle.com/post/53386​0686/mojo-websocket-demo-extjs-irc-client (4 hits)
19:56 MojoGuest806 joined #mojo
19:56 MojoGuest806 From: http://tumblr.dustinwhittle.com/post/53386​0686/mojo-websocket-demo-extjs-irc-client (5 hits)
19:56 MojoGuest100 joined #mojo
19:56 MojoGuest100 From: http://tumblr.dustinwhittle.com/post/53386​0686/mojo-websocket-demo-extjs-irc-client (6 hits)
20:16 perlite joined #mojo
20:22 batman joined #mojo
20:24 baton8 joined #mojo
20:34 tempire I never understood it's purpose in the first place.
20:34 tempire *its
20:35 tempire seemed like something outside of mojo's purview, but never took the time to understand otherwise.
20:35 sri tempire: it helped us block a little less
20:36 tempire ah, because waiting on the os to provide resolution is blocking
20:36 tempire block block block
20:36 sri ye
20:37 tempire when's the last complaint?
20:37 tempire I haven't seen it mentioned in a while before today
20:37 sri but i was never really sure if it was a good decision for core, that's why it was the longest standing experimental feature we ever had
20:37 tempire well I like the idea behind it, even though I've never used it directly.
20:37 sri i remember quite a few
20:38 sri whenever people depend on /etc/hosts or use some funky intranet dns setup
20:38 tempire I have no opinion regarding its removal.
20:38 * tempire salutes
20:39 sri it's mostly intranet setups that make it really screw up
20:39 batman joined #mojo
20:39 sri i take that as a yes then :D
20:40 sri was fun learning how dns really works though
20:45 sri btw. i would also still like some feedback on the new Mojo::IOLoop api
20:45 sri http://mojolicio.us/perldoc/Mojo/IOLoop#SYNOPSIS
20:57 batman joined #mojo
20:59 tempire looks clean to me
20:59 tempire easy to understand
21:00 tempire Mojo::IOLoop->start/stop seems weird.
21:00 tempire don't guess there's anything wrong with it, though.
21:00 sri how so?
21:01 tempire just that you usually expect stuff to work from an instantiation
21:02 tempire my $io = Mojo::IOLoop->new; $io->server/client/start/stop
21:03 sri event loop has to be started and stopped somehow
21:04 tempire I'm just stating my initial reaction to it, because it might come up with other people.  I have no complaints.
21:05 sri feel free to improve examples
21:05 sri i can not really relate to your point of view
21:06 sri generally you wouldn't instantiate Mojo::IOLoop btw
21:06 sri and just use the singleton with Mojo::IOLoop->start
21:07 tempire I know
21:10 sri still the big mystery… how do we explain events and event loops properly :)
21:21 marcus Sri: i am in favor of removing it.
21:31 berov joined #mojo
21:39 al joined #mojo
21:43 berov left #mojo
21:50 GabrielVieira joined #mojo
21:59 tempire I've got some ideas
22:01 tempire I don't think a video is a good idea until the api is no longer experimental, though.
22:01 sri what do you need to be non-experimental?
22:02 tempire you've been doing a lot to the api, changing things around and such.  I just want it to be completely settled before I make something.
22:02 sri fair enough
22:03 tempire does anyone know of any services that serve json without authentication?
22:03 sri twitter has a test api no?
22:10 sri tempire: or metacpan or course
22:10 sri http://explorer.metacpan.org/
22:10 MojoGuest280 joined #mojo
22:10 MojoGuest280 From: http://news.ycombinator.com/item?id=1277067 (122 hits)
22:11 al joined #mojo
22:11 mire joined #mojo
22:20 tempire hmm.  maybe I was wrong.  sri did retweet #4.
22:20 tempire so did a bunch of other folks.
22:21 sri well, i normally write a real tweet too
22:21 tempire I wouldn't think that would matter, as long as the link is out there on the stream.
22:24 tempire huh.  I didn't know about the metacpan.org api.
22:24 tempire that is super neat
22:25 sri it's elasticsearch
22:35 Nickeeh joined #mojo
22:40 abra joined #mojo
22:41 sri btw. if anyone is looking for an excuse to learn more about mojolicious internals, i wouldn't mind patches for making unit tests faster
22:42 sri there are many tests that just block for a second or two
22:42 sri maybe there are ways to reach the same result without blocking as much
22:46 sri i can't get them below 20 seconds anymore
23:23 jnap joined #mojo
23:43 mattastrophe joined #mojo
23:55 crab sri: i don't use the resolver, so i don't especially care.
23:56 sri crab: ok, not particularly surprised though :)
23:56 crab besides, if i ever need it, i can pull the code out of git and use it.
23:59 Alias joined #mojo

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