Camelia, the Perl 6 bug

IRC log for #mojo, 2013-10-19

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

All times shown according to UTC.

Time Nick Message
00:13 russum joined #mojo
00:14 gtodd joined #mojo
00:27 basic6 joined #mojo
00:30 saurabh_abhishek joined #mojo
00:38 gryphon_ joined #mojo
00:51 Akron joined #mojo
01:04 dqw16 joined #mojo
01:05 zivester joined #mojo
01:09 gryphon__ joined #mojo
02:06 saurabh_abhishek joined #mojo
02:06 dqw16 joined #mojo
02:09 basic6_ joined #mojo
02:13 mire_ joined #mojo
02:23 dvinciguerra joined #mojo
02:52 kryptonite joined #mojo
03:03 saurabh_abhishek joined #mojo
03:24 rem_lex joined #mojo
03:30 saurabh_abhishek joined #mojo
03:30 saurabh__ joined #mojo
03:41 preflex_ joined #mojo
04:18 saurabh_abhishek joined #mojo
04:37 dqw16 joined #mojo
04:53 memowe_ joined #mojo
05:57 davido joined #mojo
06:36 rem_lex|pivo joined #mojo
06:37 memowe joined #mojo
06:38 bpmedley joined #mojo
06:40 gtodd joined #mojo
06:47 dbr joined #mojo
06:50 davido_ joined #mojo
06:56 Vandal joined #mojo
06:56 d4rkie joined #mojo
07:15 jpn joined #mojo
07:54 mire_ joined #mojo
08:00 dod joined #mojo
08:10 D4RK-PH0ENiX joined #mojo
08:12 denis_boyun joined #mojo
08:12 sh4 joined #mojo
08:13 batman https://github.com/blog/1661-mo​deling-your-app-s-user-session
08:30 dod joined #mojo
08:32 denisboyun joined #mojo
08:35 ryozi joined #mojo
08:38 saurabh_abhishek joined #mojo
08:47 basic6 joined #mojo
09:12 marty_ joined #mojo
09:15 basic6 joined #mojo
10:38 basiliscos joined #mojo
10:59 dqw16 joined #mojo
11:00 iSlug joined #mojo
11:00 iSlug Hi all
11:05 Vandal joined #mojo
11:21 JiYu joined #mojo
11:21 JiYu hi
11:22 JiYu what would be the best way to render a hashref as json? I am somehow stuck
11:22 sri o/
11:23 sri http://mojolicio.us/perldoc/Mojolici​ous/Guides/Rendering#Rendering_JSON
11:24 JiYu yeah i read it, but dont get it :) *facepalm
11:26 JiYu I got something like http://paste.frubar.net/15733 and want to render it as json, can I just pass the hashref to the render?
11:27 JiYu something like http://mojolicio.us/perldoc/Mojoli​cious/Guides/Rendering#Stash_data
11:29 JiYu but, e.g. $self->stash(domains => {$domain => $status}) gets always overwritten... I thought this will do the magic :)
11:35 hummeleBop joined #mojo
11:40 sawtooth JiYu: you can render as json - $self->render(json => $hashref);
11:41 sawtooth if putting it in the stash you can use Mojo::JSON in the template I guess..
11:42 JiYu oh, that looks to easy to be true, let me try... thanks sawtooth
11:43 sawtooth http://mojolicio.us/perldoc/Mojolici​ous/Guides/Rendering#Rendering_JSON
11:44 sawtooth as per sri ^^
11:44 * sawtooth goes to find coffee
11:51 crab maybe we should make things more difficult so as not to surprise people ;-)
12:05 sri +1
12:10 JiYu probably :)
12:10 JiYu and yes its working ;)
12:18 sh4|2 joined #mojo
12:28 denisboyun joined #mojo
12:29 punter joined #mojo
12:52 asarch joined #mojo
12:55 denisboyun joined #mojo
13:07 Mikey joined #mojo
13:10 KindTwo joined #mojo
13:10 denisboyun joined #mojo
13:12 Fatalnix joined #mojo
13:35 mtths joined #mojo
13:53 jomo joined #mojo
14:48 perlite joined #mojo
14:55 mire_ joined #mojo
14:56 bowtie_ joined #mojo
14:59 good_news_everyone joined #mojo
14:59 good_news_everyone [mojo] kraih pushed 2 new commits to master: http://git.io/UtBkaQ
14:59 good_news_everyone mojo/master c7e2af3 Uchiko: POD typo
14:59 good_news_everyone mojo/master d8f46b7 Sebastian Riedel: Merge pull request #550 from memememomo/master...
14:59 good_news_everyone left #mojo
15:04 sh4|2 joined #mojo
15:04 denis_boyun joined #mojo
15:05 jpn joined #mojo
15:11 perlite joined #mojo
15:13 perlite joined #mojo
15:14 sri am i the only who thinks this is horrible? https://github.com/moose/Moose/​tree/master/lib/Moose/Exception
15:19 perlite joined #mojo
15:19 sri that's about 200 .pm files :o
15:23 tianon and that's _just_ the Exceptions? o.o
15:34 bpmedley Is that slated for the next Moose release?
15:34 sri it's moose master, go figure
15:35 bpmedley They're turning Moose into an Elephant, it seems.  :(
15:39 crab you might be missing the fact that a moose is not exactly the smallest creature on earth
15:40 crab (purely from a zoological standpoint. i don't understand what's going on in that humongous directory of modules)
15:40 sri point taken http://www.history.com/images/media/slideshow​/teddy-roosevelt/theodore-roosevelt-moose.jpg
15:41 bpmedley It's a pun.
15:43 crab what's a pun?
15:44 bpmedley Sorry, very bad joke.
15:44 crab heh, no. i know what a pun is.
15:45 bpmedley Is there a minimalistic oo layer that is mostly Moose like with type checking?
15:46 sri http://imgs.xkcd.com/comics/no_pun_intended.png
15:48 crab bpmedley: aren't there many? mouse and ouse or something.
15:51 marcus crab: and moo and moe and whatever
15:52 crab cool
15:54 bpmedley Last I looked Mouse was a little out of date and Moo doesn't do type checking.  It seems Mouse was updated or I was remebering incorrectly - will look again.
15:55 sri Moo + Type::Tiny
15:58 bpmedley I think I looked at that and the syntax is different from Moose.  For example, subtype is different.
16:01 bpmedley However, it looks like Mouse does have type constraints.
16:06 denis_boyun joined #mojo
16:41 basiliscos joined #mojo
17:02 mire_ joined #mojo
17:05 gtodd bpmedley: Moo or even Mo :-)
17:06 tianon Mojo::Base <3
17:06 tianon type saftey is for Go <3
17:07 gtodd bpmedley: I think there is a thing called MooX::Types::MooseLike
17:07 gtodd which maybe is closer syntax wise
17:07 bpmedley gtodd: Will look, thx.
17:07 gtodd then there's p5-mop :)
17:07 gtodd hehe
17:53 marcus wasn't there another one tho?
17:57 hrupp joined #mojo
18:00 saurabh_abhishek joined #mojo
18:16 * sri just looked up rakudo exceptions for kicks https://github.com/rakudo/rakudo​/blob/nom/src/core/Exception.pm
18:16 sri far better way to manage them
18:16 sri still a bit on the verbose side i suppose
18:18 sri has lines really add up
18:19 * sri wonders if "has ($!foo, $!bar);" is a thing
18:19 marcus FROBS!
18:23 d4rkie joined #mojo
18:30 sri moritz: does that actually work in perl6?
18:32 moritz sri: yes
18:32 sri nice!
18:46 d4rkie joined #mojo
18:49 jnbek joined #mojo
19:15 Mike-PerlRecruiter_ joined #mojo
19:36 sri looks like it might be coming to p5-mop as well https://github.com/stevan/p5-mop-redux/issues/124
19:37 jpn joined #mojo
20:21 rem_lex| joined #mojo
20:32 SmokeMachine joined #mojo
20:36 trone joined #mojo
20:48 kmx joined #mojo
21:03 mire_ joined #mojo
21:16 perlite_ joined #mojo
21:25 k0xa joined #mojo
21:27 k0xa sri, is there a replace for 'on_start' function? I'm trying to test a SOCKS  snippet from https://groups.google.com/forum/​#!topic/mojolicious/GVBWEe-3aRs but it doesn't work (no sub 'on_start' found)
21:37 jberger_ joined #mojo
21:37 jberger_ o/
21:38 jberger_ imitation is the sincerest form of flattery right?
21:38 jberger_ https://metacpan.org/source/ADAMJS/Mo​jolicious-Plugin-Leafletjs-0.004/lib/​Mojolicious/Plugin/Leafletjs.pm#L50
21:38 jberger_ https://metacpan.org/source/JBERGER​/Mojolicious-Plugin-Humane-0.05/lib​/Mojolicious/Plugin/Humane.pm#L35
21:38 jberger_ I guess I'm glad I'm influencing people, but a hat tip would be nice
21:39 jberger_ its a weird thing to find your code when you are looking at the source of someone else's
21:40 jberger_ anyway, that said ... has anyone written or seen a file/snippet dependency manager system for Mojolicious?
21:42 jberger_ I have lots of plugins which need css or js snippets (or files) to be included, but they are implemented as helpers
21:42 jberger_ so the user must be sure to include the snippets, for which I provide another helper
21:42 jberger_ see: https://metacpan.org/module/​Mojolicious::Plugin::Humane
21:43 jberger_ but I can imagine a per-request singleton object which the plugins could use to request that a certain snippet be included
21:44 jberger_ I do this in ::Humane, but as I'm considering writing the same code (as ADAMJS does in his module) to do the same thing, I always start to think about another abstraction
21:46 jberger_ it would also prevent repeated parses of the response, for example if I used both my plugin and adam's it would dom-parse and append to the head tag twice
21:46 jberger_ which wastes cycles needlessly
22:28 dqw16 joined #mojo
22:55 good_news_everyone joined #mojo
22:55 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/LdasIw
22:55 good_news_everyone mojo/master 8fdf005 Sebastian Riedel: removed deprecated attrs method from Mojo::DOM
22:55 good_news_everyone left #mojo
22:56 sri jberger_: sounds useful
22:57 sri jberger_: dom parsing is really expensive, so in this case i might actually use a clever regex
22:59 sri no actually i wouldn't
23:00 sri auto inserting javascript is silly imo
23:00 sri you have a tag helper, that's more than enough
23:00 sri add it to your layout and your whole app gets it
23:05 basiliscos joined #mojo
23:16 dvinciguerra_ joined #mojo
23:45 asarch joined #mojo
23:49 punter joined #mojo

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