Camelia, the Perl 6 bug

IRC log for #mojo, 2011-01-23

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

All times shown according to UTC.

Time Nick Message
00:00 sri then thats your problem
00:00 daviddelikat1 left #mojo
00:01 fish__ yeah, i know
00:03 MojoGuest739 joined #mojo
00:03 MojoGuest739 From: http://news.ycombinator.com/item?id=1277067 (165 hits)
00:03 MojoGuest739 left #mojo
00:42 snearch left #mojo
01:29 duff joined #mojo
01:34 duff Is the best way to use TemplateToolkit with Mojo via MojoX::Renderer::Allow::TT? I seem to be failing at getting it to work properly. Its loading the template file and rpocessing it fine, but the data i pass to render doesn't seem to end up available for the template processing...
01:35 sri duff: https://github.com/marcusramberg/mojox-renderer-tt​/blob/master/lib/Mojolicious/Plugin/TtRenderer.pm
01:49 duff ahh. I had tried to install that from cpan but it doesn't compile. the latest version might help a bit tho...
01:56 fish__ so slurp itself does no encoding at all? still strange. the file is encoded right (enca -L none says utf8, i can read it on a LANG="en_US.UTF-8" terminal, connected to a ssh enviroment with LANG="en_US.UTF-8" and it shows right when open with cat
02:02 fish__ right before the content is put to the stash, it seems to be encoded fine. at least the output i get via app->log looks good
02:05 fish__ even if i put a app->log in the template, it looks right. everything looks like it was just the html page encoding but it is utf8.. firefox's page info says so.. and putting <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
02:05 fish__ and  <meta charset="UTF-8">
02:05 fish__ should be sufficient i think..
02:06 fish__ maybe app->log does some magic encoding befor printing output?
02:07 fish__ well, a simple 'warn' outputs the same..
02:50 sri fish__: just understand the code first, spamming the channel doesn't help anyone
02:50 sri duff: new version should be on cpan soon i think
02:50 sri fish__: anyway, encoded data in the stash sounds very very wrong
02:51 sri pretty much everything in mojolicious expects chars, not bytes
04:04 tholen42 joined #mojo
04:06 tl left #mojo
04:10 perlrocks Twitter: "Reading more Mojolicious docs.  Fun." --kjwcode http://twitter.com/kjwcode​/status/29028096099221504
05:33 MisterHatt left #mojo
05:36 MisterHatt joined #mojo
05:58 HSlayer|2 joined #mojo
06:02 HSlayer left #mojo
07:40 non joined #mojo
08:27 kaare joined #mojo
08:36 avkhozov joined #mojo
08:41 avkhozov left #mojo
09:28 marcus good morning
09:28 purl For you maybe.
09:28 marcus purl, it is sunday, stop beeing such a grouch.
09:28 purl ...but it is not possible, per policy of the admins...
09:29 marcus oO
09:32 punytan left #mojo
10:35 marcus re ipv6 - http://www.ipv4depletion.com/?page_id=326
10:44 marcus https://github.com/chriso/node.io <- mojo makes this look so lame
11:12 marcus lol. "The one liner is cool, but I guarantee that node.js's non-blocking IO will outperform perl any day of the week. Try scraping thousands of pages at once using perl.."
11:14 marcus I like it when I have a good comeback.
11:15 marcus ( this is all from http://news.ycombinator.com/item?id=2131889 btw)
11:34 MisterHatt marcus: my boss is still shitting bricks over mojolicious::lite
11:34 MisterHatt "webapps take forever to develop in rails, that's why we're using php for our new site"
11:35 MisterHatt then I showed him lite :)
11:35 MisterHatt hell, I can barely get over how awesome mojo is
11:38 marcus sweet :)
12:17 marcus MisterHatt: http://leonerds-code.blogspot.​com/2011/01/ipv6-in-perl.html
12:25 avkhozov joined #mojo
12:29 MisterHatt any particular reason you're linking me that marcus ?
12:29 marcus no
12:29 marcus I didn't mean to address you
12:29 marcus sorry :)
12:30 MisterHatt saa
12:31 MisterHatt interesting though
12:34 alnewkirk joined #mojo
12:38 stephan48 get '/file/:id/:filename' => sub {
12:38 stephan48 but when i access it with /file/test/test.zip i get a zip download, any way to disable this behavior? :)
12:45 kaare left #mojo
12:45 kaare joined #mojo
12:46 yko stephan48: you want to view content of .zip ?
12:46 stephan48 i want to get full filename
12:46 stephan48 everything after the id path, so i can give that as parameter to the content-something header as filename
12:47 stephan48 so user can override the filename he gets..
12:47 marcus stephan48: see routing guide
12:48 yko stephan48: i tried to do same thing and finally i should to redirect user to something like /download/:id/real_file_name_whi​ch_will_be_saved_on_userside.zip
12:48 stephan48 k
12:48 marcus actually, he wants .filename rather than :filename
12:48 marcus afaict
12:49 marcus I think sebastian should improve the routing guide examples to make the difference clearer.
12:51 stephan48 it was (.filename)
13:01 n0n joined #mojo
13:04 marcus http://news.ycombinator.com/item?id=2132217 can someone please explain what harryf's point is? the node.js example was using a css selector as well.
13:06 non left #mojo
13:13 Ranguard joined #mojo
13:15 Ranguard Hi, is anyone interested in writing a Perl.com article about Mojolicious :) ?
13:16 marcus Ranguard: yes
13:17 marcus Ranguard: Ca how many words? Anything in particular you would like the article to focus on?
13:19 Ranguard marcus: fab - something like 'why use', 'features', 'community', 'success stories of it being used'
13:21 marcus Ranguard: Sounds doable. Maybe sri will want to collaborate on it once he wakes up. =)
13:22 Ranguard marcus: great - I'll come chasing in... a couple of weeks :) ?
13:22 marcus Ranguard: I'll get back to you with a first draft in a few days.
13:24 Ranguard fantastic - leo@cuckoo.org - personally I prefer shorter articles to longer ones, but depends how much you want to cover
13:25 marcus Ranguard: Good stuff.
13:25 purl Good stuff. are you writing tests for euler_bench :)
13:33 marcus Anyone who have good reference sites, add them at the bottom of the wiki please - https://github.com/kraih/mojo/wiki
13:45 yko ouch. looks like it's impossible to set session values in delayed response
13:46 yko https://gist.github.com/792088
13:58 non joined #mojo
14:02 n0n left #mojo
15:34 stephan48 is it possible to have a optional arg in the middle of a route? get '/fileinfo/:id/:ticket/(.filename)' => { ticket => 'test' } => sub {
15:35 stephan48 doesnt seem to work correctly :)
15:35 stephan48 after, reading Route Guide and Mojo::Lite docs over and over i still dont see a way
15:48 sri stephan48: you can do anything by customizing the regex
15:50 sri yko: i really don't like how you just added a new controller method
15:54 sri the whole solution doesn't really make sense :/
15:58 stephan48 sri: mh, can i overwrite the complete regex or only the the regexp the placeholder generates?
16:01 sri depends how deep you want to dig
16:02 sri you can always hack up Mojolicious::Routes::Pattern
16:02 sri but generally just the placeholder
16:03 stephan48 i need a optional arg in the middle of a route ;)
16:03 sri so?
16:04 stephan48 so?
16:07 sri get '/welcome/:foo/bar' => [foo => qr/.*/] => sub {
16:09 sri the slash of course can't go away, that would break reversibility of the route
16:09 sri but GET /welcome//bar is fine
16:10 stephan48 mh...
16:13 sri you can always use two routes though
16:13 sri one with the optional element, one without
16:14 sri that preserves reversibility
16:15 sri yko: that test case seems very wrong actually
16:16 stephan48 k
16:25 GitHub177 joined #mojo
16:25 GitHub177 mojo: master Sebastian Riedel * 48df118 (1 files in 1 dirs): added more tests - http://bit.ly/fztckz
16:25 GitHub177 left #mojo
16:26 sri yko: is there anything these test cases don't cover?
16:34 MojoGuest127 joined #mojo
16:34 MojoGuest127 From: http://www.google.com/search?hl=en&amp;safe​=off&amp;client=safari&amp;q=websockets+dem​o&amp;aq=f&amp;aqi=g1g-v1&amp;aql=&amp;oq= (1 hits)
16:35 MojoGuest127 left #mojo
16:37 marcus sri: Maybe routes could default to ->name('*') ?
16:38 marcus also, I was thinking it isn't very clear that you can click the 'perldoc Mojolicious::Guides link in the 'brand new page' page
16:40 marcus sri: Do you have a dropbox user?
17:07 sri marcus: it could break existing apps
17:07 sri marcus: could be
17:07 sri marcus: nope
17:13 fhelmber_ joined #mojo
17:15 marcus sri: how could it break existing apps?
17:15 marcus sri: If there is no default at the moment?
17:23 perlrocks Twitter: "Mojolicious:: Controller's render me, $ c-> render (var => $ var) $ var is undef when I was in is a set of variables without 'var' to render a template named, the behavior of trouble with" (ja) --tabe2314 http://twitter.com/tabe231​4/status/29227847243538432
17:24 sri marcus: another route could be using the auto generated name already
17:25 marcus yay for senseless .ja translations
17:25 marcus sri: just make explicit names higher priority than the default?
17:25 sri it's not that easy
17:25 marcus too bad
17:25 marcus stuffing ->name('*) all of the place is a bit ugly
17:26 sri the first one found wins
17:26 marcus sri: doesn't that depend on your implementation? :)
17:26 sri it does
17:26 marcus (of the default)
17:26 sri if you have a better solution knock yourself out :)
17:27 sri there is no central name registry
17:27 sri everything lives in the tree
17:28 sri and a search just checks all leafs
17:28 marcus I'll take a look at it and see if I can find a way to implement my behavior
17:29 * tempire hopes marcus can find a way to implement his behavior
17:37 sri yay for chinese food!
17:37 sri *nom nom nom*
17:51 MojoGuest652 joined #mojo
17:51 MojoGuest652 From: http://www.google.co.kr/url?sa=t&amp;source=w​eb&amp;cd=5&amp;ved=0CGIQFjAE&amp;url=http%3A​%2F%2Fdev.xantus.org%2F&amp;rct=j&amp;q=html5​%20irc&amp;ei=qGo8TZXeJYjQcePKiYUH&amp;usg=AF​QjCNGw6nZv0wO42uzUnHhWcD0vcKNULg&amp;cad=rjt (1 hits)
17:51 MojoGuest652 left #mojo
18:03 sri marcus: there is another problem with default route names, they can affect rendering
18:07 sri and then you have special cases that can't be turned into names automatically
18:07 Ranguard left #mojo
18:09 sri ok, there could be a simple solution
18:09 sri like prefixing default names with an _
18:11 sri interesting
18:12 sri default name seems not to break any tests
18:14 sri ah ok, breaks two tests
18:16 sri one was accidental
18:32 sri ah yea, it breaks everything ;p
18:33 sri get '/' => 'root'; and get '/root'; clash in lite_app.t
19:03 marty joined #mojo
19:06 sri interesting
19:06 sri it migth only be a bug that prevents auto route names
19:09 marty_ joined #mojo
19:09 marty left #mojo
19:17 sri yes was really just a bug :o
19:18 sri marcus: i think we can try it :)
19:19 sri i have all tests passing with auto names
19:28 yko hmm. maybe i just understand render_later wrong. let me clarify
19:29 yko if i need to delay rendering, i call $c->render_later and after that is it enough to call from some callbacks $c->render_text('Hello World!') to make everything rendered?
19:30 sri render_later is actually rather dumb, it only prevents auto rendering
19:32 sri yko: your test case seem quite wrong though
19:32 sri *+s
19:32 yko can you give a few words why?
19:32 sri test runs are blocking
19:33 sri you register the callback outside of that
19:33 sri see longpolling_lite_app.t for the current delayed tests
19:34 sri thats how it is supposed to be
19:34 yko looking at it just now. try to understand what am i doing wrong
19:34 yko anyway thank you
19:40 mib_wqkfb0 joined #mojo
19:41 mib_wqkfb0 will hypnotoad be made compatible with plack?
19:42 sri unlikely
19:42 sri psgi is too restrictive for it
19:43 achromic how so?
19:43 sri websockets
19:43 purl i guess websockets is the replacement for comet
19:43 mib_wqkfb0 so all the middlewares i want to use i have to reimplement?
19:44 sri just use a psgi server then
19:44 sri mojolicious runs just fine in psgi mode
19:45 mib_wqkfb0 google found this: https://github.com/motemen/​Plack-Middleware-WebSocket
19:46 sri argh... i really don't need this duscussion again
19:46 sri you have to hack around psgi to make websockets work... it is not part of the psgi spec
19:46 mib_wqkfb0 then add it to the faq
19:46 mib_wqkfb0 left #mojo
19:47 sri oh what a nice guy
19:47 purl we're all nice gals
19:47 * sri hugs purl
19:47 * purl smiles
19:57 yko sri: sorry and thank you for being patient to me
19:57 yko i was fucking wrong
19:58 sri no problem :)
19:58 * yko is a live illustration 'how you should never do'
19:58 sri well, you've been more right than wrong ;)
19:58 yko damn, i need a large glass of rum but i can not take it now :'(
20:00 yko when problem is ob your side and you try to solve it by patching something outside of you - you are wrong.
20:01 yko that's commong mistake which i seen many times and it makes fact i did the same even more sad
20:01 sri marcus: ok, good news, we can do auto names, bad news, render_later will be neccessary in all delayed rendering cases
20:19 sri hmm great, github bot broken again :S
20:20 sri https://github.com/kraih/mojo/commit/83​2d45ddf3b4530e30dd669412b57d1a0211dd53
20:20 sri everybody get testing!
20:20 sri ./myapp.pl routes will also show names now
20:21 * sri pokes marcus and tempire
20:28 perlrocks Twitter: "Improved #mojolicious route name generation quite a bit today, enjoy. :) http://t.co/IGRDkE4 #perl" --kraih http://twitter.com/kraih/status/29274197943394304
20:31 perlrocks Twitter: "Mojolicious root, name ('*') Nattarashii to automatically do the equivalent. But s / \ W + / / do any different specifications are difficult to read." (ja) --5_1_5 http://twitter.com/5_1_5/status/29275092399685632
20:38 perlrocks Twitter: "Automatically generated route names in #mojolicious might have side effects, please make sure to test the latest version on github. #perl" --kraih http://twitter.com/kraih/status/29276746230534145
20:39 perlrocks Twitter: "Btw. "./myapp.pl routes" will now also list route names. ;) #mojolicious #perl" --kraih http://twitter.com/kraih/status/29276979903602688
20:39 sri marcus: if something goes wrong i'll blame it on you ;p
20:49 avkhozov left #mojo
20:52 stephan48 i have my app connected via proxypass and proxypassreserve to /filebase, but the mojo app doesnt see that its mounted unter /filebase but under /, what would be the best way to make the mojo app know that?
20:54 sri http://mojolicio.us/perldoc?Mojol​icious/Guides/Cookbook#Rewriting
20:55 sri with a reverse proxy you can only rewrite the base url
20:58 stephan48 and it doesnt seem to detect that the vhost is ssl protected, *curses apache*
20:58 sri what doesn't detect what?
20:59 stephan48 https://filebase.stejau.de/filebase/ <- please, look in sourcecode for the base tag, there its http:// instead of https
20:59 sri umm
21:00 sri how would https be detectable?
21:00 sri the example i linked you above addresses that exact issue
21:02 stephan48 ye, i deployed that also
21:02 sri there are no standards for passing along reverse proxy information, you just hack something together
21:03 stephan48 ye
21:08 perlrocks Twitter: "By gum my #mojolicious experiment is actually working. #perl can do anything." --jamiepopkin http://twitter.com/jamiepopk​in/status/29284407919509504
21:13 omega left #mojo
21:13 omega joined #mojo
21:16 marty_ left #mojo
21:33 stephan48 sri: maybe you can mention these as apache2 example howto pass ssl state to mojo(required mod_header)? http://abc123.pastebin.com/4QzY1Qvz
21:33 sri that stuff belongs in the wiki
21:33 stephan48 k
21:34 alnewkirk left #mojo
21:35 alnewkirk joined #mojo
21:37 GitHub18 joined #mojo
21:37 GitHub18 mojo: master Sebastian Riedel * ea3d05d (1 files in 1 dirs): more pod cleanup - http://bit.ly/eO81hd
21:37 GitHub18 left #mojo
21:59 GitHub117 joined #mojo
21:59 GitHub117 mojo: master Sebastian Riedel * 185aaf6 (1 files in 1 dirs): added render_later example - http://bit.ly/eFiXop
21:59 GitHub117 left #mojo
22:16 kaare left #mojo
22:21 daviddelikat joined #mojo
22:22 alnewkirk left #mojo
22:27 sri there is one thing mojolicious really lacks
22:27 sri flaws
22:28 sri i think we need more flaws for people to hack on
22:29 DaTa give me commit access, i can produce a lot of flaws :)
22:30 tempire Add a separate plugin space calls Pluggables, and keep the MojoX namespace as a compatibility layer between Plugins & Pluggables.
22:31 tempire Add a template system called ep_new
22:31 tempire and ep_new_l as the successor to epl
22:37 ispy_ joined #mojo
22:37 tempire I get warnings with "myapp routes"
22:45 tempire was: http://pastie.org/1491200
22:45 non left #mojo
22:45 tempire now: http://pastie.org/1491203
22:47 tempire I don't know how I feel about the route names being munged together.
22:47 ispy_ left #mojo
22:53 tempire is there a reason default route names cannot be the route definition?
22:59 * sri gives DaTa and tempire commit access and flees
23:00 * tempire replaces all futurama quotes with mst quotes
23:01 sri :O
23:01 ispy_ joined #mojo
23:04 GitHub191 joined #mojo
23:04 GitHub191 mojo: master Sebastian Riedel * e6528c8 (1 files in 1 dirs): fixed a small routes command bug - http://bit.ly/fR0Xw9
23:04 GitHub191 left #mojo
23:04 sri tempire: fixed
23:05 * tempire loves cpanm -L
23:06 tempire warnings are indeed gone
23:09 ispy_ left #mojo
23:29 GitHub184 joined #mojo
23:29 GitHub184 mojo: master Sebastian Riedel * 919103a (1 files in 1 dirs): small routes command tweak - http://bit.ly/h2Amgv
23:29 GitHub184 left #mojo

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