Camelia, the Perl 6 bug

IRC log for #mojo, 2011-04-27

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

All times shown according to UTC.

Time Nick Message
00:03 metaperl joined #mojo
00:03 metaperl_ joined #mojo
00:08 metaperl left #mojo
00:09 sigue left #mojo
00:09 sigue joined #mojo
00:28 sigue left #mojo
00:32 varta joined #mojo
00:42 metaperl_ left #mojo
01:03 varta left #mojo
01:05 varta joined #mojo
01:10 varta left #mojo
01:11 varta joined #mojo
01:17 abra left #mojo
01:29 abra joined #mojo
01:56 daviddelikat left #mojo
02:07 tempire Mojolicious::Plugin::Bundle is the worst name ever
02:08 * tempire sprinkles glitter on Siddhartha Basu
02:10 Alias joined #mojo
02:46 PerlNinja it is a bit of a... weird name yes
02:46 PerlNinja I mean if it'd be a bundle to easily install all plugins .. sure but... hehm
02:46 * PerlNinja pokes sri ... pure perl BSON decoding by way of liberally abusing unpack() is awesome.
02:47 Alias BSON?
02:47 purl BSON is slowing me down atm :S
02:47 Alias Binary json? :/
02:47 PerlNinja yeah
02:47 PerlNinja it's what MongoDB uses to store it's stuff
02:47 Alias WTF does that look like
02:47 PerlNinja and what it tosses over the wire
02:48 PerlNinja http://bsonspec.org/#/specification
02:48 PerlNinja see the examples at the bottom
02:48 PerlNinja the bottom-most example is borked though, but oh well
02:49 * PerlNinja just hacked at a BSON thingy for fun, wasn't sleepy before.. I am now.. was just for shits and giggles because I'm getting fed up with the perl mongodb driver so who knows
02:49 PerlNinja given enough insomnia I might beat sri to yet another driver implementation :)
03:18 PerlNinja left #mojo
03:57 Foxcool joined #mojo
04:16 sh4 joined #mojo
04:18 josh left #mojo
04:19 Foxcool left #mojo
04:34 sh4 left #mojo
04:34 Foxcool joined #mojo
04:37 sh4 joined #mojo
04:49 sh4 left #mojo
04:51 jwang left #mojo
04:53 kaare_ joined #mojo
04:54 metaperl joined #mojo
04:55 tabbi joined #mojo
05:01 tabbi left #mojo
05:14 metaperl What's the best way to grep the mojo docs for a particular method? I want to lookup 'flash'
05:14 metaperl also sri - I asked about form validation and you said nothing was in the guides ... true... but there is this well-written example - https://github.com/kraih/moj​o/wiki/Validator%3A%3Acustom
05:14 metaperl but I will be seeing if jQuery can do form validation
05:16 Foxcool left #mojo
05:25 tempire metaperl: http://search.cpan.org/~kraih/Mojolicious​-1.21/lib/Mojolicious/Controller.pm#flash
05:35 Foxcool joined #mojo
05:35 Foxcool left #mojo
05:36 Foxcool joined #mojo
05:54 AmeliePoulain joined #mojo
06:16 koban joined #mojo
06:29 mattastrophe left #mojo
06:34 mattastrophe joined #mojo
06:35 Christian joined #mojo
06:35 Christian morning
06:36 ysyrota joined #mojo
07:01 mattastrophe left #mojo
07:05 mattastrophe joined #mojo
07:05 tabbi joined #mojo
07:09 tabbi left #mojo
07:17 yegor joined #mojo
07:18 yegor left #mojo
07:19 Alias left #mojo
08:03 yegor joined #mojo
08:03 cosmincx joined #mojo
08:08 fhelmber_ joined #mojo
08:09 snearch joined #mojo
08:09 fhelmbe__ joined #mojo
08:09 fhelmber_ left #mojo
08:16 metaperl left #mojo
08:18 yegor left #mojo
08:28 ajgb joined #mojo
08:33 yegor joined #mojo
08:33 yegor left #mojo
08:37 Sugar joined #mojo
09:06 Foxcool_ joined #mojo
09:11 Foxcool left #mojo
09:16 cosmincx left #mojo
09:22 marcus YAY
09:22 marcus I HAZ WORKING BLOCKING PARALLEL REQUESTS
09:22 marcus I CAN HAZ CELEBRATION
09:23 moritz congratulations
09:23 purl congratulations are in order, if so.
09:24 yko marcus: in which way?
09:24 yko share your exp :)
09:24 marcus yko: in the way sri described, localizing Mojo::IOLoop::LOOP
09:24 yko oh. got it
09:24 yko thx
09:24 marcus I just had to move the localization into each of the subs in my model
09:25 marcus instead of doing it in top of the package
09:25 yko yay.
09:25 yko anyway its better than too hackish hacks. after all now sri is responsible for keeping this trick working :D
09:28 arpadszasz joined #mojo
09:31 spleenjack joined #mojo
09:33 cosmincx joined #mojo
09:35 marcus chansen: going to nordic perl workshop?
09:36 marcus malmö is close to you, right?
09:39 chansen Most likely, yeah it's very close about 40 min by car (45KM)
09:46 koban left #mojo
09:48 yegor joined #mojo
09:51 * chansen time for lunch
09:51 koban joined #mojo
10:22 marcus just had lunch =)
10:23 fmerges joined #mojo
10:27 yegor left #mojo
10:28 koban left #mojo
10:30 perlrocks Twitter: "Selection of materials on Mojolicious http://t.co/qAVAb7q # mojo # mojolicious # perl" (ru) --afiskon http://twitter.com/afiskon​/status/63188133595983872
10:31 marcus hmpf
10:32 marcus I tried using c.req.url.query(foo=>'bar') to replace c.req.uri_with from catalyst, but it looks like it modifies the url object in place rather than returning a new object?
10:32 marcus should I be uisng c.req.url.clone.query(...) ?
10:34 yegor joined #mojo
10:35 PerlNinja joined #mojo
10:35 yegor left #mojo
10:37 PerlNinja anyone ever use DBrefs with mongodb?
10:56 perlrocks Twitter: "Mojolicious. Video rukovodstvo. http://clck.ru/BqKj # perl # mojolicious # video # mojo" (mk) --xomaa http://twitter.com/xomaa/status/63194786500317184
10:59 arpadszasz left #mojo
11:02 perlrocks Twitter: "Perl on ya.ru: Mojolicious. Video rukovodstvo. http://ff.im/C4mcb" (mk) --planetperlru http://twitter.com/planetper​lru/status/63196326086705152
11:02 perlrocks Twitter: "allframeworks / Perl: Mojolicious. Video rukovodstvo. http://ff.im/C4mce" (mk) --planetperlru http://twitter.com/planetper​lru/status/63196331082125312
11:29 Foxcool_ left #mojo
11:48 Foxcool_ joined #mojo
12:02 Foxcool_ left #mojo
12:06 Foxcool joined #mojo
12:10 spleenjack1 joined #mojo
12:14 spleenjack left #mojo
12:21 Foxcool left #mojo
12:23 koban joined #mojo
12:38 Foxcool joined #mojo
12:41 sh4 joined #mojo
12:45 AmeliePoulain left #mojo
12:51 Foxcool left #mojo
12:53 tabbi joined #mojo
12:53 tabbi left #mojo
13:02 Foxcool joined #mojo
13:14 kmx left #mojo
13:18 arpadszasz joined #mojo
13:19 kmx joined #mojo
13:31 arpadszasz left #mojo
13:40 AmeliePoulain joined #mojo
14:03 amoore joined #mojo
14:05 AmeliePoulain left #mojo
14:10 metaperl joined #mojo
14:14 PerlNinja left #mojo
14:16 mattastrophe left #mojo
14:19 zakame left #mojo
14:19 zakame joined #mojo
14:24 Foxcool left #mojo
14:35 Foxcool joined #mojo
14:37 snearch_ joined #mojo
14:42 * sri yawns
14:53 snearch left #mojo
14:55 Foxcool left #mojo
15:04 ysyrota left #mojo
15:09 koban left #mojo
15:17 marty_ joined #mojo
15:17 marty left #mojo
15:23 Christian nive evening to you all
15:24 * sri waves
15:24 Christian left #mojo
15:24 zakame hi
15:42 yegor joined #mojo
15:45 Foxcool joined #mojo
15:47 mattastrophe joined #mojo
15:54 sh9 joined #mojo
15:58 sh4 left #mojo
15:59 yegor left #mojo
16:09 perlrocks Twitter: "Mojolicious, I turned the other 1.21. 1.0 lately? Like I thought I was going." (ja) --tisihara http://twitter.com/tisihar​a/status/63273458511003648
16:25 yegor joined #mojo
16:27 cosmincx left #mojo
16:29 dwierenga joined #mojo
16:30 ajgb left #mojo
16:32 fmerges left #mojo
16:33 sh9 left #mojo
16:33 sh4 joined #mojo
16:46 tabbi joined #mojo
16:52 GitHub32 joined #mojo
16:52 GitHub32 mojo: master Sebastian Riedel * efaece7 (5 files in 3 dirs): added opposite tests to Test::Mojo - http://bit.ly/jkSFBb
16:52 GitHub32 left #mojo
16:55 perlrocks Twitter: "Still looking for more ideas to improve unit testing in #mojolicious. http://t.co/x20Aqoe #perl" --kraih http://twitter.com/kraih/status/63285033649180673
17:01 GitHub103 joined #mojo
17:01 GitHub103 mojo: master Sebastian Riedel * de0eaca (1 files in 1 dirs): fixed typo - http://bit.ly/iYv4Hg
17:01 GitHub103 left #mojo
17:03 Foxcool_ joined #mojo
17:09 metaperl This file - https://github.com/metaperl/tmp/b​lob/master/PhotoBooth/paste.html  ... is the result of "View Source" on HTML that mojo is serving via photobooth.pl --reload  .... if you simply open that file in firefox, then the jquery form validation works fine however, if you try to serve that HTML via mojo, then the form validation does not work
17:13 metaperl the submit button is actually submitting the form to the webserver (mojo invoked via ./photobooth.pl daemon --reload) instead of jQuery running it's validation process instead.... why would that be?
17:16 Foxcool_ left #mojo
17:17 Sugar left #mojo
17:23 Foxcool left #mojo
17:23 Foxcool joined #mojo
17:24 yegor_ joined #mojo
17:26 yegor left #mojo
17:33 perlrocks Twitter: "Behold! Mojolicious::Plugin::Redis http://t.co/NXlGJBc Simply && clever. #redis #mojolicious" --meettya http://twitter.com/meettya​/status/63294642547982336
17:33 fhelmbe__ left #mojo
17:33 metaperl I figured it out
17:33 yegor_ left #mojo
17:35 metaperl this .js file ... http://dev.jquery.com/view/trunk/p​lugins/validate/jquery.validate.js  ... returns FORBIDDEN when requested via the HTML served by Mojo, but when you request it having read a static html file, then that same request is honored
17:36 sri makes sense
17:36 purl makes sense is http://xrl.us/bjq3kq
17:36 metaperl sri - why does that make sense?
17:36 sri if they wouldn't protect the main jquery site everybody would use it
17:37 metaperl I suppose they looked at HTTP_REFERER to tell how it was being requested?
17:37 metaperl because the static html and the dynamically served are the same to firefox
17:37 metaperl and THANK GOD FOR FIREBUG or I would've caught hell figuring this out
17:40 sri why do you refer to http headers in their cgi env form?
17:43 metaperl RE: """why do you refer to http headers in their cgi env form?""" --- I dont know what http headers you are talking about (do you have a URL?). And you say '*their* cgi env form' I'm not sure that cgi env form we are talking about.
17:43 sri you said HTTP_REFERER
17:44 sri that is cgi, not http
17:44 sri it's quite uncommon to use that form these days
17:45 sri the http form is simply "Referer"
17:49 metaperl oh
17:49 metaperl well I was just guessing as to how they blocked me
17:52 sri they prolly used something like that, was just wondering about the lingo
17:54 sri interesting, youtube founders bought delicious
17:57 metaperl that's why rocco had to leave yahoo --- they didnt need him at delicious anymore
18:01 Foxcool left #mojo
18:07 spleenjack1 left #mojo
18:09 Drossel joined #mojo
18:10 Kulag left #mojo
18:12 Foxcool joined #mojo
18:22 Foxcool left #mojo
18:36 tabbi left #mojo
18:36 tabbi joined #mojo
18:36 Foxcool joined #mojo
18:40 yegor joined #mojo
18:49 sh4 left #mojo
19:08 mattastrophe left #mojo
19:16 Foxcool left #mojo
19:24 yegor_ joined #mojo
19:24 yegor left #mojo
19:32 abra left #mojo
19:32 abra joined #mojo
19:35 metaperl I have a single-file mojolicious::lite app. The first route simply renders an HTML page. The next route I plan to write must render plain text in streaming fashion. Can this be done in a single-file app? If so, how?
19:36 sri what kind of streaming?
19:37 sri (there are many kinds supported)
19:37 metaperl sri - I want to spit the results of running a shell command back to the browser ...
19:38 sri oh... that is a lot more complicated than just streaming
19:39 metaperl hmm
19:39 metaperl well maybe I should give more context
19:39 metaperl In this article a PHP program does what the AJAX side needs - http://blogs.sitepoint.com/take-command-ajax/
19:40 metaperl the javascript side receives a shell command line (e.g. ls -l) and then makes an ajax call to a php program with it... The php program runs the command and streams (?) the result back to ajax as it happens (?)
19:41 metaperl The shell command takes 30 seconds, so I want to give feedback as it runs
19:41 sri umm... that is not streaming
19:41 metaperl oh
19:41 metaperl you mean what I want is not streaming? or the php is not streaming but I mistakenly thought it was
19:41 sri guess i don't confuse you further and just point at the perldoc
19:42 sri the php is not streaming, you would have to watch for events
19:42 metaperl oh, so its just barfing back a ream of output
19:43 sri you should do fine with render_data
19:43 sri http://mojolicio.us/perldoc?​Mojolicious/Controller#write
19:43 sri http://mojolicio.us/perldoc?Moj​olicious/Controller#write_chunk
19:43 sri those two are about true streaming
19:44 sri the static dispatcher for example uses yet another technique to stream files directly from disk
19:45 metaperl Re: http://mojolicio.us/perldoc?Moj​olicious/Controller#render_data  ... it looks like all the data has to be there before it will incrementally render it
19:46 sri that's what you get
19:46 sri for true streaming you need an event loop
19:47 sri we can do it all, but it is complicated
19:47 sri and i'm afraid nobody has written a simple shell plugin yet
19:47 * metaperl does not need complications :)
19:48 metaperl I think I will just break down the 30 second process into parts and make multiple calls to ->render_data() in a single route
19:48 sri doesn't work that way
19:49 metaperl oh
19:49 sri you need write with callbacks then
19:49 sri http://search.cpan.org/~bfg/Mo​joX-Run-0.15/lib/MojoX/Run.pm # to give you an idea of the problems you would be facing with true streaming
19:50 sri that module is a bit outdated, but should give you an idea
19:51 sugar joined #mojo
19:52 sri recent additions to Mojo::IOLoop should make a new plugin much easier, but you still have to go that same route
19:56 sri https://github.com/kraih/mojo/blob/mast​er/t/mojolicious/longpolling_lite_app.t # these long polling examples show the write specific part
19:57 sri btw. i wouldn't mind a new plugin for running shell commands
19:58 sri plain open3 should work well with Mojo::IOLoop these days
19:58 metaperl maybe I should just set the mime type of the response to text and then exec the shell command and lets it output automatically go to STDOUT and then the shell command terminates the
19:59 metaperl i meant to erase that comment I just made
19:59 sri oh boy...
20:00 sri that would be so wrong and is never going to work outside of cgi
20:00 metaperl I apparently am still in CGI mode ... "HTTP_REFERER", and now this :)  ... I never grew up past CGI::Prototype :)
20:01 sri actually not even with cgi
20:01 metaperl it looks like Mojo::IOLoop->timer() is a way to incrementally render output
20:01 sri *a way*
20:02 sri the right way would be open3 and Mojo::IOLoop io watchers on the handles
20:03 sri traditional event loop style
20:04 metaperl by "open3" I think you mean the CPAN module IPC::Open3?
20:04 sri core module
20:05 sri you also need SIGCHLD watchers and stuff
20:06 sri streaming is really really hard
20:06 sri the php script is easy because it's plain old blocking
20:07 sri i suppose you have a lot of stuff to read now :)
20:08 metaperl yes I do including http://search.cpan.org/~toddr​/IPC-Run-0.89/lib/IPC/Run.pm
20:09 sri Mojo::IOLoop->connect(handle => $handle, on_read => sub {...}) is used to connect random handles to our event loop
20:12 sri https://github.com/kraih/mo​jo/wiki/Mojolicious-and-POE # i suppose with this you could also use POE::Wheel::Run
20:17 GitHub29 joined #mojo
20:17 GitHub29 mojo: master root * 86a5a90 (1 files in 1 dirs): fix typo: "afer" -> "after" - http://bit.ly/mlqsFX
20:17 GitHub29 left #mojo
20:17 sri too bad you sent both patches in one pull request, i wanted to try the new green button :(
20:19 GitHub174 joined #mojo
20:19 GitHub174 mojo: master Sebastian Riedel * 7b8b3b0 (2 files in 2 dirs): updated changes - http://bit.ly/katDoH
20:19 GitHub174 left #mojo
20:25 yegor__ joined #mojo
20:26 tabbi left #mojo
20:29 perlrocks Twitter: "Mojolicious Directory Traversal http://dlvr.it/Pw3pk" --zauberstuhl http://twitter.com/zauberstu​hl/status/63338942681980928
20:30 yegor_ left #mojo
20:46 metaperl """Perl lines can also be indented freely" --- hallelujah! major improvement over the Mason perl-line
20:47 metaperl Where in the mojo docs are the perl function "layout" documented? Also, I'm looking to include a big hunk of static HTML in a .ep file (the 50 US States in a pulldown) ... how can I do that?
20:54 snearch_ left #mojo
21:02 yegor_ joined #mojo
21:03 metaperl oh sorry about sending both
21:03 metaperl there was one other thing I wanted to submit hold on
21:04 kaare_ left #mojo
21:07 yegor__ left #mojo
21:11 stephen left #mojo
21:11 metaperl I just added another commit to my fork, but I dont know how to only submit that for the pull request...
21:12 yegor_ left #mojo
21:14 metaperl ok i will try to change the range to just this last one I just made
21:19 stephen joined #mojo
21:21 sugar left #mojo
21:36 GitHub45 joined #mojo
21:36 GitHub45 mojo: master root * a60cb7c (1 files in 1 dirs): refer to Mojolicious::Commands instead of just Mojolicious
21:36 GitHub45 mojo: master Sebastian Riedel * 7084d15 (1 files in 1 dirs): Merged pull request #124 from metaperl/master. ...
21:36 GitHub45 mojo: master commits 7b8b3b0...7084d15 - http://bit.ly/ij9cJn
21:36 GitHub45 left #mojo
21:36 sri interesting
21:38 GitHub41 joined #mojo
21:38 GitHub41 mojo: master Sebastian Riedel * d844496 (1 files in 1 dirs): fix formatting - http://bit.ly/lk2eVP
21:38 GitHub41 left #mojo
21:39 sri green button is really neat
21:43 amoore left #mojo
22:09 mateu what happens if I push the green button?
22:11 tempire green button?
22:11 purl green button is really neat
22:11 tempire oh
22:11 tempire nevermind
22:11 tempire I'm waiting for the chance to use it.
22:11 * sri pats purl
22:11 purl don't mess with me
22:11 tempire Took them long enough to add that feature
22:15 mateu seems like a boinc like thing.
22:34 metaperl left #mojo
23:26 daviddelikat joined #mojo

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