Camelia, the Perl 6 bug

IRC log for #mojo, 2011-07-26

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

All times shown according to UTC.

Time Nick Message
00:11 GabrielVieira2 left #mojo
00:22 minimal left #mojo
00:32 Alias joined #mojo
00:40 * tempire begins downloading lion
00:40 * tempire waits
00:45 diego_k joined #mojo
00:45 diegok left #mojo
00:45 diego_k is now known as diegok
01:00 xaka left #mojo
01:09 jwang left #mojo
01:15 sri xantus[]: AnyEvent just works
01:16 minimalist joined #mojo
01:17 ispy_ joined #mojo
01:19 perlrocks Twitter: "For those that were asking, #anyevent now pretty much just works in #mojolicious. :) http://t.co/g9H7aVO #perl" --kraih http://twitter.com/kraih/status/95664570579955712
01:29 sri not sure why timers don't survive the hypnotoad fork
01:29 sri documentation says main EV loop has fork protection
01:30 sri there can also be a 1s delay due to the blocking accept mutex when your server is idle
01:30 sri otherwise it seems quite stable
01:31 henq left #mojo
01:36 xaka joined #mojo
01:42 arpadszasz joined #mojo
01:46 echosystm joined #mojo
01:47 echosystm whats the best way to share a $dbh among controllers?
01:47 echosystm i dont want to use an ORM
01:54 crab echo: http://toroid.org/ams/etc/mojolicious-db-handles
01:54 tempire or just make a helper
01:56 sri or use the plugin
01:56 echosystm where do you put config?
01:57 echosystm ie. dev/production db settings and so on
01:57 echosystm does mojo have a concept of environments like dancer etc. ?
01:57 sri http://search.cpan.org/~madcat/Mojolicious-Plugin​-Database-1.05/lib/Mojolicious/Plugin/Database.pm
01:58 sri of course we do, it's all in the documentation
01:58 sri we call it modes
01:59 sri http://mojolicio.us/perldoc/Mojolicious#mode
02:01 echosystm so to clarify
02:01 echosystm i use per-mode logic to load different config plugin instances: http://mojolicio.us/perldoc/M​ojolicious/Plugin/JsonConfig
02:01 echosystm yes?
02:02 sri why would you do that?
02:02 purl BECAUSE I CAN!
02:03 crab just create myapp.$mode.conf files
02:03 echosystm oh
02:03 echosystm ok
02:03 echosystm where do you put them?
02:09 echosystm nevermind :P
02:09 GitHub123 joined #mojo
02:09 GitHub123 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/90​d18be92fb018e17ccfd30618c57319f7909000
02:09 GitHub123 [mojo/master] improved documentation - Sebastian Riedel
02:09 GitHub123 left #mojo
02:10 crab sri: defined -> define
02:11 sri oh crap
02:11 crab and i'd suggest s/class that/class, which/ or "class, and they"
02:13 sri oh crab
02:13 GitHub159 joined #mojo
02:13 GitHub159 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/51​895a2bf3827cbcf39c299de64a45659f30ced6
02:13 GitHub159 [mojo/master] fixed typos - Sebastian Riedel
02:13 GitHub159 left #mojo
02:14 sri yea, the "which" sounds much better
02:29 crab "oh crab", huh? :-P
02:38 tholen42 joined #mojo
02:38 marty_ joined #mojo
02:39 tempire_ joined #mojo
02:40 omega_ joined #mojo
02:40 echosystm` joined #mojo
02:40 zakame_ joined #mojo
02:40 mspo_ joined #mojo
02:40 ka2u joined #mojo
02:42 sri ;p
02:42 sri maybe a typo, maybe not
02:43 k-man_ joined #mojo
02:44 * Kovensky wonders if there's a Mojo::IRC or sth equivalent
02:44 echosystm left #mojo
02:44 abra left #mojo
02:44 zakame left #mojo
02:44 mspo left #mojo
02:44 ka2u_ left #mojo
02:44 gabb left #mojo
02:44 marty left #mojo
02:44 elb0w left #mojo
02:44 tl left #mojo
02:44 omega left #mojo
02:44 garu left #mojo
02:44 tempire left #mojo
02:44 plu left #mojo
02:44 tempire_ is now known as tempire
02:46 gabb joined #mojo
02:46 elb0w joined #mojo
02:52 abra joined #mojo
02:58 echosystm` the $c->param method
02:58 echosystm` does that contain get/post parameters AND URI segments (ie. id in /blah/:id) ?
02:59 echosystm` how do you separate post parameters from get parameters?
03:01 echosystm` wait, found it
03:02 echosystm` ok i can see how to get only GET parameters, but how do you get only POST parameters?
03:22 echosystm` left #mojo
03:55 perlrocks Twitter: "/ Mojolicious reference to draw the CSV data - http://t.co/8Bf5I4b Introduction to Perl with sample code # perl # mojolicious" (ja) --perlcodesample http://twitter.com/perlcodesa​mple/status/95703748508254209
03:56 perlrocks Twitter: "Render CSV data / Mojolicious Reference http://t.co/8Bf5I4b # perl # mojolicious" (ja) --perlcodesample http://twitter.com/perlcodesa​mple/status/95703903110299649
04:27 plu joined #mojo
04:27 plu left #mojo
04:27 plu joined #mojo
04:33 jwang joined #mojo
04:39 crab body_params
04:39 purl body_params is body params only
04:40 crab no, purl, body_params is <reply>
04:40 purl okay, crab.
04:40 crab echosystm: how do you get only GET parameters?
04:44 perlrocks Twitter: "perlcodesample: / Mojolicious Reference http://bit.ly/nLNJLm CSV data to draw" (ja) --perlironman http://twitter.com/perlironm​an/status/95716125836443649
05:10 jwang left #mojo
05:10 koban joined #mojo
05:25 koban left #mojo
05:26 glick left #mojo
05:51 koban joined #mojo
06:10 arpadszasz left #mojo
06:24 Foxcool joined #mojo
06:25 perlrocks Twitter: "Mojocast #1: Fun with clouds! - Create your first Mojolicious web app http://t.co/VXHZYgk" --oroce http://twitter.com/oroce/status/95741413022629888
06:28 AmeliePoulain joined #mojo
06:48 baton8 left #mojo
06:49 xaka left #mojo
07:06 d4rkie joined #mojo
07:11 marcus gooood mornin
07:23 crab bloody lousy afternoon.
07:25 sugar joined #mojo
07:26 tabbi joined #mojo
07:26 tabbi left #mojo
07:30 perlrocks Twitter: "Nice! “@kraih: For those that were asking, #anyevent now pretty much just works in #mojolicious. :) http://t.co/ttymzys #perl”" --sharifulin http://twitter.com/shariful​in/status/95757822054244354
07:33 Alias left #mojo
07:37 arthas joined #mojo
07:39 preflex joined #mojo
07:43 preflex_ left #mojo
07:49 perlrocks Twitter: "Mojolicious-Plugin-PlackMiddleware 0.17 by JAMADAM - http://metacpan.org/release/JAMADAM/Mo​jolicious-Plugin-PlackMiddleware-0.17/" --cpan_new http://twitter.com/cpan_ne​w/status/95762753725272064
07:55 D4RK-PH0ENiX joined #mojo
07:55 d4rkie left #mojo
08:05 d4rkie joined #mojo
08:06 d4rkie left #mojo
08:06 D4RK-PH0ENiX left #mojo
08:06 d4rkie joined #mojo
08:12 Foxcool left #mojo
08:28 spleenjack joined #mojo
08:35 perlrocks Twitter: "@szabgab use Mojolicious!" --sharifulin http://twitter.com/shariful​in/status/95774193089642496
08:36 AmeliePoulain left #mojo
08:37 Foxcool joined #mojo
09:20 jamesw left #mojo
09:25 anaio left #mojo
09:31 jamesw joined #mojo
09:32 d4rkie left #mojo
09:37 crab in a lite app, how do you say $r->route('/:foo/bar', foo => qr/.../)?
09:44 omega_ is now known as omega
09:47 xxtjaxx_ crab: get '/:foo/bar' ?
09:50 arthas left #mojo
09:51 arthas joined #mojo
09:58 crab what about the qr part?
09:58 crab i mean, that's what my question was really about.
09:59 Alias joined #mojo
10:04 AmeliePoulain joined #mojo
10:17 perlrocks Twitter: "Awesome RT @kraih: For those that were asking, #anyevent now pretty much just works in #mojolicious. :) http://t.co/g9H7aVO #perl" --pedromelo http://twitter.com/pedromel​o/status/95799777333231616
10:22 sri crab: it's in the lite tutorial
10:25 depesz hm ... please direct to manual if necessary, but - does that mean that mojolicious is asynchronous? by "that" i mean the twitter msg about anyevent.
10:26 depesz and if yes - which parts are async? is there async DBI plugin or something like this?
10:26 sri at its core mojolicious has always been non-blocking
10:27 depesz sri: ok. what does that mean for page generation?
10:28 sri be more specific
10:28 depesz if I have get '..' => sub {} -> and this sub takes 2 seconds to do its work, during this time, this particular process cannot handle other pages?
10:28 sri of course
10:28 depesz of course cannot? or of course can?
10:28 crab can.
10:29 sri if you block that one process can not handle more requests
10:29 depesz ok. how can I write non-blocking request handler?
10:29 depesz any example?
10:29 plu do not block in it :)
10:29 sri just don't block
10:29 sri see tweet
10:30 crab depesz: e.g. ->render_later; create a timer or something that calls you back later
10:30 plu AnyEvent has some weird stuff for DBI where it forks and runs the expensive queries in the forked processes
10:30 crab depesz: and then render() a response when you're ready.
10:30 plu not sure I'd suggest to use that
10:30 crab depesz: http://toroid.org/ams/etc/​mojolicious-http-streaming has a sort of example (it was meant to be an example of something else, but it'll do)
10:31 depesz thanks. checking/reading.
10:31 crab (and sorry, when i said "can" above, i misread your question.)
10:32 crab plu: AnyEvent::DBI works fine, but it's very clunky to use
10:32 depesz will need to digest it for some time. and probably play with it.
10:33 crab i have an AnyEvent::Postgres, but i haven't finished/released it. unfortunately, there's no way to make it properly DBI compatible.
10:33 depesz it would be pretty interesting to have a pool of db connections running queries without blocking
10:33 sri just because we support a lot of non-blocking modules now doesn't mean you have to use it
10:33 plu :)
10:33 sri hypnotoad can be tuned very well for blocking code too
10:33 depesz but, if I understand correctly - using non-blocking page generation (for example, running db queries "in background") i can achieve higher concurrency using the same number of worker processes.
10:33 crab how? by increasing the number of workers, or something more?
10:34 crab depesz: of course.
10:34 purl Indubitably.
10:34 sri getting non-blocking right is actually really hard
10:34 depesz crab: dbd::pg actually supports async calls.
10:34 sri consider it an optimization for when you actually need to scale better
10:35 crab depesz: i know. in a fairly horrible way, and it's not anyevent based.
10:35 sri because things like the debug screen don't work with non-blocking code, development gets harder
10:35 depesz crab: why horrible? never played with it, so I can't really tell.
10:36 * sri is a little afraid newbies will now try async too early and have bad experiences
10:37 depesz sri: don't worry about me :)
10:37 sri i worry about all users ;)
10:38 crab depesz: DBI itself has no support for such a thing, so the implementation is a hack. to use, it's not so bad. but of course, it's forced to be more like polling than async.
10:39 depesz crab: thx.
10:40 crab depesz: i.e. while (!$dbh->is_done()) { do_other_stuff() } (though the function might actually be called pg_is_ready or something)
10:41 crab if nothing else in your code is doing async stuff, it's ok. but it would be much nicer if it played nicely with anyevent.
10:41 abra left #mojo
10:44 preflex_ joined #mojo
10:49 preflex left #mojo
11:05 d4rkie joined #mojo
11:27 sri interesting, the websocket api spec got binary support
11:27 sri wonder how we should handle that
11:31 sri guess using Mojo::Asset objects would make sense
11:37 spleenjack left #mojo
11:37 spleenjack joined #mojo
11:49 tabbi joined #mojo
11:49 tabbi left #mojo
11:51 kaare joined #mojo
12:01 dotan joined #mojo
12:05 koban left #mojo
12:08 koban joined #mojo
12:29 GitHub90 joined #mojo
12:29 GitHub90 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/f9​5a9d28eca8483c36b7208c5cc71bff2a782c29
12:29 GitHub90 [mojo/master] fixed a few typos - Sebastian Riedel
12:29 GitHub90 left #mojo
12:31 ispy_ left #mojo
12:32 abra joined #mojo
12:43 dekimsey joined #mojo
12:57 sri hmm, not sure if the resolver should be redesigned
12:59 sri making it a one time use throwaway object used only by Mojo::IOLoop::Client seems more correct
13:15 sugar left #mojo
13:17 sugar joined #mojo
13:17 crab i agree.
13:18 crab or, well. i dunno. i suppose there may be people who use it to look up things en masse.
13:18 sri they still can, just have to change their code a bit
13:20 sri Mojo::IOLoop->resolver does not seem right anymore
13:21 sri gonna experiment a bit
13:26 sri hmm, i'm really unsure
13:27 sri the current api is more user friendly, but not "correct"
13:27 ispy_ joined #mojo
13:34 tabbi joined #mojo
13:34 tabbi left #mojo
13:44 D4RK-PH0ENiX joined #mojo
13:44 d4rkie left #mojo
13:50 d4rkie joined #mojo
13:50 D4RK-PH0ENiX left #mojo
13:52 dotan left #mojo
13:53 AmeliePoulain left #mojo
14:13 amoore joined #mojo
14:26 ZadYree left #mojo
14:30 marcus I like users
14:30 stephan48 I hate users. they tend to break my apps
14:32 d4rkie left #mojo
14:39 xaka joined #mojo
14:39 koban left #mojo
14:41 anaio joined #mojo
14:54 Foxcool left #mojo
15:01 sugar left #mojo
15:05 sri yes they do
15:06 garu joined #mojo
15:15 anaio left #mojo
15:34 xaka left #mojo
15:41 phillipa1smith is now known as phillipadsmith
15:47 xaka joined #mojo
15:57 spleenjack left #mojo
16:10 amoore left #mojo
16:21 Alias left #mojo
16:35 crab why do i have so much email, dammit.
16:36 anaio joined #mojo
16:36 baton8 joined #mojo
16:42 anaio left #mojo
16:47 Kulag left #mojo
16:54 * sri mails crab some more lolcats
16:54 Kulag joined #mojo
17:04 anaio joined #mojo
17:18 crab delicious.
17:18 purl delicious is social bookmarks; most popular -> http://del.icio.us/popular/ or crazy or holy crap fmh is a (rich) nutcase or candy. candy is delicious
17:26 anaio damn, we need a language plugin
17:26 anaio ... no time to build it
17:35 crab what is a language plugin?
17:36 anaio crab, .. loads language translation files, allows you to reuse verbage and change text  based on language
17:37 yko anaio: have you seen Mojolicious::Plugin::I18n?
17:38 yko https://metacpan.org/module​/Mojolicious::Plugin::I18n
17:38 yko anaio: ^^^
17:38 yko looks like just what you need
18:13 crab hi yko.
18:13 * yko waves
18:15 perlrocks Twitter: "Mojolicious-Plugin-Authentication 1.18 by MADCAT - http://metacpan.org/release/MADCAT/Mo​jolicious-Plugin-Authentication-1.18/" --cpan_new http://twitter.com/cpan_ne​w/status/95920301912764416
18:25 anaio left #mojo
18:39 amoore joined #mojo
18:47 GitHub148 joined #mojo
18:47 GitHub148 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/af​b8ed8637dee625b0dc94a19116bf409033014b
18:47 GitHub148 [mojo/master] improved Mojo::IOLoop::Resolver efficiency - Sebastian Riedel
18:47 GitHub148 left #mojo
18:51 sri should be quite a bit faster
18:52 sri think i'll go with user friendly api here
19:01 crab git grep minimalistic|wc -l => 11
19:01 * crab grins
19:04 sri crab: i don't see the typo
19:04 crab module name
19:04 purl module name is probably not quite correct or registered in the module list
19:04 sri oh
19:04 sri you changed text flow though
19:05 sri in documentation i don't put multiple sentences on one line
19:05 crab >80char pod lines are ok?
19:05 crab wait, what? you mean you start every new sentence on a separate line?
19:06 sri ye
19:07 crab heh. i never noticed that.
19:07 GitHub74 joined #mojo
19:07 GitHub74 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/79​898d0ca01904d8d7939c8a8c64d8af5759a7d2
19:07 GitHub74 [mojo/master] fixed typo - Sebastian Riedel
19:07 GitHub74 left #mojo
19:20 sri https://github.com/kraih/mojo/pull/189 # thoughts?
19:24 crab i like it. very similar to what anyevent does internally (even the name "impl"). but it seems a bit verbose (other than the problems you point out). the commented-out bit can just be removed, of course.
19:25 crab i'd use Mojo::Loader and merge those three functions, and maybe rename factory() to something else
19:26 sri yea
19:26 crab and get rid of that @impls outside the function too
19:26 crab who is bfg?
19:26 purl well, bfg is Big Fucking Geal or the Big Friendly Giant. or Big Fscking Gun or Big Fscking Gut or a Big Fscking Grin
19:28 amoore left #mojo
19:29 sri even @_impls
19:30 sri that's beyond horrible
19:30 abra left #mojo
19:30 crab yes, that's what i meant
19:46 SmokeMachine joined #mojo
19:54 GitHub105 joined #mojo
19:54 GitHub105 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/09​814345fc7a8411c541f2da68beb662e1654dd1
19:54 GitHub105 [mojo/master] added experimental detect method to Mojo::IOWatcher - Sebastian Riedel
19:54 GitHub105 left #mojo
19:55 sri this way it even makes the code simpler
19:57 GitHub136 joined #mojo
19:57 GitHub136 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/9d​2b7b2b963324a8999d3f7f9c59f43dfd2182fa
19:57 GitHub136 [mojo/master] documentation tweaks - Sebastian Riedel
19:57 GitHub136 left #mojo
20:08 GitHub137 joined #mojo
20:08 GitHub137 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/f8​165f52482f2415120b6136bd1b72b576835bf8
20:08 GitHub137 [mojo/master] replace MOJO_POLL with MOJO_IOWATCHER in tests - Sebastian Riedel
20:08 GitHub137 left #mojo
20:08 crab excellent.
20:09 tabbi joined #mojo
20:09 tabbi left #mojo
20:16 GitHub107 joined #mojo
20:16 GitHub107 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/d5​af432768a7f85b48a667a1c3e7761851c0df0e
20:16 GitHub107 [mojo/master] made resolver a little more resilient - Sebastian Riedel
20:16 GitHub107 left #mojo
20:28 SmokeMachine left #mojo
20:41 perlite_ joined #mojo
20:41 metaperl joined #mojo
20:44 kaare left #mojo
20:44 perlite left #mojo
20:44 perlite_ is now known as perlite
20:58 tabbi1 joined #mojo
20:58 tabbi1 left #mojo
21:04 dekimsey left #mojo
21:05 SmokeMachine joined #mojo
21:24 SmokeMachine left #mojo
21:50 rhaen left #mojo
21:50 rhaen joined #mojo
21:51 rhaen mojojojo :)
21:53 rhaen well, well. I am looking into node.js. Glad I started with Mojo.
21:54 * sri waves
21:54 * rhaen waves back.
21:55 rhaen Some things in JavaScript are somewhat nice, however node just provides basics
21:55 rhaen Mojo is a full blown stack. puh..
22:03 metaperl left #mojo
22:57 sri well, the main feature is that it's javascript
23:02 j3nnn1 joined #mojo
23:09 ispy_ left #mojo
23:12 GitHub100 joined #mojo
23:12 GitHub100 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/7f​e99518dae5fa50c997d25365188a8015f3fed3
23:12 GitHub100 [mojo/master] release preparations - Sebastian Riedel
23:12 GitHub100 left #mojo
23:15 perlrocks Twitter: "Mojolicious 1.66 by SRI - http://metacpan.org/release/SRI/Mojolicious-1.66/" (ms) --cpan_new http://twitter.com/cpan_ne​w/status/95995714001317888
23:51 preflex joined #mojo
23:54 preflex_ left #mojo

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