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

IRC log for #mojo, 2014-07-13

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

All times shown according to UTC.

Time Nick Message
00:16 good_news_everyon joined #mojo
00:16 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/f5OWvg
00:16 good_news_everyon mojo/master 8c38ba3 Sebastian Riedel: pass around a little less data
00:16 good_news_everyon left #mojo
00:26 good_news_everyon joined #mojo
00:26 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/t2R5mA
00:26 good_news_everyon mojo/master 5582637 Sebastian Riedel: pass around a little more data again
00:26 good_news_everyon left #mojo
00:31 gatitskiy joined #mojo
00:40 good_news_everyon joined #mojo
00:40 good_news_everyon [mojo] kraih tagged v5.13 at 18018f2: http://git.io/715KEg
00:40 good_news_everyon left #mojo
00:45 good_news_everyon joined #mojo
00:45 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/3e8EOg
00:45 good_news_everyon mojo/master c27c103 Sebastian Riedel: bump version
00:45 good_news_everyon left #mojo
00:58 btyler joined #mojo
01:01 rwp joined #mojo
01:02 rwp joined #mojo
01:34 nishttal2 joined #mojo
01:41 klapperl joined #mojo
01:43 camelo joined #mojo
01:44 camelo Hi
01:44 preaction hello
01:46 D4RK-PH0ENiX joined #mojo
02:03 D4RK-PH0ENiX joined #mojo
02:08 btyler joined #mojo
02:20 gatitskiy joined #mojo
03:11 btyler joined #mojo
03:21 lipizzan joined #mojo
03:28 JohnDRockefeller joined #mojo
03:31 KCL_ joined #mojo
03:55 basic6 joined #mojo
05:47 miniCruzer joined #mojo
06:32 berov joined #mojo
06:34 WildPikachu joined #mojo
07:09 irq joined #mojo
07:40 Vandal joined #mojo
08:36 gatitskiy joined #mojo
08:38 gatitskiy joined #mojo
08:40 gatitski_ joined #mojo
08:47 basiliscos joined #mojo
10:00 voegelas joined #mojo
10:07 TenshiLyle joined #mojo
10:11 denis_boyun joined #mojo
10:25 kyshtynbai joined #mojo
10:28 gatitskiy joined #mojo
10:37 rem_lex|pivo joined #mojo
10:56 void joined #mojo
11:09 mattastrophe joined #mojo
11:26 meshl joined #mojo
11:55 marcus sri: Back in Oslo now. Was in Munchen for a week.
11:56 D4RK-PH0ENiX joined #mojo
11:56 marcus jberger: You know, you don't have to publish the same day you write an article ;)
12:32 lipizzan joined #mojo
12:33 mishantil Ok, I feel like the answer is staring me in the face, but I just don't see it.. How does one get a hold of the full url for a incoming request to a mojo-app?
12:33 mishantil http(s)://whatever.fsck/foo/bar?baz=kaputz
12:34 D4RK-PH0ENiX joined #mojo
12:38 lb stringify $c->req->url
12:38 go|dfish mishantil: ->req->url->to_abs
12:38 lb or that
12:39 lb to_string
12:39 purl hmmm... to_string is about the object it is called on
12:42 mishantil Yup, staring me straight in the face. Thank you go|dfish and lb . *facedesk*
12:43 sh4 joined #mojo
13:15 basiliscos joined #mojo
13:51 void https://github.com/tempire/mojoexample
13:51 void I tried to run this, the lite version works fine, but the fullapp does not.
13:52 void Couldn't load application from file "script/mojo_full": Can't locate object meth
13:52 void od "start" via package "Mojolicious::Commands" at script/mojo_full line 21.
13:52 void Any idea?
13:52 purl somebody said Any idea was welcomed.
13:55 void Mojolicious::Commands->start;
13:55 void must be
13:55 void Mojolicious::Commands->start_app('MojoFull');
13:55 void Looks like you sell me old codez?
13:55 void :(
13:57 bpmedley void: That does work for me.
13:57 void For me does only work after changing start to start_app
13:58 void you sure you call full app?
13:58 void morbo script/mojo_full
13:58 bpmedley That’s what I’m saying,  When I changed that line and installed the required modules it loads.
13:58 void Yeah, it does then
13:58 void Seems like start is not longer right
13:59 void bpmedley: great that you try it to help me.
13:59 void appreciate it
13:59 bpmedley You’re welcome.  Sorry it wasn’t sooner, modules took a few minutes to install.
14:11 lb start was never right for full apps?
14:12 lb it's app->start for lite, but Mojolicious::Guides::Growing mentions Mojolicious::Commands->start_app for full apps, since at least as far back as 2.70 (which i conveniently had installed somewhere)
14:15 jberger This is the recommended full-app script: http://mojolicio.us/perldoc/Mojolicious/Guides/Growing#Simplified_application_script
14:15 KCL_ joined #mojo
14:16 jberger actually, this one: http://mojolicio.us/perldoc/Mojolicious/Guides/Growing#Simplified_application_script
14:16 jberger grrr
14:16 jberger http://mojolicio.us/perldoc/Mojolicious/Guides/Growing#Script
14:21 void I think start was used earlier since MojoExample on github is at least 3 years old. When I change it to "start_app(..);" from "start" it does work perfectly.
14:22 jberger tempire: void is right, MojoExample need some love
14:29 WildPikachu hrmmm,  I am trying to handle a result for a data POST action where I need to return json on success respond_to, or redirect_to for html, is there a way to do this using respond_to?
14:31 jberger tempire: Ignoring deprecated parameter 'quote_field_names', since 'quote_identifiers' is supplied at (eval 559) line 35.
14:32 dvinciguerra joined #mojo
14:33 WildPikachu aha
14:36 jberger sri: it might be nice if respond_to values could be subrefs, help's WildPikachu's question and it would allow for deferred calculation in the case that it is expensive to compute the response for multiple respond types
14:36 gatitskiy joined #mojo
14:37 jberger oh, ha!
14:37 WildPikachu jberger, I think it can be a coderef :)
14:37 jberger it seems that that works ;-)
14:37 WildPikachu yep
14:39 jberger I just needed to click through from the Mojolicious::Lite page to the controller page
15:07 denis_boyun joined #mojo
15:16 denis_boyun_ joined #mojo
15:23 sujithm joined #mojo
15:27 nishttal2 joined #mojo
15:27 sri haha
15:31 KCL joined #mojo
15:32 genio joined #mojo
15:44 irq joined #mojo
15:48 jberger how do I install modules from backpan with carton
15:48 jberger ?
15:51 sri https://metacpan.org/pod/distribution/Module-CPANfile/lib/cpanfile.pod
15:52 jberger hmmm
15:52 jberger I can't get it to install 4.0
15:53 sri odd
15:53 jberger I wonder if backpan only keeps the last 100 releases?
15:54 sri not even with "requires 'Mojolicious', '> 3.99, < 4.1';"
15:54 sri "cpanm Mojolicious@4.0" works fine
15:56 jberger I can install 4.01
15:57 jberger I can install 3.50
15:58 jberger I've fixed several bugs in MojoExample
15:59 jberger I'm trying to run prove against older and older versions of Mojolicious to figure out what the required version should be
15:59 jberger ha
15:59 sri requiring 5.0 should be fine ;p
15:59 jberger but not at all necessary
16:00 jberger cpanfile does not understand 4.00 but 4.0 works fine
16:01 denis_boyun joined #mojo
16:02 jberger I'm picking 4.0
16:02 jberger at 3.50 I get smartmatch warnings
16:02 jberger it won't matter
16:02 jberger new users will get 5.xx anyway
16:05 jberger tempire: https://github.com/tempire/MojoExample/pull/9
16:05 denis_boyun joined #mojo
16:10 jberger gawd I love carton
16:25 gatitskiy joined #mojo
16:45 WildPikachu I seem to be having some trouble with a POST request to Mojolicious with content type of application/json giving a negative response for $validation->has_data
16:55 Eke- joined #mojo
17:09 sri if anyone is bored... might be worth making Mojo::DOM not use recursion
17:10 sri specifically Mojo::DOM::_text and Mojo::DOM::HTML::_render could be changed to not use recursion
17:10 sri it's not a big task... but something to get to know Mojo::DOM internals a little
17:13 void jberger will do this in the next hour
17:13 * sri pokes jberger, tempire, marcus and crab
17:14 sri one-liner to show the problem
17:15 sri perl -Ilib -Mojo -E 'my $dom = x(("<foo>" x 1000) . "test"); say $dom; say $dom->all_text'
17:23 * crab looks
17:23 sri the tests are very good, so it will be hard to get wrong ;)
17:24 crab sounds like a challenge to me
17:24 * sri throws down the gauntles
17:24 sri *gauntlet
17:33 genio joined #mojo
17:37 crab i have never looked at ::DOM before
17:37 nishttal2 sri.. Mojo::JSON says "The string value gets precedence".. is there a way to tell it to give pref to numbers?
17:38 nishttal2 sri all my numbers are being converted to string
17:50 falco joined #mojo
17:51 falco hi
17:52 Adurah I love your down air attack.
17:57 irq_ joined #mojo
18:01 jberger sri: it would be easier if it was tail recursion
18:07 sri jberger: would it?
18:08 jberger muh
18:08 jberger much
18:08 sri then make it so! ;p
18:12 jberger I don't see how it could be made to be
18:13 sri then how could it be easier? ;p
18:13 gatitskiy joined #mojo
18:14 jberger I was saying that it WOULD be easier if that were so
18:15 sri oh
18:15 sri i thought you had an idea :(
18:16 disputin joined #mojo
18:17 sri tricky part with Mojo::DOM::_text is the trim stuff, which can depend on the parent elements
18:20 jberger is there an actual problem or just a warning?
18:20 jberger http://www.perlmonks.org/?node_id=324578
18:21 sri warning as far as i can see
18:22 jberger perl -Ilib -Mojo -E 'local $SIG{__WARN__} = sub{}; my $dom = x(("<foo>" x 1000) . "test"); say $dom; say $dom->all_text'
18:51 doby joined #mojo
18:55 jberger actually its even easier thanthat
18:55 jberger no warnings "recursion";
19:01 good_news_everyon joined #mojo
19:01 good_news_everyon [mojo] jberger created recursion (+1 new commit): http://git.io/FJUeiA
19:01 good_news_everyon mojo/recursion 28458bb Joel Berger: stop recursion warnings in Mojo::DOM and Mojo::DOM::HTML
19:01 good_news_everyon left #mojo
19:02 sri hmm
19:02 sri http://grep.cpan.me/?q=no+warnings+%27recursion%27
19:02 sri looks like it's not uncommon
19:04 preaction joined #mojo
19:05 jberger and quite a few of those look like parsing/data structures kind of modules
19:51 Adurah http://instagram.com/p/qQYtM9DRlJ/ How do I do this with Mojolicious?
20:01 gatitskiy joined #mojo
20:21 jberger Mojo::Util::pulled_pork() ! gosh, rtfm!
20:24 jberger I checked the TechEmpower google group to see when the next round of tests would be run
20:24 jberger and I see this: https://groups.google.com/forum/#!topic/framework-benchmarks/aEYYzJqh2V0
20:25 jberger so I checked my PR to see if it had been merged, and nope
20:25 jberger GRRRRR!
20:25 jberger there was a tiny merge conflict, they had changed how modules were installed
20:26 jberger if that means another round of results where the mojo app underperforms or worse fails, I will be really upset
20:29 mishantil Hmm. Mojo has been very well-performing here. Loving it. :)
20:34 meshl joined #mojo
20:34 jberger I know that sri is not keen on benchmarks, still seeing this is worse than seeing nothing at all: http://www.techempower.com/benchmarks/
20:39 mishantil O_o The he..?
20:40 mishantil I suspect they are comparing apples to diapers.
20:40 jberger Thus the reason for my pr and my angst
20:41 jberger No the one they are using is old and sucks
20:41 jberger A port of a Dancer app, made by someone who likely knew very little mojo
20:43 mishantil They have done som strange things indeed. *looking at github*
20:46 jberger mishantil: i have a pr in with a completely revamped app
20:48 preaction i like how none of the perl frameworks completed the test
20:49 bpmedley jberger: That’s a frustation we spent a bit of time on that, you a bit more.
20:53 falco they shouldn't have included frameworks that haven't completed the tests in results, without feedback from the authors/community of the frameworks explaining it... It's not fair
20:55 mishantil Do they state anywhere what the goal of the "benchmark" is?
20:57 falco I don't know it seems to be series of articles, I no pacience to read it all
20:58 falco *I've
20:58 mishantil Quote: "All test implementations must disable all disk logging." Ehm? Ok? So just ignore some of the difficult things like locking etc?
20:59 falco I've been using Mojolicious for severall thins for more than one year, I saw no major performance issue with it comparing with any other thing
21:00 falco also I think most people should agree that server configurations and network issues have more impact in most common cases
21:00 mishantil Me neither. Well, saw one issue, but that was due to me being an idiot. :p
21:02 falco once I made some small aplication with Mojo::UserAgent running on my laptop making way more requests than some servers could handle...
21:02 falco reconfiguring apache on those servers solved it
21:03 falco that was the only performance issue I've seen with anything using Mojo
21:04 falco :P
21:04 jberger I wouldn't mind it if sri or tempire included the EV magic for extra connections
21:07 mishantil jberger: Reading the discussion on your PR now. Pretty ...interesting... arguments they present.
21:09 mishantil I hope we see it merged.
21:10 mishantil jberger: It's great that you took the time to contribute code that actually makes sense.
21:12 kyshtynbai joined #mojo
21:14 Adurah Mojolicious was never the bottleneck for me, it was the DB.
21:17 mishantil Once you have to touch the filesystem (as with many dbs) performace is gone.
21:23 berov joined #mojo
21:50 gatitskiy joined #mojo
21:53 good_news_everyon joined #mojo
21:53 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vhWRig
21:53 good_news_everyon mojo/master 9c54f98 Sebastian Riedel: fixed deep recursion warnings in Mojo::DOM and Mojo::DOM::HTML
21:53 good_news_everyon left #mojo
21:53 sri jberger: does seem like the best option for now
21:57 mishantil *todays facepalm #5*
21:57 mishantil Just discovered that some hmac-stuff in an integration was failing due to Digest::SHA not padding '='.
21:57 dvinciguerra joined #mojo
21:57 Adura joined #mojo
21:58 mishantil And it was even documented. I had just not read it.
21:58 mishantil If someone has got a nit-wit hat then please send it my way.
21:59 JohnDRockefeller joined #mojo
22:07 denis_boyun joined #mojo
22:25 denis_boyun_ joined #mojo
22:32 jberger mishantil: thanks
22:33 WildPikachu joined #mojo
22:33 jberger sri++
22:34 sri jberger++
22:35 sri at least no warnings works in this case... unlike the regular expression engine
22:50 jberger really, there is no way to silence a recursion warning in re?
22:51 jberger every time I look at the re module I'm reminded that they broke Acme::EyeDrops
22:51 jberger :(
23:10 sri deep recursion in the regex engine ends fatally
23:35 sri hmmmm....i do wonder how much recursion costs
23:35 sri perl -Ilib -Mojo -E 'my $dom = x(("<img>" x 10000) . "test"); say $dom; say $dom->all_text;'
23:38 sri that one without recursion is really fricking fast
23:38 gatitskiy joined #mojo
23:48 D4RK-PH0ENiX joined #mojo
23:48 camelo joined #mojo
23:48 camelo hi
23:49 dvinciguerra joined #mojo

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