Camelia, the Perl 6 bug

IRC log for #mojo, 2013-05-26

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

All times shown according to UTC.

Time Nick Message
00:00 basic6 joined #mojo
00:04 mrphilov joined #mojo
01:01 tempire huh
01:02 tempire when did helpers stop being accessible from the app context?
01:09 hesperaux_ joined #mojo
01:12 tempire doh
01:12 tempire nevermind
01:14 jberger I was just checking
01:14 jberger perl -Mojo -E 'app->helper( hi => sub { say "hi" } ); app->hi;'
01:14 jberger <3 ojo
01:15 sri mojo eval -v 'app->dumper(["works!"])'
01:15 sri :)
01:15 ispy_ joined #mojo
01:56 Meiermann joined #mojo
02:17 btyler joined #mojo
02:35 whitebook joined #mojo
03:12 asarch joined #mojo
03:34 fildon_ joined #mojo
03:34 russum joined #mojo
03:37 russum2 joined #mojo
03:53 preflex_ joined #mojo
04:10 sri tempire: you need this! http://i.imgur.com/ZPMfKhC.gif
05:14 basiliscos joined #mojo
05:42 dotan joined #mojo
05:49 Britzel_ joined #mojo
06:05 sh3 joined #mojo
06:15 KindOne joined #mojo
06:49 hesperaux__ joined #mojo
06:58 hrupp_ joined #mojo
07:09 rem_lex|pivo joined #mojo
07:39 marcus joined #mojo
07:48 jzawodn joined #mojo
08:04 Vandal joined #mojo
08:22 sh3 joined #mojo
08:27 marcus that is pure awesome
08:42 dod joined #mojo
08:57 basiliscos joined #mojo
09:07 dod joined #mojo
09:44 sh4 joined #mojo
09:50 Vandal joined #mojo
10:16 sh4 joined #mojo
10:22 mrphilov joined #mojo
10:45 abra joined #mojo
11:48 maxhq joined #mojo
11:54 moltar joined #mojo
12:24 reneeb joined #mojo
12:25 jakir joined #mojo
12:28 jakir Hello everyone. Is it possible to change the inactivity timer for one action?
12:42 basic6 joined #mojo
13:02 dhg joined #mojo
13:21 asarch joined #mojo
13:39 DaTa joined #mojo
13:42 jakir1 joined #mojo
13:46 mire_ joined #mojo
13:47 bpmedley joined #mojo
13:49 fhelmber_ joined #mojo
13:51 bpmedley_ joined #mojo
13:57 fhelmbe__ joined #mojo
14:05 whitebook joined #mojo
15:45 rihegher joined #mojo
15:46 rihegher left #mojo
15:57 HtbaaPi sri: I'm getting an 'Use of uninitialized value $p in concatenation (.) or string at C:/strawberry/perl/site/lib/Test/Mojo.pm line 166' when using json_is() like ->json_is('/id' => $id);
15:57 HtbaaPi description shouldn't be required right?
15:59 HtbaaPi hmm even with description it doesn't make a difference
16:06 asarch joined #mojo
16:11 rihegher joined #mojo
16:11 rihegher left #mojo
16:14 whitebook joined #mojo
16:26 jberger HtbaaPi, which mojo version?
16:26 jberger $p is the pointer, i.e. '/id'
16:49 whitebook joined #mojo
17:01 sri ARRESTED DEVELOPMENT!!!
17:08 fhelmber_ joined #mojo
17:28 dod joined #mojo
17:31 HtbaaPi jberger: 4.07
17:35 HtbaaPi ugh, my bad
17:35 jberger I was going to say, it doesn't seem possible
17:35 HtbaaPi have found the cause
17:35 jberger just bc I'm curious what was it
17:35 HtbaaPi json_is(undef)... for checking empty response :S
17:36 jberger hmmmm, that still doesn't seem right
17:37 jberger $p should end up being '' still
17:37 jberger but still probably best to frame that test a different way
17:38 HtbaaPi doing json_is('') works for me as well
17:43 jberger oh, you're right!
17:58 sh4 joined #mojo
18:08 sri umm
18:08 sri json_is('') is a horrible hack
18:09 sri no response is not valid json
18:09 sri in fact, i might consider this a bug later on and break it
18:09 HtbaaPi content_is('') instead? status code is 204 which dictates no content
18:10 sri yes
18:10 inokenty left #mojo
18:10 HtbaaPi changed to content_is() instead :-)
18:13 sri status_is(204) is enough though, like you said, it can't have a body
18:14 jberger I should say, my comment of "you're right" was from the standpoint of the code, '' would populate $p and undef would not
18:14 HtbaaPi sri: indeed, but who stops me or someone else from adding content to it when drunk? :-)
18:17 sri HtbaaPi: Mojo::UserAgent
18:17 sri https://github.com/kraih/mojo/bl​ob/master/t/mojo/response.t#L769
18:18 sri the content will not be accepted under any circumstances
18:18 sri it's just leftovers in the buffer
18:19 sri of course Mojo::Server::Daemon will also intervene and prevent you from sending a body... so you will have to hack around that as well
18:19 HtbaaPi hmm so if content would be set, the is_status(204) check would fail because of it?
18:19 HtbaaPi oh, that's cool. Wasn't aware of that
18:19 HtbaaPi awesome
18:21 sri perl -Mojo -E 'a({data => "ohoh!", status => 204})->start' get / -v
18:21 HtbaaPi that would also simplify my tests, or at least shorten them a bit :-)
18:22 sri the feature is mostly there so you don't have to care about HEAD requests, they are just handled as GET
18:23 HtbaaPi but in this case shouldn't Content-Length be set to 0 as well?
18:23 HtbaaPi the response still reports 5
18:23 sri nope
18:24 HtbaaPi in case of HEAD yes, but GET as well?
18:26 reneeb_ joined #mojo
18:29 tempire yes.
18:29 tempire yes I do.
18:31 tempire eventemitter needs to support namespaces
18:31 sri you mean ->on('foo.*' => sub {...}) ?
18:31 tempire yes
18:31 sri considered it, but it's quite expensive
18:33 sri dealing with different arguments kinda sucks too though
18:34 sri if ($self->event eq 'bar') {...} elsif ($self->event eq 'baz') {...}
18:34 sri or rather foo.bar and foo.baz
18:36 tempire I guess my problem is that I wanted to emit mything:error and mything:success
18:36 tempire but then I have to clean up the other listener that wasn't emitted
18:36 tempire so I just have to have 'mything'
18:37 * sri is not a fan of splitting that up in two events
18:37 sri my preference is $err as first argument still
18:39 sri on(finish = sub { my ($self, $err, $whatever) = @_ })
18:40 sri actuallt not sure i've ever done that for events ;p
18:40 sri just callbacks
18:43 sri my error and finish events are usually not exclusive
18:43 tagg joined #mojo
18:43 bpmedley Does anyone else not get hypnotoad "Permission denied" error messages when trying to attach to port 80 as non-root?
18:43 bpmedley https://gist.github.com/anonymous/5653658
18:48 tempire hmm
18:48 tempire $err as the first argument seems to result in less code
18:48 * tempire accepts it suspiciously
18:49 sri http://mojolicio.us/perldoc/Mojo/IOLoop#client
18:49 sri it's a mojolicious idiom
18:49 tempire yeah, I remember the conversations
18:50 sri Mango uses it for everything
18:50 sri http://mojolicio.us/perldoc/Mango/Cursor#next
18:52 sri it's not events though
18:53 sri although, if my only events were error and success, which only get emitted once, i would rethink my api design
18:54 tempire I originally was thinking thing:error:type_of_error
18:54 sri oh my
18:54 tempire for the sake of keeping everything separate
18:54 sri you architecture astronaut!
18:55 sri although, it's a fun way to do exception handling i suppose
18:55 tempire it seems good from single concern perspective
18:55 tempire but in practice, first param as error is fine
18:56 sri if only perl errors were nicely classified objects
18:56 tempire I toyed with this a while ago: https://gist.github.com/tempire/3518374
18:57 tempire return error object that evaluates as false in boolean context
19:04 sri oh, nostarch does 100 page books now too http://nostarch.com/perloneliners
19:16 BeDa joined #mojo
19:29 bpmedley left #mojo
19:39 damaya joined #mojo
19:45 jakir joined #mojo
19:58 tempire it's strange that map returns an array instead of a list
20:03 mrphilov joined #mojo
21:07 btyler joined #mojo
21:46 whitebook joined #mojo
21:53 perlite joined #mojo
21:55 lukep joined #mojo
22:20 Averna joined #mojo
22:31 Akron joined #mojo
22:34 maxhq joined #mojo
22:36 hesperaux_ joined #mojo
23:12 hesperaux_ joined #mojo
23:42 btyler joined #mojo
23:44 whitebook joined #mojo
23:45 jmmills joined #mojo
23:51 whitebook joined #mojo

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