Camelia, the Perl 6 bug

IRC log for #mojo, 2011-10-19

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

All times shown according to UTC.

Time Nick Message
00:04 xantus[] I dug into the code, it doesn't look like you can.  You can just set a huge timeout, or make sure its active
00:05 xantus[] it defaults to 15 if you unset it
01:03 mire joined #mojo
01:05 sherwind_ joined #mojo
01:22 mattastrophe joined #mojo
01:36 xantus[] wow..mojo was randomly dropping my connections
01:37 xantus[] $self->_drop($id) if (time - ($c->{active} || time)) >= ($c->{timeout} || 15);
01:38 perlrocks Twitter: "Mojolicious - Perl real-time web framework http://t.co/9c2Ah2i3" --whatismikeupto http://twitter.com/whatismikeu​pto/status/126472278904012800
01:38 mspo joined #mojo
01:39 mspo can I get Mojo::DOM to print text with embedded html?
01:39 mspo to_xml is giving me more than I'd like
01:40 abra joined #mojo
03:10 ashleydev joined #mojo
03:10 noganex joined #mojo
03:17 perlrocks Twitter: ""Mojolicious 2.0 released: Perl real-time web framework - Sebastian Riedel about Perl and the Web" http://t.co/ZaLoGMdF" (ja) --ka2u http://twitter.com/ka2u/status/126497215643521024
03:49 perlrocks Twitter: "W00t Mojolicious! In IRC the day the company has not been the source behind Dis 指Sasa Perler house in which I never 使Ttara "I have a chat with what He smugly Mojolicious? Ww" "ww Ome is a CGI tinkering over your mouth Ttsu life" What to use Python from bullied" (ja) --kenjiskywalker http://twitter.com/kenjiskywal​ker/status/126505316853612544
04:22 perlrocks Twitter: "Good news for Perl lovers Mojolicious 2.0 is released #ironman #perl #mojolicious : http://t.co/FNjGUKIV" --ppant http://twitter.com/ppant/status/126513564025487360
04:31 Foxcool joined #mojo
04:34 ZadYree joined #mojo
05:18 xaka joined #mojo
05:18 perlrocks Twitter: "Mojolicious 2.0: Modern Perl For the Web http://t.co/OnIVAyvS" --FrikiFeeds http://twitter.com/FrikiFeed​s/status/126527594500866048
05:43 Alias_ Nice one on the slashdot post
05:46 crab hi alias.
05:52 ispy_ joined #mojo
05:52 Vandal joined #mojo
06:04 MojoGuest265 joined #mojo
06:04 MojoGuest265 From: http://news.ycombinator.com/item?id=1277067 (36 hits)
06:04 perlrocks Twitter: "Perl Web Framework Mojolicious 2.0 release http://t.co/1RMmAspt" (zh-cn) --ioola http://twitter.com/ioola/status/126539303986806784
06:06 koban joined #mojo
06:28 Foxcool joined #mojo
06:37 perlrocks Twitter: "Review Mojolicious 2.0 to Opennet http://t.co/571kLmKt # perl # mojolicious # opennet # framework" (ru) --xomaa http://twitter.com/xomaa/status/126547407830913024
06:44 kvorg joined #mojo
06:45 MojoGuest572 joined #mojo
06:45 MojoGuest572 From: http://blog.kraih.com/perl-is-ready-for-html5 (7 hits)
06:48 perlrocks Twitter: "@ Foxcool_ru uupps! Here is the correct link to the survey Mojolicious 2.0 http://t.co/bmUuJohq" (ru) --xomaa http://twitter.com/xomaa/status/126550370032943104
06:50 kmx joined #mojo
06:53 jmmills I thought multipart-form file input types were suppose to be inflated to mojo asset objects in the param object?
06:54 jmmills i.e. $self->req->param('my_file_input') would five you a Mojo::Asset::File
06:55 perlrocks Twitter: "Mojolicious 2.0 release made it to Slashdot, but not Perl Weekly? What gives?" --marcusramberg http://twitter.com/marcusramb​erg/status/126552019950505984
07:01 crab jmmills: as i suppose you have noticed, it doesn't work that way.
07:01 jmmills crab, yeah - I'm getting that
07:01 crab use $req->upload instead
07:01 jmmills yeah
07:01 jmmills docs are awesome that way :)
07:03 batman joined #mojo
07:07 perlrocks Twitter: "@marcusramberg Mojolicious 2.0 at @kraih's blog Oct, 17, pm, @PerlWeekly issue was received by me Oct, 17, am. Wait for next issue Oct, 24:)" --ykorshak http://twitter.com/ykorshak​/status/126555071352799232
07:08 spleenjack joined #mojo
07:16 dlg can i write a forward proxy in mojo?
07:16 jmmills explain what you mean by forward proxy?
07:16 jmmills i.e. you make a request a mojo app and it makes a request to another site?
07:16 dlg yes
07:16 dlg i want to replace squid
07:17 jmmills As long as your okay with having the entire request cached between the mojo service and the destination, sure
07:17 jmmills I'm still working on dealing with streaming data my self
07:17 dlg yeah
07:17 sugar joined #mojo
07:18 jmmills I.e. still learning the core well enough to figure out if I can access multipart data and not have it site in memory or the filesystem
07:18 dlg if i set up a ua and get it to dump its body into the initial request, that works ok
07:18 dlg but sucks when you get to large objects
07:18 crab jmmills: the "if" is easy: yes (see the event emitter stuff sri did recently)
07:19 jmmills crab, yeah, I'm making my way through it... it looks promising - the idea being that I catch the event and create my own asset object
07:20 sugar joined #mojo
07:20 jmmills When I'm sure I know what I'm doing expect a Mojo::Asset::{MogileFS, GridFS}
07:20 jmmills :)
07:23 crab you don't have to create an asset object if you don't need it
07:25 jmmills I think it might be kind of cool from both sides to be able to transparently deal with objects in both of those file systems
07:25 jmmills I'm not sure if it's needed yet
07:33 dlg does a ua throw any events when its finished parsing the headers, but before it handles the body?
07:36 dolmen joined #mojo
07:43 perlrocks Twitter: "Guess I was just late to get Perl weekly into my rss feed. Apparently it came out before Mojolicious 2.0." --marcusramberg http://twitter.com/marcusramb​erg/status/126564022475698178
07:50 jmmills ah, there it is
07:51 jmmills Mojo::Content::Single::parse is what generates the asset object and converts to a file on memory size
07:51 cosmincx joined #mojo
07:52 jmmills if I single out the conditions in the request in which I want to send a file to distr fs (like grid or mog) I can over load the asset object with my own and slurp the data in, then the rest of the mojo parsing mechanics will know no different
07:58 perlite joined #mojo
08:00 tempire The slashdot effect for the mojo 2.0 blog post caused the busiest day thus far on mojocasts.com
08:01 tempire slashdot -> blog post -> mojolicio.us -> mojocasts.com
08:02 jmmills sri, crab: https://gist.github.com/1297715 - given that the custom asset class works correctly would does this seem like it would work to have uploads reside in a distributed file system?
08:02 jmmills i.e. a way to handle gigantic uploads with out putting strain on your web servers disk or running out of memory
08:03 jmmills 1GB and larger kind of things
08:03 tempire that's quite a line of clicks, which leads me to believe the hits are more interested than those that came from hacker news directly.
08:04 jmmills that should be add_chunk( $_->asset->slurp )
08:04 jmmills to move the memory assets content to the new "non-local" asset
08:06 jmmills If I work this out in a generic way, it might be worth putting into an "UploadControl" plugin
08:07 jmmills anyways, afk - need to finish a paper for class tomorrow
08:09 MojoGuest982 joined #mojo
08:09 MojoGuest982 From: http://www.google.com/url?sa=t&rct=j&q=&a​mp;esrc=s&source=web&cd=4&ved=0CDIQFj​AD&url=http%3A%2F%2Fdev.xantus.org%2F&ei=​qoWeTvLiOIP8iQLQ2tTWCQ&usg=AFQjCNGw6nZv0wO42u​zUnHhWcD0vcKNULg&sig2=Fx2ZJHoTwywwDtjLwjAi8Q (1 hits)
08:10 MojoGuest815 joined #mojo
08:10 MojoGuest815 From: http://www.google.com/url?sa=t&rct=j&q=&a​mp;esrc=s&source=web&cd=4&ved=0CDIQFj​AD&url=http%3A%2F%2Fdev.xantus.org%2F&ei=​qoWeTvLiOIP8iQLQ2tTWCQ&usg=AFQjCNGw6nZv0wO42u​zUnHhWcD0vcKNULg&sig2=Fx2ZJHoTwywwDtjLwjAi8Q (2 hits)
08:35 perlrocks Twitter: "@szabgab @marcusramberg might want to mention the successful release of mojolicious 2.0 in the next Perl Weekly, a lot of buzz about it." --shadowcat_mdk http://twitter.com/shadowcat_​mdk/status/126577117600288769
08:43 sri jmmills: no, i think your approach is totally off
08:43 purl okay, sri.
08:45 sri jmmills: the fact that your input is in the form of multipart uploads is also new information that changes everything
08:46 sri https://github.com/kraih/mojo/blob/maste​r/t/mojolicious/upload_stream_lite_app.t
08:46 sri quite sure i linked this to you a few times now
08:47 sri that's hw it is done for ajax uploads
08:47 sri *+o
08:48 sri for multipart i think you need a custom parser that throws events
08:48 sri or you add events to our parser
08:52 perlrocks Twitter: "# PerlDancer nice analog Mojolicious:: Light." (ru) --Narkir http://twitter.com/Narkir/​status/126581449620062208
09:03 sri i have no idea why someone would still use multipart uploads these days
09:05 crab ? what would they use instead of multipart/form-data?
09:06 sri ajax uploads of course
09:09 jmmills sri, no I think you linked me the upload_lite_app.t one
09:09 marcus hurgle burgle
09:09 jmmills Sorry if I failed to mention that it was a multipart POST upload not a PUT
09:10 jmmills Apparently not all browsers support PUT though
09:11 sri huh, how is the method relevant?
09:12 perlrocks Twitter: "Mojolicious 1.4: Smiling Face With Sunglasses - http://t.co/RG0d8PSd" --domUpdates1 http://twitter.com/domUpdate​s1/status/126586622023188480
09:17 crab sri: i don't understand what you mean by "ajax upload"
09:18 sri crab: http://twitpic.com for example uses them
09:18 marcus but aren't they still using multipart from javascript?
09:19 sri they don't have to
09:19 marcus actually, aren't they using a hidden flash component?
09:19 marcus yupp, they are
09:19 marcus <script src="/js/uploadify/swfobject.js" type="text/javascript"></script>
09:20 sri maybe not the best example
09:21 marcus yeah, it makes absolutely no sense, since they aren't even supporting multiple files
09:22 sri http://www.cpantesters.org​/distro/M/Mojolicious.html # yay, still looks good, the one fail is a freak accident
09:25 crab http://dev.twitpic.com/docs/2/upload/ suggests that you POST the file data as a parameter value
09:25 crab is that all it is?
09:25 perlrocks Twitter: "Mojolicious 2.0: Modern Perl For the Web - Slashdot http://t.co/obOeem4R" --ericeikrem_no http://twitter.com/ericeikrem​_no/status/126589782649344000
09:25 perlrocks Twitter: "Mojolicious 2.0: Modern Perl For the Web - Slashdot http://t.co/gfGprXte" --ericeikrem_es http://twitter.com/ericeikrem​_es/status/126589782729035777
09:25 perlrocks Twitter: "Mojolicious 2.0: Modern Perl For the Web - Slashdot http://t.co/MSVQ0Buu" --ericeikrem http://twitter.com/ericeikre​m/status/126589782527717376
09:26 Vandal joined #mojo
09:27 perlrocks Twitter: "Mojolicious hack of the day: HTML5 EventSource - http://t.co/oRbnBGwf" --domUpdates1 http://twitter.com/domUpdate​s1/status/126590273219342336
09:27 sri crab: no, twitpic is a bad example
09:27 crab marcus: (re: "using multipart from javascript", xmlhttprequest doesn't support multipart/form-data, so you have to use a hidden iframe with a form and submit that or something. of course you probably know that.)
09:29 marcus crab: yeah, which makes it exactly the same on the server side. So I'm not sure what sri's point is.
09:30 sri my point is that you can use a non-multipart request
09:30 sri since most people don't need to upload multiple files at once
09:33 sri anyway, everything required to make multipart work should be one new event in the multipart parser
09:34 crab use a non multipart request as in just POST the file data with the right content type?
09:34 * sri nods
09:34 crab the problem i have with that is the file data arrives on the server separately from the form data. it makes things more fiddly to handle.
09:35 sri use a query string?
09:35 sri put it into a header...
09:36 crab oh, wait. my use case is actually one where i DO need to upload multiple files ;-) i forgot about that.
09:37 tze` joined #mojo
09:39 stephan48 crab: make an ajax request, let the server give you an id to connect the follup request to that request, and ditch that id into the uploads
09:40 stephan48 followup*
09:42 perlrocks Twitter: "Mojolicious hack of the day: CSS4 - http://t.co/qsPNSKlM" --domUpdates1 http://twitter.com/domUpdate​s1/status/126593935681392640
09:43 crab stephan: yes, i know, but it's just more work. i'll need to add code that checks if the id submitted with the form belongs to the right user and not a different one, etc. etc.
09:44 stephan48 true
09:45 tze` left #mojo
09:45 crab but in some ways it would be nicer, it would make it easier to do upload-progress notifications on the client
09:48 d4rkie joined #mojo
10:00 marcus sri: would be nice to have something like TT's DEFAULT method for the stash (unless you have it and I've missed it)
10:00 marcus so that I could say $self->default_stash(foo=>'bar'); and it would only be set if foo is undefined
10:01 sri app->defaults?
10:01 marcus sri: that's not on a per-request basis tho?
10:01 sri nope
10:04 jmmills okay, so I wasnt thinking completely wrong headed when I was trying to get at how the multipart parser stores the data as it parses?
10:05 marcus doh, I guess I can just use $self->stash->{foo} ||= 'bar';
10:07 sri marcus: you mean //=
10:07 marcus yes
10:07 marcus I do mean that
10:07 marcus although in this instance it's not important.
10:08 sri hmm, i can make streaming multipart work by adding two events
10:08 sri but it's a *huge* chain of events
10:10 jmmills eh, what does the //= assignment operator due
10:10 jmmills do
10:10 crab a //= b is a = b unless defined a
10:11 jmmills ah, rather than unless false
10:11 jmmills my $a = ''; $a ||= 'foo'; $a eq 'foo'; #true
10:12 jmmills my $a = ''; $a //= "foo"; # false
10:12 jmmills I'll never know all of this language
10:13 jmmills anyways, tired. bed.
10:16 marcus jmmills: this is a new feature in 5.10
10:17 andrefs joined #mojo
10:18 sri hmm
10:19 sri not sure i like how these new events work
10:31 GitHub62 joined #mojo
10:31 GitHub62 [mojo] kraih pushed 1 new commit to master: http://git.io/-914NQ
10:31 GitHub62 [mojo/master] added experimental upgrade and part events to content objects - Sebastian Riedel
10:31 GitHub62 left #mojo
10:31 sri when i say the event chain is *huge* i really meant it ;p
10:32 sri s/t//
10:33 sri the uploaded file in the multipart message is streamed in that test though
10:34 sri well, the first body event is not necessary, i'm just testing the timing
10:35 sri i would like to combine upgrade and body somehow
10:36 spleenjack joined #mojo
10:46 dlg sri: how hard would a http forward proxy be?
10:46 sri you don't want to ask me that
10:47 sri you prolly have something very very simple in mind, while my first though is all the millions of edge cases
10:47 perlrocks Twitter: "@ Dang I just do not post memememomo Mojolicious" (ja) --trinityCRZ http://twitter.com/trinityCR​Z/status/126610381618692097
10:48 sri http is hard
10:51 dlg sri: i just want to replace squid
10:51 sri *just*
10:51 dlg except for the caching bit
10:51 dlg and the painful configuration
10:52 sri reinventing a proper proxy is a lot more painful
10:52 sri how well do you know http?
10:52 dlg i got it working in node.js
10:52 dlg but then i got screwed by v8 leaking itself to death
10:53 sri i think you're underestimating the task
10:53 jmmills What exactly does this proxy need to do?
10:53 dlg http is fine until you get to things like chunked encoding and continue shizz
10:53 sri getting something working and doing it right are entirely different things
10:53 dlg well the dying from memory allocation failures implies not right
10:54 sri like i said, better not to ask me, since i know too many edge cases :)
10:54 jmmills If it's just for access control there are other ways to do it, like iptables
10:54 dlg jmmills: v4, v6, ident support, ftp and http backends, logging, acls
10:55 jmmills ident support?
10:55 dlg yes
10:56 dlg its 1980!
10:57 jmmills can't you use apache as a proxy?
10:57 dlg but then i'll be using apache
10:57 jmmills well, configuration is simple
10:58 jmmills I don't know, I haven't dealt with client side proxies in a long long time
10:58 dlg yeah
10:58 crab dlg: it's insanely hard. don't do it.
10:58 jmmills I don't really see the use for them much anymore - other than caching that is
10:58 dlg i generally think theyre a waste of time these days
10:58 dlg there's no point caching these days
10:58 dlg most content is dynamic now
10:58 crab what nonsense.
10:58 purl nonsense is http://stopgeek.com/wp-conte​nt/uploads/2007/07/sense.jpg or http://www.ratemyeverything.net/post/121​9/Bunny_with_a_Pancake_on_Its_Head.aspx
10:59 dlg i proxy all my servers going to the net
10:59 dlg and a couple of shell boxes for staff and students
10:59 dlg they do about 4G a day in total
10:59 dlg of which maybe 20M comes out of the cache
11:00 jmmills Put a couple hundred windows end user machines behind that caching proxy and you'll notice a bigger difference
11:01 jmmills for example caching updates alone...
11:01 dlg we already run a local wsus server
11:02 migo joined #mojo
11:02 dlg i just want to log who hits what sites from the shell boxes
11:06 jmmills dlg, pcap plus minimal request parsing
11:06 jmmills there are a ton of things that will do that for you
11:08 dlg kind of upsetting that everyones saying use anything except mojo
11:10 sri that's not what we're saying
11:10 dlg :)
11:10 sri you should be using a proper proxy
11:11 sri because doing them right is really really hard
11:11 dlg they all suck though
11:12 sri chances are yours will suck more, unless you're willing to put years of work into it
11:13 dlg i am obnoxious like that
11:13 sri because it's not just rfc2616 you have to deal with, but also real world quirks
11:19 perlrocks Twitter: "In Mojolicious is, HMAC-all stored in a cookie encrypted with MD5" (ja) --PerlCafe http://twitter.com/PerlCafe​/status/126618531558211584
11:34 perlrocks Twitter: "Mojolicious 2.0: Modern Perl For the Web http://t.co/jL8FkzIk" --wirapuru http://twitter.com/wirapuru​/status/126622138433155072
11:40 GabrielVieira joined #mojo
11:41 GitHub26 joined #mojo
11:41 GitHub26 [mojo] kraih pushed 1 new commit to master: http://git.io/O8r0gg
11:41 GitHub26 [mojo/master] improved documentation of content objects - Sebastian Riedel
11:41 GitHub26 left #mojo
11:41 sri still not entirely happy with the upgrade event
11:41 sri but i don't think it is possible to merge it with the body event
11:50 stephan48 dlg: you said you used squid? i am sure you can have it log the ips/sites into a file, and i also assume that you know the ips of the shell stations so you could filter on those..
11:50 dlg it can do the job
11:50 dlg i just dont like it
11:51 stephan48 +squid is grown based on years of testing and experience
11:51 stephan48 it can handle most problems servers/clients probably throwing at you
11:51 stephan48 if you write it yourself you would need to take care of those its not that simple...
11:51 sri quite cool though how we can add whole new categories of extensions just by emitting a new event
11:51 stephan48 but more like inventing the wheel again
11:52 perlrocks Twitter: "[Linux Magazine] Framework 2.0 makes Mojolicious pace http://t.co/2ilGhT1N # Perl" (de) --PerlHowto http://twitter.com/PerlHowt​o/status/126626734454996993
11:54 sri nothing wrong with reinventing the wheel, but yours has to be rounder
11:55 Shaeto joined #mojo
11:56 perlrocks Twitter: "Mojolicious-Plugin 0.5 for OAuth2 MRAMBERG - http://t.co/X36GfyQZ" (af) --cpan_new http://twitter.com/cpan_new​/status/126627656384000000
11:56 metaperl|2 joined #mojo
11:57 crab af?
11:57 purl hmmm... af is for Address Family.
11:58 MojoGuest779 joined #mojo
11:58 MojoGuest779 From: http://news.ycombinator.com/item?id=1277067 (37 hits)
11:58 Shaeto is it possible to call controller action from template ?
12:04 Shaeto i meant "emulate" GET for example and load controller render output
12:05 perlrocks Twitter: "Mojolicious: Framework for web applications with modern Perl # @ grilix http://t.co/pxMgoy0G you'll like it:)" (es) --picandocodigo http://twitter.com/picandocod​igo/status/126630145497890816
12:09 MojoGuest101 joined #mojo
12:09 MojoGuest101 From: http://www.google.com/url?sa=t&amp;source=web&​amp;cd=4&amp;ved=0CC4QFjAD&amp;url=http%3A%2F%​2Fdev.xantus.org%2F&amp;rct=j&amp;q=websocket%​20irc&amp;ei=WbyeTuSqPIWKsQLoyZnhCQ&amp;usg=AF​QjCNGw6nZv0wO42uzUnHhWcD0vcKNULg&amp;cad=rja (1 hits)
12:13 ispy_ joined #mojo
12:23 PerlNinja joined #mojo
12:23 PerlNinja g'day mojo-ers
12:25 abra joined #mojo
12:31 marty ¡Hola, PerlNinja!
12:32 PerlNinja hey marty
12:32 PerlNinja ok a non-mojolicious related question... sort of
12:32 PerlNinja I'm trying to set a cookie that's valid for all subdomains of a domain, so I set the domain to '.foo.com' - this oughta work...
12:32 PerlNinja but it doesn't
12:32 PerlNinja it never gets saved even though expiry is set to now + 1 day
12:32 PerlNinja anyone know why? I remember there was something about it but not exactly what
12:33 PerlNinja i'm probably missing something really obvious but ... yeah
12:34 stephan48 i know what you mean. i had the same problem some time ago i dont remember how i solved it thu
12:34 GitHub151 joined #mojo
12:34 GitHub151 [mojo] kraih pushed 1 new commit to master: http://git.io/NSoa0w
12:34 GitHub151 [mojo/master] fixed arguments of upgrade event in Mojo::Transaction::HTTP - Sebastian Riedel
12:34 GitHub151 left #mojo
12:35 PerlNinja stephan48: yeah I've done this before and I remember there was something particular about it to convince browsers to save the cookie but for the life of me I can't remember why
12:35 PerlNinja I do the exact same thing as always except now I also $self->cookie_domain('.foo.com') at startup
12:36 PerlNinja yet the one that does not set the domain works, both regular request as well as via xhr
12:37 rhaen hello world.
12:37 purl hello world. are you here?
12:39 * PerlNinja checks
12:40 PerlNinja nope, world's gone ... to hell. in a handbasket.
12:40 PerlNinja :P
12:40 rhaen :)
12:46 GitHub157 joined #mojo
12:46 GitHub157 [mojo] kraih pushed 1 new commit to master: http://git.io/qnzmnw
12:46 GitHub157 [mojo/master] fixed small WebSocket upgrade bug in Mojo::Server::Daemon - Sebastian Riedel
12:46 GitHub157 left #mojo
12:50 perlrocks Twitter: "Mojolicious 2:01 by SRI - http://t.co/HExNntpZ" (ms) --cpan_new http://twitter.com/cpan_new​/status/126641370088742912
12:51 perlrocks Twitter: "Released #mojolicious 2.01 with a few small bug fixes for the new event system. http://t.co/4gDJJCUB #perl" --kraih http://twitter.com/kraih/status/126641581901094912
12:52 sri it's nothing huge, just want to make sure nobody depends on the broken event
12:53 sri positive side effect is that we now have two more events to play with :)
12:55 PerlNinja stephan48: figured it out ... subdomain.foo.com can't set cookies for .foo.com but foo.com could set them for .foo.com ... something like that. found another solution though, so ... no big deal now :D
12:55 PerlNinja sri++
12:55 PerlNinja events are nummy
12:56 PerlNinja tasty goodness like cherries on top of icecream
12:56 sri jmmills: https://github.com/kraih/mojo/bl​ob/master/t/mojo/message.t#L646 # it might look a little intimidating, but this allows streaming multipart uploads
12:56 sri the event chain is a little deeper than it has to be (for timing tests), but you get the idea
12:57 sri PerlNinja: now i'm hungry :S
13:02 * PerlNinja eats his icecream with cherries on top ... *smirk*
13:02 PerlNinja i had to save this from the hungry jaws of a 7 year old nephew who's already polished off half a tub of icecream on his own
13:02 marcus dlg: varnish rocks
13:03 sri marcus: i think he wants a proxy proxy, not a reverse proxy
13:04 marcus sri: poor guy
13:04 purl rumour has it poor guy is writing the whole thing in perl with CGI.pm
13:16 perlrocks Twitter: "MCPC: Mojolicious to Google Chrome Web Browser:: http://t.co/xp28Gj5I to view real-time Twitter stream from the Lite server connected WebSocket" (ja) --PerlCafe http://twitter.com/PerlCafe​/status/126647792868409344
13:26 Shaeto sri: sorry for stupid question, how do you think is it possible to call "another controller" action (method) from template, emulating get request to corresponding rest resource, i am interesting to emulate views layout on server side, don't want to use jquery
13:32 andrefs joined #mojo
13:35 Eugene joined #mojo
13:35 Eugene hey. please remind me how can I access element tagname in Mojo::DOM
13:37 marcus ->{foo}
13:52 sri at some point i think i'll have to write an event guide
13:53 sri with an introduction to event loops and all the layers of events in mojolicious
13:54 sri and half of it will be about the correct use of weaken -.-
13:58 PerlNinja heh
13:58 PerlNinja weaken is a pain in the ass
14:00 ysyrota joined #mojo
14:00 Eugene joined #mojo
14:05 Eugene1 joined #mojo
14:07 koban left #mojo
14:07 sugar joined #mojo
14:09 mattastrophe joined #mojo
14:09 KayT3 joined #mojo
14:09 GabrielVieira joined #mojo
14:13 spleenjack joined #mojo
14:29 marty Shaeto: I'm not sure why you would want to do that, but this is one way to do it ( I am sure there are better ways)   <%= App::Controller->method() %>  or so
14:30 Sjors sri: chunked encoding was pretty hard to get working for me, but it's working beautifully now, awesome
14:30 Sjors sri: thanks a lot :)
14:37 mercutioviz joined #mojo
14:39 Shaeto okay thanks understand think for now it is only way
14:41 metaperl joined #mojo
14:42 mercutioviz joined #mojo
14:42 metaperl|2 joined #mojo
14:53 Debolaz joined #mojo
14:55 PerlNinja joined #mojo
14:55 ispy_ joined #mojo
14:55 migo joined #mojo
14:55 kvorg joined #mojo
14:55 ashleydev joined #mojo
14:55 Sjors joined #mojo
14:55 aghbas joined #mojo
14:55 fhelmbe__ joined #mojo
14:55 charsbar_ joined #mojo
14:55 sjn joined #mojo
14:55 alpha6 joined #mojo
14:55 diegok joined #mojo
14:55 rhaen joined #mojo
14:55 Trelane joined #mojo
14:55 jmmills joined #mojo
14:55 [R] joined #mojo
14:55 maluco joined #mojo
14:55 omega joined #mojo
14:55 zakame joined #mojo
14:57 kaare joined #mojo
14:57 metaperl|2 joined #mojo
14:57 spleenjack joined #mojo
14:57 sugar joined #mojo
14:57 abra joined #mojo
14:57 cosmincx joined #mojo
14:57 batman joined #mojo
14:57 mire joined #mojo
14:57 janus joined #mojo
14:57 sgsax joined #mojo
14:57 ryanc joined #mojo
14:57 xantus[] joined #mojo
14:57 memowe joined #mojo
14:57 geira joined #mojo
14:57 mike_ joined #mojo
14:57 jpm joined #mojo
14:57 al joined #mojo
14:57 Hinrik joined #mojo
14:57 mmcleric_ joined #mojo
14:57 stephan48 joined #mojo
14:58 GabrielVieira joined #mojo
14:58 KayT3 joined #mojo
14:58 mattastrophe joined #mojo
14:58 Eugene1 joined #mojo
14:58 andrefs joined #mojo
14:58 d4rkie joined #mojo
14:58 mspo joined #mojo
14:58 trone joined #mojo
14:58 espent joined #mojo
14:58 hide joined #mojo
14:58 marcus joined #mojo
14:58 yko joined #mojo
14:58 jwang joined #mojo
14:58 elb0w_ joined #mojo
14:58 sherr joined #mojo
14:58 black joined #mojo
14:58 nicomen joined #mojo
14:58 gizzlon joined #mojo
14:58 mikegrb joined #mojo
14:58 ka2u joined #mojo
14:58 cosimo joined #mojo
14:58 robinsmidsrod joined #mojo
14:58 kom joined #mojo
14:58 Beirdo joined #mojo
14:58 y0j_ joined #mojo
14:58 plu joined #mojo
14:58 efjboss joined #mojo
14:58 gabb_ joined #mojo
14:58 garu joined #mojo
15:31 aleksey joined #mojo
15:41 GitHub165 joined #mojo
15:41 GitHub165 [mojo] kraih pushed 1 new commit to master: http://git.io/01nGPQ
15:41 GitHub165 [mojo/master] better event descriptions - Sebastian Riedel
15:41 GitHub165 left #mojo
15:44 xaka joined #mojo
15:47 sri starting to come to terms with the upgrade event :)
15:48 sri suppose there are more uses too
16:03 batman joined #mojo
16:08 GitHub63 joined #mojo
16:08 GitHub63 [mojo] kraih pushed 1 new commit to master: http://git.io/nJZVEg
16:08 GitHub63 [mojo/master] added a few examples for important events - Sebastian Riedel
16:08 GitHub63 left #mojo
16:09 Foxcool joined #mojo
16:10 Htbaa joined #mojo
16:10 MojoGuest347 joined #mojo
16:13 sri the really cool examples are a little too advanced :S
16:24 metaperl joined #mojo
16:27 zenbitz joined #mojo
16:28 zenbitz hey anyone want to chat about refactoring my mojolicious app to controllers?
16:28 zenbitz just looking for some advice/best practices
16:31 crab ok.
16:31 zenbitz so I started with a Lite app, then expanded it.
16:32 zenbitz all working good but my App package was all cluttered with
16:32 zenbitz get(/blah => sub {})
16:32 zenbitz so I refactored to controllers
16:32 crab (aside: you've read the growing guide, right?)
16:33 zenbitz yes, and watched movies.
16:33 zenbitz I guess what bugs me is that I ended up with a couple subs in my controller(s) that are not route target actions
16:33 zenbitz they are more like helpers... i
16:33 crab why should that bug you?
16:33 crab i have plenty of subs like that in my controllers.
16:34 zenbitz OK good!
16:34 zenbitz I guess I was getting a weird error where something was rendering that I didn't mean it too
16:34 zenbitz so I was wondering if I should have made a sub a plugin or something
16:35 zenbitz Can't call method "renderer" on an undefined value at /opt/local/lib/perl5/site_perl/5​.12.3/Mojolicious/Controller.pm line 45.
16:35 zenbitz this is in a unit test (which is sadly muddled between Model and Controller)
16:35 zenbitz it's probably just a typo
16:35 tabbi joined #mojo
16:35 tabbi left #mojo
16:37 zenbitz I was "cheating" in my unittest by instantiating the controller directly.
16:37 zenbitz to get at the sub that I put in it.
16:37 zenbitz MUDDLED!
16:37 zenbitz so clearly I am trying to call a non-existent method in my controller, but the controller has no app.
16:37 zenbitz (hence error message)
16:40 zenbitz just confirming... post refactor my app "works" but my tests are mangled.
16:40 crab yes, you have do do $controller = Classname->new(app => $app)
16:41 crab in fact, if you want it to be any use, you should pass in stash => $stash and tx => $tx too
16:41 zenbitz ah, that will save me until I refactor the tests!
16:41 zenbitz your latter part makes sense for webapp testing.
16:41 crab damn, maybe i shouldn't have told you ;-)
16:42 zenbitz what I was mucking up was that 80% of my tests are focused on the Model layer
16:42 zenbitz but I snuck in the input format checks into the same tests
16:42 zenbitz so lazy.
16:42 purl so lazy is explained in perldoc Moose?
16:44 zenbitz All tests pass now
16:44 zenbitz if it makes you feel better - this is just a pre-refactor/profiliing refactor
16:44 zenbitz right before a branch
16:53 GitHub30 joined #mojo
16:53 GitHub30 [mojo] kraih pushed 1 new commit to master: http://git.io/p9ZosA
16:53 GitHub30 [mojo/master] improved Mojolicious::Controller attribute default values - Sebastian Riedel
16:53 GitHub30 left #mojo
16:53 sri zenbitz: that should help in the future
16:53 sri or maybe not, but it's a better default :)
16:58 zenbitz ah, help me with a less cryptic error message
17:00 zenbitz btw - very happy with Mojolicious.   I had made a couple catalyst apps before.
17:01 zenbitz my main work project is a horrible partial conversion of 8 year old CGI code to CGI::Application
17:01 zenbitz but I had to get something brand new up in ~2 weeks
17:01 GitHub159 joined #mojo
17:01 GitHub159 [mojo] kraih pushed 1 new commit to master: http://git.io/O9vjtQ
17:01 GitHub159 [mojo/master] fixed a few documentation typos - Sebastian Riedel
17:01 GitHub159 left #mojo
17:03 zenbitz really clean system you have... although like anything it takes some getting used to the idiosyncracies of it.
17:03 sri mojolicious is a very opinionated system ;)
17:05 zenbitz I am not a very opinionated programmer
17:08 MojoGuest239 joined #mojo
17:08 MojoGuest239 From: http://news.ycombinator.com/item?id=1277067 (38 hits)
17:08 mspo left #mojo
17:08 MojoGuest239 plop
17:09 * sri pokes MojoGuest239
17:09 MojoGuest239 :O
17:11 sromanov joined #mojo
17:20 gabriel joined #mojo
17:52 zenbitz thanks again crab
18:16 marty joined #mojo
18:20 GitHub69 joined #mojo
18:20 GitHub69 [mojo] kraih pushed 1 new commit to master: http://git.io/09LWPA
18:20 GitHub69 [mojo/master] more empty controller tests - Sebastian Riedel
18:20 GitHub69 left #mojo
18:45 grim_fandango joined #mojo
19:03 tempire hmm
19:04 tempire what does the upgrade event catch?  the declaration of multipart?
19:04 Grauwolf joined #mojo
19:04 tempire that is one hell of a test
19:06 tempire ah, I found the pod
19:06 tempire I don't always embed event handlers, but when I do, I do it 40 times :)
19:07 marty I looked at that test and went cross-eyed
19:07 tempire I really dig the event model
19:07 * tempire dances
19:12 perlrocks Twitter: "What is not fashionable anymore @ normal CGI Mankin_jp (there are technical difficulties Tteka) only from the old book, so I better to use a framework for Perl. You might hope you look at the Toka Plack / PSGI Catalyst Toka Toka Mojolicious." (ja) --brain_apple http://twitter.com/brain_app​le/status/126737556523057152
19:14 GabrielVieira joined #mojo
19:14 * sri dances
19:16 sri tempire: right after the headers are parsed there's a point when the parser checks if the body is multipart, and if it is upgrades the single content object
19:16 mercutioviz joined #mojo
19:16 sri the upgrade event allows you to target only multipart requests/responses
19:17 Eugene joined #mojo
19:17 sri it's rather nice, since each "part" is again a single object
19:18 sri which once again emit all the usual events
19:19 sri deep chained events look funny, but with just a few lines you get streaming multipart file uploads, one of the hardest problems there is :)
19:22 sromanov joined #mojo
19:31 mattastrophe joined #mojo
19:33 sri yko: new puscifer album is out btw. (vaguely remember you were a fan too) :)
19:33 yko sri++
19:34 * yko switched off that piano music playing in background
19:49 kvorg joined #mojo
19:59 marcus if you're not very opionated, sri has an opinion to lend you.
20:00 marcus opinionated is very hard to type after a few beers.
20:01 sri YOU GET AN OPINION, AND YOU GET AN OPINION...
20:02 sri OPINIONS FOR EVERYONE!
20:02 marcus \o//
20:03 marty An opinion of an opinion cancels each other out.  Therefore, no opinion.   ANARCHY!!!
20:03 sri what's that third arm? Oo
20:03 * sri slowly backs off
20:03 * marty runs around the room naked
20:07 * yko wants a bottle of Gaduceus
20:08 tempire what's this?
20:08 purl this is true
20:08 tempire sounds like a SEXY PARTY
20:08 tempire http://www.youtube.com/watch?v=i-OnyuJTm7s
20:08 marty I think I am coming the realization that the "sweet spot" between strict scheme RDBMS and document storage lies somewhere under the rainbow.
20:13 kvorg joined #mojo
20:17 kjeldahl joined #mojo
20:19 omega mojo 2.00 wont run on perl 5.10.0?
20:20 omega bleh, seems not :(
20:26 sri omega: 5.10.0 sucks
20:27 omega might be, but still the default on debian lenny
20:27 omega HTML::TreeBuilder here I come :(
20:28 sri ouch
20:29 sri how do they justify not keeping up with maint updates?
20:30 omega lenny is old-stable
20:31 omega we just haven't finished migrating our 100+ servers
20:31 omega and the machines I have to deploy to tonight are still lenny
20:31 * sri has no idea how debian releases work these days
20:31 PerlNinja perlbrew to the rescue? sucks to do it on 100 servers but....
20:32 metaperl joined #mojo
20:34 omega PerlNinja: nope, HTML::TreeBuilder to the ressuce :p already done rewriting
20:34 sri omega: you could try s/5.10.1/5.10.0/
20:35 marty I'm kinda surprised there is not a perlbrew deployment framework out there.  I have no idea if it would even be possible, but sure would save sysadmins a lot of time and headache.
20:35 omega I'm pondering making our build system use a custom perl
20:35 sri 5.10.0 has so many bugs that i didn't bother checking if we're using anything that doesn't work with it
20:35 omega but no enough time so far
20:36 omega sri: debian has backported most of the big ones from 5.10.1
20:36 sri smart match changed entirely in 5.10.1 though
20:36 omega thats how they deal with it
20:36 sri eeep
20:36 omega not sure if that made it :)
20:36 sri actually, i think we only require a perl version in the makefile
20:37 PerlNinja marty: actually what i'd love to see is the ability to tell cpanm (or cpan for that matter) to not install the latest version but to be like ... cpanm Mojolicious 1.99
20:37 PerlNinja so you can get specific versions installed
20:37 PerlNinja although carton should solve that ... I think... sorta...
20:37 sri miyagawa is working on that
20:37 omega PerlNinja: cpan can do that
20:37 sri it's what Carton is all about
20:37 omega and cpanm can do it via URL
20:39 PerlNinja omega: yeah but via URL is like... ghetto :P I want to just stick the version number on cmdline and be done with it :D
20:39 omega :p
20:39 * PerlNinja is a lazy admin, the less typing I have to do, the better it is
20:39 mercutioviz hehe
20:40 mercutioviz Being lazy and wanting to type just a few characters is definitely a prereq for being any kind of ninja. :P
20:40 sri when i say sysadmin i always get yelled at "IT'S CALLED SYSOPS NOW!!!1"
20:41 mercutioviz ha, that's funny
20:41 mercutioviz when i was calling BBS's in the mid 80's they always called it "sysop"
20:42 marty Yep, I used to be a sysop.  How dare sri be derogatory to us former sysops.   We are NOT sysadmins!   :P
20:43 marty poor sri, just can't win.  :)
20:45 omega devops <3 etc :p
20:46 sri someone get the internet plumber!
20:50 * PerlNinja used to be a sysop too - and if someone tells me i'm a sysop because i manage a bunch of servers i'm either going to laugh or punch them in the danglies
20:51 PerlNinja also
20:51 sri purl: no, internet plumber is http://www.joyoftech.com/jo​yoftech/joyimages/1317.gif
20:51 purl OK, sri.
20:51 PerlNinja mojolicious + anyevent + rabbitmq + backbone.js = omgwtf-win
20:59 GabrielVieira joined #mojo
21:12 mercutioviz_ joined #mojo
21:26 metaperl joined #mojo
21:33 andrefs joined #mojo
21:46 metaperl backbonejs - i dont get the love for htat --- jsut look at how wordy the ToDo app for it was
21:47 metaperl backbonejs seems like the COBOL of the javascript world
21:55 GitHub13 joined #mojo
21:55 GitHub13 [mojo] kraih pushed 1 new commit to master: http://git.io/IJ53wQ
21:55 GitHub13 [mojo/master] updated streaming upload test to use the new multipart events - Sebastian Riedel
21:55 GitHub13 left #mojo
21:56 sri much less intimidating example :)
21:56 sri https://github.com/kraih/mojo/blob/master/​t/mojolicious/upload_stream_lite_app.t#L19
21:58 sri $cache could be a database connection
22:02 perlrocks Twitter: "Here's a cool example for how the new event api in #mojolicious makes streaming multipart file uploads possible. http://t.co/G4GutCVl #perl" --kraih http://twitter.com/kraih/status/126780352399278081
22:09 sri tempire/marty: no more goinf cross-eyed :)
22:09 sri s/f/g/
22:26 xantus[] nice, mojo is much more stable now, wrt sockets
22:26 MojoGuest988 joined #mojo
22:27 MojoGuest988 From: http://news.ycombinator.com/item?id=1277067 (39 hits)
22:27 MojoGuest988 nice
22:27 xantus[] hi guest
22:27 xantus[] :/
22:27 sri xantus[]: yes, countless low level bugs fixed in 2.0 :)
22:27 xantus[] <3 sri
22:27 marty sri++ Excellent example.  Thank you.
22:28 sri \o/
22:29 xantus[] oh we have streaming upload?
22:30 xantus[] you could do an upload progress bar now with eventsource :)
22:33 sri we *kinda* always had streaming uploads, but they didn't have an api
22:33 xantus[] well, yeah, events
22:34 sri progress always had an api though
22:34 sri https://github.com/kraih/mojo/blob/mast​er/t/mojolicious/upload_lite_app.t#L21
22:35 xantus[] oh, so there's no excuse for not having a cool upload progress demo :)
22:35 * sri nods
22:36 sri progress is much easier than streaming, since we just need to watch the progress of the whole body
22:37 sri in fact, i can't think of a trickier case than streaming multipart uploads
22:38 xantus[] the total size is known beforehand correct?
22:39 sri no browser does chunked transfer encoding to my knowledge
22:40 sri you can always bail out if there's no content length header
22:40 sri like i do in the example above ;p
22:42 xantus[] You could use the FileAPI
22:42 xantus[] http://hacks.mozilla.org/2009/​12/w3c-fileapi-in-firefox-3-6/
23:17 perlrocks Twitter: "i am looking for a rapid prototyping tool for a webapp idea and have been playing around with mojolicious. anyone have any experience?" --stevenrconn http://twitter.com/stevenrco​nn/status/126799129178419200
23:27 perlrocks Twitter: "@stevenrconn Quite a few people.  Check out http://t.co/R64tHke8 for an easy way to get started with Mojolicious::Lite apps." --tempiretech http://twitter.com/tempirete​ch/status/126801592266670080
23:29 tempire regarding https://github.com/kraih/mojo/blob/master/​t/mojolicious/upload_stream_lite_app.t#L19
23:29 tempire why is the emit('request') needed?  wouldn't the request happen anyway?
23:29 tempire or is that prevented by the weaken
23:32 grim_fandango joined #mojo
23:33 grim_fandango Is there an environment variable or some way that I can force mojo into FastCGI mode without writing a wrapper?
23:33 Alias_ joined #mojo
23:33 grim_fandango (Yes, because I'm lazy and I want one less thing to do)
23:35 sri tempire: the request is dispatched twice
23:35 tempire ooooh
23:36 sri tempire: once right before the body is parsed and a second time when everything is done :)
23:36 tempire once for the regular handling and once for the handling of the multipart upload
23:37 GitHub162 joined #mojo
23:37 GitHub162 [mojo] kraih pushed 1 new commit to master: http://git.io/9SPlpQ
23:37 GitHub162 [mojo/master] merged request and upgrade events in Mojo::Transaction::HTTP - Sebastian Riedel
23:37 GitHub162 left #mojo
23:40 grim_fandango Answered my own question, nevermind :-)
23:41 sri phew, finally found a good solution for the transaction events
23:41 sri the upgrade event was entirely useless outside of internal hacking
23:42 perlrocks Twitter: "Mojolicious 2:02 by SRI - http://t.co/ZqRDPHjw" (ms) --cpan_new http://twitter.com/cpan_new​/status/126805432676270080
23:42 sri for the hybrid request event i have some evil new ideas :D
23:42 sri love doing more with less code
23:45 sri tempire: the double invocation of the mojolicious dispatcher is not bulletproof yet, but i think it's fun
23:45 tempire it definitely needs a good visual tutorial at some point
23:45 tempire guess that's my job :)
23:45 * sri nods :)
23:47 sri i need more simple event examples though
23:47 sri but all i can think of is rather crazy :/
23:54 MojoGuest457 joined #mojo
23:54 MojoGuest457 From: http://www.google.com/url?sa=t&amp;rct=j&amp​;q=mojolicious%2Bdemo&amp;source=web&amp;cd=​5&amp;ved=0CDwQFjAE&amp;url=http%3A%2F%2Fdev​.xantus.org%2F&amp;ei=kWKfTsSwN6HY0QGko-3eBA​&amp;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg (1 hits)

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