The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2016-03-13

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

All times shown according to UTC.

Time Nick Message
01:00 jontaylor joined #mojo
01:00 asarch joined #mojo
01:29 batman joined #mojo
01:47 batman joined #mojo
03:40 noganex_ joined #mojo
03:41 thowe joined #mojo
03:49 lluad joined #mojo
04:29 kaare joined #mojo
04:48 heytrav joined #mojo
05:51 genio joined #mojo
06:08 irqq joined #mojo
07:08 ichi joined #mojo
07:50 Vandal joined #mojo
13:01 aborazmeh joined #mojo
13:06 cpan_mojo Mojolicious-Plugin-Pingen-0.2.3 by OETIKER https://metacpan.org/release/OETIKER/Mojolicious-Plugin-Pingen-0.2.3
13:34 jberger sri / batman : I think I'm +1 on https://github.com/kraih/mojo/issues/934
13:34 jberger on batman's patch
13:34 jberger though I think there should be documentation too
13:59 jabberwok in the line: >>   for my $file (map { -f $_ && -r _ ? $_ : files $_ } @{$self->watch}) { << .... what is the bare underline after -r  ...?
14:00 pink_mist jabberwok: see perldoc -f -X
14:00 pink_mist it explains the _
14:00 pink_mist it's basically using the same stat() call that the first -f used
14:01 pink_mist so you don't hit the filesystem more than needed
14:02 jabberwok ohhhh... hmm, how long has that been there?
14:03 irqq joined #mojo
14:05 pink_mist in perl? probably since 5.10
14:05 pink_mist maybe even 5.8
14:07 pink_mist actually probably earlier
14:07 pink_mist but I don't remember that far back
14:08 jabberwok it snuck past me somehow, in a month when i was distracted removing & from subroutine calls
14:12 jabberwok the late lamented dejanews (404 but still brokenly accessible via groups.google.com) suggests the filehandle _ was available in Perl 5.0, 1994.  =sigh=
14:13 patrickz joined #mojo
14:25 batman jberger: i don't get what "that this can't handle directories like .git" means. can you explain?
14:25 jberger batman: because it already has traversed directories
14:25 jberger it would skip .git/.something but not .git/config
14:26 batman but why would it traverse .git ? wouldn't that be only happen if you do --watch .git ?
14:26 batman and why would you do that?
14:26 batman do people do --watch . ?
14:26 eseyman joined #mojo
14:27 jberger I guess that's a fair counterpoint :-P
14:41 asarch joined #mojo
15:01 eseyman joined #mojo
15:04 iamb joined #mojo
15:08 ichi joined #mojo
15:09 sri that regex really stresses me out, think i'll just leave the topic to you from now on ;p
15:15 jberger I was just curious what Plack did
15:15 sri ok, final words, please think the issue through and look for a greater scheme of things solution
15:16 sri don't just hack up a horrible solution to ignore *.swp files
15:16 jberger I think the idea that mojo skipped .files for a long time and no one complained is one important point
15:16 jberger I think that the behavior changed for an unrelated reason is another
15:17 sri and don't ignore the performance aspect
15:17 jberger I have no interest in using that regex
15:17 sri also, github reactions are weird
15:18 sri like, where is my "horrified" emoji?
15:18 jberger I'm hoping that they are going to be more introspectable, JIRA treats PRs as review requests but then treats merging as review approval because it has no other option
15:18 sri thumbs down does not do that regex justice
15:19 genio On 934: Why not adhere to what they might already have in .gitignore or MANIFEST.SKIP?  You're not exactly concerned with time on a restart of Morbo.
15:20 jberger genio: can't depend on git
15:20 jberger and MANIFEST.SKIP is usually only used for CPAN modules
15:21 sri maybe also consider the possibility of optimized file watching
15:28 sri honestly, i was rather happy when i reduced morbo cpu usage with the last round of changes
15:28 sri it's sitting at 0.9% here now
15:31 jasanj joined #mojo
15:32 jasanj jberger: I have tried the last Mojo::UserAgent, it works now, thanks
15:33 jasanj My NTLM authentication works now ;)
15:34 jasanj another problem , I can pass the NTLM authentication, but only got a 302 redirect response, can $ua automatic do a redirect ?
15:37 sri the fact that you don't know if it does makes me believe your ntlm code still has pretty big bugs
15:37 jasanj igore me, I found max_redirects can do this
15:37 sri because you should have to use the same request cloning code
15:39 jasanj sri: sorry I don't know what do you mean 'use the same request cloning code'
15:39 sri i bet you're still reusing transactions, which only acidentally works
15:40 sri i told you yesterday, look at how redirects work in Mojo::UserAgent, that's what you need
15:41 jasanj I'm using $ua->build_tx to build a new transcation now
15:41 sri ok, that limits it's usefulness a little, but works too
15:43 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/UserAgent/Transactor.pm#L66
15:43 sri redirects have exactly the same requirements as retried requests after authentication
15:56 jasanj sri: you mean I'd better use my $req = $tx->req->clone; $new->req($req) ?
16:21 jberger jasanj: also remember that if you are trying to support both blocking and non-blocking that you can't block in any of the requests for non-blocking
16:44 kaare_ joined #mojo
17:04 new_student joined #mojo
17:41 batman sri, jberger: fyi: my vim setup doesn't make temp files, so don't have any stakes in #934
17:44 batman i just feel this has gotten a bit more complicated than i was expecting :/
17:45 jberger well, I can't probably tackle it today but I can probably pick it up
17:46 * jberger was just porting Minion::Monitor to Vue.js
17:46 jberger I like it quite a bit
17:58 bhodgins joined #mojo
17:58 bhodgins Is there something extra I have to do to get a Mojo::IOLoop running? My program just exits as soon as I start it, and I'm curious what could possible cause something like that, even when I am pretty sure I am starting up things to do..
18:01 disputin joined #mojo
18:01 bhodgins i wrote up something cheap like this: http://pastie.org/private/6ut3ipwl5hlsaindwntbrq
18:05 jberger bhodgins: the ioloop will stop if it has nothing to do
18:05 jberger it looks like you need to call your start function
18:09 bhodgins I figure that, and I am calling it
18:09 bhodgins lemme tripple check that with some debug prints..
18:10 dod joined #mojo
18:11 bhodgins woah, somehow my code got all broken, I musta hit some keys somewhere..
18:11 bhodgins Yeah, okay. so start() is definately being called
18:15 dod joined #mojo
18:15 jberger can you paste an updated version?
18:17 jberger oh, no the problem can be seen even in the code you pasted
18:18 jberger you have to start the loop after calling start
18:19 jberger by putting it in the class definition Mojo::IOLoop->start is being called just after your class is defined but before your start method is called (yes its a bit confusing that there are two start methods involved)
18:20 jberger perhaps (especially for testing) you might want to put the Mojo::IOLoop->start ... line inside your start method
18:20 jberger whether or not that's a good practice really depends on the code that calls it
18:20 jberger which you haven't shared
18:20 bhodgins hmm
18:21 PryMar56 joined #mojo
18:23 bhodgins huh, that's weird.
18:24 bhodgins I get it now, yeah. the io loop exits immediately because of that
18:24 bhodgins the code that calls it isn't really anything besides my $foo = module->new; $module->start..
18:24 bhodgins but it works :D
18:25 jberger \o/
18:29 bhodgins now i just gotta hook it up to my FORTH interpreter I wrote
18:58 batman joined #mojo
19:03 bhodgins joined #mojo
19:46 cpan_mojo Test-Mojo-Role-TestDeep-0.005 by PREACTION https://metacpan.org/release/PREACTION/Test-Mojo-Role-TestDeep-0.005
19:54 renormalist joined #mojo
20:02 jberger preaction: looks like you need qw in the bag examples
20:04 renormalist joined #mojo
20:08 lluad joined #mojo
20:24 preaction jberger: argh! ... i mean, no, there's no `use strict` in effect!
20:30 cpan_mojo Test-Mojo-Role-TestDeep-0.006 by PREACTION https://metacpan.org/release/PREACTION/Test-Mojo-Role-TestDeep-0.006
20:48 bpmedley I just spent a couple hours introducing a graphics designer friend to perl and mojolicious.. :)
21:05 romel so did he like it? :)
21:06 bpmedley He _loved_ it ... documentation for the win
21:07 bpmedley I had a Mojolicious::Lite app and he was hooked once he saw how elegant the DSL allowed for code to be associated with a route.
21:22 irqq_ joined #mojo
21:28 jberger bpmedley++
22:36 rabbit joined #mojo
22:45 rabbit I have a question regarding routing. How do I route to a file (like a pdf document) or to an image (eg a.jpg)? Is routing even needed for this?
22:46 pink_mist it isn't
22:46 pink_mist just put them in the public/ dir
22:48 rabbit great. thank you. I missed that :-(
22:48 rabbit :-)
22:53 rabbit I'm currently working on a development version of mojo. So I'm using morbo. But when it's finally released, I expect to be using Apache. Do I use the VirtualHosts containers in the same way as without mojolicious, so that I can have multiple public directories (one per website)?
22:55 pink_mist I'd recommend using VirtualHosts with mod_proxy passing through to a packend hypnotoad
22:55 pink_mist *backend
22:55 rabbit Would you happen to have a handy link for that by any chance?
22:55 pink_mist like so: http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Apache-mod_proxy
22:55 rabbit Great.
22:56 rabbit Thanks.
23:58 orev joined #mojo

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