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

IRC log for #mojo, 2017-01-20

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

All times shown according to UTC.

Time Nick Message
00:13 Peppard joined #mojo
00:27 Dandre1 joined #mojo
00:57 gizmomathboy joined #mojo
00:58 sugar joined #mojo
01:02 disputin joined #mojo
01:03 disputin1 joined #mojo
01:14 Seth joined #mojo
02:44 inbioz joined #mojo
02:49 inbioz joined #mojo
02:54 inbioz joined #mojo
03:52 noganex joined #mojo
04:20 disputin joined #mojo
05:04 dboehmer_ joined #mojo
05:08 prajith joined #mojo
05:10 disputin joined #mojo
05:12 disputin joined #mojo
05:23 disputin joined #mojo
05:24 disputin1 joined #mojo
05:27 disputin joined #mojo
05:42 marty joined #mojo
06:07 inbioz joined #mojo
06:07 inokenty-w joined #mojo
07:06 CW joined #mojo
07:10 dod joined #mojo
07:14 janl joined #mojo
07:15 dod joined #mojo
07:25 Dandre1 left #mojo
07:43 kes joined #mojo
07:47 Ralesk joined #mojo
07:59 AndrewIsh joined #mojo
08:24 Petru joined #mojo
08:35 Petru joined #mojo
08:44 rshadow joined #mojo
08:52 Dandre joined #mojo
08:53 rshadow joined #mojo
08:54 Petru joined #mojo
09:04 rshadow joined #mojo
09:13 rshadow joined #mojo
09:33 CW2 joined #mojo
09:45 Petru joined #mojo
10:20 * sri is fighting with SQL::Translator today :)
10:20 sri sqlt-diagram doesn't appear to like my 2800 line schema
10:25 sugar joined #mojo
10:30 Dandre joined #mojo
10:32 gregf_ joined #mojo
10:43 foursixnine joined #mojo
10:56 tchaves joined #mojo
10:56 tchaves1 joined #mojo
11:03 mib_mgkw0y joined #mojo
11:04 kaare_ joined #mojo
11:26 sugar joined #mojo
11:43 sugar joined #mojo
12:21 prajith joined #mojo
12:26 sugar joined #mojo
12:44 Petru joined #mojo
14:07 gizmomathboy joined #mojo
14:07 Pyriticc joined #mojo
14:29 gryphon joined #mojo
14:29 Janos joined #mojo
14:42 sugar joined #mojo
15:03 cpan_mojo Mojolicious-Plugin-Renderer-WithoutCache-0.01 by SIMBABQUE https://metacpan.org/release/SIMBABQUE/Mojolicious-Plugin-Renderer-WithoutCache-0.01
15:04 vicash hello i am having trouble creating a download link for an Exe. I set res->headers->content_type('application/octet-stream') and do a reply->static($filepath). However, my browser thinks it is a text file that I am downloading despite the exe extension. Is that a problem with the browser or with the perl code ?
15:14 vicash solved it with vnd.microsoft.portable-executable instead.
15:25 simbabque vicash: note that your users might have trouble downloading executables because their browser might have security rules to prevent that
15:30 sword_smith joined #mojo
15:30 sword_smith_ joined #mojo
15:30 sword_smith joined #mojo
15:30 sword_smith_ joined #mojo
15:31 sword_smith joined #mojo
15:56 disputin joined #mojo
16:01 sugar joined #mojo
16:05 dod joined #mojo
16:08 gregf_ joined #mojo
16:12 zivester joined #mojo
16:13 stryx` joined #mojo
16:37 disputin joined #mojo
16:46 Janos joined #mojo
16:47 ashimema joined #mojo
16:49 sh14 joined #mojo
16:59 sri simbabque: $app->renderer->cache->max_keys(0)
17:00 sri http://mojolicious.org/perldoc/Mojo/Cache#max_keys
17:00 simbabque sri: we've been there already yesterday
17:01 sri just saw the plugin you uploaded, it doesn't do that
17:01 simbabque Grinnz ended up writing an answer about that to the guy's question, and I went and turned my solution into a plugin
17:01 simbabque exactly, it does something else, that was the point
17:01 simbabque it uses a cache that cannot cache anything
17:01 simbabque which I thought would be faster
17:02 sri that makes no sense
17:02 simbabque http://stackoverflow.com/a/41751175/1331451
17:02 simbabque I explained my benchmarking there
17:02 sri you disable caching, which causes massive overhead, but worry about nano seconds of overhead for looking up a value in a hash
17:03 sri wat
17:03 simbabque let's forget about why we don't want the cache to be turned off
17:03 simbabque I didn't come up with that
17:04 simbabque I just answered someone's question, and figured even if it feels useless, someone might want it
17:05 simbabque if you run it long enough and with enough load it should make a difference how it's implemented
17:05 simbabque but in reality it's useless
17:06 sri at least be consistent then and make another one for app->routes->cache, lol
17:13 marty_ joined #mojo
17:18 tchaves joined #mojo
17:24 devroot joined #mojo
17:38 devroot Is Mojo::Template's render() supposed to add a newline to the output?
17:43 Eugene joined #mojo
17:43 Eugene hi
17:43 Eugene is here somebody alive?
17:48 pink_mist sure
17:49 pink_mist bit busy though
17:49 sri devroot: think that might be undefined
17:52 devroot sri: So getting a extra newline at the end of the finished string could happen?
17:52 sri devroot: maybe
17:52 Petru joined #mojo
17:53 devroot sri: ok, it was kind of odd since the template doesn't have any newlines.
17:53 sri devroot: if you care about it you can open an issue and argue why it's a bug
17:54 Grinnz i imagine Mojo::Template is not often used for anything where a trailing newline is significant
17:54 sri think in the docs it's undefined, so all you need is a good rwason
17:54 sri s/w/e/
17:55 devroot I'm using it to generate email Subject lines and Email::Sender complains about the newline.
17:55 Grinnz ah, it would be important there yes
17:55 devroot its easy enough to fix with chomp() so I don't think it needs a bug report.
17:56 sri well, a bug report would have had a good chance
17:57 sri but ok
17:57 devroot I can file one then.
18:24 disputin joined #mojo
18:35 vuzun joined #mojo
18:57 tchaves joined #mojo
18:59 sugar joined #mojo
19:06 zach when making a mojolicious command, is it crazy to make it more complex and use getopt so it can be more versatile, or at that point should i just make more mojolicious commands?
19:07 vicash zach: use getopt if it makes sense
19:08 zach I'm thinking, user creation, modification, deletion
19:08 PryMar56 joined #mojo
19:09 zach actually, commands don't have to be in generate, do they?
19:09 zach like, if i added more paths, i could make it script/myapp delete username
19:10 zach right?
19:10 vicash zach: that depends on taste. i create separate routes for all those actions for user stuff and use curl to manage it. you can use Mojolicious::Command to do all that, similar to adduser/usermod in linux
19:10 zach I want to make both exist as a failsaife
19:10 vicash zach: yes, ./script/myapp mycommand [options] will work
19:10 zach also, I want to limit for this people that can make users
19:10 zach cool
19:16 Seth joined #mojo
19:21 zach vicash: so I lib/Mojolicious/Command/user/delete.pm    but script/myapp didn't see it
19:21 disputin joined #mojo
19:21 sri https://github.com/kraih/mojo/issues/1041#issuecomment-274156519
19:21 sri community gets to decide
19:23 Seth joined #mojo
19:26 zach if it breaks tests but is intentional, shouldn't the tests be adjusted?
19:26 sri odds are it will break lots of tests on cpan
19:28 sri when you have 660 reverse dependencies on cpan alone you kinda need to be careful with this kinda change https://metacpan.org/requires/distribution/Mojolicious?sort=[[2,1]]
19:29 sri yea, can't wait for 666 reverse dependencies :)
19:30 zach all that to take out a newline?
19:31 sri fun, isn't it? :)
19:31 zach it's something
19:35 jberger a newline is what finally caused Test::More to completely gutted
19:36 jberger and the (total number of cpan dists) - (something like 3) number of downstream dependencies on it is why it took years and has an effectively perfect backwards compatibility layer :-P
19:37 user_685 joined #mojo
19:38 tchaves joined #mojo
19:38 tchaves joined #mojo
19:39 user_685 I want to catch invalid urls.
19:39 user_685 Therefore i placed any '/:' => sub {  $self->render(text => "Not found"; }
19:39 user_685 It does only work for /abc but not for /abc/abc
19:39 user_685 Is that actually the correct way to do it?
19:41 user_685 or is it better to modify the standard not found template from mojolicious
19:43 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Routing#Catch-all-route
19:45 user_685 Ok any '/*' => sub { }
19:45 user_685 Ty
19:50 Grinnz this would be a case for a trial release to run through the cpan smokers of dependents, but i don't know if mojo ever has trial releases :P
19:50 Grinnz also it's iffy whether smokers will install trial dependencies or not
19:51 vicash zach: lib/Mojolicious/Command/delete.pm will work.
19:52 Grinnz zach: https://metacpan.org/pod/Mojolicious::Guides::Cookbook#Adding-commands-to-Mojolicious see the third example
19:53 Grinnz if you want to make subcommands, that's possible too, you just have to make the base command a subclass of Mojolicious::Commands with the subcommand namespace
19:53 Grinnz like https://metacpan.org/source/SRI/Mojolicious-7.20/lib/Mojolicious/Command/generate.pm
19:59 user_685 One question to catch-all-route
19:59 user_685 any '*' => sub { or any '/*' does not include http://127.0.0.1:3000/
20:00 user_685 Is that correct?
20:01 sri that's not the catch-all route i linked to
20:03 Petru joined #mojo
20:04 good_news_everyon joined #mojo
20:04 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vMHf7
20:04 good_news_everyon mojo/master db9c97c Sebastian Riedel: test multiple newlines too
20:04 good_news_everyon left #mojo
20:08 disputin joined #mojo
20:11 user_685 I see. This works: any '/*whatever' => { whatever => '' } => sub {
20:12 user_685 I thought /* handles already ''
20:12 jberger zach: I agree with Grinnz, it sounds like you are making an application-specific set of commands
20:13 jberger in which case, you don't really want them to be in Mojolicious::Commands:: namespace but rather MyApp::Commands:: and add the namespace to your app
20:13 jberger (where MyApp is the name of your app of course)
20:18 good_news_everyon joined #mojo
20:18 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vMHUj
20:18 good_news_everyon mojo/master a377c9a Sebastian Riedel: explain newline handling at the end of templates (closes #1041)
20:18 good_news_everyon left #mojo
20:20 sri too much breakage
20:20 sri the current behavior is not intended :)
20:22 sri ignoring empty lines is actually just a funny side effect nobody ever thought about
20:23 sri if we didn't remove empty lines there would be 180 breaking tests
20:23 sri just in core
20:24 sri no wait, it's 255 failing tests :)
20:25 sri because we did that here https://github.com/kraih/mojo/blob/master/lib/Mojo/Template.pm#L63
20:32 jberger wow mom wow
20:32 good_news_everyon joined #mojo
20:32 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vMHkh
20:32 good_news_everyon mojo/master a080fd4 Sebastian Riedel: test more newline special cases
20:32 good_news_everyon left #mojo
20:36 sri (for those that don't know, split removes trailing empty fields)
20:37 sri for my $line (split "\n", $template, -1) {
20:37 sri that would preserve trailing empty fields resulting from "foo\n\n\n\n\n"
20:40 Grinnz House of Cards new season announced today, lol
20:43 sri the expanse season 2 starts in a few days \o/
20:44 Grinnz the website stopped letting me watch that :/
21:00 marcus whee expanse
21:01 marcus Also magicians s2 next week
21:01 Grinnz i forgot about that show
21:02 sri never watched it
21:02 sri this harry potter stuff is not for me
21:02 marcus Watched season 1 after seeing ads for it in nyc, it's pretty neat
21:02 Grinnz i still have half a season of arrow+flash+legends of tomorrow to watch before i consider anything else
21:02 marcus heard the books are better tho
21:03 marcus it's a bit more adult than harry potter :)
21:15 jberger somehow I think house of cards is going to feel less relevant now
21:15 jberger I don't have to imagine a con man conniving his way into the white house
21:15 Grinnz heh
21:16 Grinnz well, that storyline's already done anyway
21:16 good_news_everyon joined #mojo
21:16 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vMHO1
21:16 good_news_everyon mojo/master fd0e182 Sebastian Riedel: we can just use the result method now
21:16 good_news_everyon left #mojo
21:16 jberger so far the first season is the only one that impressed me
21:16 jberger I still watched the others and they were good, but didn't live up to the first
21:16 Grinnz indeed
21:17 jberger re: harry potter, I really loved that series, especially book 7 (movie 7 sucked other than the snape scene)
21:18 Grinnz the snape part was quite well done
21:18 jberger Alan Rickman was masterful
21:18 jberger hmmmm, that means its time for this
21:19 jberger https://www.youtube.com/watch?v=eob7V_WtAVg
21:20 jberger oh no, where's purl? I want to add that
21:20 jberger purl!
21:54 gryphon joined #mojo
21:59 purl joined #mojo
22:20 sri wow, the good place is a really great comedy
22:21 sri one of the best twists i've ever seen in a tv show
22:46 jberger oh I forgot about that show
22:46 jberger I was going to watch it
22:47 jberger that might be a good change of pace
23:14 stryx` joined #mojo
23:32 zivester joined #mojo
23:48 bpmedley http://24.72.144.208:3000/minion_ui <-- Does anyone have time for viewing my updated Minion UI on their mobile device?  It's still a bit rusty; however, any feedback would be cool..

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