Camelia, the Perl 6 bug

IRC log for #mojo, 2012-11-09

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

All times shown according to UTC.

Time Nick Message
00:21 Molaf_ joined #mojo
01:06 laouji joined #mojo
01:18 Mike-PerlRecruiter_ joined #mojo
01:21 d4rkie joined #mojo
01:48 crab joined #mojo
02:02 lukep joined #mojo
02:10 daniel_ joined #mojo
02:37 amirite joined #mojo
02:40 lukep joined #mojo
02:54 amirite joined #mojo
03:09 gryphon joined #mojo
03:36 noganex_ joined #mojo
03:53 d4rkie joined #mojo
03:54 Averna joined #mojo
04:01 xaka joined #mojo
04:12 Adurah joined #mojo
04:28 Foxcool joined #mojo
04:36 Kulag joined #mojo
04:43 Kulag joined #mojo
04:54 Kulag joined #mojo
05:05 yakudza joined #mojo
05:11 * tempire back propagates
05:14 Drossel joined #mojo
05:27 mpgutta joined #mojo
05:38 sh4 joined #mojo
05:42 davido joined #mojo
05:58 amirite joined #mojo
06:02 jnbek^dt joined #mojo
06:05 davido joined #mojo
06:06 davido PerlMonks meditation: "Race Condition in Dancer" http://www.perlmonks.org/?node_id=1002848
06:07 davido Nothing terribly insightful, but perhaps peripherally interesting.
06:15 Kulag joined #mojo
06:20 amirite joined #mojo
06:28 amirite_ joined #mojo
06:29 Kulag joined #mojo
06:29 davido_ joined #mojo
06:30 Vandal joined #mojo
06:33 davido_ I was thinking of creating a plugin: Mojolicious::Plugin::DBIx::Connector, but I don't like the name.  Anyway, it would provide a connector object as an attribute, and a handle attribute that lazily instantiates from a connector object.  Probably also a helper to expose the handle.
06:36 spleenjack joined #mojo
06:37 amirite joined #mojo
06:38 plu joined #mojo
06:49 dpetrov_ joined #mojo
06:59 yakudza joined #mojo
07:05 marcus shit, I melted batman.
07:06 ver joined #mojo
07:07 dod joined #mojo
07:10 sri stop doing that
07:16 amirite joined #mojo
07:22 memowe joined #mojo
07:24 amirite joined #mojo
07:38 amirite_ joined #mojo
07:41 dod joined #mojo
07:49 amirite joined #mojo
08:00 amirite joined #mojo
08:14 amirite joined #mojo
08:17 fhelmber_ joined #mojo
08:23 Drossel joined #mojo
08:23 batman joined #mojo
08:32 Kulag joined #mojo
08:38 mire_ joined #mojo
08:57 dod joined #mojo
09:22 Averna joined #mojo
09:28 kitt_vl joined #mojo
09:32 jamesw joined #mojo
09:34 D4RK-PH0ENiX joined #mojo
09:44 Britzel_ joined #mojo
09:46 jpn joined #mojo
09:47 cosmincx joined #mojo
09:56 sr joined #mojo
10:06 pierrick joined #mojo
10:08 Adura joined #mojo
10:52 batman how do you do log rotation on the hypnotoad logs?
11:16 dabudabu joined #mojo
11:18 sri zero downtime restart
11:24 sri hmmm... my new macbook is taking a break in kazakhstan :o
11:25 ObseLeTe joined #mojo
11:35 Adura logrotate example config?
11:37 fhelmber_ joined #mojo
11:37 mire_ joined #mojo
11:47 arthas joined #mojo
12:05 ryozi joined #mojo
12:07 bluescreen joined #mojo
12:19 ObseLeTe joined #mojo
12:22 * sri hates html mail
12:23 sri that boundary post almost got an answer from me... but quoting html... no thanks
12:26 nicomen batman: re: logging, I remember having issues with apache on high load sites, rotatelogs wanted to restart apache to free filehandles etc. we ended up using cronolog, with some patches, piping to a command for logging
12:27 nicomen (with cronolog I fired an external command as a callback to clean up logdir and rotate: http://my.opera.com/devblog/blog/2011/08/16/​rotating-apache2-logs-with-improved-cronolog
12:27 nicomen (
12:27 nicomen but my point is, maybe it could make sense to allow this to happen from inside Mojo ;)
12:28 batman nicomen: well, i only need rotate for hypnotoad
12:28 nicomen so mojo never writes to a file?
12:28 nicomen just stderr or something being passed on?
12:28 batman so i've set up $app->log->path(...) but i would like to rotate that file each night
12:29 batman and i was wondering if there was a perl way to do that or if i needed a unix tool (which i don't know what is called) to do it
12:29 nicomen well rotatelogs works, but like I said you might need to restart your app/server to free opened filehandles, or else it will continue writing to the file you moved away
12:29 batman right
12:30 sri logrotation support in hypnotoad itself doesn't make much sense
12:30 nicomen you might want to look into a syslog system, that way you can easily make it log remotely, and you should be able to rotalogs the files without interfering
12:30 sri since we already have 3rd party loggers
12:31 batman sri: can you name one of the 3rd party loggers that you prefer?
12:31 sri i don't prefer any, but they exist
12:32 batman :)
12:32 nicomen I'm considering making a mod_dims replacement in for instance mojo, but not if something like that already exists, any suggestions. also does it make sense to fire up a perl webapp to do ad hoc resizing and caching of images?
12:40 cafe joined #mojo
12:46 d4rkie joined #mojo
13:09 sunson joined #mojo
13:12 sunson Do ua->get, ua->post, ua->post_form use Mojo::IOLoop? i.e., if my mojo app is inturn doing an ua->get(), will it block the app process?
13:13 ObseLeTe joined #mojo
13:17 Mike-PerlRecruiter_ joined #mojo
13:25 nic batman: on what platform do you want to rotate logs?  something unix-ish?
13:29 nic nm, just read back and it looks like you got your answers :)
13:32 amirite joined #mojo
13:38 asarch joined #mojo
13:42 nic What do people prefer...?   "myapp.pl clear_errors" vs "myapp.pl clear errors"
13:42 pravus batman: I've been using Log::Log4perl (there's even a MojoX module for it).  It has built-in rotators, etc.  I've also been using 'logrotate' on some machines.
13:42 sr joined #mojo
13:42 ajmrch joined #mojo
13:43 pravus i prefer 'myapp -E', myself :)
13:45 nicomen nic: do you have other stuff to clear?
13:45 nic nicomen: possibly
13:46 nic yeah, i'm leaning towards the second version, even if it's slightly more cumbersome to write
13:46 nicomen then I guess it makes sense to have a command with an argument like one of your suggestion
13:46 nicomen s
13:47 nicomen if it's only errors that can be cleared, I'd go for the first one
13:47 nic yeah, and 'clear' might be less useful.  Going with your logic, mabye 'reset' is more useful cos it's more generic
13:47 nic myapp reset stats
13:47 nic myapp reset cache
13:47 nicomen you could even go for a ./app_clear_errors and base swich functionality based on $0 (argv[0]) ;-)
13:59 ajmrch joined #mojo
14:01 batman pravus: ok. thanks :)
14:01 batman nic: redhat or something. not sure :P
14:01 fhelmber_ joined #mojo
14:03 nic batman: personally I'd go with logrotate -- nice and simple and maintainable
14:03 batman ok. thanks
14:04 nic with logrotate you just need to know whether your writer can switch to a new file
14:04 pravus The problem with logrotate is that you need to close/re-open the log filehandle during rotation.
14:05 nic pravus: I disagree
14:05 pravus logrotate can signal your program to do this, though.
14:05 nic logrotate has two modes
14:05 pravus Why do you disagree?  That's just the way *nix works.
14:06 nic if the writer can't be told to reopen then logrotate has to use the slow mode, which is poor on high-volume sites
14:06 nic but with things like hypnotoad you just use the post-rotate hook
14:07 pravus Yeah, like I said you have to set logrotate up to signal your logger to re-open the log files.
14:07 amirite joined #mojo
14:07 pravus That's not always easy to do.
14:07 nic there are times when that's not easy?
14:07 pravus It depends entirely on how the software was written.
14:07 pravus If it doesn't have a way to be signaled, how do you signal it?
14:08 nic you don't, you use the other mode
14:08 pravus What other mode?
14:08 nic if your writer can't be signalled then you shouldn't be using it on a high-volume site
14:08 nic the slow mode
14:09 pravus What does it do, copy the contents of the log and then trunc it?
14:09 nic yep
14:09 pravus I don't consider that a solution.
14:10 nic if you're in a situation where that's not a solution, you've been doing it wrong ;)
14:13 nic ie you were using a bad choice of writer
14:15 nicomen haha, we already had that discussion in layman terms, with the same conlusion
14:18 pravus left #mojo
14:23 nic diegok: I'm a bit bothered by the resque model of having ->perform() be a class method
14:23 nic I can't think of a way of having that concurrency-safe
14:29 gryphon joined #mojo
14:35 Kulag joined #mojo
15:04 sri hmm
15:04 sri starting to wonder if this whole recipe should be removed... https://github.com/kraih/mojo/pull/412
15:04 sri it's just meant to be fun... but some people seem to be taking it too serious
15:25 good_news_everyone joined #mojo
15:25 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/DYpl1A
15:25 good_news_everyone mojo/master b513934 Sebastian Riedel: improved performance of contains method in Mojo::Asset::File significantly
15:25 good_news_everyone left #mojo
15:26 xaka joined #mojo
15:33 knshaum joined #mojo
15:36 diegok nic: don't know if I'm following...
15:37 diegok nic: perform is just a namespaced function...
15:46 nic diegok: Currently MyClass::perform
15:46 sr joined #mojo
15:46 nic I'm wondering if it needs to be (for me) MyClass::new->perform
15:46 nic was just wondering how you avoid concurrency problems
15:50 mire_ joined #mojo
15:53 Foxcool joined #mojo
15:56 d4rkie joined #mojo
16:01 kvorg joined #mojo
16:13 Caelum joined #mojo
16:27 dod joined #mojo
16:34 yakudza joined #mojo
16:36 Ulti https://github.com/pmurias/rakudo-js  might be cool for a future mojolicious on perl6, one compiler and language for the client and server side
16:40 good_news_everyone joined #mojo
16:40 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Kg422g
16:40 good_news_everyone mojo/master 6075ec1 Sebastian Riedel: fixed offset bug in Mojo::Asset::File
16:40 good_news_everyone left #mojo
16:43 labrown joined #mojo
16:47 Kovensky why a "backend for rakudo" :(
16:47 Kovensky it'd be more useful as a backend for Parrot
16:57 sri parrot is dead
16:58 good_news_everyone joined #mojo
16:58 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/xHLN2A
16:58 good_news_everyone mojo/master 148c956 Sebastian Riedel: fixed another small offset bug in Mojo::Asset::File
16:58 good_news_everyone left #mojo
16:58 sri from what i hear multiple backends for nqp is the future so parrot can't hold back rakudo anymore
17:03 ruz joined #mojo
17:12 inokenty joined #mojo
17:14 Kulag joined #mojo
17:15 good_news_everyone joined #mojo
17:15 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/uVT0kg
17:15 good_news_everyone mojo/master 602adb3 Sebastian Riedel: simplified non-blocking Mojo::UserAgent recipe in cookbook (closes #412)
17:15 good_news_everyone left #mojo
17:15 sri i'm tired of the web crawler discussion and just want it to go away
17:16 nic ...crawl away
17:19 * sri crawls away
17:26 dross joined #mojo
17:44 dross joined #mojo
17:58 cafe_ joined #mojo
18:26 batman joined #mojo
18:28 sri marcus: do something with http://www.rethinkdb.com :)
18:29 sri looks like what i hoped riak would be
18:29 cafe__ joined #mojo
18:48 sr joined #mojo
18:58 cafe_ joined #mojo
19:21 good_news_everyone joined #mojo
19:21 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/f-m9bw
19:21 good_news_everyone mojo/master c247d64 Sebastian Riedel: documentation tweak
19:21 good_news_everyone left #mojo
19:30 sh4 joined #mojo
19:34 cafe__ joined #mojo
19:34 yakudza joined #mojo
19:41 cafe_ joined #mojo
20:13 sh4|2 joined #mojo
20:15 cafe__ joined #mojo
20:21 * tempire looks at rethinkdb
20:28 tempire doesn't install on osx
20:28 * tempire loses interest
20:30 sri it doesn't have secondary indexes yet either
20:30 sri but the architecture is cool
20:32 rem_lex|pivo joined #mojo
20:46 asarch joined #mojo
20:54 batman i like the name.
20:54 batman that's all i got :)
21:02 njlg joined #mojo
21:14 xaka joined #mojo
22:11 jwang joined #mojo
22:52 jzawodn joined #mojo
23:11 Miked joined #mojo

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