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

IRC log for #mojo, 2015-01-24

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

All times shown according to UTC.

Time Nick Message
00:43 disputin joined #mojo
02:20 odin22 joined #mojo
02:20 klapperl_ joined #mojo
03:24 asarch joined #mojo
03:46 genio holy crap... https://www.nerdist.com/2015/01/badass-danish-youtuber-destroys-every-hollywood-archery-myth/
03:51 noganex joined #mojo
04:12 muraiki_ wow
04:12 muraiki_ that was amazing
04:13 muraiki_ now, how many people will be injured trying this tomorrow? heh
04:37 jonquest joined #mojo
04:38 Grinnz goddamn the ending lol
04:49 jberger that is pretty cool
07:01 irq joined #mojo
07:56 Vandal joined #mojo
08:45 amon joined #mojo
09:03 good_news_everyon joined #mojo
09:03 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/rhSjyA
09:03 good_news_everyon mojo/master 4243b13 Sebastian Riedel: fix proxy detection in get command
09:03 good_news_everyon left #mojo
09:17 cpan_mojo Bootylicious 1.05 by Oleg G - http://metacpan.org/release/OLEG/Bootylicious-1.05 (depends on Mojolicious)
10:05 dotandimet joined #mojo
10:30 denis_boyun joined #mojo
10:49 good_news_everyon joined #mojo
10:49 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/5-ialQ
10:49 good_news_everyon mojo/master 406c27f Sebastian Riedel: fix "0" value bug in Mojo::Parameters
10:49 good_news_everyon left #mojo
10:58 alnewkirk joined #mojo
11:01 denis_boyun_ joined #mojo
11:13 denis_boyun joined #mojo
11:16 reneeb joined #mojo
11:39 denis_boyun joined #mojo
11:49 denis_boyun joined #mojo
11:56 denis_boyun_ joined #mojo
12:01 denis_boyun joined #mojo
12:07 sri ­čŹ╗
12:28 denis_boyun_ joined #mojo
12:41 denis_boyun joined #mojo
12:46 denis_boyun_ joined #mojo
12:53 denis_boyun joined #mojo
12:57 denis_boyun joined #mojo
12:58 sri denis_boyun: fix your connection
13:01 denis_boyun joined #mojo
13:03 denis_boyun left #mojo
13:11 jberger o/
13:11 trone joined #mojo
13:11 sri \o
13:29 asarch joined #mojo
13:31 good_news_everyon joined #mojo
13:31 good_news_everyon [mojo] kraih tagged v5.74 at c438726: http://git.io/t-VI0Q
13:31 good_news_everyon left #mojo
13:32 jberger last night I improved the error handling on the perl side, now to improve it on the js side
13:32 dotandimet joined #mojo
13:33 cpan_mojo Mojolicious 5.74 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojolicious-5.74
13:33 good_news_everyon joined #mojo
13:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/1Gukhg
13:33 good_news_everyon mojo/master 5ee677d Sebastian Riedel: bump version
13:33 good_news_everyon left #mojo
13:55 sh4 joined #mojo
14:01 muraiki_ joined #mojo
14:01 Lee joined #mojo
15:06 ryozi joined #mojo
15:38 irq joined #mojo
15:57 avkhozov Hi
15:57 hahainternet sup
15:58 avkhozov Can anyone explain in what cases the error (Operation not permitted) while changing process group are fatal in Mojo::Server?
15:58 avkhozov More info and samples in https://github.com/kraih/mojo/issues/733
16:00 sri you should know that github issues are for bugs and feature requests
16:01 avkhozov Yes, I know. At first I thought that this is really a bug. I'm sorry.
16:10 ashimema joined #mojo
16:15 cpan_mojo Ado 0.77 by Krasimir Berov - http://metacpan.org/release/BEROV/Ado-0.77 (depends on Mojolicious::Plugin::OAuth2)
16:28 berov joined #mojo
16:35 jnbek joined #mojo
16:46 rem_lex joined #mojo
16:51 bobkare joined #mojo
17:10 bobkare joined #mojo
17:14 sri i guess the 6.0 code name will be Clinking Beer Mugs :)
17:16 jberger I expect that no one will refute that
17:17 pink_mist damnit, now I want beer ... but I need to go driving in half an hour, and our laws about drinking and driving prevent me from even a single beer :/
17:19 crab yay, clinking beer mugs!
17:20 crab pink_mist: have you considered moving to a lawless third world country where you can drink and drive all you like?
17:20 preaction like the US?
17:21 pink_mist crab: many times :P but I have too many ties to this country =/
17:24 erikhenrique joined #mojo
17:26 erikhenrique I am new to Perl and would like to start using the Mojo for an application
17:26 erikhenrique Does anyone here have an example of folder structure using the mojo ?
17:26 sri http://mojolicio.us/perldoc
17:26 purl http://mojolicio.us/perldoc is lovely
17:26 * sri hugs purl
17:26 purl sri: bathe first
17:27 moritz erikhenrique: 'mojo generate' can create a recommended folder structure for you
17:28 erikhenrique Hmmm, tks moritz and sri ;)
17:44 mst you want to read the guides
17:45 erikhenrique yap, I will read more
17:51 jberger and I have now removed all Test::More from the Test::Mojo::Phantom class (which is now essentially the transport class)
17:51 erikhenrique1 joined #mojo
17:52 jberger that class is now fairly generic
18:12 zivester joined #mojo
18:18 Grinnz http://techcrunch.com/2015/01/21/blackberry-wut/ hah
18:22 jberger hahaha, welcome to the world of being the 4th most popular of
18:22 jberger os
18:22 jberger the marketplace isn't so much fun when it doesn't like you
18:23 preaction i have no sympathy. they screwed themselves
18:23 moritz so if this proposed law passed, anybody could create a new platform and force developers to prot their apps to them?
18:23 moritz that would be hilarious
18:24 moritz ... for those not working in the US, at least :-)
18:24 preaction my platform's kernel is a brainfuck interpreter and only executes programs in brainfuck!
18:25 jberger the idea that the marketplace isn't fair, and asking for the government to compel other businesses to some action is really hilarious
18:25 jberger socialism is certainly the way to good capitalism!
18:26 jberger COMEFROM preaction
18:27 preaction the market is fair. the collective will of consumers gravitates towards the things that they want and away from the things they don't. marketing is sociology. blackberry failed sociology.
18:28 jberger oh right, THAT'S how it works
18:28 sri preaction: but that would be socialism! every platform needs to pay for their own law
18:28 * jberger must have forgetten
18:29 jberger then again, I'm sure that google would love to compel all facebook users to open a g+ account
18:29 preaction when a business can interfere with the collective will of consumers, then the gov't can be called to intervene. but that's not what happened here. BB fucked up.
18:30 erikhenrique1 left #mojo
19:06 chris5 joined #mojo
19:07 chris5 hi, can someone tell me why this one-liner does not work?
19:07 chris5 perl -Mojo -E "say g('http://rss.focus.de/politik/deutschland/fietz-am-freitag/')->dom->find('rss > channel > item > link')->map('text')->join(',')"
19:07 chris5 however this selector works: rss > channel > item > title
19:09 preaction why not just 'link' as the selector?
19:10 chris5 just 'link' does not work, too
19:11 jberger the html is malformed, the link tags are not closed
19:12 sri actually link tags never get closed
19:13 jberger well, whatever they are doing is wrong
19:13 preaction it's not html, i think that's the problem
19:14 * sri nods
19:14 preaction the <link> tag in html does not have text
19:14 chris5 did a xml syntax check: no errors found
19:14 preaction so Mojo::DOM (rightly, for html) says it's a text element _next_ to the link tag
19:14 jberger right the <link> tag is just hanging out there
19:14 preaction and then a spurious </link>
19:14 jberger and there is text after it, since there is no </link>
19:15 preaction there is a </link>, but html doesn't need/use that
19:15 jberger oh wait, I'm looking at the mojo get output, which is probably already mangled
19:15 jberger ignore me
19:15 jberger well there is value
19:15 sri it's parsed in html mode
19:15 jberger this is what mojo thinks it sees:
19:15 jberger mojo get http://rss.focus.de/politik/deutschland/fietz-am-freitag/ 'rss > channel > item' 0
19:16 sri you need to parse in xml mode
19:18 preaction it doesn't have an XML prolog!
19:18 preaction it's _not_ XML...
19:19 preaction so you'll need to tell Mojo::DOM that it is, despite its appearance...
19:20 chris5 thanks, with ->xml(1) it works!
19:20 sri it's not even valid rss actually
19:23 chris5 unfortunately this does not work: perl -Mojo -E "say g('http://rss.focus.de/politik/deutschland/fietz-am-freitag/')->dom->xml(1)->find('rss > channel > item > link')->map('text')->join(',')"
19:26 preaction chris5: you need to make it xml before you parse it: perl -Mojo -E "say for Mojo::DOM->new->xml(1)->parse( g('http://rss.focus.de/politik/deutschland/fietz-am-freitag/')->text )->find('link')->map('text')->join(',')"
19:28 chris5 thanks, isn't it possible to make Mojo::UserAgent set res->dom xml by default?
19:28 preaction if the XML was well-formed, it would Just Work, but it is not
19:29 chris5 ok
19:29 preaction and by well-formed, i mean "has an XML prolog, like <?xml version="..." encoding="..." ?>"
19:33 sri oh the horror of having to use Mojo::DOM manually
19:36 bobkare joined #mojo
19:37 tencendur joined #mojo
19:47 dotandimet joined #mojo
20:23 sri hmm, re xml tag helpers... i guess <% xml_mode; %> and <% html_mode %> would make more sense
20:23 sri (a global switch for all tag helpers)
20:23 sri just thought about the rss use case
20:24 sri when you want to generate rss from an ep template with some embedded html generated by a tag helper
20:26 sri maybe even <%= xml begin %>...<% end %>
20:26 sri :)
20:26 preaction i like that one better
20:27 sri and inside the block all tag helpers generate valid xml
20:27 preaction is end implied? if i just do <%= xml begin %> at the top, do i need an end at the bottom?
20:27 tencendur joined #mojo
20:27 sri you do
20:27 preaction that's not terrible. akin to </endtag>
20:28 sri normal helper
20:28 jberger +1
20:28 purl 1
20:45 sri a working patch https://gist.github.com/anonymous/171c004bc262bb0b0374
20:45 sri perl -Ilib -Mojo -E 'say app->build_controller->render_to_string(inline => q{<%=t "link" %><%= xml begin%><%=t "link" %><% end %>})'
20:45 sri would generate <link><link />
20:46 sri the Mojo::DOM::HTML adjustment is to generate proper boolean attributes in xml mode
20:55 sri i'm on the edge about it
20:56 sri it's fun, but maybe there are not enough use cases
20:56 mst I think in XML mode it's sufficiently correct that it'll ... look good, if nothing else
20:56 mst and it's always nice for generated code/markup to be pleasant to read
20:59 sri (unsure about the whole patch)
21:02 jberger I was curious to see how you would save the state of the semantics and I have to say, it looks good to me
21:02 jberger my mind always goes to quickly to localized variables and that kind of mess
21:03 jberger but these are helpers and thus have a controller and a stash, perfect use case, I like it
21:36 rem_lex joined #mojo
21:42 rem_lex|pivo joined #mojo
21:43 rem_lex| joined #mojo
21:47 sri marcus, tempire, batman, crab: opinions?
21:50 sri the cost is about 6 lines
21:53 jberger sri: line 48 of the patch, can't it just be \&_tag ?
21:55 sri indeed
21:58 sri this would be the full patch with docs and tests https://gist.github.com/anonymous/3b630664ef19142cf34e
21:59 cpan_mojo Mojolicious-Plugin-Prove 0.03 by Renee Baecker - http://metacpan.org/release/RENEEB/Mojolicious-Plugin-Prove-0.03
22:01 preaction that's an interesting plugin
22:01 preaction poor man's CI server
22:10 cpan_mojo Mojolicious-Plugin-JQuery 2.13001 by FERRO - http://metacpan.org/release/FERRO/Mojolicious-Plugin-JQuery-2.13001
22:11 jberger oh shoot that reminds me
22:12 jberger reneeb sent me some prs that I need to merge and release
22:12 jberger I meant to do that this morning
22:12 jberger now I'm off to a wedding
22:12 sri cost is 5 lines btw.
22:12 jberger tomorrow I'm free all day
22:12 jberger sri: I think that's fine
22:13 jberger what was the cost on switching from xml to html a few days ago?
22:15 sri -10 or so?
22:15 jberger I thought so
22:16 jberger so new functionality (both xml and html) and a net loss of 5 lines. win
22:16 skittles_ joined #mojo
22:18 reneeb jberger: no worries, I already prepare some PR for other dists with regard to Mojolicious 5.73 ;-)
22:18 reneeb And the the plugins will be tested with 5.74 starting at ~ 3 am Berlin time
22:20 sri reneeb++
22:29 cpan_mojo Mojolicious-Plugin-JQuery 2.13002 by FERRO - http://metacpan.org/release/FERRO/Mojolicious-Plugin-JQuery-2.13002
22:31 sri hmmm
22:31 sri there's also a performance cost
22:34 sri perl -Mojo -E 'my $c = app->build_controller; n { $c->render_to_string(inline => q{<%=t "div" %>} x 10000) } 10'
22:35 sri that one goes from 1.31s to 1.60s
22:37 good_news_everyon joined #mojo
22:37 good_news_everyon [mojo] kraih created xml_tags (+1 new commit): http://git.io/ia1tow
22:37 good_news_everyon mojo/xml_tags a03f544 Sebastian Riedel: add xml helper to Mojolicious::Plugin::TagHelpers
22:37 good_news_everyon left #mojo
22:40 sri putting it into a branch for now
22:41 sri don't like the performance cost
22:41 cpan_mojo Mojolicious-Plugin-JQuery 2.13003 by FERRO - http://metacpan.org/release/FERRO/Mojolicious-Plugin-JQuery-2.13003
22:49 cpan_mojo Mojolicious-Plugin-Prove 0.04 by Renee Baecker - http://metacpan.org/release/RENEEB/Mojolicious-Plugin-Prove-0.04
23:30 marmez joined #mojo
23:36 jberger sri: could you try a localized package variable?
23:37 jberger $Mojolicious::Plugin::TagHelpers::XML
23:37 jberger localize it in the xml helper
23:39 jberger I'm not sure if a static package variable lookup is faster than a method lookup invocation and then hash lookup
23:39 jberger but it might be
23:39 sri yes, as fast as before
23:41 sri (before the xml helper that is)
23:45 jberger nice
23:46 sri ugly and fragile though
23:46 jberger yeah perhaps
23:47 jberger make it _XML and if they mess with it, it's clearly private
23:48 * tempire likes <%= xml begin %>...<% end %>
23:51 cpan_mojo Mojolicious-Plugin-Prove 0.05 by Renee Baecker - http://metacpan.org/release/RENEEB/Mojolicious-Plugin-Prove-0.05

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