The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2013-11-16

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

All times shown according to UTC.

Time Nick Message
00:26 btyler joined #mojo
00:31 punter joined #mojo
02:10 d4rkie joined #mojo
02:14 basic6 joined #mojo
02:34 good_news_everyone joined #mojo
02:34 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/S04y1Q
02:34 good_news_everyone mojo/master 532ed95 Sebastian Riedel: fixed recursion bug in Mojo::Reactor::EV where timers could run more than once
02:34 good_news_everyone left #mojo
02:42 duncanthrax2 joined #mojo
02:45 beyondcreed joined #mojo
02:54 howitdo joined #mojo
03:40 mfontani_ joined #mojo
03:54 jnbek joined #mojo
04:01 asarch joined #mojo
04:15 preflex_ joined #mojo
05:49 hesperaux_ joined #mojo
06:02 good_news_everyone joined #mojo
06:02 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Pd4b3g
06:02 good_news_everyone mojo/master 5578336 Sebastian Riedel: improved Mojo::DOM::HTML performance
06:02 good_news_everyone left #mojo
06:05 good_news_everyone joined #mojo
06:05 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/1lRZuw
06:05 good_news_everyone mojo/master f5bd2ac Sebastian Riedel: small optimization
06:05 good_news_everyone left #mojo
06:09 zad-perl joined #mojo
06:10 stephanj joined #mojo
06:26 kanishka joined #mojo
06:26 kanishka left #mojo
06:37 KindTwo joined #mojo
06:59 KindTwo joined #mojo
07:04 dotandimet joined #mojo
07:37 kanishka joined #mojo
07:58 dotandimet joined #mojo
08:35 iSlug joined #mojo
10:14 sh4 joined #mojo
10:18 dotandimet joined #mojo
10:41 dsteinbrunner joined #mojo
10:46 basiliscos joined #mojo
10:51 dotandimet joined #mojo
11:29 dotandimet joined #mojo
11:32 highflying joined #mojo
12:05 cfedde joined #mojo
12:17 hrupp joined #mojo
12:46 mire joined #mojo
13:34 dotandimet joined #mojo
13:53 basiliscos1 joined #mojo
13:57 batman sri: why dod you do (getgrnam($group))[2]) and not just getgrnam $group here: https://metacpan.org/source/SRI/Mojolicious-4.57/lib/Mojo/Server/Daemon.pm#L39 ?
14:03 basiliscos joined #mojo
14:20 batman *did
14:33 punter joined #mojo
14:36 sri dunno
14:38 good_news_everyone joined #mojo
14:38 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/ZA24IQ
14:38 good_news_everyone mojo/master 7842d0a Sebastian Riedel: another small optimization
14:38 good_news_everyone left #mojo
15:00 batman sri: fair enough :)
15:37 denis_boyun joined #mojo
15:56 athenot joined #mojo
16:06 * marty now understands why mongos should be a general proxy after researching mongodb replica set read preferences
16:26 denisboyun joined #mojo
16:28 rem_lex|pivo joined #mojo
16:35 basiliscos1 joined #mojo
16:35 sri yea, it's a bit messy
16:37 sri that kind of logic just doesn't belong in the client
16:41 sri although, i guess supporting read_preference would make sense already, since it works for sharded clusters with mongos
16:44 sri it's mostly just another field added to the query spec
16:45 sri seems a bit inconsistent though... figuring out all the different ways to pass it along and test it might be a bit tedious
16:47 sri would be funny though if mango supported it before the official client
16:56 marty mango leading  the pack.  I like it. \o/
16:56 d4rkie_ joined #mojo
16:56 marty I never paid much attention to the issue until  a situation for read preference came up.  but from reading the jira thread, sounds like it is a needed feature.
16:58 sri yea, but i guess most people that really need it will use sharding anyway
16:58 sri where it already works... which might be why the issue has a lower priority
16:58 marty yea.  sounds like it may make it into 2.7 or so
16:59 sri only doesn't work for pure replica-sets without sharding
16:59 marty ahhhh,  Did not know that
16:59 sri neither did i
16:59 marty I'm trying to stay away from sharding atm.
17:00 sri i have no need for sharding atm either... but read_preference tags do sound nice :)
17:00 marty agreed.   :)
17:01 sri i wonder if mongos knows which commands are read operations and which write
17:02 sri then the logic would be trivial... just have a $mango->read_preference(...) and put it into every query
17:03 marty ahhh, iteresting. I have no idea is mangos is that smart
17:03 marty interesting
17:04 btyler joined #mojo
17:05 rem_lex| joined #mojo
17:07 sri i was just about to start swearing after seeing this... https://github.com/mongodb/mongo-python-driver/blob/master/pymongo/read_preferences.py#L191
17:07 sri but then i remembered that they have to support normal replica-sets without mongos
17:08 sri mongos has to run commands on multiple shards... so it has to know about it too
17:14 d4rkie joined #mojo
17:28 punter joined #mojo
17:45 beyondcreed joined #mojo
18:31 sri i think you can actually just do $collection->find({foo => 'bar', '$readPreference' => {mode => 'secondary'}})
18:41 btyler is there a way to get mojo to talk to unix sockets? docker has a restful API running on a unix socket, trying to get mojo to talk to it in a nicer way than e.g. `docker images`, and the only cpan docker API client is an anyevent/LWP thing with all tests failing
18:42 sri don't think so
18:43 btyler ok, thanks
18:43 sri think it would bail when ->peerport and friends are called on the socket
18:45 sri otherwise you *can* pass an arbitrary file handle with a transaction to the user agent
18:47 russum left #mojo
18:48 russum joined #mojo
18:48 btyler ok, time to do some learning, that sounds promising. thanks sri
18:49 sri https://github.com/kraih/mojo/blob/master/t/mojo/websocket.t#L191
19:00 TitanOfOld joined #mojo
19:02 sri ah
19:03 sri it's $collection->find({'$query' => {foo => 'bar'}, '$readPreference' => {mode => 'secondary'}})
19:03 sri the "special" format
19:03 sri this is actually very trivial to add
19:04 sri and even test
19:07 TitanOfOld joined #mojo
19:13 Mike-PerlRecruiter_ joined #mojo
19:17 stephanj how can i use shortcuts in a lite app?
19:32 cooper joined #mojo
19:34 russum left #mojo
19:47 damaya joined #mojo
19:48 damaya I know this isn't exactly your territory or anything, but I've searched all over, asked on stackoverflow, and so on, and I have yet to find an answer
19:48 damaya I am trying to figure out with Firebug, or any other add-on, how to tell if my EventSource connection is still open.
20:01 jamesw joined #mojo
20:03 damaya One other question: In a mojo full app, where should I put my helpers?
20:05 damaya Ah
20:05 damaya lib/Helpers.pm
20:05 damaya got it
20:38 damaya Is it possible to make mojolicious log apache style?
20:39 damaya I ask because the sys admin would like for AWstats or whatever they are using to be able to parse the logs for my app.
20:45 denis_boyun joined #mojo
20:47 denis_boyun__ joined #mojo
20:56 rem_lex|pivo joined #mojo
20:56 denis_boyun joined #mojo
21:00 bowtie_ joined #mojo
21:09 denis_boyun_ joined #mojo
21:13 denisboyun joined #mojo
21:20 diegok damaya: http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Nginx
21:21 stephanj is it possible in a lite app to specify a folder for templates to search in(instead of templates/ i would like templates/bla/ as search path) for automatic template naming?
21:22 stephanj the shortcut problem i solved by using app->routes->shortcutname
21:26 diegok stephanj: http://mojolicio.us/perldoc/Mojolicious/Renderer#paths ?
21:31 stephanj i mean something like in full apps a controller does f.e. MyApp::Test would lead to templates/test/
21:32 denisboyun joined #mojo
21:42 damaya diegok, so in order to do this I have to use nginx?
21:42 damaya haha
21:43 damaya stephanj, MyApp::Test leads to lib/Test.pm
21:43 stephanj damaya: for templates?
21:45 damaya What I think you may want is something like: $app->renderer->paths->[0] = 'templates/test';
21:46 damaya diegok, why in God's name did you direct me to the cookbook for Nginx?
21:46 damaya I'm not asking if it is possible for Nginx or Apache to write Apache style logs (what moron would ask that?).
21:47 damaya I am asking if it is possible to formating Mojolicios logger to write Apache style logs.
21:47 damaya I.e., do it using my mojolicious app and hypnotoad.
22:11 marty sri++ on finding readPreference.  I'll setup a secondary and give it a try.
22:12 sri marty: it can only work with mongos
22:14 marty meh.  i guess I wont then.  :/
22:16 denis_boyun_ joined #mojo
22:19 sri i considered adding $mango->read_preference({mode => 'secondary'}) but couldn't get a test cluster running... gave up afterwards
22:20 marty lots of little things to remember when setting up replica sets
22:20 * marty wishes there were a gui for it
22:21 sri i generally use the test api
22:21 sri as in "> cluster = new ShardingTest({"shards" : 3, "chunksize" : 1})" from the mongodb shell
22:22 sri what i couldn't get working is each shard also being a 3 node replica-set
22:22 marty ya, that does sound tricky
22:22 sri which is supposedly something like "cluster = new ShardingTest({"shards" : 3, "chunksize" : 1, "rs": {"nodes": 3}})"
22:23 sri very underdocumented that stuff though
22:23 basiliscos joined #mojo
22:25 sri those test setups are pretty nice though
22:26 marty they look like it.  I didn't even know they existed.  but looks very compact.  would make testing fun.
22:27 sri you should get the mongodb book ;p
22:27 denis_boyun joined #mojo
22:28 sri actually get two books, definitive guide 2 and design patterns
22:30 sri replica-set and sharding chapters start with those test setups
22:30 * marty looks
22:31 asarch joined #mojo
22:36 denis_boyun__ joined #mojo
22:51 damaya joined #mojo
23:02 denis_boyun joined #mojo
23:10 denis_boyun__ joined #mojo
23:13 denisboyun joined #mojo
23:17 denis_boyun_ joined #mojo
23:21 denis_boyun___ joined #mojo
23:25 denis_boyun joined #mojo
23:28 denis_boyun__ joined #mojo
23:31 Zmodem joined #mojo
23:42 sri strange thing, sharded cluster without replica-sets sends back an error for a query with $readPreference
23:42 sri plain mongod doesn't appear to like it either, no error there though
23:46 denis_boyun joined #mojo
23:48 denis_boyun____ joined #mojo

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