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

IRC log for #mojo, 2014-10-28

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

All times shown according to UTC.

Time Nick Message
00:18 jberger franzkafka: https://www.usps.com/business/web-tools-apis/address-information.htm
00:18 jberger nicomen: it sounds like you are looking for Dist::Zilla
00:18 jberger though I think its a behemoth, some people like it
00:22 D4RK-PH0ENiX joined #mojo
00:43 tbushell joined #mojo
00:45 dotan1 joined #mojo
00:46 hesperaux_ joined #mojo
00:55 amon joined #mojo
01:09 jberger sri: just curious, would there be any benefit to optionally using say IO::Epoll or IO::Ppoll if available?
01:10 jberger EPoll for obvious reasons, but Ppoll might have its uses too
01:10 jberger I hadn't been aware of the existence of these until just now
01:11 sri jberger: you tell me
01:11 * jberger is investigating
01:12 jberger I wanted to ask if perhaps you had already rejected them
01:13 sri i am sceptical though... those modules tend to be of dubious quality
01:17 jberger IO::Ppoll got mentioned on #p5p as a drop-in for IO::Poll
01:18 jberger LeoNerd says this bit him: https://rt.cpan.org/Ticket/Display.html?id=93107
01:53 klapperl joined #mojo
02:25 woz joined #mojo
02:49 klapperl_ joined #mojo
02:55 doublelel joined #mojo
03:16 noganex joined #mojo
03:40 fhelmber_ joined #mojo
03:51 KCL joined #mojo
04:35 Eke- joined #mojo
05:06 marty joined #mojo
05:07 marty joined #mojo
05:24 woz joined #mojo
05:31 hesperaux_ joined #mojo
05:52 sujithm joined #mojo
06:20 sujithm_ joined #mojo
06:21 sujithm joined #mojo
06:43 Eke- joined #mojo
06:46 basiliscos joined #mojo
07:11 klapperl joined #mojo
07:12 doublelel joined #mojo
07:13 Vandal joined #mojo
07:13 woz joined #mojo
07:33 denis_boyun joined #mojo
07:41 fhelmber_ joined #mojo
07:45 dod joined #mojo
07:47 vytas joined #mojo
07:50 Dandre joined #mojo
07:51 dp_ joined #mojo
08:14 Shaeto joined #mojo
08:14 rawler joined #mojo
08:14 amon joined #mojo
08:19 denis_boyun_ joined #mojo
08:35 trone joined #mojo
08:37 bvierra_ joined #mojo
08:37 hernan joined #mojo
08:59 dod joined #mojo
09:02 woz joined #mojo
09:04 woz_ joined #mojo
09:10 doublelel joined #mojo
09:46 dod joined #mojo
10:39 da5id joined #mojo
10:51 marcus jberger / nicomen : I think you should try out batman's git-ship instead. Much more lightweight/dwim
10:56 sujithm_ joined #mojo
10:58 sujithm__ joined #mojo
11:00 sujithm joined #mojo
11:13 Guest-quest joined #mojo
11:18 Guest-quest hi, a question about Mojo::DOM. Is this parser is applicable for serious things?
11:20 Guest-quest (sorry i had no English as first lang)
11:23 Guest-quest for example, not properly work:   perl -MMojo::UserAgent -e "print Mojo::UserAgent->new->get('http://www.aliexpress.com/wholesale?SearchText=foo')->res->dom('li.list-item')->attr('qrdata');";
11:28 denis_boyun joined #mojo
11:33 Shaeto left #mojo
11:33 batman marcus: thanks :)
11:34 batman it adds the "git ship" command which integrates with git nicely. https://metacpan.org/pod/App::git::ship # feedback wanted
11:34 batman nicomen ^
11:37 nicomen cool
11:37 nicomen Guest-quest: yes for serious things
11:38 Guest-quest nicomen: please see above example
11:38 nicomen Guest-quest: your command prints three lines of code, is that wrong?
11:39 Guest-quest yes, but the lines must be more
11:40 go|dfish Tried XML::Twig on it to compare. It chokes with: 'mismatched tag at line 97, column 2, byte 6458'
11:41 fhelmber_ joined #mojo
11:46 nicomen hm
11:47 Adura They assume JS parsing along with DOM parsing.
11:47 Adura They are mistaken.
11:51 Adura Guest-quest, Mojo doesn't do Javascript, you have to find the pages that are called by the site's AJAX requests yourself.
11:55 nicomen I know Mojo::DOM goes a long way to read broken HTML
11:56 jberger for some reason they stuff all but the top three results into a textarea
11:57 jberger <textarea class="lazy-render">
11:57 nicomen oh
11:58 nicomen he can probably hack around it by re-parsing the textarea content as a DOM perhaps+
11:58 nicomen ?
11:58 jberger Guest-quest: you could get the text from that textarea and create a new DOM object to parse it
11:58 jberger nicomen: yeah
12:01 Guest-quest jberger & Adura & nicomen: many thanks )
12:02 jberger perl -Mojo -E '$p = g("http://www.aliexpress.com/wholesale?SearchText=foo"); say $p->dom("li.list-item")->attr("qrdata"); say x($p->dom("textarea.lazy-render")->all_text)->find("li.list-item")->attr("qrdata")'
12:03 Guest-quest jberger: best )
12:03 jberger actually it is interesting that parsing that second bit takes a significant amount of time longer than the first
12:04 jberger makes sense that they are "lazy-render"ing it I guess
12:08 dotan1 bpmedley: I submitted the talk proposal now.
12:13 Kripton joined #mojo
12:14 Vandal joined #mojo
12:22 Trelane joined #mojo
12:28 bpmedley dotan1: Awesome
12:30 Trelane joined #mojo
12:30 * sri yawns
12:36 dotan1 Title: "Mojolicious - Perl framework for the real-time web"Abstract: "A short introduction to Mojolicious [http://mojolicio.us], a next-generation framework that takes Perl web development from the old-time web to the real-time web."
12:37 dotan1 And by the time I got around to submitting it, the site already listed a talk on "Real time Ruby on Rails", with the abstract mentioning Node.js envy.
12:42 doublelel joined #mojo
12:44 neilhwatson joined #mojo
12:53 dotan1 http://railsisrael2014.events.co.il/presentations/1319-mojolicious-perl-famework-for-the-real-time-web
12:54 nicomen famework? ;)
12:56 Jonis hah
12:56 fhelmber_ joined #mojo
12:57 lipizzan joined #mojo
12:58 dotan1 It's gonna live forever!
12:59 tbushell_ joined #mojo
13:00 tbushell_ joined #mojo
13:01 tbushell left #mojo
13:01 nicomen dotan1: ;)
13:11 ignacio_ joined #mojo
13:12 marty joined #mojo
13:15 ignacio_ joined #mojo
13:17 sri lol
13:22 Guest-quest sorry again. why the code: $dom->attr('src') || $dom->attr('foo-src') # does not work but
13:22 Guest-quest but the code: $dom->attr('src') | $dom->attr('foo-src') # does work
13:23 Adura You're asking why boolean and bitwise or differ?
13:24 Guest-quest boolean || for ->attr
13:27 ribasushi Guest-quest: your question as asked implies several levels of misunderstanding, qualify "does not work" so we can help you further
13:28 ribasushi Guest-quest: that is - need to know what you expected to happen, in order to effectively answer and address what confused you
13:29 Guest-quest ok
13:34 nicomen ribasushi++
13:36 ribasushi nicomen: in fairness this needs to be a shortcut-factoid ;)
13:46 nicomen true dat
13:48 Guest-quest i want attr 'src' || 'image-src' : perl -Mojo -E '$p = g("http://www.aliexpress.com/wholesale?SearchText=foo"); $img = x($p->dom("textarea.lazy-render")->all_text)->find("img.picCore"); say $img->attr('src') || $img->attr('image-src');'
13:49 odc Guest-quest, what you need is ||=
13:49 odc not just ||
13:53 marcus wat
13:57 odc lol nevermind
14:00 Guest-quest please check the code http://pastebin.com/PSPgCXHe ))
14:01 Guest-quest comment line 17 not work with || operator. Why?
14:03 mikegrb I think you want || and not |?
14:04 Guest-quest mikegrb: || not work
14:05 Guest-quest particulary only
14:05 Guest-quest but | does work
14:07 odc when you say it does not work, what does it do exactly?
14:07 odc what is the value of the img key?
14:07 Guest-quest img has src OR image-src attr
14:08 mikegrb perl -MData::Printer -E '%foo=(two=>"blue");%bar=(one=>$foo{one}||$foo{two}); p %bar'
14:08 mikegrb this works as expected for me
14:08 mikegrb another option is: img=> $img->attr('src') ? $img->attr('src') :  $img->attr('image-src'),
14:08 sri you might want to read this before ever using | again http://perldoc.perl.org/perlop.html#Bitwise-String-Operators
14:12 Guest-quest simple get 'src' attr  OR 'image-src' attr of the mojo::dom
14:12 go|dfish Guest-quest: perl -Mojo -E '$p = g("http://www.aliexpress.com/wholesale?SearchText=foo"); $img = x($p->dom("textarea.lazy-render")->all_text)->find("img.picCore")->each( sub { say $_->{src} || $_->{"image-src"} })'
14:12 go|dfish the problem with your above code is that $img is a Mojo::Collection
14:13 go|dfish eh, I forgot to remove the "$img =" part, oops
14:13 Guest-quest go|dfish: oyaeh!
14:14 Guest-quest go|dfish: thanks ))
14:17 Guest-quest how to get scalar mojo:dom from the  Mojo::Collection ?
14:17 Akron joined #mojo
14:19 Guest-quest oklay, ->first
14:19 elik_ joined #mojo
14:23 arthas joined #mojo
14:26 disputin joined #mojo
14:27 disputin joined #mojo
14:35 ver joined #mojo
14:37 elik joined #mojo
14:41 D4RK-PH0ENiX joined #mojo
14:53 D4RK-PH0ENiX joined #mojo
15:21 sh4 joined #mojo
15:33 good_news_everyon joined #mojo
15:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/n_g14Q
15:33 good_news_everyon mojo/master 65859a2 Sebastian Riedel: default_message accepts an optional argument
15:33 good_news_everyon left #mojo
15:34 firnsy joined #mojo
15:49 firnsy joined #mojo
15:51 KCL_ joined #mojo
15:59 good_news_everyon joined #mojo
15:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/BDcLGQ
15:59 good_news_everyon mojo/master 3066f7a Sebastian Riedel: avoid a method call in Mojo::EventEmitter
15:59 good_news_everyon left #mojo
16:01 rem_lex|pivo joined #mojo
16:36 dotan1 I want to serve a (static) webpage without a charset, for a test. Do I need a hook?
16:48 berov joined #mojo
16:52 vytas joined #mojo
17:18 rawler joined #mojo
17:27 dotan1 nevermind, the answer is, format => htm (not html!
17:29 fhelmber_ joined #mojo
17:48 arthas joined #mojo
17:55 arthas_ joined #mojo
17:57 basic6 joined #mojo
18:03 arthas joined #mojo
18:19 disputin joined #mojo
18:20 disputin joined #mojo
18:34 ignacio__ joined #mojo
18:35 vytas joined #mojo
18:38 hernan joined #mojo
18:51 dod joined #mojo
18:53 dod joined #mojo
18:53 Eke- joined #mojo
19:17 denis_boyun joined #mojo
19:30 Ptolemarch joined #mojo
19:34 fhelmber_ joined #mojo
20:18 dod joined #mojo
20:21 dod joined #mojo
20:58 * sri is usually not a big fan of MVC, but this article is pretty good... i for one will stop asking why you're not drinking at meetups! https://modelviewculture.com/pieces/alcohol-and-inclusivity-planning-tech-events-with-non-alcoholic-options
20:59 mst offs
21:00 mst "arrange food, then beer, let people partake of whatever"
21:00 mst it's not hard
21:01 mst and the sum total conversation should go "Not drinking?" "Nope" "More for me then"
21:02 * mst shrugs
21:03 mst sri: basically: asking somebody if they aren't drinking is one thing; that fact may be relevant; why, however, is their damn business. This simple bit of logic seems to've saved me from ever having trouble around this.
21:05 genio yea, you said that perfectly.  The problem comes up when people insist that others drink.  If there's no pressure, there's no problem
21:06 sri i never put much thought into it... and actually asked tempire that question during mojoconf :/
21:07 cfedde If we are a small minority we adapt. if we are a larger minority we demand. When we are in the majority we impose.
21:08 * tempire wants to start programming community where people get looked at oddly when they say they drink alcohol
21:08 mst sri: as ever, the advice is pretty much on-point
21:09 mst sri: and the faux-academic-feminist bullshit beforehand makes my skin crawl
21:09 mst tempire: I just think people should be looked at oddly for caring either way
21:09 mst drink? sure? don't drink? sure? care whether other people are drinking? why?
21:10 mst goddamnit why can I never manage to skip the first half of modelviewmisandry articles
21:11 mst I'd end up so much less annoyed
21:12 mst ... people being thoughtless is worth correcting. calling people being thoughtless "a culture of pressure and abuse" is not constructive
21:12 mst damnit, the idea is to get people to tear the fucking system down, not guilt trip people for not having done it already
21:13 mst fucking ... bleh. holier than thou crusader signaling is a lot of why we've reached a point where it's often easier to sell feminist points if you don't ever call it feminism out loud while you're doing it
21:13 * mst throws a chair
21:13 mst (rant over, sorry for the noise)
21:14 cfedde have another drink.
21:14 sri you have to be loud and controversial to get people's attention
21:14 mst you can do that without handing the extremist idiots on the other side free ammunition
21:17 DaTa *sigh* http://www.cpantesters.org/cpan/report/5cd8fc7c-5d9a-11e4-a464-d4f3bb36d621
21:17 sri i don't think so actually, you need the extremists on both sides to yell at each other to establish a sensible middle ground
21:18 cfedde this is one reason I prefer consensus over majority rule.
21:30 lb sri: that's going so well with gamergate
21:41 cfedde I support your right to be offended.
21:51 sri TIL there's a Hello Kitty Con
21:56 cfedde The shock does not set in until you realize that every industrial niche has an association and an annual convention.
21:57 jzawodn woah... http://www.sanrio.com/hellokittycon/
21:58 sri sold out :(
21:59 jzawodn there's always next year!
21:59 jzawodn speaking of which, I think I'm going to YAPC next year for the first time evar!
22:00 sri \o/
22:01 jzawodn which is sad, really, since I went to the *original* Perl Conferences before they became OSCON
23:18 D4RK-PH0ENiX joined #mojo
23:27 good_news_everyon joined #mojo
23:27 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/2U780g
23:27 good_news_everyon mojo/master 874b85f Sebastian Riedel: deprecated support for data arguments in Mojo::JSON::Pointer
23:27 good_news_everyon left #mojo
23:34 D4RK-PH0ENiX joined #mojo
23:35 fhelmber_ joined #mojo
23:38 franzkafka Is this site set up in a way to stop scrapers?
23:38 franzkafka https://bigfuture.collegeboard.org/college-university-search/portland-community-college
23:38 franzkafka I've never really seen anything like it
23:39 franzkafka Wait
23:39 franzkafka Are you guys Hello Kitty fans?
23:46 sri hmm, wonder how to interpret this note in RFC 3339
23:46 sri "NOTE: ISO 8601 defines date and time separated by "T". Applications using this syntax may choose, for the sake of readability, to specify a full-date and full-time separated by (say) a space character."
23:46 go|dfish franzkafka: you could say so seeing as it wont load up without javascript enabled
23:48 sri guess it wouldn't hurt to allow Mojo::Date to accept the format "2014-08-20 20:45:00"
23:49 sri or rather, allow an arbitrary separator that's not a number
23:50 tbushell joined #mojo
23:54 good_news_everyon joined #mojo
23:54 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/tNQ1-g
23:54 good_news_everyon mojo/master aace17e Sebastian Riedel: be a little more liberal with RFC 3339 date and time separators
23:54 good_news_everyon left #mojo
23:55 sri i'll leave it undocumented for now, then we can remove it again if it causes problems :)
23:59 franzkafka sri, we use "2014-08-20 20:45:00" and "2014-08-20T20:45:00" quite often.
23:59 marty joined #mojo
23:59 franzkafka Working with Oracle databases that is.
23:59 sri franzkafka: it's the default format in postgresql too

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