Camelia, the Perl 6 bug

IRC log for #mojo, 2012-02-12

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

All times shown according to UTC.

Time Nick Message
00:13 ilbot2 joined #mojo
00:13 Topic for #mojo is now Mojolicious real-time web framework đź’ť http://mojolicio.us đź’ť http://irclog.perlgeek.de/mojo/today
00:14 augensalat joined #mojo
00:14 bzero joined #mojo
00:14 Netfeed joined #mojo
00:14 anparker joined #mojo
00:14 pierrick joined #mojo
00:14 fhelmber_ joined #mojo
00:14 auggy joined #mojo
00:14 slash24 joined #mojo
00:14 tempire joined #mojo
00:14 bobkare joined #mojo
00:14 kmx joined #mojo
00:14 y0j_- joined #mojo
00:14 ashleyde1 joined #mojo
00:14 elb0w__ joined #mojo
00:14 tty234 joined #mojo
00:14 phillipadsmith_ joined #mojo
00:14 jamesw joined #mojo
00:14 perlite joined #mojo
00:14 vervain joined #mojo
00:14 mattp joined #mojo
00:14 noganex_ joined #mojo
00:14 ki0 joined #mojo
00:14 jzawodn joined #mojo
00:14 kitt_vl joined #mojo
00:14 yko joined #mojo
00:14 marty joined #mojo
00:14 alnewkirk joined #mojo
00:14 Kulag joined #mojo
00:14 ccushing joined #mojo
00:14 xxtjaxx__ joined #mojo
00:14 cstamas_ joined #mojo
00:14 migo joined #mojo
00:14 geira joined #mojo
00:14 sven^ joined #mojo
00:14 sri joined #mojo
00:14 mmcleric joined #mojo
00:14 crab joined #mojo
00:14 ColonelPanic001 joined #mojo
00:14 Quai_ joined #mojo
00:14 kthakore joined #mojo
00:14 reyjrar_ joined #mojo
00:14 mike_ joined #mojo
00:14 Kovensky joined #mojo
00:14 garu joined #mojo
00:14 BinGOs joined #mojo
00:14 smpb joined #mojo
00:14 tardisx joined #mojo
00:17 keedi joined #mojo
00:17 jegade joined #mojo
00:17 janus joined #mojo
00:17 MisterHatt joined #mojo
00:17 preflex joined #mojo
00:17 memowe_ joined #mojo
00:17 elb0w joined #mojo
00:17 Kallisti joined #mojo
00:17 d4rkie joined #mojo
00:17 rhaen joined #mojo
00:17 xantus[] joined #mojo
00:17 chansen joined #mojo
00:17 al joined #mojo
00:17 sherr_ joined #mojo
00:17 hide joined #mojo
00:17 maluco joined #mojo
00:17 paul joined #mojo
00:17 marcus joined #mojo
00:17 Mad_Dud joined #mojo
00:17 stephan48 joined #mojo
00:17 pooka joined #mojo
00:17 robinsmidsrod joined #mojo
00:17 rafl joined #mojo
00:17 mikegrb_ joined #mojo
00:17 omega joined #mojo
00:17 diegok joined #mojo
00:17 purl joined #mojo
00:17 cxreg joined #mojo
00:17 tinx joined #mojo
00:17 ereslibre joined #mojo
00:17 dryman joined #mojo
00:17 jmmills joined #mojo
00:17 ruz joined #mojo
00:17 charsbar_ joined #mojo
00:17 nuba joined #mojo
00:17 DaTa joined #mojo
00:17 atrodo joined #mojo
00:17 hernan joined #mojo
00:17 junkpiano joined #mojo
00:17 gabiruh joined #mojo
00:29 l3l1p joined #mojo
00:33 GabrielVieira joined #mojo
01:12 gabiruh joined #mojo
01:12 junkpiano joined #mojo
01:12 rafl joined #mojo
01:12 chansen joined #mojo
01:12 rhaen joined #mojo
01:12 preflex joined #mojo
01:12 keedi joined #mojo
01:29 GabrielVieira joined #mojo
01:29 jegade joined #mojo
01:29 janus joined #mojo
01:29 MisterHatt joined #mojo
01:29 memowe_ joined #mojo
01:29 elb0w joined #mojo
01:29 Kallisti joined #mojo
01:29 d4rkie joined #mojo
01:29 xantus[] joined #mojo
01:29 al joined #mojo
01:29 sherr_ joined #mojo
01:29 hide joined #mojo
01:29 maluco joined #mojo
01:29 paul joined #mojo
01:29 marcus joined #mojo
01:29 Mad_Dud joined #mojo
01:29 stephan48 joined #mojo
01:29 pooka joined #mojo
01:29 robinsmidsrod joined #mojo
01:29 mikegrb_ joined #mojo
01:29 omega joined #mojo
01:29 diegok joined #mojo
01:29 hernan joined #mojo
01:29 atrodo joined #mojo
01:29 DaTa joined #mojo
01:29 nuba joined #mojo
01:29 charsbar_ joined #mojo
01:29 ruz joined #mojo
01:29 jmmills joined #mojo
01:29 dryman joined #mojo
01:29 ereslibre joined #mojo
01:29 tinx joined #mojo
01:29 cxreg joined #mojo
01:33 purl joined #mojo
01:51 yko joined #mojo
02:12 tholen joined #mojo
02:33 tempire holy net splits!
03:32 gabriel joined #mojo
03:32 mattp joined #mojo
03:32 tholen joined #mojo
03:32 purl joined #mojo
03:32 cxreg joined #mojo
03:32 tinx joined #mojo
03:32 ereslibre joined #mojo
03:32 dryman joined #mojo
03:32 jmmills joined #mojo
03:32 ruz joined #mojo
03:32 charsbar_ joined #mojo
03:32 nuba joined #mojo
03:32 DaTa joined #mojo
03:32 atrodo joined #mojo
03:32 hernan joined #mojo
03:32 diegok joined #mojo
03:32 omega joined #mojo
03:32 mikegrb_ joined #mojo
03:32 robinsmidsrod joined #mojo
03:32 pooka joined #mojo
03:32 stephan48 joined #mojo
03:32 Mad_Dud joined #mojo
03:32 marcus joined #mojo
03:32 paul joined #mojo
03:32 maluco joined #mojo
03:32 hide joined #mojo
03:32 sherr_ joined #mojo
03:32 al joined #mojo
03:32 xantus[] joined #mojo
03:32 d4rkie joined #mojo
03:32 Kallisti joined #mojo
03:32 elb0w joined #mojo
03:32 memowe_ joined #mojo
03:32 MisterHatt joined #mojo
03:32 janus joined #mojo
03:32 jegade joined #mojo
03:32 GabrielVieira joined #mojo
03:32 keedi joined #mojo
03:32 preflex joined #mojo
03:32 rhaen joined #mojo
03:32 chansen joined #mojo
03:32 rafl joined #mojo
03:32 junkpiano joined #mojo
03:32 gabiruh joined #mojo
03:32 noganex_ joined #mojo
03:32 ki0 joined #mojo
03:32 jzawodn joined #mojo
03:32 kitt_vl joined #mojo
03:32 marty joined #mojo
03:32 Kulag joined #mojo
03:32 ccushing joined #mojo
03:32 xxtjaxx__ joined #mojo
03:32 cstamas_ joined #mojo
03:32 migo joined #mojo
03:32 geira joined #mojo
03:32 sven^ joined #mojo
03:32 sri joined #mojo
03:32 mmcleric joined #mojo
03:32 crab joined #mojo
03:32 ColonelPanic001 joined #mojo
03:32 Quai_ joined #mojo
03:32 kthakore joined #mojo
03:32 reyjrar_ joined #mojo
03:32 mike_ joined #mojo
03:32 Kovensky joined #mojo
03:32 garu joined #mojo
03:32 BinGOs joined #mojo
03:32 smpb joined #mojo
03:32 tardisx joined #mojo
03:34 yko joined #mojo
03:34 vervain joined #mojo
03:34 perlite joined #mojo
03:34 jamesw joined #mojo
03:34 phillipadsmith_ joined #mojo
03:34 tty234 joined #mojo
03:34 elb0w__ joined #mojo
03:34 ashleyde1 joined #mojo
03:34 y0j_- joined #mojo
03:34 kmx joined #mojo
03:34 bobkare joined #mojo
03:34 tempire joined #mojo
03:34 slash24 joined #mojo
03:34 auggy joined #mojo
03:34 fhelmber_ joined #mojo
03:34 pierrick joined #mojo
03:34 anparker joined #mojo
03:34 Netfeed joined #mojo
03:34 bzero joined #mojo
03:34 augensalat joined #mojo
03:34 noganex joined #mojo
03:52 inokenty joined #mojo
04:02 alnewkirk joined #mojo
04:11 tempire sri:  Assuming a "has ua => sub { Mojo::UserAgent->new->ioloo​p(Mojo::IOLoop->singleton) };", is there a way to determine whether the app is a lite app from $self->ua?
04:28 tholen joined #mojo
04:31 tempire (from within the app)
04:31 tempire or, more accurately within a test.
05:07 mire joined #mojo
05:42 sri tempire: i don't understand
06:13 gabiruh joined #mojo
06:30 Foxcool joined #mojo
06:45 tempire damnit
06:45 * tempire has ssh fingerprint problems with heroku
06:49 preflex joined #mojo
06:52 GitHub4 joined #mojo
06:52 GitHub4 [mojo] kraih pushed 1 new commit to master: http://git.io/9RkCJg
06:52 GitHub4 [mojo/master] improved resileince of Mojo::IOLoop::Client - Sebastian Riedel
06:52 GitHub4 left #mojo
07:00 GitHub128 joined #mojo
07:00 GitHub128 [mojo] kraih pushed 1 new commit to master: http://git.io/BNyLTA
07:00 GitHub128 [mojo/master] better comment - Sebastian Riedel
07:00 GitHub128 left #mojo
07:04 Vandal joined #mojo
07:39 kaare joined #mojo
08:00 d4rkie joined #mojo
08:05 rafl joined #mojo
08:13 d4rkie joined #mojo
08:13 noganex joined #mojo
08:15 sri tempire: must be the NSA mitm-proxy
08:21 inokenty joined #mojo
08:44 black joined #mojo
08:52 * sri wonders if we need a rule against bad unit tests
08:53 tempire what's a bad unit test
08:53 sri http://groups.google.com/group/mojolicio​us/browse_thread/thread/87e22ccb79a9b78b
08:53 sri like the one proposed in this thread
08:53 sri it does a lot of weird shit
08:54 sri if something like that landed in core our 100% green status would be gone
08:54 inokenty joined #mojo
08:57 sri the fork is a pretty big red flag, but there's a lot more wrong with it that's not so obvious
08:58 tempire I'm not even sure what it does.  but the fork made my eyebrow raise
08:58 sri it in fact behaves differently between EV 4.04 and EV 4.11
09:04 omega joined #mojo
09:04 MisterHatt joined #mojo
09:52 mire joined #mojo
09:56 marcus moo
09:59 noganex_ joined #mojo
10:00 ki0 joined #mojo
10:08 sri woof
10:11 melmothX joined #mojo
10:14 tempire so
10:15 tempire are you ready for a preview?
10:16 tempire http://www.screenr.com/86Vs
10:17 stephan48 joined #mojo
10:18 memowe joined #mojo
10:20 * marcus is ready for some darkness.
10:22 marcus tempire: looks good.
10:22 marcus tempire: maybe cut some of the deploy waiting
10:23 tempire there's still several things to be worked out
10:24 tempire ssh keys for one
10:24 tempire and sometimes the push fails.
10:24 tempire for no other reason than to toy with me.
10:25 tempire the good thing is that it doesn't require the user to know git, only that it's installed.
10:25 tempire in fact, it doesn't interfere with any existing .git at all
10:26 tempire also, this will result in Net::Heroku being on cpan
10:26 tempire \o/
10:27 tempire hoping to get some insight from judofyr on Monday as to why the perl detection isn't always successful
11:19 sri woot
11:19 sri tempire++ # heroku commands… of course!
11:32 tempire I'm really happy with how it's turning out.
11:33 tempire It creates a git repo in a tmp dir, commits er'thing, and then pushes it.
11:34 tempire so the user doesn't have to worry about any configuration, and it doesn't interfere with any current repo/branch
11:46 Mad_Dud hi guys, do you recommend Config::Simple for mojo and storing mysql passwords, secret etc?
11:52 Mad_Dud Mojolicious::Plugin::Config ... damn you, guys ;-)
11:59 ki0_ joined #mojo
12:04 briang joined #mojo
12:08 memowe hellomojo
12:27 chansen joined #mojo
12:29 batman joined #mojo
12:57 sri this channel could use an op bot
13:06 baton8 joined #mojo
13:29 batman joined #mojo
13:58 d4rkie joined #mojo
14:10 exc joined #mojo
14:15 exc ALL GLORY TO THE HYPNOTOAD!
14:15 exc A lame question: Mojo::Server::Hypnotoad exec itself first when started to do clean start (that's what the comment says). What is exactly the benefit of the exec in this case? just asking
14:16 sri a clean start :)
14:16 sri higher chances of zero downtime upgrades succeeding
14:17 sri since it's in the upgrade state rigth from the start
14:18 sri if it can exec itself from the start then chances of big screwups are much lower
14:18 exc aaaaa, i see now! thank you so much :)
14:20 Andrei666 joined #mojo
14:21 alnewkirk joined #mojo
14:24 Andrei666 hey use the Mojo::UserAgent to get some info from an website
14:24 Andrei666 and my question is
14:25 Andrei666 i have the a href data like this
14:25 Andrei666 <a href="/company/byte-ventures" title="Byte Ventures">Byte Ventures</a>
14:25 Andrei666 is it possible to get only the href? only this bit "/company/byte-ventures" ?
14:26 sri yes
14:27 memowe $ mojo get mojolicio.us a attr href
14:27 memowe http://github.com/kraih/mojo
14:27 memowe ...
14:28 Andrei666 i've seen the last mojo cast about mojo user agent..
14:29 sri http://blog.kraih.com/mojolicious-​hack-of-the-day-web-scraping-with # you might enjoy this blog post
14:29 memowe $ perl -Mojo -E 'say g("memowe.de")->dom->at("a")->attrs->{href}'
14:29 memowe mailto:mail@memowe.de
14:29 memowe blog post > simple example
14:29 Andrei666 great
14:30 sri or the other thousand or so examples in the mojolicious documentation ;p
14:30 Andrei666 thx sri, memowe :)
14:31 melmothX joined #mojo
15:24 Andrei666 guys i'm still trying to get that href out
15:24 Andrei666 my code is like this
15:24 Andrei666 my $list = $ua->get($crunch_companies)->re​s->dom->html->find('#container #col2 .col2_table_listing li a');
15:24 Andrei666 which returns a list like this
15:24 Andrei666 <a href="/company/azur-soft" title="Azur Soft">Azur Soft</a>
15:25 Andrei666 <a href="/company/azure-interactive" title="Azure Interactive">Azure Interactive</a>
15:25 Andrei666 and so on
15:25 Andrei666 how can I get that href?
15:25 Andrei666 should I instantiate $list as a new Mojo::DOM object?
15:25 Andrei666 * Mojo :: DOM
15:26 Andrei666 something like this? my $href = Mojo :: DOM->new ($list); ?
15:26 sri ->at('[title="Azur Soft"]')->{href}
15:27 Andrei666 hmm
15:27 sri don't make it so complicated
15:27 Andrei666 ok..
15:27 Andrei666 the hing is ..
15:27 Andrei666 i won't always know the title
15:27 Andrei666 my list is huge..
15:27 Andrei666 about 247
15:27 sri then be creative
15:27 Andrei666 those are just 2 examples...
15:27 Andrei666 ok..?
15:28 sri Mojo::DOM is insanely flexible, if you have to hack around, you're prolly doing it wrong
15:28 Andrei666 i  guess..
15:30 memowe sri: is it intented to bypass the attrs method like that?
15:30 sri memowe: what do you mean?
15:30 Andrei666 if I do it like this      my $list = $ua->get($crunch_companies)->re​s->dom->html->find('#container #col2 .col2_table_listing li')->at("a")->attrs->{href};
15:30 Andrei666 i get
15:31 Andrei666 Can't locate object method "at" via package "Mojo::Collection" at  ...line 27
15:31 memowe I thought at(...)->attrs->{href} was "the right way to do it". Didn't know I'm supposed to access the href attribute directly.
15:31 sri memowe: attrs is the old way
15:31 memowe Ah, ok! :)
15:31 sri direct hash access is a newer feature, that actually uses attrs internally :)
15:32 sri Andrei666: http://mojolicio.us/perldoc/Mojo/DOM # you better read everything, including the linked classes
15:33 Andrei666 k, sri
15:33 Andrei666 thanks :)
15:33 memowe use overload '%{}' => sub { shift->attrs }
15:33 memowe I see...
15:34 memowe Nice feature!
15:34 purl nice feature is that you can get a SunPCI card to run Windows natively within the workstation itself.  So it's virtually a Sun WS and a nice gaming PC
15:35 sri stolen from beautiful soup :)
15:37 memowe It's magic.
15:37 memowe Not really, but feels like.
15:39 memowe FYI, I really like the PODRenderer plugin. It's so easy to display an app's documentation for first-time users.
15:39 memowe But what do you think about an option to disable the mojolicious bar?
15:40 sri that topic comes up every now and then, i'd rather keep the plugin minimal
15:40 sri after all the whole thing is just a big hack
15:40 sri topic = more options
15:41 sri not to mention that templates *will* change
15:41 memowe sri: maybe it is possible to "override" its template?
15:42 sri that would require a new renderer feature
15:42 sri (multiple root directories)
15:43 sri which i'm actually in favor of, but nobody wanted to hack on so far
15:43 memowe hmm...
15:43 memowe sounds complicated.
15:43 sri it is
15:43 sri but then you can have your easy template overloading
15:44 sri in a sensible way
15:44 sri i'm also totally ok with forks of the podrenderer plugin
15:45 sri but multiple renderer directories would be nice
15:45 sri don't even have to be exposed yet, just make the built-in templates go though the renderer
15:46 sri like that static dispatcher already works
15:47 memowe multiple root directories sounds useful for mounted apps, too.
15:47 sri mounted apps don't share a renderer
15:47 memowe ok?
15:47 memowe ok!
15:47 sri but it could be useful for plugins that want to bundle templates
15:48 memowe Like PODRenderer.
15:48 sri we could allow plugins to add their public/templates directories
15:48 sri ye
15:50 sri static dispatcher already can do that internally, renderer needs to learn
15:58 marcus ø
15:59 GitHub145 joined #mojo
15:59 GitHub145 [mojo] kraih pushed 1 new commit to master: http://git.io/G0WOLg
15:59 GitHub145 [mojo/master] removed a few lines of code from renderer - Sebastian Riedel
15:59 GitHub145 left #mojo
15:59 sri memowe: template_path() is kind of a problem
16:01 sri hope i'm not giving the impression that i'll implement it, because i won't ;p
16:02 sri i would be willing to do the cleanup work, exposing it to the public api, documentation for plugin authors… but not the grunt work :)
16:03 memowe hehe
16:04 sri allowing plugins to bundle templates would be pretty cool
16:06 memowe yes!
16:07 sri if you don't want to hack on it either it might be worth opening a wishlist ticket
16:08 sri actually doubt it's that much work, just a few strategically placed tweaks
16:09 memowe For me I think it's much work to deeply understand what's going on there.
16:09 memowe But if I find the time, I'm willing to invest it. :)
16:11 sri ticket!
16:11 sri imo it's a great task for getting into mojo development
16:22 GitHub106 joined #mojo
16:22 GitHub106 [mojo] kraih pushed 1 new commit to master: http://git.io/5ICf3A
16:22 GitHub106 [mojo/master] added tests for static_class stash value - Sebastian Riedel
16:22 GitHub106 left #mojo
16:22 sri memowe: well, you can actually already bundle templates and static files
16:22 sri but only in the DATA section
16:23 sri no overloading there though
16:34 sri memowe++ # https://github.com/kraih/mojo/issues/286
16:34 sri i've commented with possible solutions
16:36 memowe sri++
16:37 sri i think we actually already cache that data, so it might be quite easy :)
16:40 memowe What should the deprecated root accessor return from the roots array ref if it contains more than one element? The first or an error?
16:44 sri first
16:44 sri and for set i suppose it would replace everything
16:47 memowe Where is template_path cached?
16:47 sri $self->{templates} or so
16:48 memowe Hm, if your comments on that ticket is everything, I'll try it.
16:48 sri you might have to change the caching strategy if it's too slow
16:49 sri hash instead of array
16:49 memowe That would be the second step, I think.
16:50 sri of course
16:51 sri there are basically two steps you need to hack
16:51 sri handler detection (by file extension) and template_path()
16:55 sri time for pizza!
16:55 memowe Guten Appe!
16:56 sri danke
16:59 memowe :set ts=2 ...
17:05 melmothX joined #mojo
17:55 jwang joined #mojo
18:02 memowe sri: What should be returned from template_path if nothing could be found?
18:02 memowe I see the paths are checked for -r in template plugins.
18:02 memowe return undef?
18:10 memowe return undef?
18:10 memowe s/.*//
18:10 memowe #mousefocus
18:20 sri memowe: not sure
18:23 sri makes sense i suppose
18:23 memowe ok
18:23 sri undef is already a possible return value
18:24 sri on the other hand
18:24 purl ... this might all be a waste of bandwidth?
18:24 sri it kinda prevents sensible log messages
18:24 sri first root + $template_name might be better
18:25 memowe I think it breaks down to the question if it should return a possible template path or a valid template path.
18:25 sri atm it's possible
18:25 memowe That means first root + $template_name if it exists and if it doesn't (in the other)?
18:25 memowe No problem here, but feels strange.
18:25 sri huh?
18:26 * sri is confused
18:26 memowe Wait, phone...
18:26 sri first_root + $template_name if none exists
18:26 sri if one exists that one gets priority of course
18:28 sri let me check existing cpan modules
18:29 sri oh wow, tt renderer doesn't even use that
18:31 sri xslate doesn't use it either
18:31 sri neither does mason2
18:32 sri others don't even handle the normal undef case
18:33 sri i suppose first_root + $template_name is still a more sensible default
18:33 memowe OK, no problem.
18:34 memowe Works. :)
18:34 memowe But the caching thing is ugly atm:
18:34 memowe $templates = $self->{templates} = [ map {
18:34 memowe @{Mojo::Home->new->parse($_)->list_files}
18:34 memowe } @{$self->roots} ];
18:34 memowe quick'n'dirty. :)
18:35 sri eep
18:35 sri make it pretty!
18:35 memowe Give me some minutes.
18:36 sri btw. about deprecation
18:36 sri i think setting root() should only change the first array element
18:36 memowe No problem.
18:37 sri not so important though, can also be changed later on :)
18:45 memowe sri: this was my test: https://gist.github.com/1810171
18:45 memowe Any idea where I should put it?
18:46 sri t/mojolicious/multiroot_lite_app.t?
18:47 memowe OK!
18:47 sri i'll need it to test multiroot static files too anyway
18:47 memowe OK!
18:47 sri delete $t->app->renderer->{templates}; # that looks wrong
18:48 sri i don't think you need to test that it doesn't work before
18:48 sri just test that it works
18:48 memowe OK!
18:49 sri and start using more words!
18:50 sri oh, and don't you dare forget the futurama quote ;p
18:51 sri don't we have a better method name than ->roots btw.?
18:51 sri s/method/attribute/
18:52 memowe Quote: no problem
18:52 memowe roots: no clue
18:52 memowe more words: what do you mean? Are my comments to verbose?
18:53 sri "OK!" <- more words
18:53 memowe OK OK!
18:53 * sri was expecting another "OK!" and had a witty response prepared :(
18:54 memowe SORRY!
18:54 memowe :D
18:55 sri hmm… maybe $renderer->paths?
18:56 memowe OK! BETTER THAN ROOTS IS!
18:56 memowe sri: what about a {template => 1} hash?
18:57 memowe (#cache)
18:57 sri ?
18:57 sri oh
18:57 memowe You talked about replacing the array based template name cache
18:57 sri ye, that's an option
18:58 memowe But I don't know how to test performance differences.
18:59 sri render some template 1000 times?
18:59 sri $self->render('foobar') for 1 .. 1000;
18:59 memowe OK.
19:00 sri just guessing though
19:00 sri it kinda depends on how many templates you have
19:00 sri memowe: which one is less code?
19:00 sri if hash is easier to maintain it already wins
19:01 memowe I don't know. But I think the hash version would be prettier.
19:01 memowe I'll find it out now.
19:01 sri \o/
19:02 memowe I hope nobody else uses that cache.
19:02 sri huh?
19:02 sri it's 100% private
19:02 memowe "OK!" ;)
19:02 sri if it doesn't have an accessor it's private
19:04 sri i refuse to use ugly instance data like $self->{_templates}
19:04 sri makes no sense imo
19:05 * sri waves with pitchfork
19:10 memowe No, I don't think it's prettier. I thought something like if ($self->{seen_template}{foo}) would be nice, but you need to regex match them.
19:11 memowe That can't be faster.
19:14 sri aww
19:25 memowe sri: I'm sorry, need to go now. It works here and I uploaded it as a new branch in my fork. TODO: POD and your cleanup. :)
19:25 sri memowe: mind if i continue?
19:25 memowe please! :)
19:26 sri :)
19:27 sri oh noes
19:27 sri memowe: your quote already exists!
19:27 memowe oh noes!
19:29 memowe sri: looking forward to see what you did with it. cu!
19:29 sri memowe++ # i'm just cleaning up now
19:30 * sri waves
19:46 jwang joined #mojo
19:53 sri very easy cleanup :)
19:53 sri now i'll just make the built in templates use the new system and deprecate Mojolicious::Static->root
20:01 tempire $renderer->roots/root is a an accessor?
20:03 sri oh damn
20:04 sri i forgot something
20:04 sri built-in templates are special :S
20:04 sri they need to have a lower precedence than DATA templates
20:05 sri tempire: $renderer->paths, ->root is deprecated
20:05 tempire I just didn't like the array ref input, but if it's an accessor, I guess it has to be.
20:06 sri memowe: you might not be able to overload built-in templates after all :(
20:07 sri doesn't make the patch less valuable for *us* though
20:10 tempire MOJO_USERAGENT_DEBUG=1 is such a simple thing, but it makes M::UA better for client work than every library in every language.
20:12 tempire well, except for those libraries that have something similar.
20:12 tempire but it's still better :)
20:27 osprey_ joined #mojo
20:27 osprey_ hi
20:28 sri damn
20:29 sri there are more problems
20:29 osprey_ can somebody give a little tip how to set header (for eaxmple Referer) via post_form of ua?
20:29 sri render_static('../lib/MyApp.pl')
20:29 sri that doesn't work if we make an index of all static files
20:29 sri pretty much rules out multi directory support for static files
20:30 sri hmm
20:31 sri or i'm overthinking this
20:31 sri doh!
20:32 sri i'm stupid
20:34 tempire osprey_: append a hash ref on to the end of the post_form call
20:35 osprey_ tempire: last hash - header?
20:35 osprey_ jr
20:35 osprey_ ok
20:57 sri ok, got everything working with multiple paths :)
20:57 sri but memowe will be a little disappointed, since nothing changes for built-in templates and static files
21:16 GitHub135 joined #mojo
21:16 GitHub135 [mojo] kraih pushed 1 new commit to master: http://git.io/n7AkRA
21:16 GitHub135 [mojo/master] added support for multiple "templates" and "public" directories to Mojolicious (closes #286) - Sebastian Riedel
21:16 GitHub135 left #mojo
21:17 sri https://github.com/kraih/mojo/commit/00556​8f96e11121d748b1b6866c851779255287f#diff-9
21:17 sri test is a good example
21:18 sri plugins can just push another path on the list and files will get served
21:19 osprey_ ,  ?
21:19 purl i think , is always way low precedence or ugly
21:19 sri only works for renderers that support it though
21:19 osprey_ ,
21:19 sri most don't use the template_path() mechanism
21:19 osprey_ oops, sry, bad chat wind
21:26 osprey_ left #mojo
21:27 GitHub93 joined #mojo
21:27 GitHub93 [mojo] kraih pushed 1 new commit to master: http://git.io/4dHOIw
21:27 GitHub93 [mojo/master] fixed typo in Changes - Sebastian Riedel
21:27 GitHub93 left #mojo
21:30 rhaen ho ho ho
21:30 purl and a bottle of lube!
21:45 Kulag joined #mojo
21:46 sri think i'll write a recipe for a plugin with bundled assets later this week
21:48 sri http://mojolicio.us/perldoc/Mojolicious/Guides​/Cookbook#Making_your_application_installable
21:48 sri that one is already pretty close though
21:49 ruz sri: cool, asked that a few days ago
21:50 ruz sri: I have comment on request type detection (accept parsing)
21:51 ruz jquery sends 'Accept:application/json, text/javascript, */*; q=0.01'
21:52 ruz in Mojolicious/Types.pm you have 'has types' with map as hash
21:54 ruz I think there should be reverse map that allows to map multiple mime types to one canonic for Mojo name
21:54 ruz sri: will you accept a patch?
21:57 tempire I like the new recipe
21:57 tempire it's a good step to having ready-made web applications available on the cpans
21:57 tempire or was that already there?
21:57 tempire :s
21:58 tempire you know, each one of these recipes would make a decent blog entry
22:08 sri tempire: was already there ;p
22:09 sri new one will be similar
22:09 sri but for bundling assets with plugins
22:09 sri ruz: nope
22:09 tempire perloku thing fails more often than it succeeds.  :(
22:10 sri ruz: type detection has been dscussed for months, it is now frozen until we have gathered more experience with it
22:11 sri tempire: perlbrew/cpanm failing?
22:12 tempire I'm not even sure.  It fails on the git push
22:12 ruz sri: I don't mind it to stay experimental
22:12 sri ruz: not just experimental, it is basically frozen, no more changes in the near future
22:14 ruz :(
22:15 ruz ok, what should I use to say "does request expect JSON?"?
22:15 sri ruz: https://github.com/kraih/mojo/issues/237 # you should have spoken up there
22:15 tempire https://gist.github.com/1811126
22:16 tempire I don't see any way to get more debug output.  The "Heroku push rejected, no Cedar-supported app detected" is the only clue.
22:16 sri strange
22:17 sri https://github.com/zachwill/flask_heroku/issues/3
22:17 sri looks like it's not just you
22:19 tempire saw that…his solution seems to have been just to start over.
22:19 tempire I have a one liner that does it all in one shot, and it's intermittent.
22:19 sri oh
22:19 sri do you have .DS_Store files?
22:20 tempire no
22:20 tempire no finder involved
22:20 tempire my one liner (assumed makefile and Perloku file): or i in `heroku list`; do heroku destroy $i --confirm $i; done; rm -rf .git && git init && git add . && git commit -vm 'hello' && sleep 5 && RESTCLIENT_LOG=stdout heroku create -s cedar --buildpack http://github.com/tempire/perloku.git && git push heroku master
22:20 tempire removes all apps, removes .git, then creates repo, heroku app, and pushes.
22:21 sri hmm
22:23 sri ruz: you're welcome to open a new ticket, maybe one of the other core-devs gets interested
22:24 tempire here's what it should look like:
22:24 tempire https://gist.github.com/1811171
22:24 tempire note the portion at the bottom under #Relevant success
22:25 tempire The culprit seems to be this: https://github.com/tempire/pe​rloku/blob/master/bin/detect
22:25 tempire for whatever reason, it doesn't consistently detect Perloku properly
22:28 tempire on a possibly related note: the official ruby client is weird.
22:28 sri ruz: but make sure to address the concerns from the old ticket
22:28 tempire after it creates the app, it has a sleep 1 loop that detemintes whether it's created.
22:29 mire joined #mojo
22:29 tempire https://github.com/heroku/heroku/blob/​master/lib/heroku/command/apps.rb#L114
22:29 sri maybe a timing problem
22:29 tempire and that loop, to determine whether "create_complete?" is an http put
22:29 tempire https://github.com/heroku/heroku/bl​ob/master/lib/heroku/client.rb#L80
22:29 tempire !?
22:35 ruz sri: considering mentioned webkit bug and comments there, accept looks hardly reliable
22:36 sri that's why it has been discussed for months
22:37 tempire ruz: it's not sri that has to be convinced.
22:37 tempire you would need to mount a campaign
22:37 tempire the delegates the core developers
22:37 tempire *are the
22:38 * sri nods
22:38 tempire marcus is a socialist.  I'm a libertarian.  sri is a robot.  crab is a…crab I guess.
22:38 tempire good luck :)
22:38 * ruz is thinking about replacement for accept in his app
22:39 ruz not because of delegates, but cuz the header sucks
22:46 tempire ok, this is definitely something wrong with heroku.
22:46 tempire I just tried to push mojoexample heroku branch to a new heroku app and it fails
22:47 sri my bet is on timing issue
22:47 sri some hook that runs at an odd moment or so to check something that doesn't exist yet or so
22:47 sri or so
22:48 tempire the question is what it's waiting for
22:57 tempire is it rude to reopen a github issue?
22:57 sri i've been wondering about that too
23:28 sri hmm
23:28 * sri is also wondering how to make plugin assets more user friendly
23:29 sri maybe some methods in the Mojolicious::Plugin base class

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