Camelia, the Perl 6 bug

IRC log for #mojo, 2013-04-03

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

All times shown according to UTC.

Time Nick Message
00:02 jberger app->plugins->unsubscribe('before_dispatch')
00:03 jberger which would unsubscribe from all before_dispatch hooks, but from my simple check it seems to be the only one
00:07 jnbek joined #mojo
00:07 al802 so in this case I want to unsubscribe a specific plugin
00:07 priodev joined #mojo
00:08 al802 also there is another header I want to remove and it's the server identifier "Server:"
00:08 al802 I did not check yet, but I assume that is using a simular method
00:09 jberger I think you misunderstand what a "plugin" is
00:09 jberger its just a wrapper for some code which might otherwise be written in your startup method
00:09 jberger look at the source for Mojolicious::Plugin::PoweredBy
00:09 jberger its really simple
00:09 al802 yes I did
00:09 al802 I would prefer it did not register
00:10 al802 so I was thinking it should be unregistered
00:10 jberger all it does is add a hook handler, so unsubscribe from that handler
00:10 jberger as to never subscribing in the first place, I'm not sure exactly where that happens
00:10 jberger but I assume its before the startup method is called
00:11 al802 how will it know to unsubscribe that specific plugin
00:11 jberger again, you don't unsubscribe from a plugin
00:12 sivoais joined #mojo
00:12 jberger the plugin subscribes to a hook
00:12 al802 yer, but that's the problem, I did not (I don't think so) ask for this plugin to be loaded
00:14 jberger https://metacpan.org/source/SRI/Mojo​licious-3.91/lib/Mojolicious.pm#L83
00:14 jberger the plugin is registered before it calls startup
00:14 al802 that's correct I just check that
00:15 jberger purely out of curiosity, is there some reason not send the powered-by header?
00:16 al802 well 2, I'm trying to optimize what get's sent, and second, for security, I would prefer not to identify the server as my app will be a target
00:18 jnbek joined #mojo
00:19 al802 so currently, I issue $self->app->res->headers->remove('Server'); and $self->app->res->headers->remove('X-Powered-By'); for every request which is really just wasting cycles
00:20 sri plugins that get loaded automatically are considered built-in functionality, you're not supposed to "unload" them
00:20 sri only reason they are implemented as plugins is so they can be examples
00:23 al802 if I register another helper of the same name, would that override the existing ones ?
00:45 shmuel joined #mojo
00:48 xaka joined #mojo
00:53 Averna joined #mojo
01:02 tagg joined #mojo
01:06 jpn joined #mojo
01:10 d4rkie joined #mojo
01:10 d4rkie joined #mojo
01:17 Molaf__ joined #mojo
01:21 hesperaux joined #mojo
01:31 ka2u joined #mojo
01:39 xaka joined #mojo
01:39 moltar joined #mojo
01:52 D4RK-PH0ENiX joined #mojo
01:55 sivoais joined #mojo
02:06 whitebook joined #mojo
02:44 whitebook joined #mojo
02:56 whitebook joined #mojo
02:59 preflex_ joined #mojo
03:14 mattastrophe joined #mojo
03:29 Gedge joined #mojo
03:39 Meiermann joined #mojo
03:54 MeierM joined #mojo
04:09 shmuel joined #mojo
04:56 ka2u joined #mojo
05:02 ver joined #mojo
05:10 jb360 joined #mojo
05:29 basiliscos joined #mojo
05:29 denisboyun joined #mojo
05:43 Britzel_ joined #mojo
05:48 d4rkie joined #mojo
05:56 ver joined #mojo
06:09 dod joined #mojo
06:13 ver joined #mojo
06:30 dpetrov_ joined #mojo
06:39 dod joined #mojo
06:52 Meiermann joined #mojo
06:54 Vandal joined #mojo
07:11 dod joined #mojo
07:27 marty_ joined #mojo
07:31 basiliscos joined #mojo
07:36 jpn joined #mojo
07:38 bzero sri: I run M::Lite application with daemon command. How to change accept_interval?
07:50 cstamas joined #mojo
07:51 jzawodn joined #mojo
08:03 shmuel_ joined #mojo
08:04 fhelmber_ joined #mojo
08:47 alnewkirk joined #mojo
08:58 nelio joined #mojo
08:59 rem_lex|pivo joined #mojo
09:01 avkhozov joined #mojo
09:05 avkhozov Hello everyone!
09:06 avkhozov Someone used the plugin Mojolicious::Plugin::Process? There is some feedback? Or may be there are similar modules?
09:06 avkhozov https://github.com/hayajo/Mojolicious-Plugin-Proc​ess/blob/master/lib/Mojolicious/Plugin/Process.pm
09:07 nic you have to be suspicious of stuff that hasn't made it to metacpan
09:08 suy joined #mojo
09:09 nic hmm, I look forward to playing with that
09:51 bowtie joined #mojo
10:10 Akron joined #mojo
10:16 rem_lex| joined #mojo
10:20 denisboyun joined #mojo
10:22 Akron Sometimes I'm still totally confused by IOLoops and non-blocking request - how can I make this test stop - or better, how should I modify the helper to make the IOLoop stop after testing? Test-Code: https://gist.github.com/Akron/545b7263569b33093611
10:39 Britzel joined #mojo
10:41 rem_lex| joined #mojo
10:41 bowtie joined #mojo
10:41 suy joined #mojo
10:41 avkhozov joined #mojo
10:41 alnewkirk joined #mojo
10:41 fhelmber_ joined #mojo
10:41 jpn joined #mojo
10:41 Meiermann joined #mojo
10:41 ver joined #mojo
10:41 priodev joined #mojo
10:44 denisboyun_ joined #mojo
10:46 stephan48 joined #mojo
10:47 Akron I updated the minimal case: https://gist.github.com/Akron/545b7263569b33093611
11:10 GabrielVieira joined #mojo
11:33 maxhq joined #mojo
11:33 Gedge joined #mojo
11:44 mire_ joined #mojo
11:57 wingfold joined #mojo
12:04 Gedge joined #mojo
12:11 whitebook joined #mojo
12:11 jberger Akron: https://gist.github.com/jb​erger/6460c9d1017a267ff451
12:11 jberger sri can probably phrase it better since I'm still trying to wrap my head around the terminology of non-blocking
12:12 jberger but simplistically, Test::Mojo expects to be run essentially in a blocking style, so if you start the IOLoop you need to stop it again when you are done
12:12 jberger see for example the code for websocket_ok
12:13 jberger which of course must be non-blocking, so it starts the IOLoop but then stops it again in the callback
12:13 jberger https://metacpan.org/source/SRI/Moj​olicious-3.91/lib/Test/Mojo.pm#L297
12:13 Akron jberger: Oh - thank you very much! Well ... hmm.
12:14 jberger your code is fine with the stop commands added I think
12:15 Akron You mean, the Problem is the get_ok method of Test::Mojo?
12:19 Akron So essentially the helper code is fine?
12:25 jberger I think so?
12:25 jberger I think the problem is that the Test::Mojo methods expect the loop stopped
12:29 sri Akron: i'm afraid the code is not fine, calling start/stop directly won't work at all, for portable helpers you use delays
12:30 Akron sri: Thank you - do you have an example code for an async helper with delays?
12:30 sri with the built-in servers, the event loop is always running
12:31 Akron I see. Hm.
12:31 sri there is nothing special about helpers
12:31 sri just use the examples that say they work in a running event loop
12:32 sri http://mojolicio.us/perldoc/Mojolicious/G​uides/Cookbook#Parallel_blocking_requests # second example
12:32 denisboyun joined #mojo
12:33 Akron sri++ Thank you!
12:34 sri the point of "$delay->wait unless Mojo::IOLoop->is_running;" is to make sure the helper works with environments such as CGI and PSGI where no event loop is running at all
12:36 Kripton joined #mojo
12:37 jberger Akron: why the "undefine useragent" line?
12:37 moltar joined #mojo
12:37 sri use Mojo::IOLoop; my $running = Mojo::IOLoop->is_running; Mojo::IOLoop->timer(3 => sub { say "DONE!"; Mojo::IOLoop->stop unless $running }); Mojo::IOLoop->start unless $running;
12:38 sri that is basically the only way to do start/stop portably
12:39 sri but even for one event delays are simpler
12:41 jberger updated: https://gist.github.com/jb​erger/6460c9d1017a267ff451
12:42 Akron I've now got https://gist.github.com/Akron/545b7263569b33093611
12:43 sri both are fine
12:43 * sri likes the Akron version more
12:43 d4rkie joined #mojo
12:43 mire_ joined #mojo
12:43 jberger I almost did exactly that
12:44 Akron jberger++ Thanks! The UA thing was just by experience ... I found out that the connection wasn't properly disconnected without ... now there seems to be no problem with it anymore. Now, that I am doing it correctly. ;)
12:44 Akron Great! Thank you both!
12:44 sri with CGI/PSGI it would just block for a bit and work too now
12:45 sri but don't do "$|++;" ;p
12:46 Akron I nearly always put it on top of my files when I'm confused with the normal output ... What is wrong in that case?
12:47 bzero sri: I run M::Lite application with daemon command. How to change accept_interval?
12:51 doby left #mojo
12:51 nicolaas joined #mojo
12:52 sri Akron: at least localize it
12:53 Akron sri: Ah, yes. Sure.
12:53 Akron That's a good advice. Thank you.
12:54 denisboyun_ joined #mojo
12:55 doby joined #mojo
12:57 sri also, $| is bound to the currently selected file handle, so i prefer STDOUT->autoflush(1)
12:58 sri for mojolicious apps you don't really know how the server loading your app has modified the environment
12:59 Akron Hm. That's true.
12:59 * Akron goes through his test suites and deletes some $|++s ...
13:17 D4RK-PH0ENiX joined #mojo
13:20 good_news_everyone joined #mojo
13:20 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/R3XEIQ
13:20 good_news_everyone mojo/master 4ad06cc Sebastian Riedel: JSON Pointers are now RFC 6901
13:20 good_news_everyone left #mojo
13:20 sri \o/
13:24 bluescreen joined #mojo
13:29 jb360 joined #mojo
13:55 gryphon joined #mojo
14:01 jberger sri++, early adopter!
14:02 jberger is there a typo on page 4 of the RFC?
14:03 jberger in the examples:
14:03 jberger ""           // the whole document
14:03 jberger and
14:03 jberger "/"          0
14:03 jberger seems to me those are flipped
14:03 sh4 joined #mojo
14:04 jberger (https://tools.ietf.org/html/rfc6901#section-5)
14:06 jberger OH
14:07 jberger no it means that my test suite is buggy
14:08 jberger https://github.com/jberger/Gali​leo/blob/master/t/basic.t#L106 should not use the pointer '/' but ''
14:11 jberger sri: I think Mojo::JSON::Pointer has a bug
14:12 jberger and it might be "breaking" old behavior so I guess it should be for 4.0
14:13 jberger $p->get({foo => 'bar'}, '/') should be undef
14:13 jberger $p->get({foo => 'bar'}, '') should be the whole document
14:13 jberger according to the rfc
14:15 * jberger moves to another computer, expects to be jberger_
14:16 jberger_ joined #mojo
14:21 sri jberger: if it's a bug it's a bug
14:22 sri there is no need to wait for 4.0
14:22 Akron json pointers weren't experimental before?
14:22 sri they were experimental by nature
14:22 sri how can something be stable if the spec is still in the works? :)
14:22 jberger_ true
14:23 Akron I mean declared as "may change without warnings".
14:23 Akron The implementation in mojo.
14:23 sri we've not used those in a long time
14:25 sri the json pointer / is not compatible with perl then i guess
14:25 sri or actually it is
14:26 Akron Is the example json document valid with Mojo::JSON?
14:26 Akron I mean {"": 0} ... looks weired.
14:27 Akron Or is this just ignored?
14:27 jberger_ yeah, I'm porting the examples to an array of tests
14:28 btyler joined #mojo
14:28 sri just be aware that we only support the fragment identifier form
14:31 sri i'm working on tests too btw
14:32 jberger_ you're welcome to do it if you want
14:32 jberger_ I
14:32 jberger_ I was going to, but I really should be working on my thesis
14:33 jberger_ be sure to ping me if it gets released, I'll need to push a new release of Galileo
14:33 jberger_ actually I was working on the other form and it seems to work
14:34 jberger_ the JSON string representation
14:34 jberger_ (other than the broken case)
14:35 jberger_ sri: I'm confused, does the URI Fragment Identifier Representation have the leading #
14:36 jberger_ should Mojo::JSON at least strip that if present?
14:36 sh3 joined #mojo
14:38 GabrielVieira joined #mojo
14:38 jberger_ https://gist.github.com/jberger/5301776
14:38 sri jberger: if in doubt, look at the ABNF
14:39 jberger_ gist is what I had before you mentioned fragment ident form
14:39 jberger_ seems to work
14:42 btyler_ joined #mojo
14:44 jberger_ oh, I see, if a key was really named '/c%25d' it would get decoded
14:44 sri the examples have bugs too
14:47 sri when Mojo::JSON::Pointer started there was only the fragment identifier form
14:51 mire_ joined #mojo
14:52 jberger_ the bug in the examples is %22 -> %27 ?
14:53 jberger_ updated https://gist.github.com/jberger/5301776
14:58 btyler joined #mojo
15:01 good_news_everyone joined #mojo
15:01 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/4ZG46Q
15:01 good_news_everyone mojo/master 8bad5a2 Sebastian Riedel: fixed RFC 6901 compliance of Mojo::JSON::Pointer
15:01 good_news_everyone left #mojo
15:02 jberger_ sri += 2
15:02 jberger_ I was wondering what the nice way to handle that case would be
15:02 jberger_ well done
15:03 sri :)
15:03 jberger_ I guess its the obvious way now that I see it
15:03 sri think i liked it more when / meant everything :/
15:03 sri oh well
15:03 btyler_ joined #mojo
15:04 jberger_ I think I did too, but then again, there would be no way to access a key ''
15:06 jberger_ actually it is probably consistent when you think of it in terms of a trailing slash
15:06 sri yea, it makes sense
15:09 good_news_everyone joined #mojo
15:09 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Mc-2ag
15:09 good_news_everyone mojo/master 602eaef Sebastian Riedel: mention that JSON Pointers use fragment identifier representation
15:09 good_news_everyone left #mojo
15:12 geira joined #mojo
15:13 sri hmm, i wonder if fragment identifier representation is wrong
15:15 jberger_ ?
15:16 sri if we should just use the normal representation
15:16 sri it's what other RFCs depend on
15:16 ka2u joined #mojo
15:17 labrown joined #mojo
15:17 sri normal representation seems like a more correct choice
15:17 sri https://tools.ietf.org/html/rfc6902
15:17 sri like JSON Patch
15:18 jberger_ can we do both somehow? `$pointer = url_unescape $pointer if $is_fragment_rep`
15:18 sri meh
15:19 sri -1
15:19 jberger_ certainly you can unescape yourself before using the pointer if needed
15:19 sri would suck for all our APIs
15:19 jberger_ I don't care either way
15:20 jberger_ I think mostly people will use json pointers with res->json($p)
15:20 jberger_ which isn't really doesn't need percent encoding right?
15:20 sri "need" is a strong word, you don't need it anywhere
15:21 sri what i find annoying with supporting both is switching
15:21 sri $t->pointer->fragment_rep(1) $req->pointer->fragment_rep(1)
15:22 jberger_ I say I think I'm starting to lean to supporting the normal
15:22 sri that's what i wanted to hear :)
15:22 jberger_ I was thinking more like $pointer->get($json, $p, 1)
15:23 jberger_ $pointer->get($json, $p, $is_frag)
15:23 sri incompatible with our APIs
15:23 jberger_ but I don't think its needed
15:23 jberger_ $pointer->get($json, uri_unescape $p )
15:24 btyler joined #mojo
15:25 jberger_ all the fragment representation really says is "you can percent encode if using as a url fragment" right
15:26 jberger_ that sounds like something that should be handled elsewhere
15:27 sri right
15:27 jberger_ it doesn't seem like a user-facing thing, it sounds like url contruction thing
15:27 jberger_ ok, I'm on board
15:27 jberger_ +1 to change representation to normal
15:28 travis-ci joined #mojo
15:28 travis-ci [travis-ci] kraih/mojo#406 (master - 8bad5a2 : Sebastian Riedel): The build has errored.
15:28 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/4ad06cca6b0b...8bad5a2f43d4
15:28 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/6018915
15:28 travis-ci left #mojo
15:28 sri OI!
15:29 good_news_everyone joined #mojo
15:29 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/eOhdKA
15:29 good_news_everyone mojo/master 593965a Sebastian Riedel: more RFC 6901 compliance tweaks
15:29 good_news_everyone left #mojo
15:32 sh3 joined #mojo
15:34 good_news_everyone joined #mojo
15:34 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/7RXjew
15:34 good_news_everyone mojo/master 1c4f800 Sebastian Riedel: small optimizations
15:34 good_news_everyone left #mojo
15:38 jberger_ removing uft8 decode is just because we are assuming that the pointer is coming from inside the script not an outside source, right?
15:38 jberger_ its no longer a "boundary"
15:38 sri why would we expect bytes?
15:39 jberger_ I don't think we should, I was just making sure I understood
15:39 jberger_ I think I do and I think I agree
15:39 sri we get characters out of Mojo::JSON, which is imo the most likely source for a pointer
15:39 * jberger_ is taking every opportunity to check his understanding of unicode things (and non-blocking too btw)
15:39 sri besides test scripts, which will be characters as well
15:40 jberger_ right
15:43 good_news_everyone joined #mojo
15:43 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/sL1zoA
15:43 good_news_everyone mojo/master 46af5c6 Sebastian Riedel: a few more tests for Mojo::JSON::Pointer
15:43 good_news_everyone left #mojo
15:44 jberger_ \☃/
15:46 sri ok, as far as i can see we are now RFC compliant \☃/
15:46 whitebook joined #mojo
15:47 jberger_ I'll fix Galileo's tests and bump mojo version as soon as this goes out
15:58 travis-ci joined #mojo
15:58 travis-ci [travis-ci] kraih/mojo#408 (master - 593965a : Sebastian Riedel): The build passed.
15:58 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/602eaef7cd6c...593965ae0ed8
15:58 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/6019626
15:58 travis-ci left #mojo
16:02 xaka joined #mojo
16:05 travis-ci joined #mojo
16:05 travis-ci [travis-ci] kraih/mojo#409 (master - 1c4f800 : Sebastian Riedel): The build passed.
16:05 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/593965ae0ed8...1c4f8003d391
16:05 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/6019766
16:05 travis-ci left #mojo
16:09 travis-ci joined #mojo
16:09 travis-ci [travis-ci] kraih/mojo#410 (master - 46af5c6 : Sebastian Riedel): The build passed.
16:09 travis-ci [travis-ci] Change view : https://github.com/kraih/mojo/com​pare/1c4f8003d391...46af5c661f78
16:09 travis-ci [travis-ci] Build details : http://travis-ci.org/kraih/mojo/builds/6020012
16:09 travis-ci left #mojo
16:10 sri hmm, looks like github and travis are having some trouble :S
16:12 dabudabu Hmm, Mojo::UserAgent doesn't work w/ https sites on one of my machines
16:12 jberger_ dabudabu, does it have IO::Socket::SSL
16:12 jberger_ mojo version
16:12 dabudabu Yes
16:13 dabudabu Ho, it says it's not installed
16:15 dabudabu Does it need IO::Socket::IP to use IO::Socket::SSL?
16:15 dabudabu Because I can use IO::Socket::SSL; just fine
16:16 sri just check for errors when you make a request with Mojo::UserAgent
16:16 vel joined #mojo
16:16 * jberger_ suspects multiple perls problem
16:17 sri much simpler than that
16:17 sri he'll see when he checks the transaction error
16:19 mire_ joined #mojo
16:20 dabudabu Hmm, how do I check the transaction error?
16:22 labrown joined #mojo
16:24 good_news_everyone joined #mojo
16:24 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Auha_w
16:24 good_news_everyone mojo/master b555858 Sebastian Riedel: more Mojo::JSON::Pointer examples
16:24 good_news_everyone left #mojo
16:24 sri dabudabu: http://mojolicio.us/perldo​c/Mojo/UserAgent#SYNOPSIS
16:27 dabudabu Thanks ;p
16:27 dabudabu Seems like it wants a much newer version than the one included in Debian Stable
16:28 * sri nods
16:28 jberger_ but mojo version should still report the version number found, right?
16:28 sri not if it's unusable
16:28 dabudabu It just says "(not installed)"
16:30 whitebook1 joined #mojo
16:31 jberger_ hmmm, it seems like 'not installed' is a confusing message in that case
16:31 dabudabu Yay! It works.
16:31 jberger_ 'not install or version too low'
16:31 jberger_ ?
16:31 good_news_everyone joined #mojo
16:31 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/TUQ4Ug
16:31 good_news_everyone mojo/master 8a3ca57 Sebastian Riedel: improved version command to show required versions of optional dependencies
16:31 good_news_everyone left #mojo
16:32 jberger_ sri++
16:33 dabudabu <3
16:37 Akron sri++
16:37 sri \o/
16:37 alester joined #mojo
16:41 vel joined #mojo
16:41 sri http://imgur.com/a/uujto # avatars for your next social app :)
16:45 dod joined #mojo
16:52 heytrav joined #mojo
17:02 Akron No difference to my current friends list.
17:03 Akron Well - less sloths. ;)
17:22 whitebook joined #mojo
17:25 steveo_mich joined #mojo
17:25 steveo_mich left #mojo
17:25 sri sloths are the best!
17:26 ka2u joined #mojo
17:27 KindTwo joined #mojo
17:31 KindOne joined #mojo
18:01 alizaheer joined #mojo
18:02 alizaheer Hi
18:03 alizaheer i am getting error on testing t/mojolicious/longpolling_lite_app.t line 409.
18:03 alizaheer my env is windows 64 bit
18:03 alizaheer My complte error is
18:03 alizaheer C:\mojo-master>cpan . > c:\log.txt
18:03 alizaheer #   Failed test 'right content'
18:03 alizaheer #   at t/mojolicious/longpolling_lite_app.t line 409.
18:03 alizaheer #          got: ''
18:04 alizaheer dmake.EXE:  Error code 255, while making 'test_dynamic'
18:04 sri STOP!
18:04 sri please don't ever paste into an irc channel
18:05 sri we've seen that error before, but have so far been unable to replicate it, so for now it can't be fixed
18:05 basiliscos joined #mojo
18:08 jpn joined #mojo
18:08 sri odds are it's a windows/perl bug, and can be fixed by upgrading one of the two
18:09 mire_ joined #mojo
18:10 sri as you can see from our cpantesters results, it's a very very rare bug http://www.cpantesters.org/distro​/M/Mojolicious.html#Mojolicious-3.91
18:11 sri my guess for the actual cause of the bug would be a bad return code from sysread/syswrite or the like, broken winsock possibly
18:11 basiliscos joined #mojo
18:12 sri which reminds me, this cygwin bug annoys the hell out of me! http://www.cpantesters.org/cpan/report​/58be2bda-923f-11e2-b289-c297c68967c6
18:13 sri if we have anyone on cygwin, please track it down! :)
18:13 alizaheer i remove perl from cygwin
18:13 alizaheer now current path of perl is :\Dwimperl\perl\bin
18:19 sawtooth joined #mojo
18:27 Caelum feature request, $c->can('helper') should work
18:28 Caelum sri: I'll take a look tonight
18:31 alizaheer left #mojo
18:32 moltar joined #mojo
18:34 sh3 joined #mojo
18:37 Caelum just recently finally copied over stuff to my home dir on win8, after going through 2008r2->2012->win8
18:39 good_news_everyone joined #mojo
18:39 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/co-_EQ
18:39 good_news_everyone mojo/master 81eba1f Sebastian Riedel: fixed a few small Unicode bugs in get command
18:39 good_news_everyone left #mojo
18:44 good_news_everyone joined #mojo
18:44 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/aAyQtQ
18:44 good_news_everyone mojo/master 0a0cbde Sebastian Riedel: removed deprecated base_tag helper
18:44 good_news_everyone left #mojo
18:44 denisboyun joined #mojo
18:45 doby sri: regarding http://www.cpantesters.org/cpan/report​/58be2bda-923f-11e2-b289-c297c68967c6  -- i am unable to reproduce the error
18:46 doby it worked fine on the only windows system i have available
18:46 sri doby: i think it depends on a very specific combination of windows, cygwin and perl versions
18:46 doby i must not have that combination
18:47 sri and it seems to usually be 5.10.1
18:47 sri i guess if we bump the requirement to 5.12 those would just go away :D
18:47 doby my cygwin perl is at 5.14.2
18:47 doby MAGIC!
18:50 Caelum please don't do that
18:50 sri at some point it's bound to happen
18:50 Caelum sure
18:51 Caelum as long as it matches the perl on the latest RHEL
18:59 Kripton joined #mojo
19:04 jberger_ Caelum, with perlbrew you can get any Perl version you need
19:05 jberger_ and that goes double for RedHat who doesn't give you "Perl" at all but the crippled thing they call Perl
19:05 jberger_ (possibly in violation of the license)
19:09 inokenty joined #mojo
19:11 Pizentios joined #mojo
19:12 Pizentios hi there, can somebody point me to a doc describing how to read incoming http headers? I need to find out what browser a user is browsing with (mainly mobile vs desktop)
19:13 sri http://mojolicio.us/perldoc/Mojolicious/Lite#HTTP
19:13 Pizentios ah cool, thanks
19:21 Caelum $c->app->log->info($c->dumper($c->req->headers))
19:21 Caelum jberger_: I know, but that means recompiling mod_perl etc.
19:22 suy joined #mojo
19:22 Caelum jberger_: not everyone uses perlbrew yet
19:28 jberger_ yeah, forgot about mod_perl
19:28 jberger_ other than that though, perlbrew isn't hard to start using
19:29 jberger_ hypnotoad + apache reverse proxy?
19:29 * jberger_ likes to spend other people's tuits :-)
19:31 maxhq joined #mojo
19:31 Caelum I've been using it for a while
19:31 Caelum the point is you can't tell people "you have to start using perlbrew now"
19:37 jberger_ no, you can't do that
19:37 jberger_ but you can tell them not to use an unsupported Perl version
19:37 Caelum supported by who?
19:37 jberger_ p5p
19:38 Caelum see, they might care more about redhat than p5p or whoever does their IT support
19:40 Caelum anyway, what about my idea about making $c->can work for helpers
19:40 Caelum it's often a good idea to overload can when you define an AUTOLOAD
19:43 jberger_ the hardest place to do so would probably be in ep template
19:47 jberger_ though I guess in the template you could just do app->can
19:47 good_news_everyone joined #mojo
19:47 good_news_everyone [mojo] kraih tagged v3.92 at 2a2daf5: http://git.io/ir3W6A
19:47 good_news_everyone left #mojo
19:48 jberger_ \☃/
19:52 * jberger_ <3 release early and often, mojo rocks
19:53 sri \o\
19:53 sri /o/
19:55 * jberger_ goes to fix Galileo
19:56 marty is it a coincidence that the unicode snowman has a strange likeness to the bumble snowman?  http://cdn.gunaxin.com/wp-content/upload​s/2012/12/abominable-snowman-520169.jpeg
19:56 marty I think not!!!
19:56 sri heh
20:04 jberger_ [Galileo] jberger tagged 0.027 at 931c354: http://git.io/xgqpNA
20:08 jnbek joined #mojo
20:09 ObseLeTe joined #mojo
20:10 moltar joined #mojo
20:36 lukep joined #mojo
20:37 bluescreen joined #mojo
20:41 nelio joined #mojo
20:54 * sri wonders if we have projects for http://www.perlfoundation.or​g/outreach_program_for_women
21:02 Akron joined #mojo
21:04 Mithaldu does mojolicious include a websocket client?
21:05 ObseLeTe joined #mojo
21:08 sri http://mojolicio.us/perldo​c/Mojo/UserAgent#websocket
21:09 Mithaldu that looks promising, thanks :)
21:11 Mithaldu hm, immediately closes
21:12 Mithaldu ah, of course
21:17 good_news_everyone joined #mojo
21:17 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/N91bBw
21:17 good_news_everyone mojo/master d6adfa6 Sebastian Riedel: added example for sending JSON messages with Test::Mojo
21:17 good_news_everyone left #mojo
21:21 heytrav joined #mojo
21:22 good_news_everyone joined #mojo
21:22 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/tYMwpw
21:22 good_news_everyone mojo/master 1ef5a56 Sebastian Riedel: mention that Test::Mojo methods don't accept callbacks
21:22 good_news_everyone left #mojo
21:33 Akron joined #mojo
21:35 beyondcreed joined #mojo
21:36 Akron My async helper works now ... but I don't get it to work nested. Or can I start a delay chain and stop it in a delay callback? https://gist.github.com/Akron/542a532395b4ef55317a
21:36 sri poor opera, they are too late to the webkit party
21:36 sri google just forked webkit
21:37 sri Akron: that looks horrible, i can't read that
21:37 Akron :)
21:37 Akron It's like Javascript - I don't like it either.
21:37 sri nested shouldn't be a problem though
21:38 Mithaldu nice, now i can control things on my screen with leap via mojo
21:38 Mithaldu also, uh, wasn't chrome already webkit?
21:38 sri now chrome is blink
21:38 sri http://www.chromium.org/blink
21:38 Akron sri: I created a new delay nested, but it got no tick.
21:39 sri Akron: seriously, i can't read that code
21:39 perlite joined #mojo
21:39 Mithaldu oh, you meant a hostile fork
21:40 Akron sri: I try to simplify it further. Without fallbacks for unsuccessful txns etc.
21:40 Mithaldu huh
21:40 Mithaldu http://www.brucelawson.co.uk/2013/hello-blink/
21:41 sri haha, so opera goes blink instead of webkit
21:41 Mithaldu > With Presto remaining in the wild until 2020
21:41 Mithaldu hilariously optimistic
21:42 Mithaldu if blink won't have the same smooth scrolling, tab-switching and zoom, there's no way in hell i'll switch
21:43 _xaka_ joined #mojo
21:45 stephan48 Mithaldu: "leap via mojo"?
21:45 Mithaldu stephan48: motion leap makes its data available via websockets
21:48 bluescreen joined #mojo
21:49 Akron sri: The essentials - a delay nested in another delay: https://gist.github.com/Akron/542a532395b4ef55317a
21:50 Akron (It's still not good looking though)
21:50 sri Akron: that's not nested, nested would be when you do something before the last $delay->end call
21:51 sri the callback runs after the delay is finished
21:51 Akron sri: So in the style of jberger's approach?
21:51 sri really, i don't get what you're trying to accomplish
21:52 sri why not just use steps?
21:54 Akron Maybe the reason is I don't understand the IOLoop thing completely. I found no way to stop the processing of steps - I mean: Is there a way to say in step 1 "Don't process further"?
21:59 sri i'm afraid you will have to read the source and learn the hard way, we have no best practices there yet
21:59 sri the Mango tests have a few more advanced examples, maybe that can be of help
22:01 Akron Okay. Thank you!
22:02 heytrav joined #mojo
22:05 sri https://github.com/kraih/mango/​blob/master/t/connection.t#L65
22:05 sri for example
22:07 Akron Oh - wow. That looks nice!
22:09 laidback_01 joined #mojo
22:12 sri suggestions for how to explain delays better would be very welcome btw.
22:13 sri it's one of the most advanced concepts we have atm
22:20 mattastrophe joined #mojo
22:22 Mithaldu sri, thanks! have a demo of what i did: https://dl.dropbox.com/u/1​0190786/2013-04-04-870.mp4
22:24 ka2u joined #mojo
22:33 sri Mithaldu: ah, a leap motion controller, neat!
22:33 sri (in case anyone was wondering https://www.leapmotion.com)
22:34 Mithaldu yeah, got it for free for telling them i'd mess around in perl with it
22:34 Mithaldu i like how the nearly invisible infrared lamps have massive lense flares on my cellphone
22:37 jberger_ joined #mojo
22:37 mattastrophe joined #mojo
22:38 jberger_ Mithaldu, http://i289.photobucket.com/albums/ll​221/ferreed/ccd-spectral-response.gif
22:38 jberger_ CCD response goes much further into the IR than our eyes do
22:39 Mithaldu jberger_: pfft, you and your science. i assumed it was because it realized the awesome chiptunes were playing and wanted to make it more DEMOSCENE
22:39 jberger_ (you've unwittingly wandered right into my area of knowledge, muwahahaha)
22:39 Mithaldu i guess i did not involve enough booze
22:39 jberger_ very cool demo though
22:39 Mithaldu i plan to do some kind of pointer with trail thing with it :)
22:40 sri Akron: btw. you might be on to something, i can see a $delay->clear to remove all remaining steps be useful at some point
22:40 jberger_ Mithaldu, some kind of DDR game might be fun
22:41 sri $delay->clear and return $c->render(text => 'Go away!');
22:43 Akron sri: Ah - so I can stop figuring out how to do that! :)
22:45 Mithaldu jberger: haha, not a bad idea
22:56 njlg joined #mojo
23:00 asarch joined #mojo
23:06 * sri wonders what the right name for such a method would be
23:06 sri $delay->clear?
23:06 sri $delay->break
23:06 sri $delay->finish
23:08 Akron finish is confusing with the event, although it's intuitive.
23:08 sri yea, ->finish and ->end kinda sucks
23:08 Akron I would vote for clear.
23:09 sri it does not clear the finish event btw.
23:09 sri just steps
23:09 good_news_everyone joined #mojo
23:09 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/JIZE9g
23:09 good_news_everyone mojo/master 230421e Sebastian Riedel: added clear method to Mojo::IOLoop::Delay
23:09 good_news_everyone left #mojo
23:09 Akron And finally it's working: https://gist.github.com/Akron/542a532395b4ef55317a (Still not very elegent)
23:10 sri i'm not entirely sure about ->clear yet, would appreciate feedback
23:11 * sri pokes marcus, tempire, jberger and crab
23:11 sri especially marcus
23:11 Akron Oh - I didn't think implementing clear would be so simple.
23:11 Akron Well - I like it. It would make my use case really simple.
23:12 sri the whole class is pretty simple
23:12 sri it's just the concept that's complicated
23:16 Akron Yes.
23:16 hrupp_ joined #mojo
23:16 Akron Sorry - have to go now. Thanks for all your time! sri++ I'm happy that it's working now. Good night!
23:17 sri Akron: i expect feedback! ;)
23:17 sri nn
23:17 jpn joined #mojo
23:18 Akron I said I like it. I will create my use case tomorrow with ->clear.
23:19 Akron Bye!
23:29 good_news_everyone joined #mojo
23:29 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/76GMcw
23:29 good_news_everyone mojo/master 03e5be5 Sebastian Riedel: better tests for Mojo::IOLoop::Delay
23:29 good_news_everyone left #mojo
23:33 priodev joined #mojo
23:55 ka2u joined #mojo
23:59 hesperaux joined #mojo

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