Camelia, the Perl 6 bug

IRC log for #mojo, 2010-10-09

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

All times shown according to UTC.

Time Nick Message
00:01 und3f is now known as und3f[A]
00:04 doubi Hm, that'd be a Mojolicious::Controller. Just keep reminding yourself "It's only Perl" and everything will be fine...
00:24 sri :)
01:00 * doubi goes to bed
01:01 doubi left #mojo
01:07 baton8 left #mojo
02:11 baton8 joined #mojo
02:35 janus left #mojo
03:01 janus joined #mojo
04:04 tholen42 joined #mojo
04:06 tl left #mojo
07:06 gabb Poster is amazing for ws debugging
07:07 omega url?
07:08 omega ahh, ff addon?
07:10 gabb ye
07:50 und3f[A] is now known as und3f
07:57 alnewkirk left #mojo
07:57 alnewkirk|com joined #mojo
07:57 alnewkirk|com is now known as alnewkirk
08:06 ka2u left #mojo
08:06 ka2u joined #mojo
08:06 alnewkirk left #mojo
08:28 kvorg joined #mojo
08:52 ka2u left #mojo
10:41 and joined #mojo
10:56 gabb is: get '' => /& or sub {} a shortcut for routes()->via() thats only in Lite ?
11:05 and left #mojo
11:17 janus adding helpers is too easy... i'm (ab)using them for almost everything in a current project ;)
11:19 janus like a need through all layers... but yeah, helps a lot :)
12:05 Rhaen hm. what's the trick to run a mojo::lite app with fastcgi?
12:05 Rhaen read mod_fcgid
12:11 Rhaen ok, found something inside the ML - why is this not documented?
12:11 Rhaen *rants*
12:44 Rhaen ok, forget nearly everything what I said, I'll send a doc patch
12:56 und3f is now known as und3f[A]
13:13 jamesw left #mojo
13:22 jamesw joined #mojo
13:59 GabrielVieira left #mojo
14:32 GabrielVieira joined #mojo
14:59 perlrocks Twitter: "@ Sharifulin Anatoly, but you have an init.d script for Mojolicious? :) In an ideal - that's so right for CentOS well with daemon_prefork ..." (ru) --skaurus http://twitter.com/skaurus/status/26849723863
15:06 tempire left #mojo
16:01 kewl joined #mojo
16:03 sri Rhaen: deployment recipes are in the cookbook
16:22 Htbaa joined #mojo
17:31 mvuets joined #mojo
17:33 mvuets Greatings!
18:01 spleenjack joined #mojo
18:04 * sri waves
18:09 kthakore joined #mojo
18:10 kthakore is there an example that shows how to make a Model in mojolicious ?
18:15 kthakore oh well
18:20 perlrocks left #mojo
18:33 vti sri: what do you think about this http://vti.showmetheco.de/drafts/how-to-a​void-unicode-pitfalls-in-mojolicious.html
18:38 tempire joined #mojo
18:48 tempire kthakore: It's recommended to use defaults: http://github.com/kraih/mojo/blo​b/master/lib/Mojolicious.pm#L502
19:27 achromic joined #mojo
19:32 ryanc left #mojo
19:42 ryanc joined #mojo
19:43 rhaen_ joined #mojo
19:48 Rhaen left #mojo
19:48 rhaen_ is now known as Rhaen
19:50 GabrielVieira2 joined #mojo
19:56 GabrielVieira left #mojo
19:59 ryanc left #mojo
20:06 sri vti: looks good
20:06 kthakore tempire: ... ump what?
20:06 ryanc joined #mojo
20:06 sri could use a few more examples though
20:06 kthakore sri: how do I use a database with mojo?
20:06 kthakore what are defaults/
20:06 sri mojolicious is model layer agnostic
20:07 sri you just use databases like you would in any other perl script
20:07 vti sri: any fast ideas?
20:07 kthakore ... sure ... but that doesn't answer my problem
20:07 sri vti: the slides i keep linking too
20:07 kthakore so I ahve to set up DBIx::Class and stuff my self?
20:07 sri yes
20:07 kthakore ok
20:07 kthakore thanks man
20:08 vti sri: marcus'?
20:08 sri no
20:08 vti or you mean unicode slides?
20:08 sri http://www.slideshare.net/Penfold/perl-and-unicode
20:09 sri general unicode examples
20:09 sri most people don't understand the difference between UTF-8 and perl characters
20:10 sri double encoding is way too common, so if you show that it would be huge
20:10 sri you could mention what actually happens when someone double encodes :)
20:10 vti ok
20:11 sri would be cool if i just have to link to your blog post in the future :D
20:13 vti that article forces me to fix some bootylicious bugs
20:13 vti and when i looked at the code.. oh my, who has wirren all that crap :D
20:13 vti s/wirren/written/
20:14 sri lol
20:29 gabb was there a verbose logger for mojo (that automagically sends stuff to stdout) ?
20:29 sri delete the log directory ;)
20:30 sri it's documented in the lite tutorial i think
20:30 gabb ah, must have missed it, thanks
20:37 gabb guess you cant leave out the controller name from ->to() like I tried xD
20:41 perlrocks joined #mojo
20:44 hoelzro joined #mojo
20:45 kewl left #mojo
20:45 hoelzro when I'm running a Mojolicious app under PSGI, is there a way to tell it to look under $CWD/templates for templates instead of under $(which plackup)/templates, without explicitly saying $renderer->root(...)?
20:46 sri that should me documented in the cookbook recipe
20:47 sri there might also have been improvments in the github version if they were possible
20:48 sri plackup makes detection much harder though
20:48 sri you might have to set MOJO_HOME
20:48 hoelzro sri: alright, I'll take a look in the cookbook, thanks
20:53 mvuets sri: MojoX::Renderer runs _render_template until all extends/layout are expanded, right?
20:54 sri possibly
20:55 mvuets As i understand $output is passed by ref again and again. Looks like next itrations gets previous results.
20:55 mvuets Seems it's done on purpose as there is a corresponded test.
20:57 mvuets Is it passed to renders simply just to provide previous results?
20:58 sri what else should it do?
20:58 mvuets In other words can i safely override it? epl render works this way if i'm not wrong.
20:58 sri override what?
21:00 mvuets In handler: sub _render { my ($self, $renderer, $c, $output, $options) = @_; ... that is $output param
21:00 sri i don't understand the question
21:00 mvuets Sorry. I'm confused (:
21:02 mvuets Are you familiar with TT renderer plugin?
21:02 sri no
21:03 vti but he knows who is :D
21:03 mvuets Lucky
21:04 mvuets vti: looks i found a bug there... or opportunity for enhancement
21:05 gabb lol, like the opportunity for enhancement bit :D
21:06 vti mvuets: could be
21:08 mvuets renderer.t:21: $$output .= 'Hello Mojo!';
21:10 mvuets $output contains results from previous call. epl renderer does not use them and overrides. Why it is done such way and how it can be used?
21:11 vti mvuets: could you provide a test or test app? i don't understand..
21:12 sri seems you append to the output buffer
21:12 sri and you should redefine it
21:12 vti me?
21:12 sri ye
21:12 sri it might contain garbage
21:12 mvuets That was mojo test script.
21:13 sri ok, i give up
21:13 mvuets Either it was done on purpose (as there is such test), or that's buggy test (:
21:15 sri maybe it helps if you try to show us a real world test case where the bug shows up
21:15 sri what are you going after here?
21:17 sri or more specific, what are you trying to achieve with these questions? is there a bug that shows up in your app?
21:19 mvuets I want ensure i won't break something.
21:22 perlrocks Twitter: "@rayners guess there's Mojolicious. everything else seems farther down the stack." --markpasc http://twitter.com/markpasc/status/26877321211
21:23 vti sri: so the problem is all about layouts
21:23 vti in tt $output gets concatenated
21:23 sri i don't think there is a problem
21:23 vti and the result is wrong
21:24 sri and i won't investigate further until there's a proper question or test case ;)
21:24 mvuets I can provide. But i doubt it's a Mojo bug.
21:24 sri this is why i usually insist on test cases ;p
21:24 sri questions are just going nowhere
21:26 vti sri: i am not saying it is a mojo bug ;p
21:26 * sri will just play cut the rope on his iphone now ;p
21:29 hoelzro left #mojo
21:29 phillipadsmith question (possible stupid): What's up with the "Your secret passphrase" error message?
21:30 skaurus joined #mojo
21:30 sri see lite tutorial
21:30 phillipadsmith sri: okay, will re-read.  :)
21:30 skaurus Hi. Can anyone share their init.d or start-stop scripts for Mojolicious?
21:30 skaurus i stuck..
21:34 Htbaa can't you use /etc/init.d/skeleton as your base?
21:35 skaurus don't have one; I using Centos 5.5 btw
21:36 skaurus and if you mean just create start, stop, restart and so on - no, I can;t )
21:36 sri why can't you?
21:37 skaurus cause that lines of mine doesn't work!
21:37 skaurus it's totally out of my expertise
21:39 skaurus and it's some non-googleable question...
21:40 phillipadsmith sri: thanks; sorted.  :)
21:40 sri get a sysadmin to do it then?
21:40 sri it's their bread and butter
21:40 * phillipadsmith wasn't thinking about cookies, so skimmed over that bit
21:41 skaurus yeah, maybe...
21:41 skaurus I some kind of volunteered sysadmin here
21:46 Rhaen why didn't you use mongo db?
21:47 skaurus ok; so I writing start part; my first attempt is start sub like that: "daemon /var/around/script/around daemon_prefork --listen file:///tmp/around.sock --pid /tmp/around.pid --lock /tmp/around.lock --start 10". It's a daemon command, it should run argument in background, but no, that doesn't happen. Ok, I break execution, ran again: "Can't create listen socket: address in use". Why, am I should do rm -f /tmp/around.sock before start?
21:47 skaurus because it's a webscale
21:50 Rhaen guys, sri? I need some help with my fcgid setup :)
21:50 Rhaen I'll prepare a pastie :)
21:50 sri no clue about fcgid
21:51 Rhaen this is my current config
21:51 Rhaen http://pastie.org/private/sr6xupdi1omlnbeflx7kka
21:52 Rhaen it works - hm, nicely :)
21:52 Rhaen the setup is working :)
21:52 Rhaen however, every request is being dispatched through the mojolicious lite app
21:53 Rhaen what do you think about this?
21:53 spleenjack left #mojo
21:53 Rhaen Should I place the pkgbox.pl Mojolite script inside the DocumentRoot
21:53 Rhaen and rename it to so something like index.fcgi?
21:54 skaurus apache doesn't scale btw...
21:54 Rhaen so the webserver will deliver the static images and css and javascript stuff and the mojo app only cares for the logic
21:54 Rhaen what do you think?
21:54 sri might be better asked in an apache channel ;p
21:55 Rhaen skaurus: I don't use joins or write to disk so it's high performance
21:56 vti sri: tt fix http://github.com/vti/mojox-renderer-tt/comm​it/083570204fdd2248fa11995b1dd3f7ad55db61b8
21:56 Rhaen sri: true. Using my method forces every request being sent to the mojo app.
21:56 Rhaen I wonder if that's a performance impact or not.
21:56 Rhaen Sounds like the need for testing, hm?
21:57 sri static file serving is always faster if handled by the server
21:58 sri it doesn't matter much with a proper reverse proxy though
21:58 Rhaen that's what I thought, too
21:59 Rhaen A request is being sent to apache -> fcgi -> mojo -> filesystem
21:59 Rhaen instead of apache - > filesystem
21:59 Rhaen sounds like the need for some tests to get some numbers
22:00 Htbaa left #mojo
22:01 sri http://markup.io # cool idea
22:03 sri http://markup.io/v/c0v4px9a3dbm
22:03 chansen cool
22:06 Rhaen http://markup.io/v/f2bs8hf6dmwd
22:08 sri http://markup.io/v/cyb2d1gcnpw2
22:10 skaurus left #mojo
22:10 Rhaen does not work on Firefox on my Mac, tho
22:15 Rhaen ok, it's alot faster without fcgi-mojo stuff
22:16 Rhaen but how do I configure mojo for it? Can I specify a template path?
22:16 Rhaen yep. I'll dive into the docs
22:35 Rhaen What's the best way to "relocate" the template directory
22:35 Rhaen e.g. to a different place
22:40 november joined #mojo
22:41 november hey. im new to mojo. can anybody explain to me when do i have to use param and when do i have to use stash to get a param out of a route?
23:02 november left #mojo
23:09 sri Rhaen: just change the path
23:10 sri app->renerer->root
23:10 sri *renderer
23:32 skaurus joined #mojo
23:34 skaurus Mojo CentOS init.d script, use with caution: http://gist.github.com/618726
23:42 tempire skaurus: here's another one: http://pastie.org/1210346
23:43 skaurus tempire: )) if i seen that earlier, i would already be sleeepin
23:49 skaurus left #mojo
23:52 mvuets left #mojo

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