Camelia, the Perl 6 bug

IRC log for #mojo, 2013-03-26

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

All times shown according to UTC.

Time Nick Message
00:26 dabudabu joined #mojo
00:30 tagg joined #mojo
00:58 kthakore hullo
01:25 ka2u joined #mojo
01:26 d4rkie joined #mojo
01:35 zivester joined #mojo
01:54 asarch joined #mojo
02:05 duncanthrax joined #mojo
02:16 MeierM joined #mojo
02:28 l3l1p joined #mojo
02:34 GabrielVieira joined #mojo
03:05 l3l1p joined #mojo
03:18 preflex_ joined #mojo
03:20 bpmedley cfedde: Does Devel::NYTProf work for you?
03:29 rem_lex| joined #mojo
03:59 l3l1p joined #mojo
04:01 xaka joined #mojo
04:16 l3l1p joined #mojo
04:52 ka2u joined #mojo
05:24 mike_ joined #mojo
05:34 basiliscos joined #mojo
06:27 suy joined #mojo
06:30 wingfold joined #mojo
06:54 jamesw joined #mojo
07:00 wingfold joined #mojo
07:06 wingfold joined #mojo
07:09 dod joined #mojo
07:23 bjoernfan joined #mojo
07:26 duncanthrax joined #mojo
07:26 Vandal joined #mojo
07:28 wk joined #mojo
07:29 Vandal joined #mojo
07:37 wingfold joined #mojo
07:40 jzawodn joined #mojo
07:42 dod joined #mojo
07:47 dod joined #mojo
07:50 wingfold joined #mojo
07:56 eugen joined #mojo
07:58 dpetrov_ joined #mojo
08:02 suy joined #mojo
08:20 wingfold joined #mojo
08:20 coff joined #mojo
08:21 fhelmber_ joined #mojo
08:22 keedi joined #mojo
08:47 Meiermann joined #mojo
08:59 Averna joined #mojo
09:17 Averna joined #mojo
09:20 ask joined #mojo
09:27 wingfold joined #mojo
09:35 wingfold joined #mojo
09:35 wingfold joined #mojo
09:42 ObseLeTe joined #mojo
09:53 jpn joined #mojo
09:58 ver joined #mojo
10:02 Freman joined #mojo
10:07 bjoernfan joined #mojo
10:11 dod joined #mojo
10:22 wingfold joined #mojo
10:27 dod joined #mojo
10:31 mtths joined #mojo
10:35 ask joined #mojo
10:36 mtths joined #mojo
10:38 Britzel joined #mojo
10:40 bjoernfan joined #mojo
10:40 Meiermann joined #mojo
10:48 MeierM joined #mojo
10:55 arthas joined #mojo
11:00 bowtie joined #mojo
11:05 zdk joined #mojo
11:07 connor_g1odwolf joined #mojo
11:12 denisboyun joined #mojo
11:25 maxhq joined #mojo
11:37 dod joined #mojo
11:54 Molaf__ joined #mojo
11:56 maxhq joined #mojo
12:12 kmx joined #mojo
12:54 dod joined #mojo
13:02 Slatibart Hi, in template  %= form_for '/login'  would be possible to use a var like %= form_for '/login'.$variable or is this not possible ?
13:14 moltar joined #mojo
13:31 bluescreen joined #mojo
13:38 gryphon joined #mojo
13:51 mire joined #mojo
13:51 SmokeMachine joined #mojo
14:04 jberger Slatibart, if the question is just "can I use a variable here?" then yes of course, its just Perl
14:05 Slatibart thx, then I have find why i get an error message
14:06 jberger but you probably want to be using it more like url_for
14:07 jberger because you probably aren't constructing the url you think you are
14:08 Slatibart hmmm, how does that work with form_for ? Can that be combined ?
14:09 SmokeMachine joined #mojo
14:10 Slatibart I just want to create a route with variable information in the url . And using submit in the form. Or am I missing the point ?
14:12 Slatibart strange, with my second try I've got it working. thx
14:13 jberger %= form_for 'routename' => { stash_key => stash_value, ... }, ...
14:13 jberger glad its working :-)
14:16 wingfold joined #mojo
14:16 btyler joined #mojo
14:18 Slatibart funny, also working that way %=form_for '/update/' . $tld    where $tld is already in the stash
14:26 sh3 joined #mojo
14:26 jberger Slatibart, the "proper" way would be to do %= form_for 'update' => { tld => $tld }
14:27 jberger this generates a more portable url
14:27 jberger for simple cases its probably 6 vs half dozen
14:27 jberger when you get more complicated though, you might like this
14:27 jberger say when you have several stash values etc
14:29 Slatibart I see, but this create this kind of url /update/$tld or does this syntax { tld => $tld } do something else ?
14:30 jberger Slatibart, ok, lets start from the beginning
14:31 jberger say you have a route defined like /update/:tld
14:31 jberger its route name will be (by default) updatetld
14:31 jberger and it expects a stash value tld will be set during routing
14:32 Slatibart correct, have that route
14:32 jberger so now with url_for or form_for, you say, "generate a url that will match this route and set this stash value"
14:33 jberger so you would use form_for 'updatetld' => { tld => $tld} and you should get the url that would find its way to that route
14:33 jberger (in my first example, I had your route name incorrect btw)
14:34 Slatibart so mojo does some magic, and it will match in the end ? Guess I have to read the docs once more time again. that wasn't clear to me
14:37 jberger you should read more about url_for
14:37 jberger then form_for just uses url_for to make the url
14:39 Slatibart changed the code.working. thx !
14:44 jberger glad to help
14:45 jberger url_for is very cool. takes a while to get used to it, but when you do you'll be glad
14:50 vifo joined #mojo
14:51 vifo Hey folks, what is the proper way to use redirect_to in a controller? I am calling it, but my app still tries to render an appropriate template (which does not exist, since not needed).
14:55 marty vifo;  $self->redirct_to->('someurl'); return;
14:56 * marty waves good morning to everyone
14:56 jberger o/
14:57 sri \o
14:58 xaka joined #mojo
15:16 dod joined #mojo
15:17 memowe \o/
15:30 asarch joined #mojo
15:47 sh4 joined #mojo
15:48 tomi-ru joined #mojo
15:49 d4rkie joined #mojo
16:04 hesperaux_ joined #mojo
16:05 xaka joined #mojo
16:14 ajmrch joined #mojo
16:17 tl joined #mojo
16:33 wingfold joined #mojo
16:34 wingfold joined #mojo
16:39 labrown joined #mojo
16:40 sh3 joined #mojo
16:44 Vandal joined #mojo
16:46 mire joined #mojo
16:53 basiliscos joined #mojo
17:12 ZadYree I'm looking for a Mojolicious plugin list; is there something like that yet?
17:13 ZadYree said nothing: http://search.cpan.org/~sri/Mojolicious-​3.91/lib/Mojolicious/Plugins.pm#PLUGINS
17:14 ZadYree only native ones btw
17:14 ZadYree I wonder if there is a full list of community ones somewhere
17:20 basic6 joined #mojo
17:21 Vandal http://search.cpan.org/search?query=​Mojolicious%3A%3APlugin&mode=all
17:33 jpn joined #mojo
17:57 dod joined #mojo
18:00 sh3 joined #mojo
18:18 heytrav joined #mojo
18:20 moltar joined #mojo
18:22 vervain joined #mojo
18:23 denisboyun joined #mojo
18:26 dabudabu I've got a site that's written using Mojolicious and have to periodically send emails to users. It would be cool if I could generate these emails using Mojolicious' render_partial(), but my mailer is just a tiny background app and not a web app.
18:27 dabudabu Is there a way to use render_partial() in programs that aren't web servers?
18:39 anewkirk dabudabu, you could a) make the email a private page and access it programmatically b) look at the Mojolicious::Plugin::Mail
18:42 vervain joined #mojo
18:44 ajmrch joined #mojo
19:11 moltar joined #mojo
19:18 beyondcreed joined #mojo
19:22 bluescreen joined #mojo
19:26 dabudabu Hmm, I'm thinking of doing something like this: http://pastebin.com/47MQYE7j
19:26 dabudabu I can't get it to render from a template in an external file though
19:29 dabudabu (templates from the data section work)
19:37 btyler joined #mojo
19:40 marty dabudabu:  Your pastebin works here.
19:40 Caelum my before_dispatch hook isn't seeing the route captures
19:40 Caelum is there a way to have something like a before_dispatch hook that sees route captures?
19:42 mire joined #mojo
19:42 Caelum I suppose it's dispatch that sets that
19:43 marty Caelum:  you could try after_build_tx   It seems weird that before_dispatch does not work since it's emitted before the router does its work.
19:45 Caelum but it's the router that sets the captures in the stash/param isn't it?
19:46 sri it is
19:47 sri there is no hook that runs between matching routes and dispatching to actions
19:48 dabudabu marty: Ah, yes. Sorry. I wasn't experiencing any problems with that code. That was just my hackish solution to the problem I was talking about a little earlier.
19:48 sri also related http://groups.google.com/group/mojolicio​us/browse_thread/thread/d51a9c48d56e7185
19:50 * sri wanted to add routing hooks for a long time, but there have been no good proposals yet
20:36 nelio joined #mojo
20:44 lukep joined #mojo
20:49 xaka joined #mojo
20:49 GabrielVieira Hey guys, I'm breaking my head here.. I'm trying a simple application where I receive the UTF-8 content from a textarea, save to a txt file, then show this content back in the textarea. But no way I can handle the output encoding, strange chars instead of the uft8 ones. Tried opening and saving with :encoding(UTF-8), Encode, use utf8; html meta, but no success... Can anyone try a simple code and check if it works fine there? Regards.
20:53 * GabrielVieira thinking why he wrote 'regards' :)
20:56 GabrielVieira hum... don't need to save to a file.. just use a utf8 word in stash, this occurs
21:06 Caelum you need to save to some sort of persistent storage if you want to load it between requests
21:07 njlg joined #mojo
21:09 suy joined #mojo
21:11 GabrielVieira oh.. found.. the problem was in a code I use in after_dispatch
21:11 GabrielVieira thanks
21:22 BeDa joined #mojo
21:54 vervain joined #mojo
22:02 Meiermann joined #mojo
22:05 ka2u joined #mojo
22:27 vervain joined #mojo
22:50 sri neat, websockets with coroutines in python https://github.com/aaugustin/django-c10k-demo
22:51 preaction_ wow, nice
22:59 _xaka_ joined #mojo
23:08 sri those composable generators are pretty sweethttps://github.com/aaugustin/django-c10k-de​mo/blob/master/c10ktools/websockets.py#L42
23:11 jpn joined #mojo
23:12 hrupp_ joined #mojo
23:13 BeDa joined #mojo
23:15 BeDa joined #mojo
23:43 rem_lex|pivo joined #mojo
23:50 l3l1p joined #mojo
23:52 ka2u joined #mojo

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