From richard at rushlogistics.com Fri Mar 11 09:01:27 2016 From: richard at rushlogistics.com (richard at rushlogistics.com) Date: Fri, 11 Mar 2016 11:01:27 -0600 Subject: [Chicago-talk] Forking and Memory Message-ID: <20160311110127.z3xs3pct8w84wcwo@hostingemail.xo.com> I have this code below that forks to convert a large uploaded video. I just tried a 72M video and got: ?Route exception: Can't fork: Cannot allocate memory at /usr/local/share/perl/5.20.2/Mail/Transport/Sendmail.pm Is there something wrong with my code or do I need more RAM? ??? if ($file_stg =~ /MOV/) { ??? ??? #print "File is a MOV\n"; ??? if (my $kid = fork()) { ??? ??? ??????????????? waitpid($kid, 0); # let the child die ??????????? ??? } else { ???????????? ??? ??? if (my $grandkid = fork) { ??? ??? ??? ??? POSIX::_exit(0); # the child dies here ??????????????? ??? ??? } elsif (defined $kid && $kid == 0) { ??? ??? # child ??? ?? ??? ??? system("ffmpeg -i $self->{_video_in} -vcodec libx264 -profile:v main -level 3.1 -preset veryslow -crf 23 -x264-params ref=4 -acodec copy -movflags +faststart -vf scale=-2:720:flags=lanczos $self->{_video_out}.mp4"); ??? ? ??? ??? system("ffmpeg -i $self->{_video_out}.mp4 -c:v libtheora -c:a libvorbis $self->{_video_out}.ogv"); ??? ??? ??? ??? #exit 0; ??? ??? POSIX::_exit(0) ??? ??? } ??? ? ??? } ??? ??? } From madcityzen at gmail.com Fri Mar 18 15:22:09 2016 From: madcityzen at gmail.com (Doug Bell) Date: Fri, 18 Mar 2016 17:22:09 -0500 Subject: [Chicago-talk] March Presentation - Message-ID: <74C0CFE2-0DCC-49EE-8ADC-760EE45A163E@gmail.com> This month, Doug Bell[1] will be giving two short talks. One talk is about using Travis-CI[2], a free continuous integration testing service, for Perl projects, and maximizing Travis's effectiveness. This talk introduces Graham Knop's[3] Perl Travis Helpers[4], gets you started using Travis-CI, and shows how to configure Travis to cover edge cases like very old Perls and missing optional modules/features (using Devel::Hide[5]). The other talk is an introduction to Rex[6], a Perl-based server configuration management system. This talk was given informally at an office hours last year, but now it's a real talk with real slides! This talk introduces Rex, goes through simple configuration and tasks, and touches on some of the more powerful features of Rex such as the CMDB (Configuration Management Database). RSVP on the Chicago.PM Meetup: http://www.meetup.com/ChicagoPM/events/229699475/ [1]: Doug Bell: http://preaction.me [2]: Travis-CI: https://travis-ci.org [3]: Graham Knop: https://github.com/haarg [4]: Perl Travis Helpers: https://github.com/travis-perl/helpers [5]: Devel::Hide: https://metacpan.org/pod/Devel::Hide [6]: Rex: http://rexify.org Doug Bell madcityzen at gmail.com From michael at potter.name Mon Mar 21 04:52:14 2016 From: michael at potter.name (Michael Potter) Date: Mon, 21 Mar 2016 07:52:14 -0400 Subject: [Chicago-talk] Forking and Memory In-Reply-To: <20160311110127.z3xs3pct8w84wcwo@hostingemail.xo.com> References: <20160311110127.z3xs3pct8w84wcwo@hostingemail.xo.com> Message-ID: This is bit old thread, but I am replying anyway.... This line looks strange: if (my $grandkid = fork) { I would not expect the fork keyword there. Just a hunch. On Fri, Mar 11, 2016 at 12:01 PM, wrote: > I have this code below that forks to convert a large uploaded video. I > just tried a 72M video and got: > Route exception: Can't fork: Cannot allocate memory at > /usr/local/share/perl/5.20.2/Mail/Transport/Sendmail.pm > > Is there something wrong with my code or do I need more RAM? > > if ($file_stg =~ /MOV/) { > > #print "File is a MOV\n"; > if (my $kid = fork()) { > > waitpid($kid, 0); # let the child die > > } else { > > if (my $grandkid = fork) { > > POSIX::_exit(0); # the child dies here > > } elsif (defined $kid && $kid == 0) { > # child > > system("ffmpeg -i $self->{_video_in} -vcodec libx264 -profile:v > main -level 3.1 -preset veryslow -crf 23 -x264-params ref=4 -acodec copy > -movflags +faststart -vf scale=-2:720:flags=lanczos > $self->{_video_out}.mp4"); > > system("ffmpeg -i $self->{_video_out}.mp4 -c:v libtheora -c:a > libvorbis $self->{_video_out}.ogv"); > > #exit 0; > POSIX::_exit(0) > } > > } > > } > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -- Michael Potter Tapp Solutions, LLC www.tappsolutions.com +1 770 815 6142 ** Atlanta ** michael at potter.name ** www.linkedin.com/in/michaelpotter -------------- next part -------------- An HTML attachment was scrubbed... URL: From madcityzen at gmail.com Sat Mar 26 11:32:25 2016 From: madcityzen at gmail.com (Doug Bell) Date: Sat, 26 Mar 2016 13:32:25 -0500 Subject: [Chicago-talk] Fwd: [pm_groups] Announcement: TPF to send a few first timers to YAPC for $50. Register soon. References: Message-ID: The TPF is sponsoring people who are new to Perl to come to YAPC::NA in Orlando, FL. The reduced cost is $50, which includes admission, hotel, and the Zero to Perl 5 Beginner Class. So far a couple other Chicago.PM members will be there (myself included), so if you or someone you know is new to Perl, this is a good opportunity to go to a high-quality conference at a steep discount. Full details below. Doug Bell madcityzen at gmail.com > Begin forwarded message: > > From: David Oswald > Subject: [pm_groups] Announcement: TPF to send a few first timers to YAPC for $50. Register soon. > Date: March 26, 2016 at 11:42:47 AM CDT > To: pm_groups at pm.org > > New to Perl? Come to The Perl Conference in Orlando for only $50. > > > Perl is a thriving language backed by an active community that continues to grow daily as newcomers discover what the language has to offer. The Perl Conference (also affectionately referred to as ?YAPC::NA ?) is the premiere North American event featuring training, workshops, hackathons for all things Perl and for all skill levels. > > If you are new to Perl and have never attended YAPC before, The Perl Foundation is pleased to announce a very special welcome gift for a few lucky individuals. If this is your first time, you could join the Perl community at YAPC::NA::2016 in Orlando, Florida June 19th through 22nd for only $50. > > Here?s what your $50 will get you: > > Free admission to the main conference event, including all track talks, all keynotes, and some fun social events. (Regular ticket price is $250). > Free hotel accommodations June 19, 20, and 21 (The lowest room rate is $119/night) > Free Zero to Perl 5 Beginner Class. (Regular ticket price is $75). > That?s over $650 worth of YAPC for only $50! > > The YAPC::NA Website has a full conference schedule and description: http://yapcna.org > Q: What?s the fine print? > > A: There is some fine print, and there are only a few spots available. Please read http://www.yapcna.org/yn2016/newbies.html for all the details, and get your request in by April 10th, 2016 12:01:00 AM EST by mailing admin at yapcna.org . > > Q: What if I don?t win? > > A: If you are a student or active or retired military and are not selected for this program, you may still be eligible for a scholarship to attend YAPC (hotel and Zero to Perl class not included) for $50. Please see this link for details: http://www.yapcna.org/yn2016/costs.html#scholarships > > -- > > David Oswald > daoswald at gmail.com > -- > http://www.pm.org/faq/hosting_faq.html > > pm_groups mailing list > pm_groups at pm.org > http://mail.pm.org/mailman/listinfo/pm_groups -------------- next part -------------- An HTML attachment was scrubbed... URL: From amead2 at alanmead.org Sat Mar 26 13:19:00 2016 From: amead2 at alanmead.org (Alan Mead) Date: Sat, 26 Mar 2016 15:19:00 -0500 Subject: [Chicago-talk] Help with Net::Amazon::MechanicalTurk Message-ID: <56F6EEB4.3050301@alanmead.org> I need to install Net::Amazon::MechanicalTurk on my CentOS 6 server, but it's failing. If you're interested, the results are here: http://gooseburger.homeunix.org/alan/files/net-amazon-mturk.buildfails.text Looking at the open bugs on CPAN, this code looks unmaintained. But I did find this: http://daveviner.blogspot.com/2009/12/amazon-mechanical-turk-perl-library.html But the patch seems to be gone away and brian d foy's unofficial version seems to have gone away: http://search.cpan.org/~bdfoy/Net-Amazon-MechanicalTurk-1.01_01/ But I did find a suggestion to delete the function 'defined' on line 35 of ModuleUtil. The only comment in that routine was "Symbol table black magic" and I have no idea what it's doing. I've reproduced the relevant routine ("packageExists") with the change, although I think I'd need more context (like a call) to understand what it's doing... Can anyone explain this change? sub packageExists { my ($class, $package) = @_; # Symbol table black magic no strict 'refs'; return %{*{"${package}::"}}; # <-- here's the change #return defined %{*{"${package}::"}}; # <-- here's the old line # based on Pavel Karoukin's suggestion # http://stackoverflow.com/questions/701093/how-can-i-fix-netamazonmechanicalturks-failing-tests } When I run the accountbalance sample script, it returns "MechanicalTurk account balance: 10000.000" while the website says I have about $102.00. So, I'm assuming the code is not working... A number of the package's tests were deferred until I configured the package with AWS credentials, and one test failed when I re-ran them: t/93-RetrieveResults.t .................... 1/4 # Failed test 'Actual reviewable hits' # at t/93-RetrieveResults.t line 15. # Looks like you failed 1 test of 4. t/93-RetrieveResults.t .................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/4 subtests t/boilerplate.t ........................... ok t/pod-coverage.t .......................... skipped: Test::Pod::Coverage 1.04 required for testing POD coverage t/pod.t ................................... ok Test Summary Report ------------------- t/93-RetrieveResults.t (Wstat: 256 Tests: 4 Failed: 1) Failed test: 3 Non-zero exit status: 1 Files=33, Tests=112, 28 wallclock secs ( 0.09 usr 0.05 sys + 3.01 cusr 0.42 csys = 3.57 CPU) Result: FAIL Failed 1/33 test programs. 1/112 subtests failed. make: *** [test_dynamic] Error 255 Any suggestions about how I go about investigating this? Finally, I also found this: https://aws.amazon.com/items/443?externalID=443&categoryID=24 Which also doesn't work (no output) but I feel like I can probably debug that script myself. Any thoughts, suggestions, or experiences with this would be much appreciated. I'd really like to do this using Perl, if I can. -Alan -- Alan D. Mead, Ph.D. President, Talent Algorithms Inc. science + technology = better workers +815.588.3846 (Office) +267.334.4143 (Mobile) http://www.alanmead.org I've... seen things you people wouldn't believe... functions on fire in a copy of Orion. I watched C-Sharp glitter in the dark near a programmable gate. All those moments will be lost in time, like Ruby... on... Rails... Time for Pi. --"The Register" user Alister, applying the famous "Blade Runner" speech to software development From kent at c2group.net Sat Mar 26 16:32:53 2016 From: kent at c2group.net (Kent Cowgill) Date: Sat, 26 Mar 2016 18:32:53 -0500 Subject: [Chicago-talk] Help with Net::Amazon::MechanicalTurk In-Reply-To: <56F6EEB4.3050301@alanmead.org> References: <56F6EEB4.3050301@alanmead.org> Message-ID: <60610512-3B68-4CE9-A48D-FD8BDCC1D2BA@c2group.net> I found this at least: https://web.archive.org/web/20110222145817/http://www.vinertech.com/patches/net-amazon-mechanicalturk.patch > On Mar 26, 2016, at 3:19 PM, Alan Mead wrote: > > I need to install Net::Amazon::MechanicalTurk on my CentOS 6 server, but > it's failing. If you're interested, the results are here: > http://gooseburger.homeunix.org/alan/files/net-amazon-mturk.buildfails.text > > Looking at the open bugs on CPAN, this code looks unmaintained. But I > did find this: > http://daveviner.blogspot.com/2009/12/amazon-mechanical-turk-perl-library.html > > But the patch seems to be gone away and brian d foy's unofficial version > seems to have gone away: > http://search.cpan.org/~bdfoy/Net-Amazon-MechanicalTurk-1.01_01/ > > But I did find a suggestion to delete the function 'defined' on line 35 > of ModuleUtil. The only comment in that routine was "Symbol table black > magic" and I have no idea what it's doing. I've reproduced the relevant > routine ("packageExists") with the change, although I think I'd need > more context (like a call) to understand what it's doing... Can anyone > explain this change? > > sub packageExists { > my ($class, $package) = @_; > # Symbol table black magic > no strict 'refs'; > return %{*{"${package}::"}}; # <-- here's the change > #return defined %{*{"${package}::"}}; # <-- here's the old line > # based on Pavel Karoukin's suggestion > # > http://stackoverflow.com/questions/701093/how-can-i-fix-netamazonmechanicalturks-failing-tests > } > > When I run the accountbalance sample script, it returns "MechanicalTurk > account balance: 10000.000" while the website says I have about > $102.00. So, I'm assuming the code is not working... > > A number of the package's tests were deferred until I configured the > package with AWS credentials, and one test failed when I re-ran them: > > t/93-RetrieveResults.t .................... 1/4 > # Failed test 'Actual reviewable hits' > # at t/93-RetrieveResults.t line 15. > # Looks like you failed 1 test of 4. > t/93-RetrieveResults.t .................... Dubious, test returned 1 > (wstat 256, 0x100) > Failed 1/4 subtests > t/boilerplate.t ........................... ok > t/pod-coverage.t .......................... skipped: Test::Pod::Coverage > 1.04 required for testing POD coverage > t/pod.t ................................... ok > > Test Summary Report > ------------------- > t/93-RetrieveResults.t (Wstat: 256 Tests: 4 Failed: 1) > Failed test: 3 > Non-zero exit status: 1 > Files=33, Tests=112, 28 wallclock secs ( 0.09 usr 0.05 sys + 3.01 > cusr 0.42 csys = 3.57 CPU) > Result: FAIL > Failed 1/33 test programs. 1/112 subtests failed. > make: *** [test_dynamic] Error 255 > > Any suggestions about how I go about investigating this? > > Finally, I also found this: > https://aws.amazon.com/items/443?externalID=443&categoryID=24 > > Which also doesn't work (no output) but I feel like I can probably debug > that script myself. > > Any thoughts, suggestions, or experiences with this would be much > appreciated. I'd really like to do this using Perl, if I can. > > -Alan > > -- > > Alan D. Mead, Ph.D. > President, Talent Algorithms Inc. > > science + technology = better workers > > +815.588.3846 (Office) > +267.334.4143 (Mobile) > > http://www.alanmead.org > > I've... seen things you people wouldn't believe... > functions on fire in a copy of Orion. > I watched C-Sharp glitter in the dark near a programmable gate. > All those moments will be lost in time, like Ruby... on... Rails... Time for Pi. > > --"The Register" user Alister, applying the famous > "Blade Runner" speech to software development > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From amead2 at alanmead.org Sat Mar 26 16:41:22 2016 From: amead2 at alanmead.org (Alan Mead) Date: Sat, 26 Mar 2016 18:41:22 -0500 Subject: [Chicago-talk] Help with Net::Amazon::MechanicalTurk In-Reply-To: <60610512-3B68-4CE9-A48D-FD8BDCC1D2BA@c2group.net> References: <56F6EEB4.3050301@alanmead.org> <60610512-3B68-4CE9-A48D-FD8BDCC1D2BA@c2group.net> Message-ID: <56F71E22.9020900@alanmead.org> On 3/26/2016 6:32 PM, Kent Cowgill wrote: > I found this at least: > > https://web.archive.org/web/20110222145817/http://www.vinertech.com/patches/net-amazon-mechanicalturk.patch Thanks! I'll give it a try right now. -Alan -- Alan D. Mead, Ph.D. President, Talent Algorithms Inc. science + technology = better workers +815.588.3846 (Office) +267.334.4143 (Mobile) http://www.alanmead.org I've... seen things you people wouldn't believe... functions on fire in a copy of Orion. I watched C-Sharp glitter in the dark near a programmable gate. All those moments will be lost in time, like Ruby... on... Rails... Time for Pi. --"The Register" user Alister, applying the famous "Blade Runner" speech to software development From amead2 at alanmead.org Sat Mar 26 20:52:59 2016 From: amead2 at alanmead.org (Alan Mead) Date: Sat, 26 Mar 2016 22:52:59 -0500 Subject: [Chicago-talk] Help with Net::Amazon::MechanicalTurk In-Reply-To: <56F71E22.9020900@alanmead.org> References: <56F6EEB4.3050301@alanmead.org> <60610512-3B68-4CE9-A48D-FD8BDCC1D2BA@c2group.net> <56F71E22.9020900@alanmead.org> Message-ID: <56F7591B.2080508@alanmead.org> On 3/26/2016 6:32 PM, Kent Cowgill wrote: > > I found this at least: > > https://web.archive.org/web/20110222145817/http://www.vinertech.com/patches/net-amazon-mechanicalturk.patch Thanks again Kent! I think this is working. In a past email I had one test failing, 93-RetrieveResults.t, and I think that's because I don't have any results to retrieve. And the account balance script needed to be forced to query the production environment: #!/usr/bin/perl use strict; use warnings; use Net::Amazon::MechanicalTurk; # This sample shows how to get your account balance. my $mturk = Net::Amazon::MechanicalTurk->new; $mturk->serviceUrl('Production'); # this is the important change printf "MechanicalTurk account balance: %s\n", $mturk->getAvailableBalance; -Alan -- Alan D. Mead, Ph.D. President, Talent Algorithms Inc. science + technology = better workers +815.588.3846 (Office) +267.334.4143 (Mobile) http://www.alanmead.org I've... seen things you people wouldn't believe... functions on fire in a copy of Orion. I watched C-Sharp glitter in the dark near a programmable gate. All those moments will be lost in time, like Ruby... on... Rails... Time for Pi. --"The Register" user Alister, applying the famous "Blade Runner" speech to software development