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

IRC log for #mojo, 2016-03-28

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

All times shown according to UTC.

Time Nick Message
00:00 jontaylor joined #mojo
00:41 meshl joined #mojo
01:02 genio hmmm.  getting close to 1000 issues on the Mojo repository
01:13 upasana_ left #mojo
01:13 upasana_ joined #mojo
01:19 atom pink_mist and jberger:  this worked perfectly - $c->reply->asset( Mojo::Asset::File->new( path => $image ) );
01:20 atom thanks!  i like this better than using the Mojolicious::Plugin::RenderFile plugin
01:35 ivi joined #mojo
02:33 jberger Cool
02:38 asarch joined #mojo
02:48 noganex_ joined #mojo
03:00 nicomen heh http://blogs.perl.org/users/xenu/2016/03/the-problem-with-cpan-depending-on-poorly-maintained-modules.html#comments
03:11 jberger does it feel every now and again lately that people are asking contradictory questions with contradictory answers
03:11 jberger they say "look at what happened with NPM, it could happen to CPAN too"
03:12 jberger and in the next breathe say that Mojo should be split up or that other people should fork it for convenience
03:12 jberger I really don't want to open that question again, I've had quite enough of it last week
03:12 jberger but the contrast is really amazing
03:13 jberger also, can you really not cpanm Dancer2 on windows for that last year?!
03:14 jberger if so, that's incredible
03:14 preaction Dancer2 isn't nearly as well-maintained as Mojolicious, if their response to my PR a few weeks back is any indication
03:15 inokenty-w joined #mojo
03:21 preaction but frankly, if you're just screaming about things being broken without taking any steps to fix them, when those things are built by volunteers and given freely in good faith, i'm not sure what the polite response should be...
03:23 preaction and of course don't forget how that post stomps on the contributions of the current volunteers across Perl, since they didn't fix that specific problem and are now told they should give up and find another language, because that's what this mythical novice is doing
03:27 jberger oh I'm not giving that post any real credence
03:27 jberger though I do worry for the "dark users" (those who approach perl but never interact with the community in any way)
03:28 jberger heh, its that poster's only post and they chose the name xenu
03:28 jberger throwaway account much?
03:39 cpan_mojo Mojolicious-Plugin-AutoRoute-0.20 by KIMOTO https://metacpan.org/release/KIMOTO/Mojolicious-Plugin-AutoRoute-0.20
03:58 kaare joined #mojo
03:58 jberger anyway, I've almost published this several times over the weekend, and I finally did
03:58 jberger https://twitter.com/joelaberger/status/714300553216430080
04:00 Adura https://twitter.com/hashtag/mojolicious Got a bit NSFW there, ror...
04:01 jberger yes
04:02 jberger I obliquely mentioned that the other day
04:02 Adura Good eye, I may have been banned or missed the line. :P
04:03 jberger yes indeed, the #mojolicoius hashtag is ... trying
04:04 preaction jberger: your link to Mojo::Date is wrong, it links to mojoliciou.us
04:05 jberger oh damn, they were all over
04:05 jberger copypasta fail
04:05 preaction SEO-fail
04:06 jberger preaction++ thanks for spotting
04:06 jberger should be fixed now
04:07 cpan_mojo Mojolicious-Plugin-AutoRoute-0.21 by KIMOTO https://metacpan.org/release/KIMOTO/Mojolicious-Plugin-AutoRoute-0.21
04:14 s1037989 Good stuff!!!  http://blogs.perl.org/users/joel_berger/2016/03/on-the-mojolicious-codebase.html
04:14 jberger I'm trying to keep it positive
04:14 jberger and still explain our position
04:15 s1037989 I can't imagine the recent refactoring of transactions if everything was forked or split into multiple packages.  Holy cow!!  What a terrific case in point.
04:18 jberger and it happens regularly
04:24 s1037989 The blog post was a really excellent summary of basis for your position.  Not only should it end negativity forever, it should encourage so many more users to come to Mojolicious.  For its code, it's features, and honestly the core team.  I have been studying Mojolicious' code, code of conduct, and just general behavior for years.  I can say with all sincerity that I personally have become a better programmer and a better person for it.
04:27 jberger we are trying
04:28 jberger it may be rocky some times, our first attempt at a code of conduct ("keep things G rated") was quite a flop in retrospect
04:28 jberger :-P
04:28 s1037989 Too simplistic?
04:29 jberger yeah
04:29 jberger and caused us to come down too hard on things like swearing (which is now permitted, as long as it isn't directed at someone, because of the current code of conduct)
04:29 jberger which then made people uncomfortable
04:29 s1037989 A business grows, the complexity grows; a software project grows, the complexity grows...
04:30 jberger and people are most complex of all
04:30 s1037989 Wait, no swearing in #mojo??  Really?  Lame.  :P
04:30 jberger that didn't last long ;-P
04:30 s1037989 Swearing is so fun!
04:31 jberger it was clearly the pendulum swung too far in the other direction
04:31 s1037989 Oh, I see, it is *now* permitted.
04:38 s1037989 If I have a series of chained methods ($a->b->c) and $a or -> b returns undef, the program dies because can't call ->c.  Is the only way to prevent this to do an eval?  I'd rather do $a->b->c and if -> is undef it just return undef and ->c not be attempted.  Does my question make sense?
04:38 jberger there are several ways around it
04:39 jberger ($a->b || return)->c or eval as you say, but those both have their troubles
04:39 jberger some languages have gotten a conditional method call operator
04:39 Grinnz https://metacpan.org/pod/Safe::Isa#call_if_object may make it nicer
04:39 jberger ->? or the like
04:39 jberger but it doesn't seem likely for perl5
04:39 jberger Grinnz++
04:43 s1037989 Interesting ideas!  Thank you both!
05:19 melo joined #mojo
05:37 atom12 joined #mojo
05:48 batman so weird... i thought there was a maybe.pm, so you could do $a->b->maybe::c() or something...
05:56 kes joined #mojo
06:08 Grinnz batman, seems maybe.pm has been used for something unrelated :(
06:48 dod joined #mojo
06:53 dod joined #mojo
07:17 melo joined #mojo
07:59 sugar joined #mojo
08:03 melo joined #mojo
08:09 sri it's funny how this keeps coming up https://github.com/kraih/mojo/issues/941
08:10 sri the big questions again, is it worth 2.4% performance
08:12 sivoais joined #mojo
08:23 sri jberger: since you brought up rails... that is about 175k lines of ruby :)
08:24 pink_mist maybe have a flag canonical => 1 to turn on sorting?
08:25 sri naah, sort by default or bust
08:26 pink_mist eh, then I say bust
08:29 pink_mist especially since it seems to already be possible using a sorted hash implementation
08:32 sri hmm, i can't actually measure the difference
08:34 pink_mist 0_o
08:34 sri yea, totally not measurable for me
08:35 pink_mist how large is your json?
08:35 Vandal joined #mojo
08:35 sri i'm using his test
08:35 sri results are between 22.94s and 24.30s for both
08:37 pink_mist huh, has Mojo::JSON changed significantly since then?
08:40 sri a few things did in fact change, like slash escaping
08:40 sri maybe that's expensive enough to mask the difference?
08:44 sri well, the code is there, anyone can try
08:47 sri umm, i mean 22.94/s
08:51 * pink_mist is just updating his Mojolicious to try
08:52 sri yea, totally made no difference in the old version either
08:52 sri just tested
08:53 sri Mojo::JSON did get a little faster since then though
08:53 sri that much is visible ;p
08:53 pink_mist timethis for 10: 10 wallclock secs (10.44 usr +  0.00 sys = 10.44 CPU) @ 15.04/s (n=157) <-- without sort
08:53 pink_mist timethis for 10: 11 wallclock secs (10.63 usr +  0.01 sys = 10.64 CPU) @ 14.10/s (n=150) <-- with sort
08:53 pink_mist on my machine
08:53 sri run it a few times
08:53 pink_mist alright
08:54 sri perl 5.22 here btw.
08:54 pink_mist same
08:54 pink_mist just to be sure, it's line 216 of Mojo/JSON.pm I should add the sort in front of keys to, right?
08:55 sri yes
08:58 pink_mist huh, curious; the first bench I did was the only one I got higher than 15/s with ... the others, even the ones without sort, are all about the same now :/
08:58 pink_mist guess I don't see any impact either
08:58 sri hah, exact same i saw
09:02 sri if a third person confirms the results i'll just add the sort again ;p
09:03 anparker http://pastebin.com/pLZN1XzP
09:04 sri anparker: now do it in reverse :)
09:04 sri (start with sort and then remove it)
09:05 sri i refuse to believe that it's measurable ;p
09:05 KindOne joined #mojo
09:06 sri anparker: perl 5.22?
09:08 meshl joined #mojo
09:09 anparker http://pastebin.com/qQ8k3gD3 I don't see difference
09:09 anparker yes. 5.22 on freebsd
09:09 sri interesting
09:09 sri hmmmmm
09:11 pink_mist which version of Mojolicious?
09:11 anparker Mojolicious (6.57, Clinking Beer Mugs)
09:12 pink_mist right, good. just wanted to make certain =)
09:17 sri i guess monkey patching it in removes some randomness https://gist.github.com/anonymous/fca9dd4d0f766b6d653d
09:18 sri now i do see it consistently a little slower
09:20 sri nowhere near 2.4% though
09:21 sri 1% at best
09:32 anparker http://pastebin.com/JxsqpETV - 5.22 on freebsd
09:33 anparker http://pastebin.com/AwWFaTdm - centos 7 with perl from perlbrew
09:40 Shaeto joined #mojo
09:58 cpan_mojo Mojolicious-Plugin-QuickMy-1.0 by AZJADFTRE https://metacpan.org/release/AZJADFTRE/Mojolicious-Plugin-QuickMy-1.0
10:17 sri linux is very inconsistent
10:18 meshl joined #mojo
10:24 anparker maybe it's because linux is running in vm
10:41 dvinciguerra joined #mojo
11:04 sugar joined #mojo
11:05 jontaylor joined #mojo
11:07 mdom joined #mojo
11:09 Kripton joined #mojo
11:25 Kripton joined #mojo
12:12 jberger sri: 175k?!
12:13 jberger Yikes
12:15 sri there's also about one mojolicious worth of css and html :)
12:16 sri (or css and javascript, not sure which i looked at)
12:37 sri look at that, booking.com is all over twitter
12:38 sri apparently their ios app breaks ios, ouch
12:39 perlpilot joined #mojo
12:47 neilhwatson joined #mojo
12:51 jberger ooooo
13:01 jberger https://bencollier.net/2016/03/unable-to-open-links-in-safari-mail-or-messages-on-ios-9-3/
13:20 da5id joined #mojo
13:43 good_news_everyon joined #mojo
13:43 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vVUox
13:43 good_news_everyon mojo/master cd35ec2 Sebastian Riedel: use less words
13:43 good_news_everyon left #mojo
13:50 good_news_everyon joined #mojo
13:50 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vVU6e
13:50 good_news_everyon mojo/master b116946 Sebastian Riedel: slightly better ending
13:50 good_news_everyon left #mojo
13:51 jontaylor joined #mojo
14:20 Kripton joined #mojo
14:33 asarch joined #mojo
14:38 lluad joined #mojo
14:47 mattp_ batman: http://shadow.cat/blog/matt-s-trout/madness-with-methods/ (see the bottom)
14:51 batman not quite what i had in mind... i wonder if this maybe stuff is something i remember from perl6 :/
15:03 Kripton joined #mojo
15:05 lluad_ joined #mojo
15:25 PryMar56 joined #mojo
15:27 lluad joined #mojo
15:38 lluad joined #mojo
16:03 jberger http://s.quickmeme.com/img/f0/f05e986f96340848e0d77e0f3925619a62ee4fc182d87356e792875ac525298f.jpg
16:05 batman :)
16:09 jberger "udp meme" google image search is pretty awesome
16:10 PopeFelix joined #mojo
16:12 jberger though it doesn't have as many as some, those that are there are pretty good
16:15 irqq joined #mojo
16:21 cpan_mojo Clustericious-1.19 by PLICEASE https://metacpan.org/release/PLICEASE/Clustericious-1.19
17:38 Kripton joined #mojo
17:46 buu joined #mojo
17:46 buu Are people still on this network
17:47 buu If you have multiple template files with the same name in your template search path (for mojo-template specifically) is there anyway for one template to refer to a different template with the same name, via 'extend' or 'include' or something?
17:58 perlpilot buu: I'm pretty sure you can always specify the path you want it to use .  (caveat emptor, I haven't used mojo in a while)
17:59 buu I don't think it takes absolute paths
18:00 buu I don't really have the absolute path anyways =[
18:01 preaction my guess would be no. how could it know?
18:02 buu Dunno
18:02 buu I'm just trying to figure out how to magically override templates
18:02 buu What I want essentially is polymorphic templates
18:04 buu I have code that's slightly outside my current app, a plugin I load
18:04 buu That attempts to load 'foo.template'
18:04 buu I'd like to replace foo.template with my own template that extends the original
18:07 buu I suppose I could hackup ->render
18:07 buu but ehhhhhhh
18:15 vicash buu: http://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Bundling-assets-with-plugins  you can put your template's path in front of the other template's path so that your template is picked.
18:16 buu Right
18:16 buu That's the easy part
18:16 buu The hard part is then referring to the previous tempalte
18:16 buu template
18:19 Grinnz can you abstract it to another directory layer?
18:20 Grinnz foo/foo bar/foo
18:20 mcsnolte joined #mojo
18:27 jontaylor joined #mojo
18:29 buu No then it wouldn't implicitly replace it
18:30 buu Oh well
18:30 vicash you may have to do inline rendering or render_to_string of the plugin's template and then re-render using that as content into your template
18:31 Grinnz it seems to me that if you could implicitly replace a template without changing either the path to the template or the order of include paths, that would be rather nondeterministic
18:33 buu Well, right now it searchs @includepaths in a deterministic order and chooses the first one it finds
18:33 buu The problem is there's no way to choose which template inside those paths to use instead
18:33 buu Like, use the second one, or use the one inside /foo/bar root
18:33 buu etc
18:34 Grinnz how would you specify that? in a way that would be different from just changing the template directory layer?
18:35 buu Absolute path or even just basic "if template X attempts to include/extend template X don't choose the same file"
18:35 perlpilot buu: reset the include path from within the template :)
18:35 Grinnz that doesn't sound very basic
18:35 buu heh
18:35 Grinnz and specifying an absolute path doesn't sound very implicit :P
18:36 buu Grinnz: Well, that's more of a question of who knows which details, the idea here is to move all the logic into the 'child class' and prevent the 'parent class' from having to know about children
18:36 buu I mean
18:36 buu I want % extend 'super::my_template';
18:37 Grinnz I don't know enough about the extend setup unfortunately
18:42 vicash buu: your best bet at this stage is render_to_string and then reformat it as you need it... %extends is not going to do what you want if the template names are identical.
18:49 stephan48 can I somehow make this look nicer? http://paste.stejau.de/205adb33b7ba $auth_route is a bridge I get passed from the Plugin. I would like to have all stuff inside the group automatically be a children of this bridge instead of doing it individually for each action.
18:49 stephan48 doing=defining
19:07 dvinciguerra_ joined #mojo
19:16 jberger stephan48: I think you are crossing a few contexts here
19:17 jberger once you get back a bridge (well, mostly we call them "unders" now) the group {} has no effect
19:17 jberger group only changes what the "global" router is from the perspective of the dsl
19:17 jberger you already aren't using the global router so it makes no difference
19:17 stephan48 As I now managed to grasp the code in Mojolicious::Lite I managed to understand what group does
19:18 stephan48 yesterday I tried to parse that while almost sleeping - did not work out well :)
19:19 stephan48 Removed the group {}. According to the DSL code there is no other way than mine(without the group ofcourse)
19:20 stephan48 thank you!
19:22 buu left #mojo
19:24 jberger group is really the one thing that doesn't translate between Lite and Full
19:25 jberger grokking that difference is worth a Mojo level-up
19:41 disputin joined #mojo
19:50 csroli joined #mojo
20:03 Kripton joined #mojo
20:15 Kripton joined #mojo
20:16 mitya joined #mojo
20:50 Kripton joined #mojo
21:18 medo joined #mojo
21:24 HtbaaPi joined #mojo
21:25 meshl joined #mojo
22:24 punter joined #mojo
22:36 haarg sri: did bugs get filed about the licensing issues with the stuff forked from mojo?
22:46 dvinciguerra__ joined #mojo
22:46 jberger haarg: not yet I don't think
22:46 jberger that was only seen researching for the post
22:46 jberger headslapper moment that
22:47 haarg yeah
22:52 Adura joined #mojo
23:13 neilhwatson joined #mojo

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