Camelia, the Perl 6 bug

IRC log for #mojo, 2010-08-25

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

All times shown according to UTC.

Time Nick Message
00:12 skaurus and if everybody knows, what is a root for MojoX::Renderer::TT in commands like INCLUDE?
00:13 stephen left #mojo
00:20 stephen joined #mojo
00:53 yakudza joined #mojo
01:01 skaurus after installing parent module from CPAN, nginx suddenly started to time out reading from app socket... restarted app, nginx, recreated socket with no effect. Straaange.
01:11 fod left #mojo
01:21 skaurus well, reboot then
01:23 skaurus and after reboot all is ok
01:34 nrh left #mojo
01:40 nrh joined #mojo
01:41 alnewkirk left #mojo
02:09 Foxcool joined #mojo
02:36 janus left #mojo
02:42 janus joined #mojo
03:05 yakudzo joined #mojo
03:40 und3f[A] is now known as und3f
04:04 tl joined #mojo
04:06 tholen42 left #mojo
04:19 Foxcool left #mojo
05:12 koban joined #mojo
05:57 dynax60 left #mojo
06:12 dynax60 joined #mojo
06:40 ltriant left #mojo
06:43 ltriant joined #mojo
07:03 arthas joined #mojo
07:07 yko joined #mojo
07:14 yakudzo I have uri http://localhost:3000/system/​clusters/A%5C%2F)%22%27/info and     $r->route('/system/clusters/(:name)​/info')->to('system#cluster_info');
07:14 yakudzo route
07:14 marcus oh sweet, ask released a new TT renderer finally
07:15 yakudzo why Uri do not pass this route ?
07:15 marcus yakudzo: he too fat
07:15 yakudzo ??
07:15 marcus yakudzo: http://www.flickr.com/phot​os/byrnereese/2711853020/
07:16 marcus yakudzo: I dunno why your route does not work, looks like it should... but shouldn't ')' be escaped in the url?
07:17 skaurus left #mojo
07:19 yakudzo heh javascript escape escapes all exept slash and encideURIComponent escapes everything except ()
07:22 marcus yakudzo: if you change it to %28 , does the route work?
07:23 yakudzo not working
07:23 yakudzo %29
07:23 yakudzo not working too
07:24 yakudzo browser automatically converts %29 to )... so routes should handle it
07:26 marcus yakudzo: time to write a failing test, I guess.
07:29 ltriant left #mojo
07:30 marcus sri: I have some trouble with perl -Mojo -le'$dom=g(qw(http://itunes.apple.com/app​/minim/id336153168?mt=8))->dom; print $dom->at("#title h1")'
07:30 marcus sometimes it works, sometimes it just returns gzip trash
07:42 ysyrota joined #mojo
07:50 baton8 left #mojo
08:07 baton8 joined #mojo
08:21 baton8 left #mojo
08:29 marcus sri: also, when it works, it returns <h1>Minim</h1> <- Shouldn't it strip the header tag?
08:47 skaurus joined #mojo
08:56 skaurus left #mojo
09:01 yko situation: JsonConfig gets default config file name from $0 but if i want to run tests on my application that uses JsonConfig with Mojo::Test from file testname.t default config filename actually would be 'testname.json' and obviously that file doesn't exists
09:50 koban left #mojo
09:53 koban joined #mojo
10:05 marcus hmm
10:06 marcus I just heard Kjetil stopped using Mojolicious because it was too hard to turn a Mojo Header into a HTTP::Header object
10:06 marcus might be useful feedback, sri
10:14 _mpu joined #mojo
10:14 jest joined #mojo
10:19 Outlaw joined #mojo
10:30 yko left #mojo
10:37 yko joined #mojo
10:43 jest left #mojo
10:52 sri marcus: it should be trivial
10:53 sri marcus: turn your parser bug into a test case and i'll fix it
10:55 marcus sri: not sure what you are replying to now
10:55 sri the itunes thing
10:55 marcus sri: It seems to me that the gzip thing is apple sometimes responding with gzip encoding regardless of the client
10:55 marcus sri: is the case that the client currently does not support gzip encoding?
10:56 sri sending gzip without being asked to is absolutely invalid
10:56 marcus sure, but you don't support it either?
10:57 marcus so you don't ask for it?
10:57 sri correct
10:57 marcus I think apple ignores tat.
10:57 marcus that
10:57 sri serious bug on their end
10:57 marcus gives curl problems as well
10:58 marcus curl http://itunes.apple.com/app/minim/id336153168?mt=8 emits garbage here
10:58 sri ok, no bug at all then
10:59 marcus sri: what about the dom thing?
10:59 marcus shouldn't at('#foo h1') not include the <h1> ?
10:59 sri it of course doesn't strip tags, that wouldn't make sense
10:59 sri at('irc://kraih.com/#foo h1')->text does that
11:00 sri or ->all_text
11:00 sri stupif colloquy
11:00 sri *d
11:01 marcus ah, thanks
11:02 dynax60 left #mojo
11:03 marcus sri: support for compressed content would be nice tho. Would have let me work around this issue :)
11:03 sri patches welcome
11:03 sri gzip always annoys me because of the side effects
11:03 marcus guess we don't have the necessary modules in perl core :/
11:04 marcus sri: google has turned gzip on now, apparently
11:04 sri optional prereq
11:04 sri use constant IPV6 => $ENV{MOJO_NO_IPV6} ? 0 : eval 'use IO::Socket::INET6 (); 1';
11:05 sri this is how we do prereqs
11:05 * marcus just noticed http://search.cpan.org/~markstos/MojoX-E​ncode-Gzip-1.10/lib/MojoX/Encode/Gzip.pm
11:05 marcus I can't do gzip on iusethis for markup because of ESI
11:05 sri gzip sucks because you need to cache everything
11:07 marcus varnish can cache gziped objects
11:10 sri btw. you can always manually gunzip the message body and feed it to Mojo::DOM
11:10 marcus yeh, but given that it sometimes respects the vary...
11:11 marcus would be easier if it was consistently wrong.
11:12 sri btw. gzip is a core module since 5.10
11:12 sri Compress::Raw::Zlib
11:12 marcus nice
11:13 korshak joined #mojo
11:14 dotan joined #mojo
11:16 Outlaw left #mojo
11:16 yko left #mojo
11:19 marcus sri: so basically, for the client to support it, it would need to set the accept-heading header, and the Message object should look for the encoding header and decompress the body if it's set?
11:19 marcus (Am at client now, but want to look providing a patch for this in the evening)
11:20 sri something like that, complicated part will be message bodies stored in files
11:21 sri it would actually go into a Mojo::Content module i think
11:22 sri does gzip affect multipart messages?
11:23 yakudzo left #mojo
11:23 marcus sri: it gzips the entire body, so you would have to unpack before parsing multipart
11:24 marcus In general, HTTP treats a multipart message-body no differently than any other media type: strictly as payload.
11:24 sri thats the catch then
11:25 sri i see huge problems
11:25 marcus you can probably unpack the chunks as you go?
11:25 marcus I think you are right it would have to go into content
11:25 sri like how do you store a 500gb multipart gzip body
11:26 sri well, if you can unzip the chunks it's not that bad
11:26 sri proper tests will be important
11:32 sri think i would start with a new test file designed after t/mojo/message.t
11:32 sri t/mojo/message_gzip.t or so
11:34 sri you can basically look for the chunked code, it preprocesses in a similar way already
11:34 sri we also do chunked multipart
11:35 sri all in the Mojo::Content modules
11:35 sri and make sure to use the latest github version, that code got simpler recently
11:36 sri wonder if chunked and gzip can me mixed
11:36 sri *be
11:36 sri gzip would be a layer after chunked then
11:57 sri yakudza: paths are unescape before matching against routes
11:58 sri and your path contains a / which can't be matched with :foo
11:59 sri (*name) might work
11:59 sri otherwise you need a custom regex
12:11 Htbaa joined #mojo
12:13 ashleydev left #mojo
12:14 ashleydev joined #mojo
12:44 yakudza left #mojo
12:45 ashleydev left #mojo
12:53 ashleydev joined #mojo
12:57 koban left #mojo
12:57 skaurus joined #mojo
12:58 skaurus left #mojo
12:59 marcus sri: http://www.stevesouders.com/blog/2010/0​7/12/velocity-forcing-gzip-compression/
13:02 sri interesting, but no explanation for broken apple behavior
13:07 marcus agree
13:08 marcus sri: you do not provide an accept-encoding header tho?
13:08 sri thats correct, but we identify ourself
13:11 MojoGuest63 joined #mojo
13:11 MojoGuest63 From: http://www.google.com/search?client=safari&amp;rls​=en&amp;q=websocket+demo&amp;ie=UTF-8&amp;oe=UTF-8 (5 hits)
13:12 MojoGuest63 left #mojo
13:17 koban joined #mojo
13:19 MojoGuest823 joined #mojo
13:19 MojoGuest823 From: http://www.google.de/ (1 hits)
13:19 MojoGuest823 test test :)
13:19 jest joined #mojo
13:19 janus pass pass :)
13:23 MojoGuest823 left #mojo
13:42 vel joined #mojo
13:56 Akron joined #mojo
13:56 Htbaa left #mojo
14:06 jest left #mojo
14:09 Htbaa joined #mojo
14:15 korshak sri: about extends
14:15 korshak if i get example from http://github.com/kraih/mojo/blob/master/lib/Mojo​licious/Guides/Rendering.pod#Template_Inheritance
14:15 korshak and add 'layout "funky"' to 'first.html.ep' - it doesn't works correct
14:16 korshak is now known as yko
14:16 sri yko: dunno, and don't have time to investigate right now
14:17 yko ok, thanks anyway
14:18 sri possibly the main content getting reset somehow by one of the extending templates
14:18 sri but you know the drill
14:18 yko ok, ill dig that
14:18 yko ...maybe ... somewhere.... :)
14:24 * sri really needs to finish hypnotoad
14:26 sri customer totally digs idiot proof hot deployment :)
14:28 sri actually i should make configuring it harder so i can earn more with consulting :D
14:30 sri the fact that you configure it once and let it run forever kinda kills that idea though :/
15:45 koban left #mojo
16:01 sri also switching to a static worker pool instead of dynamic
16:03 yko fixed extends. one day you'll have time, i'll recall you
16:04 yko looks like nobody used extends before at all :D
16:05 vel left #mojo
16:09 sri yko: possibly
16:10 ysyrota yko: I used extends heavily
16:10 sri :o
16:11 yko Oo
16:11 yko ysyrota : can i ask you to test your usage with my fork?
16:12 ysyrota yko: sure. probably I will be able to test it tomorrow
16:13 yko Great! http://github.com/yko/mojo -- not a big changes, but it makes extends little bit more usable, i think
16:26 dotan left #mojo
16:39 ysyrota yko: ok
16:39 maettu joined #mojo
16:53 maettu left #mojo
16:58 sri not sure yet if i should default to async in hypnotoad
16:58 sri daemon_prefork defaults to sync atm
16:59 sri well designed apps are quite a bit faster async though, it's also better for websockets
16:59 ysyrota left #mojo
17:00 sri i guess sync would be smarter for production, because people are stupid
17:00 sri :)
17:36 zecrazytux joined #mojo
17:36 zecrazytux hi
17:37 * sri waves
17:38 * zecrazytux just heard about mojo a few minutes ago => seems amazing :)
17:39 sri :)
17:49 perlrocks Twitter: "Mojolicious-Plugin-YamlConfig-0.0.4, Danijel Tašov. CPAN: http://tinyurl.com/35x4zw8 * Changes: http://tinyurl.com/2vy888c" --cpan_linked http://twitter.com/cpan_linked/status/22107239444
17:57 koban joined #mojo
18:33 esskar_ joined #mojo
18:48 awnstudio joined #mojo
18:52 sri leverage is really good
19:08 Akron left #mojo
19:12 skaurus joined #mojo
19:20 * ashleydev votes for async default
19:28 skaurus voting? what voting?
19:29 ashleydev skaurus: for hypnodoad
19:36 skaurus hypnoroad already accepted, isn't? what is "async default"? ^)
19:36 skaurus *hypnotoad
19:48 sri the question was if we allow hypnotoad workers to act like daemon (async) or limit them to handling one client connection at a time
19:49 sri both are just a single setting, but i want a sane default
19:50 sri advantage is that we can handle countless slow client connections (good for websockets) but stuff like DBI blocks everything in the same process
19:51 skaurus DBI will block worker anyway, isn't?
19:51 sri async is much better if you use mojolicious features, possibly client + couchdb, sync is better for old school stuff like DBI
19:51 skaurus also one can use AnyEvent::DBI
19:52 sri it will block the worker, but not multiple connections, since a sync worker only has one
19:53 sri thats correct, you could mix in all kinds of other event loops
19:53 sri but not many people can handle event loops
19:54 sri i tend towards async now, since it's consistent with daemon :)
19:55 sri and performs much better for people that know what they are doing
19:56 skaurus i vote for async. And maybe recommendation in README or FAQ to start two instances of Mojo, for sync and async connections
19:57 sri the difference is really just the max_connections setting, async = 1000, sync = 1
19:58 sri sync is just emulated :)
19:58 skaurus if one instance will be able to run sync and async workers at same time, it will be great too i think
19:58 sri that doesn't make sense
19:59 skaurus they can have different urls or additional cgi param or something :)
19:59 skaurus but just async is simpler)
19:59 sri wouldn't work
20:00 sri sync is specifically for stupid people, so they shoot themself less in their feet
20:00 skaurus :))
20:06 esskar__ joined #mojo
20:09 * vti uses dbi
20:10 * skaurus dbd::pg has nice async capabilities
20:10 esskar_ left #mojo
20:10 esskar__ is now known as esskar_
20:20 awnstudio left #mojo
20:22 vti sri: where is that super duper server? :)
20:24 awnstudio joined #mojo
20:30 sri vti: not released yet
20:33 MojoGuest512 joined #mojo
20:34 MojoGuest512 left #mojo
20:36 MojoGuest55 joined #mojo
20:36 MojoGuest55 is now known as ezjs
20:36 ezjs is now known as jsrx
20:36 jsrx left #mojo
20:40 und3f is now known as und3f[A]
20:45 arthas left #mojo
20:46 stephan48 sri?
20:46 sri stephan48?
20:46 stephan48 how do i prevent encoding of text via mojo?
20:46 sri use data
20:47 sri text = perl chars, data = perl bytes
20:47 stephan48 k
20:47 stephan48 how to accomplish that?
20:47 skaurus render(data => ...)
20:48 stephan48 oh yea thanks :)
20:48 koban left #mojo
20:50 stephan48 works thanks
20:51 yko left #mojo
20:52 skaurus :)
21:54 ltriant joined #mojo
22:03 Htbaa left #mojo
22:40 ashleydev looking for a time based, persistant event queue server, any suggestions? ...(I'm building a web service that has calendars in it and want to give users the option of sending SMS/email alarms to them selves at the time they set in their calendar events)
22:41 ashleydev i'm thinking the queue should allow me to set certain events to show up at the time I set, and then the queue consumer could respond when those events show up in the queue at their proper time
22:41 ashleydev you guys use any queues that allow you to set time based delays on an item  in the queue?
23:11 su-bzero joined #mojo
23:15 su-bzero_ left #mojo
23:16 esskar_ left #mojo

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