Camelia, the Perl 6 bug

IRC log for #mojo, 2011-02-17

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

All times shown according to UTC.

Time Nick Message
00:23 marty left #mojo
00:27 marcus left #mojo
00:29 marcus joined #mojo
01:29 aiglenoir left #mojo
01:29 aiglenoir joined #mojo
01:29 aiglenoir left #mojo
01:34 aiglenoir joined #mojo
01:54 jjafuller joined #mojo
01:55 jjafuller What is the best way to get authentication/authorization into a mojo app?
02:20 tempire jjafuller: more details
02:20 purl more details are in 'git help config', for the interested.
02:20 tempire what method of auth are you interested in?
02:22 jjafuller tempire: For the moment, I just need user/pass. But, ultimately I would like full RBAC
02:22 tempire that wouldn't be mojolicious specific
02:22 jjafuller tempire: For example, in catalyst I use the Authenticate, and Authorization plugins so I would be looking for that kind of functional for now
02:22 tempire but if you're talking about something like basic auth, or tls certificates, that would be mojolicious specific
02:23 jjafuller tempire: So basically, if I want that functionality I would use something else, in addition to mojo?
02:25 tempire for the example of catalyst::plugin::authentication, there's no direct plugin equivalent.  it wouldn't be that hard to implement in your own plugin, though
02:26 tempire do the auth in a mojo bridge, and go from there
02:26 jjafuller tempire: I wouldn't be opposed to that. Are their any docs / examples I can reference?
02:27 tempire the growing guide has an example: http://mojolicio.us/perldoc​?Mojolicious/Guides/Growing
02:28 tempire that should show you how simple it is
02:28 tempire starting at http://mojolicio.us/perldoc?Mo​jolicious/Guides/Growing#Model
02:28 tempire but it's a good idea to read through it, so you understand the relationships between ::lite and a full app
02:29 tempire and how everything works together
02:29 tempire fairly quick read, most of it's code examples
02:29 tempire and takes you through how to test your app as well
02:30 jjafuller Very cool, thanks for the tip
02:42 tempire :)
02:49 elb0w` joined #mojo
02:50 elb0w` when I see FastCgiServer /home/sri/myapp/script/myapp -processes 10
02:50 elb0w` will that spawn 10 processes? of my app?
03:10 jjafuller left #mojo
03:13 stephen left #mojo
03:13 elb0w` sri you around by chance?
03:17 kaare_ joined #mojo
03:19 kaare left #mojo
03:32 MojoGuest484 joined #mojo
03:32 MojoGuest484 From: http://www.google.fr/search?q=html5+irc&ie=​UTF-8&oe=UTF-8&hl=en&client=safari (1 hits)
03:33 MojoGuest484 left #mojo
03:37 tardisx_ joined #mojo
03:47 ispy_ left #mojo
03:51 perlrocks Twitter: "blogs.perl.org: CSS selector goodness in Mojo::DOM http://bit.ly/f1Wpe4" --tempiretech http://twitter.com/tempirete​ch/status/38083020669849600
03:53 tardisx_ I have a session problem (builtin sessions)
03:53 elb0w` Why would http://pastie.org/1573240 give me http://dev.elbowrage.com
03:53 elb0w` ?
03:54 tardisx_ before I go into lots of detail, the fundamental problem is that they go out with signature and come back without it
03:55 tardisx_ ie: in a tcpdump I see: Set-Cookie: mojolicious=BAg[more data]lcw==--b5124[more hex]; Version=1; Path=/; expires.. [etc]
03:56 tardisx_ and then: Cookie: mojolicious=BAg[more data]lcw;
03:56 tempire elb0w`: I ran your pastie locally, and it works as expected
03:56 tempire with the url http://localhost:3000/whatever
03:56 elb0w` im running it with apache2
03:56 tempire without the /whatever, it returns the unboxed page.
03:57 tempire so it's likely your /whatever is being eaten by apache2
03:57 tempire NOM
03:57 elb0w` hmm
03:57 elb0w` man why cant things just work easily? :P
03:57 tempire there's a reason I don't use apache ;)
03:57 elb0w` http://pastie.org/1573248
03:58 elb0w` What do you use?
03:58 tempire hypnotoad
03:58 purl hmmm... hypnotoad is at http://www.r33b.net/ or ALL GLORY TO THE HYPNOTOAD!
03:58 elb0w` and do you see anything wrong with what im doing?
03:58 tempire ALL GLORY TO THE HYPNOTOAD!!!
03:58 elb0w` Ive never used hypnotoad
03:58 elb0w` a little scared to use it
03:58 elb0w` :P
03:59 tempire All the cool kids are using it
04:00 tempire It's been years since I've been familiar with rewriterule
04:00 tempire I'd check your mojo logs, though.
04:01 elb0w` Template "not_found.development.html.ep" not found.
04:02 elb0w` ill dig in tomorrow
04:02 elb0w` good night, ty
04:02 elb0w` left #mojo
04:03 tl joined #mojo
04:05 tholen42 left #mojo
04:46 perlrocks Twitter: "Mojolicious-Plugin-CSRFDefender 0.0.3 by SHIBAZAKI - http://frepan.org/~shibazaki/Mojol​icious-Plugin-CSRFDefender-0.0.3/" --cpan_new http://twitter.com/cpan_ne​w/status/38097022120755200
04:50 MojoGuest889 joined #mojo
04:51 crab tardis: that's just weird
04:51 tardisx_ isn't it
04:51 tardisx_ I suspected browser weirdness
04:51 crab does it always happen? which browser?
04:51 tardisx_ but I'm running the same code in a different environment and the problem doesn't occur
04:51 tardisx_ safari
04:51 tardisx_ firefox
04:52 tardisx_ different environments are linux (ubuntu server) - broken, mac os x - works
04:52 tardisx_ mojolicious versions the same
04:52 tardisx_ both running through the built in web server
04:52 crab does the browser also think it's receiving the full cookie? e.g. in firebug?
04:53 tardisx_ only other piece of the puzzle is it's a facebook app, so it's all going through the canvas etc etc
04:53 tardisx_ but again, this does work against one target, not the other
04:53 tardisx_ not tried firebug or anything yet, my next step I think
04:53 tardisx_ I was hoping someone would say "Oh That!" :-)
04:53 crab i don't understand what implications being a facebook app has
04:53 crab do you really see a ";" at the end of the cookie?
04:54 MojoGuest889 is now known as moro
04:54 tardisx_ yes
04:54 tardisx_ but
04:54 tardisx_ the one that is complete has it too, I think it's the separator for the version, path, expires
04:54 tardisx_ looks the same in the working tcpdump
04:54 crab but the client isn't supposed to send it back
04:54 memememomo_ is now known as memememomo
04:54 tardisx_ except the signature is intact
04:55 bigbootay joined #mojo
04:56 crab oh, seems it can send it. ok, sorry.
04:56 tardisx_ http://pastie.org/1573343
04:57 mattastrophe left #mojo
04:57 crab hmm. according to the abnf in 2965 it should send it only if there are any extra attributes to send, not otherwise.
04:58 crab but anyway. probably not relevant.
04:58 memememomo is now known as memememomo_
04:58 tardisx_ no I agree
05:03 crab tardisx: since there is no other explanation, it must be evil hackers!!@#!
05:06 tardisx_ curse them!
05:09 moro left #mojo
05:13 crab what happens if you change the separator to something else? ...but no, the problem must be somewhere else.
05:29 tardisx_ the signature separator? I did think of that... I wonder
05:29 tardisx_ could be worth a hack
05:35 crab you only ever do $self->session(x=>$y) in your app, right? you don't do anything to change how the cookie is generated and sent?
05:39 tardisx_ that's right
05:39 tardisx_ and remember it works with the same codebase in a different server environment
05:48 crab tardis: how about sending a plain old cookie and seeing how it is treated?
05:50 tardisx_ I will try that... I expect it will as it all comes down to the signature being stripped
05:51 crab tardis: send a cookie that's like x=aaaaaaaaaaaaa....bbbb--xyzyzyyxysnk or so
06:01 tardisx_ yep pasted in my failing value into a 'manual' cookie and it works fine
06:04 crab now instead of a plain cookie, send a signed_cookie()?
06:22 tardisx_ ok, facebook is messing with it
06:22 tardisx_ I don't know a) why and b) why it only breaks one deployment
06:23 crab your responses are proxied through facebook?
06:23 tardisx_ yep
06:24 crab i wish i'd realised that earlier
06:24 tardisx_ don't get me wrong, I always considered this the likely problem
06:24 tardisx_ but I have the same code running on a different box, proxied in exactly the same way, which does not exhibit this behaviour
06:25 tardisx_ I've even taken the FB application configuration out of the picture by changing the callback URL between my working and non-working envirnoments
06:33 tardisx_ bleah I can solve this by just using regular non-signed cookies rather than sessions, but I wish I knew what was going on :(
06:36 crab well, non-signed cookies don't give you integrity protection, as i'm sure you realise
06:37 tardisx_ yep, but I prefer to do that server side anyway
06:37 tardisx_ CALL ME CRAZY
06:38 crab you crazy!
06:42 crab (out of curiosity, why?)
06:44 tholen joined #mojo
06:44 tardisx_ just a general principle, if it's sensitive I'll keep it server side. so they just provide me with data to lookup the sensitive stuff.
06:44 tardisx_ in many cases it doesn't make any difference, since they can guess keys/id's or whatever
06:44 tholen left #mojo
06:46 crab well, even if you're storing the state on the server, you should be using strongly random identifiers
06:51 tardisx_ in this case I just store a UID (which is public) and get the access token from the DB. Facebook takes care of making sure that it's the right access token for the logged in user
06:51 tardisx_ anyway, thanks for your debugging help, time to go home :-)
06:51 tardisx_ left #mojo
06:58 kaare_ is now known as kaare
07:10 yko hmm. looks like issue 74 has reason
07:10 yko perl -MMojo::Client -e 'Mojo::Client->new->async->get("http://google.com/" => sub { warn "Response!" })'
07:10 yko async client doesn't start IOLoop if it's stopped. Or it's normal behavior?
07:11 yko oh. previous code is wrong.
07:11 yko perl -MMojo::Client -e 'Mojo::Client->new->async->get("http://google.com/" => sub { warn "Response!" })->start'
07:11 yko this one supposed to start, isn't it?
07:16 crab it says "start
07:16 crab ", so i guess you're right
07:24 koban joined #mojo
07:24 crab yko: tell about your pdf renderer?
07:24 yko It's in progress atm.
07:25 Alias_ Based on ghostscript?
07:25 yko Main idea is to run external app (or make request to external daemon/api) for content
07:25 * Alias_ maintains a couple of pdf render pipelines at $work
07:25 yko Alias, no on Inkscape at the moment :D
07:25 yko but i'm going to add ghostscript to force font embedding
07:25 Alias_ Interesting, although too big an app for our prod servers probably
07:26 Alias_ We ended up doing some pretty evil things
07:26 yko Alias: it has --shell mode, so i can launch just a single instance (30 mb of ram) and reuse it
07:26 yko btw, works fast enough
07:26 Alias_ We have a data model -> PDF::API2 -> ghostscript -> postscript pipe
07:26 Alias_ That's print grade
07:27 * omega uses TT to render LaTeX, then to pdf
07:27 Alias_ So it can produce stuff with all the crazy bleedbox etc stuff intact
07:27 yko Alias: i'm going to have Perl-preprocess of SVG template => Inkscape => PDF::API2 (some postprocess stuff) => ghostscript (font embedding)
07:27 Alias_ But, oddly, we use entirely different pdf -> ps -> pipes for screen and final version
07:28 Alias_ With two different installed versions of ghostscripts, because there's bugs/nigglies that are needed for screen and print
07:28 Alias_ Neither versions are current :)
07:28 yko ouch...
07:29 Alias_ And we do some hacking of the box model with a hand-written pdf parser thingy
07:29 Alias_ We had to trick ghostscript into using different box model
07:29 yko That's why i want to have delayed rendering: i want to be able just $c->render('template', handler => 'svg') and not block whole app while renderers process request
07:29 Alias_ So we hack the pdf, stashing the original box model away, let ghostscript chew on it, then open it up and hack the original box model back in
07:30 Alias_ Well, we haven't seen noticable slowdown from the render
07:30 Alias_ The screen one anyways
07:30 yko Alias: ouch.. thats really hurts
07:30 Alias_ The print pipeline does a few more tricky things
07:30 Alias_ And it's in a daemon in the background
07:30 Alias_ And only runs after the document has been proofed
07:30 Alias_ The end result is nice though
07:31 Alias_ A web-based customisation environment for documents, where we can PROVE that the picture of the thing you are designing on the screen will perfectly match the paper that ends up on your desk
07:31 Alias_ font bugs, kerning mistakes, and everything
07:31 Alias_ 100% font embedding, as you said
07:32 Alias_ Except all our fonts have to be in the database
07:32 yko hmm.. sounds good
07:32 Alias_ It's pretty damned awesome if you ask me
07:32 Alias_ Very very niche specific
07:32 Alias_ Maybe 50-100,000 lines of code
07:32 Alias_ Out of 250k for the entire website
07:33 yko oh... damn
07:33 yko is it public? i mean i can see how does it works?
07:33 Alias_ Hells no
07:33 yko :)
07:33 Alias_ It's a company secret
07:33 * yko wanna steal it
07:33 Alias_ We print the business cards for global companies and police departments etc
07:34 Alias_ And governments
07:34 purl governments are far more efficient at *creating* monopolies than preventing them. :)
07:34 yko the stuff i was dreaming five years ago. huh
07:34 Alias_ Get me in a room some time and I'll tell you how it works
07:34 yko I believe i do
07:36 Christian joined #mojo
07:36 Christian morning
07:36 * yko waves
07:45 crab a soundproof room with padded walls?
07:47 yko sushi and few geishas. best environment to steal corporate secrets :)
07:49 yko well, on post-soviet land we also have thermorectal cryptanalysis for that purposes
07:49 yko http://www.inpic.ru/pic/3097-1994feb0.jpg
07:50 yko title on the cover says: 'Thermorectal Cryptanalysis - workbook for high schools' or so
07:51 crab thermo*rectal*? i don't think i want to know.
07:51 koban left #mojo
07:52 crab oh boy. soldering iron. i really don't want to know.
07:52 crab (but: rectothermal, not thermorectal :)
07:54 yko i believe - no. first bring 'thermal' on iron then ... :)
07:54 crab yko: can you get sushi easily in .ua?
07:55 yko there's sushi bar each 200 meters. sushi is a trend last ~5-7 years
07:55 GitHub94 joined #mojo
07:55 GitHub94 mojo: master Brian Duggan * 2f7455d (1 files in 1 dirs): fix setuid hypnotoad worker
07:55 GitHub94 mojo: master Sebastian Riedel * e987c96 (2 files in 2 dirs): cleanup
07:55 GitHub94 mojo: master commits f4fc807...e987c96 - http://bit.ly/euZxRx
07:55 GitHub94 left #mojo
07:56 crab wow. here you have to go to a very upmarket five-star hotel or so for sushi.
07:57 yko it's became cheap last time. sometimes - very. also all ingridients are in free access
07:59 sri good morning synshines
07:59 yko hi sri!
07:59 yko glad to see you this morning
07:59 yko did you sleep well? :)
08:00 * yko is a bit positive today
08:01 yko maybe it's because somebody left aligator-pit open? :)
08:04 yko https://github.com/kraih/mojo/blob/mas​ter/lib/Mojolicious/Controller.pm#L300 <-- this line actually allows renderer to preform delayed render
08:04 * sri pulls yko out of the alligator pit
08:04 yko -_-
08:04 yko hehe
08:04 * yko bites sri's hand
08:05 yko yum yum
08:05 sri :o
08:05 yko well, if somebody is in aligtor pit for a while, he begin bites :D
08:05 sri tempire++ # fun blog post
08:06 yko sri: can i ask your advice about delayed rendering?
08:06 yko i'm thinking about using that controller's behavior but unsure if it's safe - maybe you are going to change it
08:07 sri it's a little early but sure
08:07 sri define "that controllers behavior"
08:09 yko if renderer returns undefined output controller stops rendering silently
08:09 yko in source it's marked as 'Fail' but renderer can just set render_later, return undefined content, and preform delayed rendering by itself
08:09 yko https://github.com/kraih/mojo/blob/mas​ter/lib/Mojolicious/Controller.pm#L300 <-- here
08:10 sri i think you can rely on that
08:10 sri if you want to be absolutely sure look for tests depending on it
08:11 crab ("and if there aren't any, submit one" :-)
08:11 sri exactly :)
08:11 yko damn. i should really do that. thank you
08:12 sri but i think we have quite a few tests for it, auto rendering and stuff
08:12 AmeliePoulain joined #mojo
08:14 crab synshines are like synfloods, but happen in the morning
08:15 yko such rendering looks like that: https://gist.github.com/de21e6e4ed86096805dc
08:15 yko nut sure that example works, but it describes main idea
08:15 MojoGuest617 joined #mojo
08:15 MojoGuest617 From: http://www.google.de/url?sa=t&amp;source=web&​amp;cd=2&amp;ved=0CCAQFjAB&amp;url=http%3A%2F​%2Fdev.xantus.org%2F&amp;rct=j&amp;q=irc%20ht​ml%205%20client&amp;ei=e9hcTcORDdGZOrOylYEL&a​mp;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg&amp​;sig2=Eru5tgEWWE_21Ka7Z6bp1g&amp;cad=rja (1 hits)
08:16 MojoGuest617 left #mojo
08:17 sri tardisx: that == looks wrong
08:19 sri yko: long polling test cases cover that
08:20 yko oh great. thank you much. i was going look there today
08:21 crab sri: the == is just from the base64 encoding of the storable'd data
08:21 sri yea, i can see it cause trouble
08:21 yko oh, that's so sweet, if renderer supposed to do some hard stuff it can just delay rendering!
08:21 crab oh! i see what you mean. hmm.
08:22 yko So, actually, there can be renderers for PDF files, or renderers that rendering some data from third-party APIs even
08:22 * crab watches yko quivering with excitement
08:23 crab damn. i never noticed that the lcw== turned into lcw; wonder why it broke only on one system.
08:23 crab but no point speculating, who knows what facebook did with it
08:23 yko like <AMAZON-TITLE ASIN > can take name of ASIN just from amazon for example :D
08:24 yko sure this example is not the best one, but i believe there's use cases for such stuff
08:26 breaker313 joined #mojo
08:35 GitHub150 joined #mojo
08:35 GitHub150 mojo: master Sebastian Riedel * faa80d7 (2 files in 2 dirs): fixed session cookie encoding bug
08:35 GitHub150 mojo: master Sebastian Riedel * 78be057 (1 files in 1 dirs): fixed typo
08:35 GitHub150 mojo: master commits e987c96...78be057 - http://bit.ly/i40k78
08:35 GitHub150 left #mojo
08:35 sri tardisx: please try that
08:40 crab sri: he's gone already
08:40 crab oh, another client. ok.
08:40 sri he'll come back
08:41 giwi joined #mojo
08:52 breaker313_ joined #mojo
08:53 * crab suddenly realises that he's storing a humongous Mojo::URL object in the session cookie
08:53 crab ->to_string to the rescue.
08:55 breaker313 left #mojo
08:56 breaker313_ left #mojo
08:56 breaker313_ joined #mojo
09:01 memememomo_ is now known as memememomo
09:05 memememomo is now known as memememomo_
09:08 breaker313 joined #mojo
09:10 breaker313_ left #mojo
09:13 jwang left #mojo
09:25 su-bzero is now known as su-bzero[off]
09:27 MojoGuest126 joined #mojo
09:27 MojoGuest126 From: http://news.ycombinator.com/item?id=1277067 (237 hits)
09:27 MojoGuest126 left #mojo
09:30 perlrocks Twitter: "Web development can be fun again! Mojolicious + DBIx::Simple + SQL::Abstract #mojolicious" --mshershnev http://twitter.com/mshershn​ev/status/38168271320645632
09:46 koban joined #mojo
09:49 Alias_ left #mojo
10:06 spleenjack joined #mojo
10:11 sri ETOOMUCHSUN
10:12 fmerges joined #mojo
10:17 marcus GUYBRUSH THREEPWOOD
10:39 su-bzero[off] is now known as su-bzero
11:07 sri hmm
11:07 sri maybe $client->async is misleading
11:10 sri people always misunderstand it
11:19 GitHub45 joined #mojo
11:19 GitHub45 mojo: master Sebastian Riedel * c5d66cc (1 files in 1 dirs): added async client example - http://bit.ly/go9h3C
11:19 GitHub45 left #mojo
11:21 sri maybe it should be called $client->shared or so
11:22 marty joined #mojo
11:25 sri oh mason2 has been released
11:28 crab mason!
11:29 sri wonder how many people will go berserk about it breaking backwards compatibility
11:29 crab it's not mentioned on masonhq.com yet (if it will be at all)
11:29 sri http://search.cpan.org/~jswartz/Mason/l​ib/Mason/Manual/UpgradingFromMason1.pod
11:30 sri it just replaced mason1 on cpan
11:30 sri same namespace, different template system
11:31 sri no wait, it has html::mason before :)
11:32 crab yes, HTML::Mason. i used to like it, back in the day.
11:33 crab Mason 2 sounds pretty nice from the pod you linked to. but i have zero incentive to even look at it in more detail.
11:34 sri i like a few things
11:34 sri but it doesn't do indented perl lines
11:34 sri imo the only way to really make perl blocks look good embedded
11:36 sri the <%lalala></%lalala> tags could be a neat alternative to begin/end actually
11:36 crab do you mean "%        x" or "        % x", or something else?
11:36 sri second
11:36 crab ah
11:39 sri <% form_for 'lalala'>...</%> that's not too bad
11:40 sri vs % form_for 'lalala' begin ... % end
11:41 sri *+ =>
11:45 crab i wouldn't mind <% form_for 'lalala' %> but i don't want <% end %> to go away
11:45 Akron joined #mojo
11:47 baton8 joined #mojo
11:50 esskar2 left #mojo
11:56 GitHub161 joined #mojo
11:56 GitHub161 mojo: master Sebastian Riedel * 3709a71 (1 files in 1 dirs): regex cleanup - http://bit.ly/iaLBTQ
11:56 GitHub161 left #mojo
12:11 yko aha! so async client needs running ioloop :)
12:12 sri yes!
12:12 yko i think i had that knowledge but issue 74 dropped it down :\
12:12 sri the whole point of async is giving up ioloop control :S
12:12 sri that's why i said it might need a better name
12:12 yko oh noes....
12:12 purl noes is probably sungo
12:13 yko i somehow was thinking that async client on ->start checks ioloop->is_running and starts it if needed, but ignore me
12:14 sri if you think there's a way to improve it you should just start experimenting
12:14 sri i'm wrong a lot
12:15 sri guess i should just say it's impossible, instead of prove me wrong, more motivating :)
12:19 yko ЖВ
12:20 yko sri: i don't mind, main reason of all that is me sometimes missunrestooding ->async, ye
12:22 ok22 joined #mojo
12:23 sri async is really hard, i wish i knew a way to make it easier :/
12:32 ispy_ joined #mojo
12:33 yko no way! how then i can looks clever? :D
12:40 sri it might actually be possible to do it
12:41 sri but it would break other stuff
12:45 ok22 left #mojo
12:48 LoonyPandora joined #mojo
12:49 LoonyPandora left #mojo
12:55 sri damn
12:55 sri current behavior is even a bug...
12:56 yko oh noes...
12:56 sri this is going to hurt
12:56 * yko cries
12:56 crab as long as it hurts yko more than me, i don't mind
12:57 * yko is crying harder
12:58 sri some documentation is actually wrong...
12:58 sri i really screwed up
13:00 crab what is the problem?
13:00 purl it has been said that the problem is this:
13:00 sri all code using ->async will currently break with cgi, fastcgi and psgi
13:00 sri as in not work at all
13:00 crab purl, no, the problem is <reply>
13:00 purl okay, crab.
13:01 sri this illustrates the actual problem really well
13:01 sri nobody understands async really
13:01 sri and no matter what i do now, stuff breaks :/
13:02 crab :/
13:03 sri :(
13:08 crab just fix it so it makes sense, and i offer to help document the change
13:08 crab if it's actually broken now, i guess there's nothing else to do
13:08 sri that's not the problem
13:08 sri people will go berserk because i break stuff again...and not care for reasons
13:08 yko sri: only *cgi and psgi are affected?
13:08 sri cgi psgi and fastcgi
13:09 sri all non daemon environments basically
13:09 yko i'm using only daemon atm
13:09 sri the problem is ->async does not fallback to blocking atm in those environments
13:10 sri it will just not work at all
13:10 yko but wait, maybe we can keep this behavior? :)
13:10 sri ?
13:11 sri wait for what?
13:11 yko i mean, maybe current behavior is ok?
13:11 crab yko: as in keep async as it is, add a better-named function that works always?
13:11 sri umm
13:12 sri the reason i added ->start was to make a fallback work
13:12 yko crab: if you haven't ioloop running you need to start it manually. that's just all
13:12 yko oh...
13:12 yko than damn yes. actually i was thinking it worksuntil this day
13:12 sri the problem is not so easy to solve
13:12 yko so issue 74 has sense?
13:12 sri it is really really broken by design
13:13 sri yes issue 74 makes sense in a cgi context
13:14 sri and nobody even understands async
13:14 sri that's the biggest problem
13:14 sri i might rip it out as a whole and replace it with something easier to understand
13:14 yko only? i was thinking that if ioloop isn't running than ->start should block always
13:14 sri yko: IT CAN'T!!!!!
13:15 sri that's the whole point
13:15 sri yko: http://mojolicio.us/perldoc?Mojolic​ious/Guides/Cookbook#Non2DBlocking # look!
13:15 sri i've documented $async->get(...)->start; $async->ioloop->start;
13:16 sri which is total bullshit
13:16 sri if i fix it then the first start will block until the request finished and the second will block infinitely afterwards
13:16 yko hey, dont you shout on me please, i've already hassle a bit with my gf and my old father
13:16 yko don't want it anymore :)
13:17 * sri has no idea what to do
13:18 marcus stick your head in the ground!
13:18 * sri sticks his head in the ground
13:18 crab the hard, stony ground?
13:19 marcus yes!
13:19 marty morning!
13:19 purl Mornings are great. Every time you experience morning, you're not dead yet!
13:19 marty Wow!  sri, sounds like you are having a baaad day.  :(
13:20 sri hmm, maybe async shouldn't work in cgi, fastcgi, psgi environments
13:20 sri fallback might be too much magic anyway
13:20 marty I suggest you deny everything and blame it on your new SSD.  :P
13:21 MojoGuest975 joined #mojo
13:21 MojoGuest975 From: http://news.ycombinator.com/item?id=1277067 (238 hits)
13:21 MojoGuest975 left #mojo
13:25 sri think i'll make ->async mean "make client give up ioloop control"
13:26 sri no more fallback magic
13:26 sri if you go async you have to know what it actually means
13:27 yko ьфниу ерші ші еру иуіе іщдгешщт
13:27 yko maybe this is the best solution
13:27 sri it's simple and predictable
13:27 sri and stuff stays mostly the same
13:28 yko other one is to not inherit loop from sync client, but start singleton one managing when to stop it...
13:28 yko anyway its magic that will shout your leg one day
13:29 yko *shoot
13:29 elb0w sri, have you setup mojo on apache2 with mod_fcgid?
13:29 sri that will break all documented examples again
13:30 sri elb0w: i don't really do much fastcgi anymore
13:30 sri and surely not with apache
13:30 elb0w So is hypnotoad the recommended server with mojo then?
13:31 sri i like it most
13:31 sri but you'll have to decide for yourself
13:31 elb0w Well im more worrying about stability with high traffic
13:31 elb0w I have never used it
13:31 sri yko: sorry for the shouting btw
13:32 yko np, i understand you
13:32 yko today is bad day to do anything. especially communicating
13:33 sri elb0w: stability with high traffic? didn't you use dreamhost before? Oo
13:34 elb0w hahah
13:34 elb0w good point
13:34 purl nice and sharp
13:34 yko i already have two quarrels today. i think ill close all aims, mail clients, windows and doors, switch off mobiles and get drunk till tommorow
13:34 elb0w dreamhost was always just a staging platform
13:34 elb0w I will give hypnotoad a shot tonight
13:35 sri quite sure you are overthinking it
13:36 sri build your app, and worry about scaling when it becomes actually a problem
13:36 yko sri++
13:36 sri heck, run the first version as a cgi
13:37 yko yea, http://korshak.name/months/ was written in 20 minutes as experiment and i still use it
13:38 yko if i dont run it in cgi i would still mix months names
13:42 crab eh, i didn't realise .ua has different month names
13:43 crab why is this a cgi? it doesn't seem to *do* anything
13:50 giwi left #mojo
13:55 marcus 2x more exciting than watching paint dry.
14:08 fhelmber_ joined #mojo
14:11 yko crab it really don't do anything, but i was experimenting with i18n and Lite those days
14:12 yko and ye, .ua has own language with similar to .ru, but has a lot of differences
14:13 giwi joined #mojo
14:13 yko almost all .ua speak .ru and can understand (on a simple level) .pl
14:17 yko crab: oh wait. it does! that page does i18n :D just a simple test
14:51 sri grr
14:52 sri people have been using ->async for no reason at all :S
14:52 sri the fallback was a very very stupid idea in the first place
15:00 koban left #mojo
15:01 elb0w im excited to use hypnotoad now
15:01 elb0w weeee
15:10 koban joined #mojo
15:20 AmeliePoulain left #mojo
15:34 MojoGuest120 joined #mojo
15:34 MojoGuest120 From: http://news.ycombinator.com/item?id=1277067 (239 hits)
15:37 MojoGuest120 left #mojo
15:41 tholen joined #mojo
15:49 ispy_ left #mojo
15:57 koban left #mojo
15:57 Akron left #mojo
15:59 sri positive news, ->start becomes optional again for async clients
16:12 tempire_ I have a BRILLIANT feature request
16:13 tempire_ there should be a command and switch to the hypnotoad command that plays the sound to alsa devices
16:13 tempire_ hypnotoad glory --all
16:13 sri BRILLIANT!
16:13 purl coincidentally, I had beans for breakfast
16:19 ysyrota joined #mojo
16:23 tholen left #mojo
16:27 breaker313 left #mojo
16:29 Christian nive evening to you all
16:29 Christian s/nive/nice/
16:33 Christian left #mojo
16:37 fmerges left #mojo
17:09 perlrocks Twitter: "Mojolicious-Plugin-CSRFDefender 0.0.4 by SHIBAZAKI - http://frepan.org/~shibazaki/Mojol​icious-Plugin-CSRFDefender-0.0.4/" --cpan_new http://twitter.com/cpan_ne​w/status/38283886853103616
17:36 dotan joined #mojo
17:37 dotan I'm trying to spider some huge html with Mojo::Client and the response body gets cut off; what's the thing to set to avoid that?
17:37 dotan Oh, and good evening.
17:40 dotan "you can use the MOJO_MAX_LINE_SIZE environment variable or the max_line_size attribute of Mojo::Message to change this value." - is this a class attribute?
17:42 dotan I mean MAX_MESSAGE_SIZE
17:52 ysyrota left #mojo
17:54 MojoGuest177 joined #mojo
17:54 MojoGuest177 From: http://www.google.ca/ (1 hits)
17:55 MojoGuest177 yo
17:57 moritz hello
17:57 dotan hi
17:57 purl hey, dotan.
17:58 dotan yo, purl
17:58 purl y0!!
17:58 moritz botsnack
17:58 purl :)
17:59 dotan sheeeeeyeeeet. The page I was trying to spider is 200Mb.
18:00 dotan I should probably skip trying to parse this with Mojo::DOM...
18:07 jwang joined #mojo
18:11 dotan So, how do I process the page the client is loading in chunks?
18:18 MojoGuest331 joined #mojo
18:18 MojoGuest331 From: http://news.ycombinator.com/item?id=1277067 (240 hits)
18:19 MojoGuest331 left #mojo
18:20 tholen joined #mojo
18:21 bigbootay left #mojo
18:21 bigbootay joined #mojo
18:39 stephen joined #mojo
18:49 sri wow, i've found a very very old bug on the way
18:50 sri that might have caused some random test failures
18:53 crab on the way to fixing async or something else?
18:53 sri yea
18:58 dotan sri: do streaming responses play well with redirects?
18:59 sri don't ask, write a test!
18:59 sri :)
18:59 dotan OK :)
19:04 spleenjack left #mojo
19:06 sri the bug also affected the way your tests have to be ordered
19:06 sri i know some of you noticed that one before
19:31 vel joined #mojo
19:42 garu is now known as killerbot6
19:42 killerbot6 is now known as garu
19:57 fhelmber_ left #mojo
20:01 jfuller joined #mojo
20:05 fh left #mojo
20:08 giwi left #mojo
20:10 dotan sri: ok, I wrote my test. redirection and streaming responses don't seem to mix https://gist.github.com/832561
20:11 sri dotan: i don't see a streaming response
20:12 dotan sri: I meant the client is trying to stream the response from the server
20:12 * sri doesn't follow
20:13 sri http://mojolicio.us/perldoc?Moj​olicious/Controller#write_chunk # this is streaming
20:13 dotan sri: trying to read the server's response in chunks instead of waiting for it to download
20:14 dotan sri: http://mojolicio.us/perldoc?Mojolicio​us/Guides/Cookbook#Streaming_Response # this is the streaming I'm talking about
20:14 * sri really doesn't follow
20:14 sri that makes absolutely no sense
20:14 sri if you're writing one chunk there is nothing that could be streamed, nowhere
20:15 dotan sri: ok, maybe it doesn't
20:16 dotan sri: the real life scenario is I'm trying to scrape a site where you post a query and get 200Mb of HTML in response.
20:16 dotan and there's a redirect in between
20:17 sri and?
20:17 purl rumour has it and is a relatively small number of classes anyway
20:17 sri you're not following me on twitter are you? ;p
20:18 sri http://mojolicio.us/perldoc?Mojolicious/Gu​ides/Cookbook#Decorating_Followup_Requests
20:19 dotan on_start, you say?
20:20 sri the mojo get command streams to stdout that way, even after redirects
20:21 crab purl: no, and is <reply>
20:21 purl okay, crab.
20:22 al left #mojo
20:24 al joined #mojo
20:25 perlrocks Twitter: "One of my favorite things about #mojolicious is all the Futurama references; mainly the Hypnotoad server #perl" --hoelzro http://twitter.com/hoelzro​/status/38333329619165184
20:25 dotan sri: thanks!
20:33 sri wtf? there's a mojolicious link on perlbuzz
20:34 * sri stares at tempire
20:35 dotan I think I found mojo originally via perlbuzz...
20:36 sri :o
20:36 tholen left #mojo
20:39 tempire_ \o/
20:46 dotan Yes! Works! (streaming spidering blah) Yay!
20:46 dotan Now, weekend
20:46 dotan left #mojo
20:51 GitHub11 joined #mojo
20:51 GitHub11 mojo: master Sebastian Riedel * 4945d3b (13 files in 7 dirs): fixed Mojo::Client async mode - http://bit.ly/gaNPBi
20:51 GitHub11 left #mojo
20:51 sri please test
20:52 sri i'm sure it will break some apps
20:52 sri documented cases are mostly the same
20:53 sri but many undocumented and untested ones will break
20:55 sri http://mojolicio.us/perldoc?Mojo/Client#async # i guess this description is a lot better
20:55 sri "Disable automatic Mojo::IOLoop management and the need to call start."
20:58 sri and in case you were using the $self->client->async->ioloop trick, you should be able to replace that with Mojo::IOLoop->singleton now
21:00 sri but i guess only xantus uses that anyway ;p
21:01 sri and Mojo::IOLoop->singleton->is_running can be used to tell if you're in an async capable environment
21:07 GitHub101 joined #mojo
21:07 GitHub101 mojo: master Sebastian Riedel * a2655bc (1 files in 1 dirs): improved test case - http://bit.ly/ibe0OJ
21:07 GitHub101 left #mojo
21:10 * sri feels a lot better about this solution
21:10 sri no surprises, everything is one dimensional and predictable
21:30 sri maybe i'll deprecate the ->async method too
21:31 sri an attribute seems more appropriate now
21:31 sri like $client->managed(0)
21:36 tempire_ The $client->ioloop->start after the async->get is what starts the async call?
21:37 sri the loop just needs to run
21:38 sri only the managed client keeps a queue
21:38 sri the unmanaged one starts right away
21:41 tempire_ when you talk about managed vs unmanaged, that's the new functionality, right?  was there managed and unmanaged request types before?
21:42 sri it was async and sync before
21:42 tempire_ ah, ok
21:42 sri but even our sync mode is rally async
21:42 sri managed and unmanaged is easier to grok
21:42 tempire_ not too me
21:42 tempire_ *to
21:42 sri managed means automatic ioloop management
21:43 sri unmanaged, you are responsible
21:43 tempire_ oh, so you're not replacing the descriptions with new words, you're changing the foundation of how it works
21:43 tempire_ that makes more sense
21:43 sri ?
21:43 sri it was pretty much like that before too
21:44 tempire_ nevermind.  carry on, I'll catch up.
21:44 sri :)
21:44 sri nobody really understood it -.-
21:45 crab do i need to use an unmanaged client to make multiple parallel requests?
21:46 sri NO!
21:46 * sri runs around screaming
21:47 * sri falls into the alligator pit
21:48 crab so i don't think i need an unmanaged client, period.
21:49 sri most likely not
21:49 crab (the alligator pit is empty. some german guy whom we will not name ate all the alligators, and because of budget cuts we couldn't acquire any new ones.)
21:50 GitHub153 joined #mojo
21:50 GitHub153 mojo: master Sebastian Riedel * c5bdb95 (1 files in 1 dirs): pod cleanup - http://bit.ly/gyiUIU
21:50 GitHub153 left #mojo
21:50 sri yko is not german
21:51 crab indeed not.
21:51 sri hmm, somehow i don't like the attribute name "managed"
21:52 crab ->entrepreneurial(0)
21:53 sri ->happy_hour(0)
21:53 crab what? happy hour until you explicitly turn it off?!
21:53 * sri nods
21:54 sri ->yes_i_really_know_what_i_m_doing(0)
21:58 sri http://www.git-tower.com # looks cool
22:13 kaare left #mojo
22:30 MojoGuest177 left #mojo
22:54 snearch joined #mojo
22:59 tempire_ gittower is hella buggy
22:59 tempire_ At least it was 2 months ago when I tried to use it.
23:19 daviddelikat1 joined #mojo
23:19 snearch left #mojo
23:24 daviddelikat left #mojo
23:25 perlrocks Twitter: "I interviewed @kraih about #mojolicious. Read the post here http://www.activestate.com/blog/2011/02​/mojolicious-interview-sebastian-riedel" --burntflowers http://twitter.com/burntflow​ers/status/38378631432634368
23:27 DaTa sri++
23:41 ispy_ joined #mojo
23:47 MojoGuest990 joined #mojo
23:48 MojoGuest990 left #mojo
23:48 MojoGuest387 joined #mojo
23:48 MojoGuest387 left #mojo
23:49 MojoGuest428 joined #mojo
23:49 MojoGuest428 left #mojo
23:49 perlrocks Twitter: "Wrote a quick OpenBSD errata scraper with Mojo::Client between the busy I was today - http://t.co/VNgzcGF #Mojolicious #Perl" --AFreshOne http://twitter.com/AFreshOn​e/status/38384641576542208
23:57 tempire_ This interview is quite a bit different from the one I read about catalyst
23:58 tempire_ I recall sri saying that newbies should not really contribute, as catalyst was using cutting edge perl tech
23:59 tempire_ VIVA LA REVOLUCION!

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