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

IRC log for #mojo, 2016-03-10

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

All times shown according to UTC.

Time Nick Message
00:00 sri_ joined #mojo
01:17 stephan48 joined #mojo
01:18 stephan48 joined #mojo
02:08 bpmedley mspo : A late recommendation for front end widgets is Kendo UI or Kendo UI Core
02:34 cpan_mojo Mojo-ACME-0.01 by JBERGER https://metacpan.org/release/JBERGER/Mojo-ACME-0.01
02:36 acamari ~/win 4
02:36 acamari sorry~
02:40 jberger I hate it when I leave commits on a server and forget to merge them before a release
02:40 jberger 0.01 no less
02:41 jberger seeing that WWW::LetsEncrypt go out today made me say "screw it I'm releasing what I have"
02:41 jberger I can keep working on it of course
02:41 cpan_mojo Mojo-ACME-0.02 by JBERGER https://metacpan.org/release/JBERGER/Mojo-ACME-0.02
02:42 jberger anyone want to be a guinea pig?
02:46 jberger free ssl certs!
02:46 lluad joined #mojo
02:49 jberger no one?!
02:50 acamari for what?
02:50 jberger free ssl certs
02:50 acamari im reading
02:52 acamari interesting
02:54 jberger I'm just starting a more explanatory blog post
02:54 acamari i remember the hassle of getting a cert from the startssl guys
02:55 jberger I haven't added revoke yet, that does seem like something that will be needed
02:58 acamari how supported are letsencrypt certs?
02:58 preaction they've got an intermediary, so as far as i know, fully
02:58 acamari i see they are signed by identrust
02:59 jberger preaction: do you have any mojo apps that need a cert?
02:59 preaction not as such, no
03:00 jberger it doesn't have a standalone mode yet, so you can't actually issue a cert for say a Statocles site
03:00 jberger that is planned but its kinda a pain since you need port 80
03:00 bpmedley jberger : do you need a tester?
03:01 jberger I've already used it for myself but I'm kinda curious for someone to try it
03:01 bpmedley What do you need?
03:02 jberger is bmedley.org a mojo app?
03:02 bpmedley Yip
03:02 bpmedley plugin Mount => {'*.bmedley.org' => '/opt/bmedley.org/bmedley.pl'};
03:05 jberger so you have some container app that hosts the main site?
03:05 bpmedley Yes
03:06 jberger anyway if you wanted an ssl cert you could add my plugin and use the commands to create an account key and then generate a cert
03:06 jberger then you'd either add it to your listen on mojo or your nginx reverse proxy
03:12 bpmedley How long should 'acme cert generate take'?
03:13 mcsnolte joined #mojo
03:15 lluad I've been using the DNS-01 authentication, which doesn't require messing with the webapp at all. If your infrastructure supports it, it's awesome.
03:18 jberger shouldn't take long
03:19 jberger a minute at most I'd think
03:19 bpmedley I either made a mistake, or there is an issue somewhere
03:19 jberger did you add the plugin to the app?
03:19 jberger and restart the app?
03:20 bpmedley Yes.  I ran this command exactly: /opt/perl /opt/vhost/vhost.pl acme cert generate bmedley.org
03:20 bpmedley So, if the plugin wasn't there the "acme" command would fail, correct?
03:20 jberger the server on port 80 has to be able to serve the challenge request
03:21 jberger it adds a route to your app
03:21 jberger so if you didn't restart the app after adding the plugin it won't work
03:21 jberger though it should give you the error
03:21 jberger hmmm
03:24 bpmedley Issue was either that I hadn't restarted the vhost and/or I hadn't added the acme plugin to bmedley.pl app.
03:26 jberger did it work after that?
03:27 bpmedley https://bmedley.org/ <-- :)
03:27 jberger nice
03:28 jberger pretty easy right?
03:28 bpmedley Very
03:28 jberger \o/
03:29 jberger bpmedley: thanks!
03:29 jberger thanks for testing I mean
03:29 bpmedley Easy peasy for a cronjob, as well..
03:29 jberger that's the idea
03:29 jberger since this even automates the challenge request easily it makes putting this behind cron a piece of cake
03:30 jberger bpmedley: keep that account.key safe
03:30 jberger that's how you renew etc
03:31 jberger hmmm, I should probably make that clearer in the documentation
03:31 bpmedley Cool.
03:43 noganex joined #mojo
04:25 ichi joined #mojo
04:50 irqq joined #mojo
05:07 inokenty-w joined #mojo
06:51 dod joined #mojo
06:56 dod joined #mojo
07:25 ichi joined #mojo
07:29 dod joined #mojo
07:36 dod joined #mojo
07:38 dod joined #mojo
07:44 dod joined #mojo
07:47 McA joined #mojo
07:47 Vandal joined #mojo
07:57 AndrewIsh joined #mojo
08:12 dod joined #mojo
08:32 ashimema anyone here any good at translating RFC's into simpler english..?
08:32 ashimema I'm trying to understand the URI reserved characters: http://tools.ietf.org/html/rfc3986#section-2.2
08:33 ashimema where in a URI are "[" and "]" allowed/expected to appear?
08:33 ashimema this is in relation to my open pull request on ::Swagger2 https://github.com/jhthorsen/swagger2/pull/76
08:34 ashimema just wanted another opinion on what the RFC means ;)
08:36 ashimema clarification on the terms 'gen-delims' and 'sub-delims' is what I'm most after ;)
08:40 Foxcool joined #mojo
08:40 Lee ashimema: the RFC says "A subset of the reserved characters (gen-delims) is used as delimiters of the generic URI components
08:40 ashimema it's interpretting that, that my brain is struggling with..
08:40 ashimema probably best I do some examples ;)
08:41 Lee it's saying the [ and ] are at the same level as / and ? (etc)
08:41 ashimema coolios..
08:41 ashimema that's how I read it
08:41 ashimema so
08:41 Lee i don't recall every seeing [ and ] other than to set query params as array values (in poorly designed APIs)
08:42 ashimema &my_funky_param=a,b,(c,d)&param2 is valid
08:42 ashimema but
08:42 ashimema &my_funky_param=a,b,[c,d]&param2=something isn't
08:42 ashimema or rather.. it might be valid..
08:43 ashimema but the parameter split would happen rather differently
08:43 ashimema yeah.. me either
08:43 BinGOs joined #mojo
08:44 garu joined #mojo
08:44 ashimema ooh.. I think I'm being stupid anyways.. I think the "[" in batmans comments is a typo anyways
08:44 ashimema my bad
08:46 Lee this is the unfortunate gray area of complex params and GET requests :D
08:46 ashimema indeed..
08:48 ashimema I'm not missing anything when I say the " character isn't allowed am I?
08:49 garu_ joined #mojo
08:52 Lee IIRC i don't think " is a reserved char
08:53 ashimema indeed.. seems not to be
08:53 trone joined #mojo
08:53 ashimema so.. would &my_funky_param="a","b","c,d" make sense, be valid?
08:54 Lee https://tools.ietf.org/html/rfc2396#appendix-A
08:54 Lee sure, but *how* that will be parsed is another issue
08:54 ashimema ooh.. thanks for the link :)
08:57 Lee might be easier to send a URI encoded JSON string :p
08:58 ashimema indeed.. I must admit I'm starting to wonder that
08:59 ashimema Swagger annoys me in so many ways ;)
09:01 irqq joined #mojo
09:02 Lee i think it just suffers from the same issues that others do: handling the aforementioned gray areas
09:03 Lee i repeat myself, but: REST = Reinvented Every Single Time
09:03 ashimema in this case, yeah.
09:03 ashimema there are toher swagger things I hate ;)
09:03 ashimema haha. like that REST meaning.. so true
09:20 new_student joined #mojo
09:22 csson ashimema: Regarding [], this seems to be the relevant bit (from 3.2.2): "A host identified by an Internet Protocol literal address, version 6 or later, is distinguished by enclosing the IP literal within square brackets ("[" and "]"). This is the only place where square bracket characters are allowed in the URI syntax."
09:27 ashimema interesting
09:28 ashimema I've decided there's not any really clear specification of what the csv collectionFormat in swagger should do.. so I'm going to leave it as trivial as it currently is in the plugin and instead docotr my spec to use strings instead of collections
10:53 jontaylor joined #mojo
11:19 dvinciguerra joined #mojo
11:40 taichi joined #mojo
11:51 asarch joined #mojo
12:27 kaare joined #mojo
12:36 upasana joined #mojo
12:38 upasana_ joined #mojo
12:49 McA joined #mojo
13:01 punter joined #mojo
13:31 McA joined #mojo
13:37 McA2 joined #mojo
13:39 McA2 joined #mojo
13:43 McA joined #mojo
13:44 neilhwatson joined #mojo
13:50 zivester joined #mojo
13:53 vicash left #mojo
13:54 vicash joined #mojo
13:58 AndrewIsh Hey guys. My Morbo has suddenly started watching .swp files for some inexplicable reason. Does anyone have any idea why it might be doing this? It never has until recently.
13:59 nic Do you have it watching a directory (rather than files)?
14:00 nic What editor are you using?
14:01 nic Are you now editing files as a different user?
14:01 ashimema he's using vim..
14:01 ashimema as the same user
14:01 ashimema and watching dirs
14:02 nic vim can be configured to put .swp files somewhere useful (eg /var/tmp) but if that config is missing it'll put them local to the original file
14:02 pink_mist ashimema is psychic :P (though I did also realise he was using vim)
14:02 nic my first guess is vim is behaving differently now
14:02 pink_mist I'm pretty sure morbo never watched .swp files for me even though they're in the same dir as the original file 0_o
14:03 nic So you reckon morbo used to ignore dot files?
14:03 pink_mist I do reckon that
14:04 nic It's easy to test that hypothesis, slightly less easy to determine which version changed the behaviour
14:08 ramortegui joined #mojo
14:14 AndrewIsh Sorry, I didn't spot I'd had replies!
14:15 AndrewIsh I've not changed anything vim-wise, and I'm also sure that Morbo hasn't been watching .swp files until recently
14:15 AndrewIsh I'll test whether it's watching all dot files now
14:18 AndrewIsh Does appear to be doing: >touch .test causes it to reload
14:18 AndrewIsh Interestingly, it no longer says "xxxx file has changed" too!
14:18 AndrewIsh It just reloads
14:19 batman AndrewIsh: there was some changes some days ago: https://github.com/kraih/mojo/pull/931
14:20 ashimema I think it's those recent changes
14:20 ashimema AndrewIsh is a colleague, hence my being able to answer on his behalf
14:21 AndrewIsh Just looking at the changes in that PR, not seeing anything that would cause it to suddenly watch hidden files
14:21 ashimema me either
14:23 batman i think it has always observed .swp files.
14:24 batman i haven't used swap/backup files in a while, so i'm not sure though :/
14:25 AndrewIsh interesting, so i wonder what i was doing before that caused it to ignore them, odd
14:25 nic Is this something you've tested or just supposing?
14:26 AndrewIsh not a mojo question, but i'm interested in these conditions in that PR, anyone know what the lone "_" means in this context:
14:26 AndrewIsh -f $_ && -r _ ? $_ : files $_
14:26 batman nic: are you responding to me...? (i wrote "so i'm not sure though")
14:26 nic no, Andrewish
14:26 AndrewIsh -r means "File is readable by effective uid/gid." but i've not seen the underscore used like that before
14:26 batman AndrewIsh: yeah, it's the cache from the last stat
14:26 nic his reasoning sounds flawed
14:26 AndrewIsh batman: aha, great :)
14:27 batman so let's say you do -f $file && -r $file you need to actually stat() the same file twice
14:27 batman -f $file && -r _ only does stat() once
14:27 AndrewIsh batman: Oooh, well worth knowing, thanks :)
14:27 ashimema that change came in at 6.55 right?
14:27 ashimema cant' see any mention of it in the changes file before then
14:27 AndrewIsh nic: i have tested that it's taking notice of hidden files, is that what you mean?
14:27 ashimema we could easily revert to .54 to check AndrewIsh
14:27 batman AndrewIsh: are you able to check out a previous version and see if it's the same?
14:27 nic no
14:28 batman AndrewIsh: i would test by doing "touch lib/.foo.swp" and not using "vim" directly
14:28 nic I suggested you get your old v of morbo and test whether it did what you say it did
14:28 AndrewIsh batman: i've tried that, it does cause morbo to restart
14:28 * ashimema jumps onto AndrewIsh's server
14:28 batman AndrewIsh: then i guess you answered your own question..?
14:29 melo joined #mojo
14:29 AndrewIsh batman: i'm not sure i asked one <confused>
14:30 batman AndrewIsh: you asked some minutes ago if morbo had recently started watching .swp files..? (maybe i misunderstood)
14:31 AndrewIsh batman: i actually asked if anyone knew why it was suddenly doing so ;-)
14:31 nic We all agree that it currently watches dot files.  That was never the question
14:31 batman so i read your answer two minutes ago as "i've tried to `touch lib/.foo.swp` in an old version, and it does cause morbo to restart"
14:31 batman ^^  AndrewIsh
14:31 abra joined #mojo
14:31 nic Andrewish asserts that it used to ignore them, but he hasn't checked that
14:33 AndrewIsh batman: sorry,  bad wording on my part i think
14:33 batman so "touch lib/.foo.swp" cause morbo in mojo 6.50 to restart. let me try an older version
14:35 AndrewIsh batman: interesting, i just went back to 6.53 and it is restarting:
14:35 AndrewIsh > touch .test.hello.swp
14:35 AndrewIsh > File "./public/app/.test" changed, restarting.
14:35 batman i tried the same in 6.18 and it doesn't restart
14:35 AndrewIsh s/\.test/.test.hello.swp/
14:36 AndrewIsh batman: ooooh, interesting
14:37 batman right. so it used to use Mojo::Home and list_files()
14:37 batman list_files skip all files starting with "."
14:37 batman jberger: what do you think? should i make a commit to not watch dotfiles?
14:40 batman it was changed in 17ace539a85e1a2201afbb3e3f8caeeab7dd8bfa
14:40 batman not sure what was the reasoning behind it :(
14:40 * batman has been on vacation
14:41 nic Does the issue annoy anyone other than people putting their .swp files next to the originals?
14:41 batman AndrewIsh: which version are you using?
14:43 AndrewIsh batman: 5.66
14:43 AndrewIsh batman: sorry! 6.53
14:43 Grinnz lol, was gonna say
14:43 batman AndrewIsh: hehe :)
14:45 AndrewIsh but i reverted back a few mins ago to test, i originally noticed it on 6.55
14:57 trone joined #mojo
15:04 dotan joined #mojo
15:05 Lee joined #mojo
15:11 batman jberger: my suggestion: https://ssl.thorsen.pm/paste/a6fceb7223a7
15:13 batman there's also a commit from 2011: 43d95c34a8986293d7ff6d7ce7b0616304f8c2f3
15:17 jberger maybe I'm being blind but I don't see 17ace539a85e1a2201afbb3e3f8caeeab7dd8bfa skipping .files
15:17 jberger unless File::Find does that
15:22 jberger although the new code uses File::Find too
15:36 Lee_ joined #mojo
15:37 batman jberger: i think i was wrong about 17ace539a85e1a2201afbb3e3f8caeeab7dd8bfa... what i noticed was that morbo stopped using Mojo::Home->list_files()
15:37 PopeFelix joined #mojo
15:39 batman jberger: i think it was ea8dc338c66c504d53b28dd1c4ba34783a6fc8a7 that introduced the change
15:41 jberger that does look like the culprit
15:42 zivester joined #mojo
15:45 jberger the commit message seems to indicate that the grepping for /^\./ was to prevent showing the . and .. directories
15:45 jberger but it does seem like a glaring change to have made callously
15:45 * batman checks what "callously" means :)
15:46 jberger without regards to other effects
15:46 batman thanks
15:47 jberger personally I can't imagine wanting to restart on the change of any .files
15:47 batman i've always thought skipping dotfiles was somewhere between "odd" and "convenient" :)
15:47 batman skipping dotfiles => in list_files()
15:47 jberger I think skipping them in list_files was probably wrong
15:47 jberger but having morbo skip them might make sense
15:48 batman ok. did you see my patch?
15:52 jberger I'm not opposed to that patch, assuming we think its the correct behavior
15:52 jberger and even if sri_ is taking a bit of a break, I do at least want to highlight him at least once
15:56 jberger plackup does something much more complex: https://metacpan.org/source/MIYAGAWA/Plack-1.0039/lib/Plack/Loader/Restarter.pm#L55
16:25 jontaylor joined #mojo
16:42 osfabibisi joined #mojo
16:48 batman jberger: i don't mind doing what plack does, except it's a lot more to test, hehe
16:48 jberger you don't mind but it doesn't seem very mojo
16:49 jberger I'd almost rather just say we don't update on .files
16:49 preaction if all else fails, you do have the explicit watch options. you could also perhaps allow wildcards to do: --watch .*
16:49 batman +1 on that, since i've not heard of anyone requesting anything else
16:49 batman that was to you jberger ^^
16:50 ashimema :)
17:13 dod joined #mojo
17:32 Lee joined #mojo
17:41 lluad joined #mojo
17:42 acamari joined #mojo
18:05 bradjm joined #mojo
18:11 stephan48 joined #mojo
18:12 dod joined #mojo
18:14 PryMar56 joined #mojo
18:23 patrickz joined #mojo
18:34 punter joined #mojo
18:41 kes joined #mojo
18:42 kes sri: Hi. There useless check or you miss some test for submit input. PR here: https://github.com/kraih/mojo/compare/master...KES777:useless_check_for_submit?expand=1
18:50 kes Also it is impossible to setup different attrs for submit_button and miss 'value' like for others input
18:50 kes %= text_field 'name', class => 'colored'
18:51 kes %= submit_button class => 'colored'
18:51 kes last one will generate tag with wrong attrs
18:59 dod joined #mojo
19:04 irqq joined #mojo
19:16 s1037989 Should `$ perl script/my_app minion worker` put the worker in the background or do I need to append & ?
19:17 preaction you need to background it yourself. also consider Daemon::Control
19:19 s1037989 Ok, thanks!
19:20 s1037989 Any idea why that is necessary, why not daemon / prefork like mojo?
19:30 ichi joined #mojo
19:32 new_student I am using Mojo::Redis2 and I keep facing the warning: subscribe(@list, ...) is DEPRECATED: Requires an array-ref as first argument. What I am doing ryt now is: $ilmt_json->{jobid} = $randid->randpattern("ssssssss"); $c->redis->subscribe($ilmt_json->{jobid}); How do fix this to remove the warning?
19:33 new_student It's probably a stupid question... but do I have to create a list from the scalar and then pass it to subscribe() ?
19:35 Adurah How do you create a list from a scalar... the size of 1?
19:36 new_student [ $scalar ] ?
19:36 Adurah There's your answer.
19:37 new_student Thanks
19:41 Grinnz @arr is not an arrayref, \@arr is, and [$scalar, ...] is
19:43 disputin joined #mojo
20:03 rwp joined #mojo
20:09 melezhik joined #mojo
20:09 mishanti1 Ok, so how common is it to see references to God (whichever) in B2B-contracts?
20:09 mishanti1 This one service-provides caught me pretty off-guard with that one.
20:10 Adurah Sounds like you're dealing with 'murricans.
20:10 mishanti1 I know, but no, Swedes in this case.
20:11 Adurah If it's anything more than "Act of God", odd.
20:12 mishanti1 "...including but not limited to acts of God" :) Why even put that in a contract?
20:17 new_student Here is my small app: http://fpaste.org/336937/76409941/ When I call the / route a second time, it throws Mojo::Reactor::Poll: I/O watcher failed: Can't call method "res" on an undefined value at /usr/share/perl5/vendor_perl/Mojolicious/Controller.pm line 222
20:17 new_student How do I traceback to where this is happening?
20:19 neilhwatson How does one prove God is the cause of said event?
20:20 Adurah It's one of those events where he tells everyone he did.
20:20 mishanti1 Ah right.
20:20 mishanti1 Has there been any of those yet?
20:21 Adurah Not recently.
20:22 Grinnz_ mishanti1: "act of God" is a common phrase in legal contracts in america, at least
20:22 Grinnz_ it has a specific definition
20:22 neilhwatson Perhaps acts of god sounds less weasly than 'events we didn't think of that cost us too much'.
20:22 Grinnz_ which is kind of funny, but whatever
20:23 Grinnz_ https://en.wikipedia.org/wiki/Act_of_God#Contract_law
20:24 neilhwatson lawyers, they're why we can't have nice things.
20:28 mishanti1 Grinnz_: Thanks. :) That's pretty informative. Bizzare, but informative.
20:35 pink_mist Grinnz: here we use the term Force Majeure for that - https://en.wikipedia.org/wiki/Force_majeure
20:35 pink_mist (in legal matters, that is)
20:36 ribasushi mishanti1: for a nation that has "in god we trust" on their currency this is hardly bizarre
20:38 new_student nvm, got the error.
20:39 orev joined #mojo
20:39 mishanti1 ribasushi: This was from a swedish company, and I did not know they were a god-fearing nation. Now I know better.
20:40 ribasushi mishanti1: it's clearly a CIA covert operation, and you inadvertently got wind of it :D
20:40 new_student lol
20:41 ribasushi new_student: nothing to lol about - predator drones T-40 seconds :)
20:41 mishanti1 Oh dear.
20:42 * mishanti1 dons his smashing tin-foil hat
20:50 hummeleBop joined #mojo
21:04 bwf Is a pull-request too much for a documentation tweak?
21:04 Grinnz_ if it's a comma or bit of grammar, probably :P
21:05 irqq joined #mojo
21:05 bwf more of a small code addition to Mojolicious::Guides::Routing
21:15 ichi joined #mojo
21:17 cpan_mojo Mojolicious-Plugin-CGI-0.26 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-CGI-0.26
21:19 disputin joined #mojo
21:24 cpan_mojo Mojo-IRC-0.29 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-IRC-0.29
21:32 cpan_mojo Toadfarm-0.74 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Toadfarm-0.74
21:41 jberger I'm ok with this change
21:41 jberger https://github.com/kraih/mojo/pull/933/files
21:42 jberger batman / Grinnz_ thoughts?
21:42 jberger anyone else
21:43 Grinnz_ seems appropriate
21:43 batman jberger: +1
21:43 cpan_mojo Mojo-IOLoop-ReadWriteFork-0.17 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-IOLoop-ReadWriteFork-0.17
21:44 * batman is done with the "release party" for tonight
21:44 good_news_everyon joined #mojo
21:44 good_news_everyon [mojo] jberger pushed 2 new commits to master: https://git.io/vaOu0
21:44 good_news_everyon mojo/master bf32e5f Bob Faist: Update Routing.pod...
21:44 good_news_everyon mojo/master dd66d84 Joel Berger: Merge pull request #933 from bfaist/patch-2...
21:44 good_news_everyon left #mojo
21:44 jberger merged
21:44 jberger bwf++
21:45 bwf awesome, thanks
22:05 preaction https://gist.github.com/preaction/2156f6a37872af8ac2b4 do these two methods (text_deeply and attr_deeply) look useful to anyone else? i'm thinking of adding them to Test::Mojo::Role::TestDeep
22:12 bpmedley preaction : I can see them being useful in our test suite at work; although, I need to add Mojo::UserAgent in our test suite first.. :)
22:14 bpmedley new_student : May i ask your methodology for finding your issue?  I use daemon and Devel::Trace (or DB::single) quite a bit for finding things like that.
22:27 preaction bpmedley: thanks. i updated the gist with some possible documentation, and allowing multiple attr => test pairs, because i apparently do that a lot

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