Camelia, the Perl 6 bug

IRC log for #mojo, 2011-07-31

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

All times shown according to UTC.

Time Nick Message
00:00 sri controller needs to be lower case
00:02 sri and that namespace looks like it is global
00:02 sri $r->namespace(…) once in your app should look much better
00:04 sri the namespace default value is used very rarely
00:04 sri http://mojolicio.us/perldoc/Mojolicious/Gui​des/Routing#Route_To_Class_28_namespace_29
00:04 sri last part
00:04 purl somebody said last part was the story of ascii's life :)
00:06 sri in fact, even writing controller and action has become very rare
00:06 sri since there's the 'foo#bar' short form
00:06 alnewkirk-hiring which i do take advantage of but had some difficulty
00:06 sri but that's all explained earlier in the guide
00:08 alnewkirk-hiring i'll paste my App.pm code shortly and show you what I have
00:09 Drossel joined #mojo
00:10 Kulag left #mojo
00:21 heince left #mojo
00:30 Drossel left #mojo
00:55 Kulag joined #mojo
01:01 arpadszasz left #mojo
01:15 ispy_ left #mojo
01:16 ispy_ joined #mojo
01:33 jwang left #mojo
01:46 mspo where is query documented? <%= link_to url_for->query(foo => $foo) => begin %>Retry<% end %>
01:46 mspo I need to generate a link with my app's controller path
01:57 sri http://mojolicio.us/perldoc/Mojo/URL
01:59 mattastrophe left #mojo
02:07 ispy_ left #mojo
02:09 ispy_ joined #mojo
02:26 sri alnewkirk-hiring: i would very much appreciate it if you didn't criticize documentation before reading it in the future
02:27 alnewkirk-hiring huh?
02:27 alnewkirk-hiring is now known as alnewkirk
02:27 sri as shown above, every single one of your points is covered already
02:28 alnewkirk sri, point taken
02:28 sri i'm saying that because you've criticized routes before
02:29 alnewkirk in the future I will read the documentation thoroughly first
02:29 sri take your time, grok the concepts, then we can discuss details
02:30 alnewkirk agreed, since I plan on using Mojolicious as my WAF of-choice, I am planning to grok the entire documentation very soon
02:36 sri http://twitpic.com/5xs1vy # haha, so true
02:39 alnewkirk ^ nice lol
02:54 MisterHatt I think I've seen that image do the rounds on a dozen irc networks in the last hour, it totally is true tho
02:55 MisterHatt actually my current office isnt bad, our managers are all ex-devs/admins
03:17 will joined #mojo
03:22 will I'm pulling from a database, one of the columns has a <em>little bit</em> of markup in it, which I'd like to pass through to the screen, mojo is doing the appropriate thing, encoding it.. is there any way to disable this for a particular template/route?
03:23 sri will: http://mojolicio.us/perldoc/Mojolic​ious/Guides/Rendering#Embedded_Perl
03:27 ispy_ left #mojo
03:27 will much appreciated
03:31 crab hmm, narwhalcorn.
03:38 ispy_ joined #mojo
04:09 crab i wish there were some way to migrate modules between different versions of perl in a perlbrew installation.
04:09 crab or to keep them in sync, somehow.
04:14 ispy_ left #mojo
04:31 MisterHatt hey sri, how feasible is it to run a web and irc service from the same app?
04:31 MisterHatt or rather, how much of a ridiculously stupid idea is it
04:31 Kulag left #mojo
04:32 sri MisterHatt: if you want to do it do it
04:32 MisterHatt I want to do a lot of things but most of them are bad ideas, this is why I ask
04:33 MisterHatt I guess it can't be too harmful tho...
04:33 crab i run a jabber client and an http server in the same program.
04:34 sri well, many stupid ideas are fun
04:35 MisterHatt hmm
04:35 kaare joined #mojo
04:35 sri as long as you don't want to scale i don't see a good reason not to do it
04:35 MisterHatt I have a bunch of jobs that need doing in a specific order both in EU and US servers, however onyl the EU one needs a web frontend and irc connectivity
04:36 MisterHatt was going to write a script to do them via some modules and run it in cron for the states, and then bolt it into a mojo app for the EU
04:36 MisterHatt I guess that works...
04:36 Kulag joined #mojo
04:36 sri considering that the built in mojolicious servers are all event based there is not much you can't bolt into them
04:37 MisterHatt yeah that's what I thought
04:37 MisterHatt thanks for the clarifications
04:41 crab i really hate having to implement the same function in javascript, in perl, and in sql.
04:42 sri thinking about going all javascript? :)
04:42 Kulag left #mojo
04:44 Kulag joined #mojo
04:46 crab no.
04:47 sri a perl to javascript compiler would be fun
04:47 sri at least for a subset of perl
04:47 crab in this case, even if i switched to js on the server (shudder), i'd still have to do it in js and sql.
04:48 sri not if you use mongodb
04:48 sri http://pyjs.org # bit weird nobody tried doing this for perl yet
04:58 ispy_ joined #mojo
04:59 k-man_ left #mojo
05:00 k-man joined #mojo
05:10 crab sri: so what you're saying is that if i switch away from everything i'm using now, things will be different? :-)
05:11 sri that does sound very possible ;p
05:15 Kulag left #mojo
05:18 Kulag joined #mojo
05:23 MisterHatt is the Mojo::DOM the right tool for logging into an external website and posting form data?
05:23 MisterHatt or would that be the ua?
05:24 Kulag left #mojo
05:25 Kulag joined #mojo
05:27 D4RK-PH0ENiX joined #mojo
05:29 d4rkie left #mojo
05:32 Kulag left #mojo
05:33 Kulag joined #mojo
05:45 Kulag left #mojo
05:50 perlrocks Twitter: "Switching from # mojolicious lite to non_lite hard for me. What is websocket analog in routing? -> Via ('websocket') doesnt work" (ru) --korjavin http://twitter.com/korjavi​n/status/97544558145060865
06:10 Kulag joined #mojo
06:11 heince joined #mojo
06:12 heince hi, im confuse in jsonconfig
06:12 heince can i have an example how to parse it inside controller
06:39 crab you shouldn't be parsing it inside a controller. you should do it in setup.
06:44 heince ok, so i should load the plugin on startup then parse it under controller ?
06:50 ispy_ left #mojo
07:06 sh9 joined #mojo
07:19 will left #mojo
07:22 will joined #mojo
07:24 heince is morbo supposed to reload change on configuration ?
07:34 Kulag left #mojo
07:34 Kulag joined #mojo
07:38 sh9 left #mojo
07:40 will left #mojo
07:50 henq left #mojo
07:55 henq joined #mojo
08:05 Kulag left #mojo
08:06 Foxcool joined #mojo
08:07 Kulag joined #mojo
08:13 Kulag left #mojo
08:21 Kulag joined #mojo
08:27 Kulag left #mojo
08:27 Kulag joined #mojo
08:33 Kulag left #mojo
08:34 Kulag joined #mojo
08:35 perlrocks Twitter: "Perl + Mojolicious: Category: Scripts / Web Applications Development Applied POByudzhet:? Should overwrite existing ... http://bit.ly/qNdTsC" (ru) --FreelanceOffer http://twitter.com/FreelanceO​ffer/status/97586107511873537
08:41 Kulag left #mojo
08:47 Kulag joined #mojo
08:50 xaka left #mojo
08:51 sromanov joined #mojo
08:52 nickl joined #mojo
08:56 Kulag left #mojo
08:56 Kulag joined #mojo
08:59 Drossel joined #mojo
09:02 Kulag left #mojo
09:06 Drossel left #mojo
09:06 Kulag joined #mojo
09:09 nickl hi, i'm just learning to use mojolicious - could someone help me out with getting / setting cookies in my startup sub?
09:09 nickl or point me to the relevant docs - I couldn;t find them
09:12 Kulag left #mojo
09:13 Kulag joined #mojo
09:15 sromanov left #mojo
09:17 sromanov joined #mojo
09:19 Kulag left #mojo
09:20 perlrocks Twitter: "Mojolicious-Plugin-Mail 0.82 by SHARIFULN - http://metacpan.org/release/SHARIF​ULN/Mojolicious-Plugin-Mail-0.82/" --cpan_new http://twitter.com/cpan_ne​w/status/97597538508611584
09:21 Kulag joined #mojo
09:27 Kulag left #mojo
09:27 Kulag joined #mojo
09:33 Kulag left #mojo
09:33 Kulag joined #mojo
09:37 sh9 joined #mojo
09:51 heince left #mojo
09:58 sromanov left #mojo
09:59 Drossel joined #mojo
10:00 sromanov joined #mojo
10:02 Kulag left #mojo
10:06 Drossel left #mojo
10:09 alnewkirk left #mojo
10:09 Kulag joined #mojo
10:12 sh9 left #mojo
10:17 crab nickl: in your startup sub? why?
10:17 crab there aren't any requests (hence cookies) yet in your startup sub.
10:18 Kulag left #mojo
10:19 Kulag joined #mojo
10:25 nickl crab: good point
10:25 purl nice and sharp
10:26 nickl ok, so I'll need to do it somewhere else, but I still don;t know how to manipulate cookies
10:30 nickl I can see that there is Mojo::Cookie and Mojo::Cookie::Request|Response but I'm not sure how I use these in my app - was hoping for a really simple interface to get and set
10:30 marcus oh hai
10:32 sr joined #mojo
10:33 espent_ left #mojo
10:34 espent joined #mojo
10:35 cosimo left #mojo
10:35 cosimo joined #mojo
10:36 mmcleric_ left #mojo
10:36 sromanov left #mojo
10:36 Foxcool left #mojo
10:36 Foxcool joined #mojo
10:36 Kulag left #mojo
10:36 mmcleric joined #mojo
10:37 Kulag joined #mojo
10:42 Drossel joined #mojo
10:42 sh9 joined #mojo
10:43 sr left #mojo
10:44 Kulag left #mojo
10:44 sromanov joined #mojo
10:46 Kulag joined #mojo
10:48 Drossel left #mojo
10:52 Drossel joined #mojo
10:52 sromanov left #mojo
10:53 Kulag left #mojo
10:53 sromanov joined #mojo
10:57 sromanov left #mojo
10:57 Kulag joined #mojo
10:58 Drossel left #mojo
11:03 Kulag left #mojo
11:07 sromanov joined #mojo
11:19 Kulag joined #mojo
11:22 crab nickl: look at ->cookie() in Mojolicious::Controller
11:22 crab you just $self->cookie(Nick => "L") in any action
11:43 perlrocks Twitter: "Books are in the "Mojolicious" products that match your search did not" (ja) --trinityCRZ http://twitter.com/trinityC​RZ/status/97633366068838400
11:48 perlrocks Twitter: "Solr is an WebService:: Solr Mojolicious Data:: Page:: Move the Navigation" (ja) --trinityCRZ http://twitter.com/trinityC​RZ/status/97634622011219968
12:30 nickl crab: thanks!
12:39 kaare left #mojo
12:48 perlrocks Twitter: "The framework document for the Web in Japanese-made great Mojolicious Perl. https://github.com/yuki-kimoto/m​ojolicious-guides-japanese/wiki" (ja) --PerlCafe http://twitter.com/PerlCaf​e/status/97649808998809601
12:49 perlrocks Twitter: "Very clean feature of Mojolicious, a portable, Perl API pure object-oriented. Only requirement is that at least Perl 5.8.7." (ja) --PerlCafe http://twitter.com/PerlCaf​e/status/97650085860622337
12:54 perlrocks Twitter: "Mojolicious application is incredibly easy to deploy in the Plack." (ja) --PerlCafe http://twitter.com/PerlCaf​e/status/97651273536507905
12:54 crab nickl: generally speaking, when you think "how do i...?", you should look for an answer in Mojolicious::Controller first
12:58 perlrocks Twitter: "What is it like a taxi Mojolicious. Not going to drive yourself anymore." (ja) --trinityCRZ http://twitter.com/trinityC​RZ/status/97652400839593984
13:02 nickl 6crab: ok will do, thanks for the pointer
13:05 crab zoiks. bright purple.
13:21 crab maybe i should write a book about mojolicious. with a purple cover and unicorns.
13:27 MisterHatt hmm, is it possible to reverse proxy a route to another application altogether?
13:27 MisterHatt as dumb as that sounds
13:28 crab sure. just do it.
13:28 MisterHatt I cant even think how to
13:28 crab read about embedded applications etc.
13:28 crab Mojolicious::Plugin::Mount
13:28 MisterHatt ah
13:28 MisterHatt cool, thanks
13:33 MisterHatt crab: any ideaif that'd work for non-mojo or even non-perl apps?
13:34 crab no, it won't.
13:34 MisterHatt got something where i need to pass some stuff on to a C application and then just forward the result back to the main webserver..
13:34 MisterHatt hmm, ok, thanks
13:34 crab if you want to do that, i'd recommend doing it at a different level (e.g. in nginx)
13:35 crab but of course you can do it in mojo too. marcus might even have a proxy plugin to help you.
13:35 MisterHatt so setuo a vhost for the other app where the mask for it includes the path in the url?o.o
13:36 sh9 left #mojo
13:36 tabbi joined #mojo
13:37 tabbi left #mojo
13:39 crab you don't need a separate vhost
13:39 crab misterhatt: e.g. http://www.gabrielweinberg.com/bl​og/2011/07/nginx-json-hacks.html
13:39 mspo MisterHatt: sounds like a job for qx
13:40 MisterHatt never heard of it
13:40 mspo MisterHatt: is your c program a library, a web service, or just a program?
13:40 MisterHatt web service
13:40 purl rumour has it web service is just what contains all the logic involved for bundling stuff and etc
13:40 MisterHatt really tight
13:41 MisterHatt does a bunch of threaded calcuations and returns the dynamic results ot the same url fo raccess on different hardware platforms, but it has a lot to do so it's super lean and quick, however only makes up  small part of the site
13:41 MisterHatt at first i didnt think it made that much difference to be in C but ti really does
13:42 mspo it shouldn't
13:42 mspo you just need to curl/lwp/whatever out to it and get the result
13:43 mspo or Mojo::UserAgent?
13:43 purl Mojo::UserAgent is not optimized for fast blocking requests
13:44 crab what is qx?
13:44 purl qx is not there so that you can collect the output and print to stdout.   qx is there so you can collect the output and assign it to a variable. or print qx" your; stuff";
13:45 mspo crab: I thought he was just looking for output from a program
13:45 crab oh
13:45 MisterHatt mspo: well it outputs some html and a datastream depending on the request made to it
13:47 mspo MisterHatt: according to a conference I went to, stitching together a bunch of REST services is the way to scale
13:48 MisterHatt I see
13:48 mspo crab: what do you think of mojo::useragent?
13:49 MisterHatt I was a bit worried I'd need to tell my devs/client to have subdomains for the secondary app, was a bit dirty to do it like that
13:58 crab mspo: i like it.
13:58 crab misterhatt: subdomains? what?
13:58 purl subdomains are penalized in most search engines.
13:59 crab misterhatt: make it listen on localhost:4349 or something and proxy requests to it internally.
13:59 MisterHatt crab: as in, host the C app at a subdomain, and redirect requests to that
13:59 MisterHatt messy tho
13:59 MisterHatt proxy from within mojo?
14:03 heince joined #mojo
14:05 MisterHatt also another odd question, possible to have a single app listening two hostnamess and route handling based on url?
14:06 stephan48 i bet you could do it with bridges, just point the 2 hostnames to same ip/or use an webserver in frontof it
14:14 alnewkirk joined #mojo
14:21 henq left #mojo
14:22 MisterHatt yeah thats what I hought
14:22 MisterHatt thanks guys
14:51 wolf_ left #mojo
14:51 wolf_ joined #mojo
15:02 mattastrophe joined #mojo
15:04 kaare joined #mojo
15:26 plu win 25
15:40 minimalist marcus: ping
16:04 crab plu: what did i win 25 of?
16:08 Kovensky meh
16:08 Kovensky if perlpod documents something but no standard pod formatters (other than 'perldoc') implement it properly, is it a bug? :S
16:32 perlrocks Twitter: "It's been a super MoJolicious month at cupcake MoJo!!!" --cupcakeMoJo http://twitter.com/cupcakeMo​Jo/status/97706165487669248
16:39 reyjrar left #mojo
16:41 crab Kovensky: do they implement it wrong, or not implement it?
16:42 Kovensky /Users/kovensky/perl5/perlbrew/​perls/perl-5.14.1/bin/pod2html: : cannot resolve L<Usably|http://github.com/idangazit/usably-limechat> in paragraph 4.
16:43 sri MisterHatt: the mount plugin does that already
16:43 Kovensky implement it wrong, I guess; pod2html seems to only implement the basic L<> links (to other perldoc documents)
16:43 Kovensky github implements L<|> wrong too :(
16:44 crab kovensky: weird, you'd think someone would've noticed by now.
16:44 Kovensky (it's actually L<schema:>)
16:45 Kovensky I wonder where I'd complain about that but idk if github would ever pick up the fix =p
16:45 * Kovensky got used to write his github READMEs in POD
16:45 Kovensky s/te/ting/
16:53 crab kovensky: istr that github's readme-rendering is done by some code that's in a github repository, and they ask people to submit fixes, new converters, etc.
17:00 gabiruh_ is now known as gabiruh
17:08 xaka joined #mojo
17:32 vel joined #mojo
17:55 perlrocks Twitter: "Look Mojolicious reference http://d.hatena.ne.jp/perlco​desample/20110402/1305602329, Mojolicious apparently:: Lite is a good Monorashii realized." (ja) --narazaka http://twitter.com/narazak​a/status/97726973278822400
18:11 jwang joined #mojo
18:12 vel left #mojo
18:35 perlrocks Twitter: "Next time, anyway Mojolicious:: Let's make at the Lite" (ja) --narazaka http://twitter.com/narazak​a/status/97737151399215104
18:40 heince left #mojo
18:50 vasundhar joined #mojo
19:27 vifo joined #mojo
19:27 vifo Good evening.
19:27 purl Ah, evening. The tumultuous mind tarries and contemplates, reveling in the silence afforded by the diurnal proletariat. Good evening, indeed.
19:31 nickl left #mojo
19:35 vifo Say I have an app named App and a controller named App::Foo::Bar with method baz. How can I add a route to this controller? $r->route('/foo/bar/baz')->to('foo::bar#baz') does not work, nor ->to(controller => 'Foo::Bar', ...)
19:36 perlrocks Twitter: "# Mojolicious # chrome and # websockets made me cry. Always 'Uncaught Error: INVALID_STATE_ERR: DOM Exception 11'. Debug, tcpdump se nothing" (ru) --korjavin http://twitter.com/korjavi​n/status/97752414265937921
19:37 sri vifo: http://mojolicio.us/perldoc/Mojolic​ious/Guides/Routing#Special_Stash_V​alues_28_controller_and_action_29
19:38 vasundhar left #mojo
19:38 vasundhar joined #mojo
19:43 vifo @sri: thanks and shame on me, should have read the docs more carefully :)
19:49 perlrocks Twitter: "at the same time check whether Mojolicious and Nginx with Cyrillic domains (especially not in punycode)" (ru) --skaurus http://twitter.com/skaurus​/status/97755828714602497
20:06 nuba left #mojo
20:06 kaare left #mojo
20:15 nuba joined #mojo
20:16 vifo_used joined #mojo
20:18 vifo left #mojo
20:33 SmokeMachine joined #mojo
20:33 sr joined #mojo
20:37 sromanov left #mojo
20:37 SmokeMachine left #mojo
20:39 abra left #mojo
20:44 SmokeMachine joined #mojo
20:47 Foxcool left #mojo
20:50 abra joined #mojo
20:54 sr left #mojo
20:54 nickl joined #mojo
21:05 nickl left #mojo
21:07 sromanov joined #mojo
21:16 mhi left #mojo
21:25 SmokeMachine left #mojo
21:32 SmokeMachine joined #mojo
21:32 xaka left #mojo
21:41 jwang left #mojo
21:47 alnewkirk left #mojo
21:55 baton8 left #mojo
22:29 vasundhar left #mojo
22:36 abra left #mojo
22:39 barries joined #mojo
22:42 barries Upgrading to mojo 1.68 seems to have prevented Chrome from calling WebSocket.onopen.
22:42 barries Did mojo pull ahead of chrome's websocket and become non-compatible?
22:43 barries (the old mojo was very old: 1.11)
22:45 barries ah, I see some lines in yesterday's chat logs
22:45 * barries goes to look further
22:48 sri barries: which chrome?
22:49 sri anyway, we support ietf-10 websockets
22:50 sri chrome m12 would be draft-76, which is incompatible
22:55 sri what you need is chrome m14 or firefox 6
22:56 alnewkirk joined #mojo
22:57 barries yeah, found the commit where you guys pulled ahead to the ietf-10 version, figured that was probably the borkage.
22:57 barries I'm on chrome stable, which is 12.
22:58 sri soon we'll have consistent websocket support in all browsers
22:58 barries twill be nice...
22:59 sri ietf-10 is in last call, that means it's going to be a rfc
22:59 * barries pulls chrome beta
23:00 * barries will probably go away during the install.
23:00 sri firefox 6 for example will go stable august 16
23:01 barries I'll take any browser for now, so long as it doesn't break my daytime use cases. This is a hobby project that I rarely get a chance to work on.
23:07 * barries pulls dev channel installer... that's where 14 is to be found, apparently.
23:07 sri they call it chrome canary
23:08 sri http://tools.google.com/dlpage/chromesxs
23:09 * barries avoided canary, went for dev instead. installed now, going away for a moment to launch it.
23:09 barries left #mojo
23:12 barries joined #mojo
23:13 sri canary is better, since it installs parallel to your normal chrome
23:14 barries dev is 14.x, but doesn't seem to work either. Same symptom: socket opens for a while, onopen never called, onclose called after a few seconds.
23:14 barries I'll check out canary.
23:18 sri dev is too old then
23:19 barries same symptoms on canary
23:25 * barries pulls firefox 6
23:26 barries been a long time since I developed for FF. chrome so shiny.
23:29 sri then it's something else, i've just tried canary and it works
23:30 barries thanks for checking.
23:30 sri we have a simple test
23:31 sri "mojo daemon"…open http://127.0.0.1:3000/diag/websocket
23:32 barries confirming: that works in dev.
23:32 barries thanks for the tip.
23:34 preflex_ joined #mojo
23:37 preflex left #mojo
23:52 mspo is there a channel on here that I could ask about a potential perl bug/problem?
23:53 crab hi barries.
23:53 barries that's voodoo. I edited the .js file for the app a bit, it then started working in chrome dev. I undid the edit, reloaded the page, it continues to work.
23:53 barries hey crab!
23:53 alnewkirk mspo, #perl-help

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