Camelia, the Perl 6 bug

IRC log for #mojo, 2013-09-02

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

All times shown according to UTC.

Time Nick Message
00:05 dvinciguerra_ joined #mojo
00:48 shmuel joined #mojo
01:00 laouji joined #mojo
01:08 laouji_ joined #mojo
01:18 basic6_ joined #mojo
01:23 laouji joined #mojo
01:43 laouji joined #mojo
01:55 mohawk joined #mojo
01:55 phillipadsmith sri: what's your take, ember.js vs. angular.js? Interestingly, I built a simple Mojolicious::Lite + angular.js app last weekend to try it out.
01:56 sri undecided, i like both so far
01:57 sri tend towards ember.js now though, angular.js has some very rough edges
02:01 d4rkie joined #mojo
02:02 d4rkie joined #mojo
02:02 d4rkie joined #mojo
02:15 StinkfooT joined #mojo
02:16 hutong236 joined #mojo
02:19 hutong236 ....
02:33 russum joined #mojo
02:36 phillipadsmith sri: yah, the video was a little underwhelming on the angular.js side
02:36 phillipadsmith But the whole "this is Google's project" makes me want to like angular.js more
02:55 dotandimet joined #mojo
03:31 preflex_ joined #mojo
03:42 tempire bah
03:42 tempire backbone marionette
03:42 tempire better docs
03:48 laouji_ joined #mojo
04:00 tianon joined #mojo
04:36 dqw joined #mojo
04:50 hummeleBop joined #mojo
05:03 Meiermann joined #mojo
05:08 rem_lex joined #mojo
05:24 MeierM joined #mojo
05:42 basiliscos joined #mojo
06:33 yakudza joined #mojo
06:39 zakame joined #mojo
06:45 dpetrov_ joined #mojo
07:05 Vandal joined #mojo
07:07 dod joined #mojo
07:11 dod joined #mojo
07:13 basiliscos joined #mojo
07:14 arpadszasz joined #mojo
07:29 maxhq joined #mojo
07:31 trone joined #mojo
07:41 Dandre good morning
07:42 Dandre (2013-08-30 18:39:11) marty_: Dandre:  $app->routes->get('/')->rend​er(template=>'foo/welcome', message => 'Welcome');
07:42 Dandre I get this error: Can't use string ("foo/welcome") as a HASH ref while "strict refs" in use at /usr/local/share/perl/5.14.2/​Mojolicious/Routes/Pattern.pm line 65.
07:42 Dandre for reference:  http://pastebin.fr/28575
07:42 Dandre the first version works fine but not the second. Apparently the template is not found
07:47 Molaf__ joined #mojo
07:49 fhelmber_ joined #mojo
07:58 punter joined #mojo
08:03 basiliscos1 joined #mojo
08:08 aleksey left #mojo
08:13 * batman has upgraded Mojolicious and Mojo::Redis (thanks sri)
08:47 ruz Dandre: second version passes hash ref while it should be set of named args, eg hash
08:48 ruz basicly you hash ref is used as template naem
08:48 Dandre ruz, if I do: $app->routes->get('/')->rend​er(template=>'foo/welcome', message => 'Welcome'); I get the error shown
08:48 ruz may be I'm wrong
08:51 ruz I'm right it should be $app->routes->get('/')->rend​er(template=>'foo/welcome', message => 'Welcome');
08:52 ruz check logs
08:55 ruz wait a sec, I'm wrong you call render on a route
08:58 ruz Dandre: I'm not familiar with all aspects, but what you get after ->get('/') is a route object
08:58 ruz not a controller
08:58 mire_ joined #mojo
08:59 ruz you either dispatch it to a callback that does rendering
09:00 ruz ->to(cb => sub { shift->render(...)})
09:00 ruz or to a controller
09:01 ruz you don't have to write a controller, so it will be skipped and dispatched directly to a template
09:02 ruz ->to('foo#welcome', message => 'Wellcome');
09:06 arpadszasz joined #mojo
09:55 geira joined #mojo
10:13 trone joined #mojo
10:17 batman ja
10:17 batman oops!
10:20 wsri joined #mojo
10:20 marcus joined #mojo
10:20 batman joined #mojo
10:36 marcus joined #mojo
10:36 batman joined #mojo
10:36 wsri joined #mojo
11:00 rem_lex joined #mojo
11:03 mire_ joined #mojo
11:14 rem_lex|pivo joined #mojo
11:20 aleksey joined #mojo
11:51 d4rkie joined #mojo
11:55 asarch joined #mojo
12:14 denisboyun joined #mojo
12:15 maxhq joined #mojo
12:18 Dandre (2013-09-02 11:02:21) ruz: ->to('foo#welcome', message => 'Wellcome');
12:18 Dandre ok I'll try this
12:22 rem_lex joined #mojo
12:27 Dandre I get this error:
12:27 Dandre [Mon Sep  2 14:28:53 2013] [debug] Template "not_found.development.html.ep" not found.
12:33 Vandal its not an error
12:44 dqw joined #mojo
12:48 Dandre (2013-09-02 11:02:21) ruz: ->to('foo#welcome', message => 'Wellcome');
12:48 Dandre oups, sorry. I hadn't seen you put 'to' insteadof 'render'. putting 'to' works fine, thanks
14:00 gryphon joined #mojo
14:01 coff joined #mojo
14:02 coff Hi all.
14:02 coff Anyone have any hints to where to start debugging when a condition added with ->add_condition(---) is not being run?
14:02 dod joined #mojo
14:04 coff Have used $r->add_condition(mycond => sub { ... })   then   $r->get('/foo')->over(mycond => qr/somepattern/)->to('foo#bar');
14:09 Dandre how can I render with an empty in my custom renderer?
14:10 Dandre I have tryied to return ("","myformat") but this seems to hang somewhere
14:15 ryozi joined #mojo
14:20 coff So if anyone else asks: a condition will not be called if the condition has been added to a bridge. so my $br = $r->under(sub { .... }); $br->add_condition(cond => sub { ... }); $br->get('/foo')->over(cond => qr/pattern/)->to('foo#bar'); will not trigger the condition.
14:21 sri coff: you're using an ancient version of mojolicious, aren't you?
14:23 sri in anything newer than early 2012 you can't actually make that mistake
14:23 dsteinbrunner joined #mojo
14:26 coff @sri: yeah, I have been stuck at 2.23 for a little while. Migrating to a newer one very soon. :)
14:27 sri ewwww
14:27 coff Yeah. :) I know.
14:28 coff It'll be good to get over to a newer version. Hopefully you won't get as many 'wtf?' questions from me then.
14:29 coff Have a great day. *logging off*
14:32 denis_boyun joined #mojo
14:33 * sri wonders what would be a good name for a Mojolicious::Routes::Route method for calling shortcuts
14:34 sri to allow $r->lalala(foo => ...) instead of $r->foo(...)
14:35 nicomen so, the opposite of a shortcut?
14:35 * diegok can only think of too generic names :(
14:35 nicomen longcut? ;-P
14:35 nicomen detour?
14:35 sri already exists
14:36 sri something that fits the theme like $r->go(foo => ...)
14:36 nicomen what would foo typically be?
14:37 diegok get/post/patch
14:37 sri http://mojolicio.us/perldoc/Mojo​licious/Guides/Routing#Shortcuts
14:37 nicomen and what would the typical usecase be?
14:37 sri diegok: nope
14:37 diegok ah! :)
14:38 sri $r->with(resource => 'user')
14:38 nicomen woudl it only work for custom shortcuts?
14:38 sri all shortcuts are custom
14:38 dqw joined #mojo
14:38 nicomen yeah sorry, would only work for shortcuts, not existing methods
14:39 nicomen so, I guess when I normally use a shortcut, I "follow" it?
14:39 sri $r->follow(resource => 'user')
14:39 * sri tends towards ->with() atm
14:40 nicomen (other verbs that came to mind were: run, exec(ute), run_shortcut, path)
14:41 sri with can get in the way when you're playing with moose though
14:41 connor_goodwolf joined #mojo
14:41 sri follow is not bad
14:41 connor_goodwolf joined #mojo
14:42 nicomen 'via' could have worked, but then 'via' should be 'requested_as' or 'method'
14:42 nicomen just shortcut could work, it's a verb
14:42 nicomen and it's obvious
14:43 sri $r->by(resource => 'user')
14:43 nicomen </suggestions>
14:43 sri $r->through(resource => 'user')
14:43 nicomen under, over, via, with, by -- quite hard to know the differences without looking them up constantly
14:43 nicomen (hehe or thru)
14:44 sri most of them are rarely used though
15:06 mire_ joined #mojo
15:45 rem_lex|pivo joined #mojo
15:51 punter joined #mojo
15:52 Vandal joined #mojo
15:55 ladnaV joined #mojo
16:05 dqw joined #mojo
16:11 dsteinbrunner joined #mojo
16:27 bowtie_ joined #mojo
16:36 Vandal joined #mojo
16:43 ladnaV joined #mojo
16:46 D4RK-PH0ENiX joined #mojo
16:53 mire_ joined #mojo
16:55 denisboyun joined #mojo
16:56 arpadszasz joined #mojo
16:59 russum joined #mojo
17:01 trone A Mojo::UserAgent behaviour is different in a Mojolicious app vs standalone script ? In script is work as expected, in Mojolicious app it returns empty res->body. I have to use Mojo::IOLoop::Delay?
17:08 russum left #mojo
17:10 Vandal joined #mojo
17:10 dvinciguerra_ joined #mojo
17:11 d4rkie joined #mojo
17:29 ladnaV joined #mojo
17:34 punter joined #mojo
17:40 punter I made a Jabber server that uses Mojolicious: https://github.com/akarelas/KJabberd
17:43 moritz punter: if it starts with a "K", everybody will think it's a KDE project :-)
17:43 moritz punter: but it's way cool
17:43 punter Damn, it's a "Karelas" projecte
17:44 punter thanks
17:44 btyler joined #mojo
18:10 dod joined #mojo
18:13 basiliscos joined #mojo
19:00 punter joined #mojo
19:30 dotandimet joined #mojo
19:58 mire_ joined #mojo
20:46 rem_lex| joined #mojo
20:51 dotandimet1 joined #mojo
21:02 Liam`` joined #mojo
21:43 TitanOfOld joined #mojo
21:49 Liam`` joined #mojo
22:15 dvinciguerra joined #mojo
22:31 bluescreen joined #mojo
23:19 asarch joined #mojo
23:24 StinkfooT joined #mojo
23:41 dotandimet joined #mojo
23:48 russum joined #mojo
23:59 russum left #mojo

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