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

IRC log for #mojo, 2014-11-19

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

All times shown according to UTC.

Time Nick Message
00:05 spikkie joined #mojo
00:12 sri at this point the pg_notifies problem doesn't really matter much anymore, if it changes in DBD::Pg, breaking Mojo::Pg, we have an excuse for changing it anyway
00:13 sri only thing i'm a little unsure about is an event name... which is very minor... http://mojolicio.us/perldoc/Mojo/Pg/Database#close
00:13 sri and Minion is just done now, no open problems
01:03 laouji joined #mojo
01:09 KCL_ joined #mojo
01:10 tempire I don't see anything wrong with on(close
01:14 absolut__ joined #mojo
01:38 * sri has released Minion 1.0 and Mojo::Pg 1.0
01:49 sri \o/
01:51 bpmedley Awesome
02:21 klapperl joined #mojo
02:43 ceej__ evening, how would I use http://mojolicio.us/perldoc/Minion with heroku’s workers?  Coming from ruby id specify worker: command to run workers
02:45 KCL joined #mojo
02:47 sri http://mojolicio.us/perldoc/Minion#DESCRIPTION
02:50 ceej__ sri: so I’d just add that line to my Perloku file?
02:51 sri dunno, i have little experience with heroku
02:52 sri and i suppose there are multiple perl buildpacks now
02:54 sri looks like you'd have to send a pull request for worker support in perloku https://github.com/judofyr/perloku/blob/master/bin/release
02:55 ceej__ ah, ty.
03:23 zivester joined #mojo
03:41 genio ^5
03:42 genio hmmm... maybe free certs soon: http://www.engadget.com/2014/11/18/lets-encrypt/?ncid=rss_truncated  ?
03:50 disputin joined #mojo
04:07 basic6_ joined #mojo
04:13 panzana` joined #mojo
04:20 woz joined #mojo
04:43 jberger sri++
04:44 jberger also just saw Interstellar
04:44 jberger most of the comments I have seen have been about the visual spectacle
04:44 jberger I'm not sure that it holds a candle to Gravity
04:48 franzkafka joined #mojo
04:48 franzkafka Has anyone here used the Google Places API with Mojo::UserAgent?
04:49 nicomen jberger: I wan't disappointed, but I think it has been hyped too much
04:49 jberger nicomen: agreed
04:50 jberger a decent movie, but I'll take 2001 and HP3 and Inception and call it a day probably
04:51 franzkafka I have a simple script: http://paste.scsys.co.uk/443286
04:51 franzkafka It basically takes a CSV file, one city/state per line, and looks up the long and lat for them
04:51 franzkafka However, for some reason, running the script 50 lines is 1,200 API calls.
04:53 firnsy franzkafka: it looks like you're needlessly to two get() calls when one could suffice
04:53 firnsy s/to/doing/
04:53 nicomen franzkafka: start by using one get call at least
04:54 franzkafka Ah, good eye! You're right.
04:54 nicomen my $location = $ua->get($url)->res->json->{results}->[0]->{geometry}->{location};
04:54 franzkafka Still, 50 lines should equal 100 calls with it the way it is, not 1,2000
04:55 franzkafka Alright, I've fixed that problem. Let's see what happens.
04:57 nicomen ($row->[2], $row->[3]) = @{$location}{'lat','lng'};
05:00 jberger franzkafka: May I self promote?  https://metacpan.org/pod/Tie::Array::CSV
05:05 franzkafka nice jberger, going to use it :D
05:06 franzkafka How do I test if res->json->{results}->[0]->{geometry}->{location} exists? I don't want it to keep dying with 'Can't use an undefined value as a HASH reference'
05:07 hesperaux joined #mojo
05:07 jberger franzkafka: json pointer?
05:07 jberger it's built right in
05:08 absolut_todd joined #mojo
05:08 franzkafka I did
05:09 franzkafka Interesting, getting a 400 error now and then: <p>Your client has issued a malformed or illegal request.  <ins>That’s all we know.</ins>
05:11 franzkafka Ahh, my bad
05:12 franzkafka I thought $url->query({query => $query}); would encode spaces, etc
05:12 nicomen my $j = $res->json; my $l = $j->get('/results/0/geometry/location');
05:13 nicomen isn't there a google location module anyway?
05:13 franzkafka I am a complete and total idiot
05:13 preaction admitting it is the first step to recovery ;)
05:13 nicomen http://search.cpan.org/~manwar/WWW-Google-Places-0.04/lib/WWW/Google/Places.pm
05:14 franzkafka For every single time through my loop $url->query({query => $query}); was adding the new location to the query
05:14 nicomen heh
05:15 franzkafka yeah, my $url was getting pretty long by loop 10
05:16 franzkafka And look at that, 1 request equals 1 API all
05:16 franzkafka s/all/call
05:17 franzkafka And it does encode elements too
05:18 nicomen ;)
05:19 franzkafka Thanks for the help all!
05:19 franzkafka And thanks for pointing me to your CSV module jberger, I will be replacing Text::CSV with it
05:21 Snelius franzkafka: what is a csv module  ?
05:21 jberger it uses that module under the hood, but imo it's much cleaner and clearer
05:21 atom joined #mojo
05:21 jberger Snelius: https://metacpan.org/pod/Tie::Array::CSV
05:22 franzkafka I swear to god, Google API is having issues I think. I don't think it's a problem with my script. I just jumped from 5,000/100,000 requests to over my quota in a few hundred lines.
05:22 franzkafka Snelius, I can't even say I use CSV for version control either.
05:23 irq joined #mojo
05:24 Snelius ok, thx
05:26 laouji joined #mojo
05:31 woz joined #mojo
05:33 sri franzkafka: MOJO_USERAGENT_DEBUG=1 if in doubt
05:35 franzkafka sri, yeah that's set... it's not the script, I am positive it is Google Places API. It seems to be having issues today.
05:36 hesperaux_ joined #mojo
05:38 franzkafka This piece of crap keeps going between allowing me to make API calls to "OVER QUERY LIMIT"
05:45 avkhozov joined #mojo
06:33 franzkafka Ah, not sure if this is still the case: https://groups.google.com/forum/#!msg/google-places-api/W1TNvYVkI9w/BBgyMKUiWqQJ
06:33 franzkafka According to Google employee, text search is subject to a 10x multiplier, making each request equal to 10 API calls
06:33 franzkafka that explains it
06:33 purl Damn right it does.
06:37 franzkafka Yep, from Places API documentation: 'Note that the Text Search service is subject to a 10-times multiplier. That is, each Text Search request that you make will count as 10 requests against your quota.'
06:48 dotandimet joined #mojo
06:51 dod joined #mojo
07:10 tianon joined #mojo
07:20 woz joined #mojo
07:25 rem_lex|pivo joined #mojo
07:32 tianon joined #mojo
07:34 Adura joined #mojo
07:44 HtbaaPi joined #mojo
07:46 ashimema joined #mojo
07:48 dotandimet joined #mojo
07:48 rawler joined #mojo
08:10 marmez joined #mojo
08:12 batman chansen: not sure what is confusing with what I said. A Perl scalar holds data. The encoding information is metadata. It helps with io and regexes.
08:13 sugar joined #mojo
08:13 batman And you can toggle the UTF8 flag on for a scalar holding iso8859 characters
08:13 batman Sorry for not replying yesterday. Was helping a coworker with SSL and forgot all about it :/
08:19 Vandal joined #mojo
08:24 sugar_ joined #mojo
08:28 trone joined #mojo
08:31 sugar__ joined #mojo
08:34 ashimema joined #mojo
08:44 basiliscos joined #mojo
08:47 b^_^d joined #mojo
08:47 mishantil joined #mojo
08:47 mfontani joined #mojo
08:47 genio joined #mojo
08:47 gabiruh joined #mojo
08:47 Bender joined #mojo
08:47 bayashi joined #mojo
08:47 rofl__ joined #mojo
08:47 stephanj joined #mojo
08:47 Kundun joined #mojo
08:47 lestrrat joined #mojo
08:47 cpan_mojo joined #mojo
08:47 wim joined #mojo
08:47 preaction joined #mojo
08:47 elik joined #mojo
08:47 Jonis joined #mojo
08:47 tempire joined #mojo
08:47 bc547 joined #mojo
08:47 allison joined #mojo
08:47 firnsy joined #mojo
08:47 stryx` joined #mojo
08:47 diegok joined #mojo
08:47 Snelius joined #mojo
08:47 batman joined #mojo
08:47 sri joined #mojo
08:47 ribasushi joined #mojo
08:47 jmmills joined #mojo
08:47 inokenty joined #mojo
08:47 GillesM joined #mojo
08:47 jamesw joined #mojo
08:47 mudler joined #mojo
08:47 ceej__ joined #mojo
08:47 jberger joined #mojo
08:47 davido__ joined #mojo
08:47 moritz joined #mojo
08:47 augensalat joined #mojo
08:47 omega joined #mojo
08:47 yuni joined #mojo
08:47 rwp joined #mojo
08:47 yusukebe joined #mojo
08:47 salparadise joined #mojo
08:47 stokachu joined #mojo
08:47 xtetsuji joined #mojo
08:47 DaTa joined #mojo
08:47 sweet_kid joined #mojo
08:47 phillipadsmith joined #mojo
08:47 chansen joined #mojo
08:47 bowtie joined #mojo
08:47 saki joined #mojo
08:47 mtj- joined #mojo
08:47 dp_ joined #mojo
08:47 Zx3 joined #mojo
08:47 doby joined #mojo
08:47 Grinnz_ joined #mojo
08:47 abhishekisnot joined #mojo
08:47 hernan604 joined #mojo
08:47 basic6_ joined #mojo
08:47 avkhozov joined #mojo
08:47 dod joined #mojo
08:47 rem_lex|pivo joined #mojo
08:47 Adura joined #mojo
08:47 andrefs joined #mojo
08:47 go|dfish joined #mojo
08:47 bzero joined #mojo
08:47 Kovensky joined #mojo
08:47 cosimo joined #mojo
08:47 agorman joined #mojo
08:47 wk joined #mojo
08:47 nickname joined #mojo
08:47 dabudabu joined #mojo
08:47 jeff joined #mojo
08:47 lb joined #mojo
08:47 avenj joined #mojo
08:47 ivan joined #mojo
08:47 suy joined #mojo
08:47 kmx joined #mojo
08:47 Andreas joined #mojo
08:47 denny joined #mojo
08:47 paulg joined #mojo
08:47 jzawodn joined #mojo
08:47 xevz joined #mojo
08:47 al joined #mojo
08:47 Fistful_of_Coins joined #mojo
08:47 oetiker joined #mojo
08:47 odc joined #mojo
08:47 janus joined #mojo
08:47 risugg joined #mojo
08:47 bobkare joined #mojo
08:47 alnewkirk joined #mojo
08:47 kablamo joined #mojo
08:47 jwang joined #mojo
08:47 throughnothing joined #mojo
08:47 gtodd joined #mojo
08:47 Lee joined #mojo
08:47 hahainternet joined #mojo
08:47 da5id joined #mojo
08:47 Grinnz joined #mojo
08:47 Ralesk joined #mojo
08:47 niczero joined #mojo
08:47 jnbek joined #mojo
08:47 absolut_todd joined #mojo
08:47 atom joined #mojo
08:47 laouji joined #mojo
08:47 hesperaux_ joined #mojo
08:47 tianon joined #mojo
08:47 HtbaaPi joined #mojo
08:47 rawler joined #mojo
08:47 trone joined #mojo
08:47 BinGOs joined #mojo
08:48 purl joined #mojo
08:49 dotandimet joined #mojo
08:50 garu joined #mojo
08:50 mst joined #mojo
08:54 aleksey joined #mojo
08:55 garu_ joined #mojo
08:57 dotandimet joined #mojo
08:57 Insane joined #mojo
08:58 Insane hi all, I have mojo classic app working under hypnotoad, so how could I get path to main script from anywhere of the code? (from $c, or $app) is there any way?
09:00 ashimema joined #mojo
09:01 woz joined #mojo
09:03 odc Insane, i guess you're looking for FindBin?
09:03 odc it's a core module
09:06 Adurah joined #mojo
09:19 neyasov_ joined #mojo
09:21 sugar joined #mojo
09:28 irq joined #mojo
09:45 garu joined #mojo
09:45 neyasov_ joined #mojo
09:45 sugar joined #mojo
09:45 woz joined #mojo
09:45 ashimema joined #mojo
09:45 Insane joined #mojo
09:45 b^_^d joined #mojo
09:45 mishantil joined #mojo
09:45 mfontani joined #mojo
09:45 genio joined #mojo
09:45 gabiruh joined #mojo
09:45 Bender joined #mojo
09:45 bayashi joined #mojo
09:45 rofl__ joined #mojo
09:45 stephanj joined #mojo
09:45 Kundun joined #mojo
09:45 lestrrat joined #mojo
09:45 cpan_mojo joined #mojo
09:45 wim joined #mojo
09:45 preaction joined #mojo
09:45 elik joined #mojo
09:45 Jonis joined #mojo
09:45 tempire joined #mojo
09:45 bc547 joined #mojo
09:45 allison joined #mojo
09:45 firnsy joined #mojo
09:45 stryx` joined #mojo
09:45 diegok joined #mojo
09:45 Snelius joined #mojo
09:45 batman joined #mojo
09:45 sri joined #mojo
09:45 ribasushi joined #mojo
09:45 jmmills joined #mojo
09:45 inokenty joined #mojo
09:45 GillesM joined #mojo
09:45 jamesw joined #mojo
09:45 mudler joined #mojo
09:45 ceej__ joined #mojo
09:45 jberger joined #mojo
09:45 davido__ joined #mojo
09:45 moritz joined #mojo
09:45 augensalat joined #mojo
09:45 omega joined #mojo
09:45 yuni joined #mojo
09:45 rwp joined #mojo
09:45 yusukebe joined #mojo
09:45 salparadise joined #mojo
09:45 stokachu joined #mojo
09:45 xtetsuji joined #mojo
09:45 DaTa joined #mojo
09:45 sweet_kid joined #mojo
09:45 phillipadsmith joined #mojo
09:45 chansen joined #mojo
09:45 bowtie joined #mojo
09:45 saki joined #mojo
09:45 mtj- joined #mojo
09:45 dp_ joined #mojo
09:45 Zx3 joined #mojo
09:45 doby joined #mojo
09:45 Grinnz_ joined #mojo
09:45 abhishekisnot joined #mojo
09:45 hernan604 joined #mojo
09:45 basic6_ joined #mojo
09:45 avkhozov joined #mojo
09:45 dod joined #mojo
09:45 rem_lex|pivo joined #mojo
09:45 andrefs joined #mojo
09:45 go|dfish joined #mojo
09:45 bzero joined #mojo
09:45 Kovensky joined #mojo
09:45 cosimo joined #mojo
09:45 agorman joined #mojo
09:45 wk joined #mojo
09:45 nickname joined #mojo
09:45 dabudabu joined #mojo
09:45 jeff joined #mojo
09:45 lb joined #mojo
09:45 avenj joined #mojo
09:45 ivan joined #mojo
09:45 suy joined #mojo
09:45 kmx joined #mojo
09:45 Andreas joined #mojo
09:45 denny joined #mojo
09:45 paulg joined #mojo
09:45 jzawodn joined #mojo
09:45 xevz joined #mojo
09:45 al joined #mojo
09:45 Fistful_of_Coins joined #mojo
09:45 oetiker joined #mojo
09:45 odc joined #mojo
09:45 janus joined #mojo
09:45 risugg joined #mojo
09:45 bobkare joined #mojo
09:45 alnewkirk joined #mojo
09:45 kablamo joined #mojo
09:45 jwang joined #mojo
09:45 throughnothing joined #mojo
09:45 gtodd joined #mojo
09:45 Lee joined #mojo
09:45 hahainternet joined #mojo
09:45 da5id joined #mojo
09:45 Grinnz joined #mojo
09:45 Ralesk joined #mojo
09:45 niczero joined #mojo
09:45 jnbek joined #mojo
09:45 absolut_todd joined #mojo
09:45 laouji joined #mojo
09:45 tianon joined #mojo
09:45 HtbaaPi joined #mojo
09:45 rawler joined #mojo
09:45 trone joined #mojo
09:46 BinGOs joined #mojo
09:47 Insane if I have my own Mojolicious command, could I ask mojo to run this command ever day? or it is better to use cron?
09:48 purl joined #mojo
09:50 garu_ joined #mojo
09:56 mst joined #mojo
10:03 Adura joined #mojo
10:11 crab use cron
10:14 fhelmber_ joined #mojo
10:20 odc "Cron is strong"
10:27 dotandimet joined #mojo
10:49 dotandimet joined #mojo
10:51 sugar_ joined #mojo
10:55 sugar__ joined #mojo
11:12 sugar joined #mojo
11:28 alnewkirk joined #mojo
12:00 ua joined #mojo
12:34 neilhwatson joined #mojo
12:37 sugar_ joined #mojo
12:48 sugar__ joined #mojo
13:22 oetiker writing code for a proxy. in order to pass on a post request, I am doing: $txNew->req->body($ctrl->req->build_body)
13:22 oetiker is there a better way
13:22 sujithm joined #mojo
13:22 oetiker in case the incoming request has a really large body (upload post)
13:39 human39 joined #mojo
13:47 Akron joined #mojo
14:08 odc oetiker, looks at this: http://larig.wordpress.com/2012/08/01/a-mini-proxy-via-mojolicious/
14:08 odc it still requires a copy though
14:09 odc i guess you'd have to write your proxy in C to avoid copies
14:12 lipizzan joined #mojo
14:13 irq_ joined #mojo
14:15 popeshoe joined #mojo
14:17 rosinante joined #mojo
14:21 zivester joined #mojo
14:31 popeshoe hi I have a weird thing with morbo, hopefully this sounds familiar to someone. I have a route set up to execute a method on a controller, which works the first time, but then subsequent executions I get a perl error about how it can't locate the same controller
14:33 popeshoe so my controller sits in lib/Blah/Controller.pm, and the error that happens on the second excution complains that it can't find that file, and it's looking in lib/Blah/Controller/Controller.pm for it
14:39 rosinante joined #mojo
14:42 sri odc: that doesn't copy the message body
14:42 KCL_ joined #mojo
14:44 rocinante joined #mojo
14:46 odc sri, clone() doesn't make a copy?
15:01 bucephalus joined #mojo
15:10 sugar joined #mojo
15:13 bwf joined #mojo
15:29 spikkie joined #mojo
15:33 Akron Oh - Mojo::PG is ready to be used - that's great! sri++
15:33 Akron jberger: Congrats to your new job!
15:34 sh4 joined #mojo
15:41 punter joined #mojo
15:42 punter joined #mojo
15:54 sugar_ joined #mojo
15:57 hernan604 ready for prod? \o/
16:00 cfedde what ever "prod" is.
16:00 cfedde so far as I can tell it is the place where we put code for user testing.
16:32 ignacio_ joined #mojo
16:36 dod joined #mojo
16:38 dod joined #mojo
16:40 s1037989 joined #mojo
16:47 disputin joined #mojo
17:24 dod joined #mojo
17:30 sri i bet notifications will be used wrong a lot (should Mojo::Pg become popular)
17:33 sri Akron: i noticed you've switched to $collection->map(sub { $_->foo }) from pluck
17:33 sri you can also just do ->map('foo')
17:46 Akron sri: Oh ... I wasn't sure $method was meant this way (and not meant as a callback). Thanks - I will change that!
17:47 Akron May be $methodname would be more clear.
17:47 sri pluck was documented the same way ;p
17:48 Akron It's history for good reason! :-P
17:54 ignacio_ joined #mojo
17:59 hernan604 joined #mojo
18:08 sugar__ joined #mojo
18:17 dod joined #mojo
18:31 neyasov_ joined #mojo
18:38 dod joined #mojo
18:41 ua left #mojo
19:17 rocinante joined #mojo
19:39 neyasov_ joined #mojo
19:56 asarch joined #mojo
20:23 irq joined #mojo
21:05 gtodd1 joined #mojo
21:15 disputin joined #mojo
21:32 KCL_ joined #mojo
21:34 rem_lex joined #mojo
21:38 dotandimet joined #mojo
21:39 sri really slow week
21:48 gtodd joined #mojo
22:14 Averna joined #mojo
22:20 sugar joined #mojo
22:37 mtths joined #mojo
23:18 disputin joined #mojo
23:29 absolut__ joined #mojo
23:44 absolut_todd joined #mojo

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