From not.com at gmail.com Wed Aug 1 10:54:21 2012 From: not.com at gmail.com (yary) Date: Wed, 1 Aug 2012 13:54:21 -0400 Subject: [sf-perl] All these Perl web frameworks In-Reply-To: References: Message-ID: Just got an off-list comment, so thought I should follow up that I did a web-search and found some good answers via perlmonks at http://www.perlmonks.org/?node_id=900844 corroborated by http://code.google.com/p/catz/wiki/FrameworkComparison and this "directors cut" announcement for Poet http://www.openswartz.com/2012/04/21/poet-a-web-framework-for-mason/ All can get the job done, differentiation is on how much it leans on CPAN vs. bundled all-in-one, how much it creates a domain-specific language vs. uses perl, a few bells and whistles... Most of the web work I've done was MVC, eg a perl (or python) file containing a sub that was tied to a template html-ish file, pretty much one-to-one. I'm interested by Poet/Mason method of being pragmatic and putting the code & template in a single file. Alas as I stated in the first email, I doubt I'll get round tuit! From doom at kzsu.stanford.edu Wed Aug 1 13:39:16 2012 From: doom at kzsu.stanford.edu (Joseph Brenner) Date: Wed, 1 Aug 2012 13:39:16 -0700 Subject: [sf-perl] All these Perl web frameworks In-Reply-To: References: Message-ID: yary wrote: > ... and was wondering if you would care to > discuss/post a comparison of the following frameworks. Why would you > pick one over the other, what differentiates them? I don't have a lot of first-hand experience on these, but that doesn't usually stop me-- > Catalyst- http://www.catalystframework.org/ - grandaddy of the big > active frameworks? Lots of modules / flexibility? Yes, I think that's about the size of it. > Mojolicious- http://mojolicio.us/ A lot of us seem to agree that Mojolicious is a scary project. They're main feature is they've reduced external dependencies, but that means they've re-written a lot of stuff from scratch themselves. > Dancer- http://perldancer.org/ I've got a vaguely positive vibe about dancer, though at this point I can't remember why... I gather Catalyst is more configurable. > Poet- http://search.cpan.org/~jswartz/Poet-0.09/lib/Poet/Manual/Intro.pod I would say that Jonathan has a good point that while the various MVC-style frameworks talk-up "separation of concerns" really the pieces end up being pretty tightly-coupled, and you have to keep making parallel changes everywhere. Also, using Mason by default appeals to me more than TT, it feels much more perlish. From bryan at beeley.org Thu Aug 2 10:17:33 2012 From: bryan at beeley.org (Bryan Beeley) Date: Thu, 02 Aug 2012 10:17:33 -0700 Subject: [sf-perl] All these Perl web frameworks In-Reply-To: References: Message-ID: <501AB62D.9030307@beeley.org> On 08/01/2012 01:39 PM, Joseph Brenner wrote: >> Catalyst- http://www.catalystframework.org/ - grandaddy of the big >> active frameworks? Lots of modules / flexibility? > Yes, I think that's about the size of it. I have used Catalyst extensively, and would definitely recommend it. It is a huge memory hog though. I would also recommend you take advantage of copy-on-write as much as possible (load as much as possible into memory before forking child Catalyst processes). >> Mojolicious- http://mojolicio.us/ > A lot of us seem to agree that Mojolicious is a scary project. > They're main feature is they've reduced external dependencies, but > that means they've re-written a lot of stuff from scratch themselves. I don't know much about Mojolicious. I was on their mailing list for a while though, and it didn't seem like things were moving very fast. >> Dancer- http://perldancer.org/ > I've got a vaguely positive vibe about dancer, though at this point I > can't remember why... I gather Catalyst is more configurable. I have heard that Dancer is nice and much lighter weight than Catalyst. Probably better for quick, simple projects where Catalyst would be overkill. I haven't had any direct experience with it though. >> Poet- http://search.cpan.org/~jswartz/Poet-0.09/lib/Poet/Manual/Intro.pod > I would say that Jonathan has a good point that while the various > MVC-style frameworks talk-up "separation of concerns" really the > pieces end up being pretty tightly-coupled, and you have to keep > making parallel changes everywhere. As with a lot of things, I think there are a lot of design decisions that can be made to keep things more separate. What worked for the last big project I was on was to move all the code dealing with the model into a Form object (we use HTML::FormHandler). This makes the controllers very simple, and allows you to test your forms separately from your Controllers. Assuming you will be using DBIx::Class, you can help to keep things less tightly-coupled by putting any complicated searches into custom ResultSet methods. Doing so makes it more likely that you will be able to make model changes without having to touch code outside of the model. > Also, using Mason by default appeals to me more than TT, it feels much > more perlish. I feel like using TT is great because its is too simple to do anything too complicated well but flexible enough to allow you to make most pages work when only passing in a form object -- encouraging more separation of concerns. Bryan From mgrimes at cpan.org Fri Aug 3 09:14:45 2012 From: mgrimes at cpan.org (Mark Grimes) Date: Fri, 3 Aug 2012 12:14:45 -0400 Subject: [sf-perl] All these Perl web frameworks In-Reply-To: <501AB62D.9030307@beeley.org> References: <501AB62D.9030307@beeley.org> Message-ID: On Thu, Aug 2, 2012 at 1:17 PM, Bryan Beeley wrote: > I have used Catalyst extensively, and would definitely recommend it. It is > a huge memory hog though. I would also recommend you take advantage of > copy-on-write as much as possible (load as much as possible into memory > before forking child Catalyst processes). Agree, Catalyst is very robust, flexible, and highly recommended, but it is a bit of a memory hog. Bryan, can you expand on taking advantage of COW? I've been using plack and the FCGI backends, but I'm not sure when exactly when it is loading modules vs forking. In order to improve the hot deployment, I've been thinking about switching to server::starter/startlet and proxying it behind apache, but again I'm not sure about load vs fork. >>> Mojolicious- http://mojolicio.us/ >> >> A lot of us seem to agree that Mojolicious is a scary project. >> They're main feature is they've reduced external dependencies, but >> that means they've re-written a lot of stuff from scratch themselves. > > I don't know much about Mojolicious. I was on their mailing list for a > while though, and it didn't seem like things were moving very fast. Reinventing the wheel has been a common concern for Mojolicious, but they have done a great job of it. I've found it to be stable, lightweight, well documented, and feature packed (WebSockets, DOM parsing, etc). I really like that you can write apps with very little "magic", for example, you can declare your routes explicitly rather than relying on auto-discovery based on method attributes. And, there is Mojo::Lite if you want the magic. The mailing list may be slow but the pace of development is brisk. There have been six releases to CPAN in just the last month and about one major release each year. >>> Dancer- http://perldancer.org/ I've heard good things about Dancer, but when I last looked there seemed to be a great deal of the aforementioned "magic" involved. In many ways they seem to be creating a DSL for webapps (similar to Mojo::Lite). I believe Dancer is going through a very substantial rewrite as they approach 2.0. >>> Poet- http://search.cpan.org/~jswartz/Poet-0.09/lib/Poet/Manual/Intro.pod I haven't tried Poet, but Mason is my preferred templating language under Catalyst. Unless you have a bunch of non-programmers editing your templates, why introduce another mini-language when you can just use Perl. As a templating language though, it does require some discipline to keep from pushing too much logic into your view. Poet takes a unique approach by encouraging the combination of presentation and logic. -Mark From bryan at beeley.org Tue Aug 7 14:40:26 2012 From: bryan at beeley.org (Bryan Beeley) Date: Tue, 07 Aug 2012 14:40:26 -0700 Subject: [sf-perl] All these Perl web frameworks In-Reply-To: References: <501AB62D.9030307@beeley.org> Message-ID: <50218B4A.1030705@beeley.org> On 08/03/2012 09:14 AM, Mark Grimes wrote: > Agree, Catalyst is very robust, flexible, and highly recommended, but > it is a bit of a memory hog. Bryan, can you expand on taking advantage > of COW? I've been using plack and the FCGI backends, but I'm not sure > when exactly when it is loading modules vs forking. In order to > improve the hot deployment, I've been thinking about switching to > server::starter/startlet and proxying it behind apache, but again I'm > not sure about load vs fork. Unfortunately, I don't use FCGI, so I don't really know the answer to this. At work we actually still use mod_perl in Apache 2 (gasp!), simply because we have optimized its performance enough that switching hasn't seemed worth the effort. Our Apache instance is sitting behind nginx, so there is also that. The general idea with copy-on-write is that you want to find the place in the framework you are using where it forks, and make sure you load everything before that gets called. For Moose-based code this means you want to explicitly use modules rather than letting Moose load them for you automatically. For DBIx::Class based code it helps to instantiate your schema so that all the result, result source, and result set classes are loaded. In applications that have a lot of static lookup tables in the database, you might want to load all of them into memory (make sure DBIx::Class::Cursor::Cached cursors get loaded, etc). We pre-load all the Template Toolkit templates into memory by reaching into Catalyst, pulling out a template object, and manually calling $template_ob->process($template_file, {}, \$output) for all template files. If I had to guess about FCGI, assuming you are using FCGI::ProcManager, I would say load everything that you want to be in COW memory before pm_manage was called. It seems like you would do something similar with Starlet/Parallel::Prefork. This is just a guess though. For Apache+mod_perl you specify a PerlPostConfigRequire script to do all your initialization. For Starman there is a --preload-app option or the -M option. Bryan From fred at redhotpenguin.com Wed Aug 8 07:47:36 2012 From: fred at redhotpenguin.com (Fred Moyer) Date: Wed, 8 Aug 2012 07:47:36 -0700 Subject: [sf-perl] All these Perl web frameworks In-Reply-To: <50218B4A.1030705@beeley.org> References: <501AB62D.9030307@beeley.org> <50218B4A.1030705@beeley.org> Message-ID: On Tue, Aug 7, 2012 at 2:40 PM, Bryan Beeley wrote: > At work we actually still use mod_perl in Apache 2 (gasp!), simply because > we have optimized its performance enough that switching hasn't seemed worth > the effort. Our Apache instance is sitting behind nginx, so there is also > that. mod_perl is used by many companies despite that it has been around for over 10 years. The mod_perl users list is very active right now, and 2 new releases have come out this year. It's a good platform for serving large web applications; Apache is widely used, so you get the benefit of performance optimizations, a web server with a history of solid security, and a large development team. It isn't vulnerable to a bus taking out one developer, or the more common situation of the lone developer moving on to something else. If your application runs on more than one machine, you'd be hard pressed to find a better web server than mod_perl. As long as you have an http connection pooler like nginx (Perlbal is my preferred choice) in front of the application servers, scaling it is not a problem. > > The general idea with copy-on-write is that you want to find the place in > the framework you are using where it forks, and make sure you load > everything before that gets called. For Moose-based code this means you > want to explicitly use modules rather than letting Moose load them for you > automatically. For DBIx::Class based code it helps to instantiate your > schema so that all the result, result source, and result set classes are > loaded. In applications that have a lot of static lookup tables in the > database, you might want to load all of them into memory (make sure > DBIx::Class::Cursor::Cached cursors get loaded, etc). We pre-load all the > Template Toolkit templates into memory by reaching into Catalyst, pulling > out a template object, and manually calling > $template_ob->process($template_file, {}, \$output) for all template files. > > If I had to guess about FCGI, assuming you are using FCGI::ProcManager, I > would say load everything that you want to be in COW memory before pm_manage > was called. It seems like you would do something similar with > Starlet/Parallel::Prefork. This is just a guess though. > > For Apache+mod_perl you specify a PerlPostConfigRequire script to do all > your initialization. > > For Starman there is a --preload-app option or the -M option. > > Bryan > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From gatorreina at gmail.com Wed Aug 15 14:53:50 2012 From: gatorreina at gmail.com (Richard Reina) Date: Wed, 15 Aug 2012 16:53:50 -0500 Subject: [sf-perl] What language is most like perl? Message-ID: Hello all, I have a program that uses tesseract to try to classify documents on our LAN. Tesseract comes up way short so I am looking into Abbyy. The problem I have is that abbyy supplies sample code in everything but perl http://ocrsdk.com/documentation/code-samples/ . Perl is the only language I know, but I don't know it well enogh to re-write the sample code. Is it time for me to learn a new language? If so does anyone have any recommendations? WHich is most like perl? -------------- next part -------------- An HTML attachment was scrubbed... URL: From not.com at gmail.com Wed Aug 15 15:01:33 2012 From: not.com at gmail.com (yary) Date: Wed, 15 Aug 2012 18:01:33 -0400 Subject: [sf-perl] What language is most like perl? In-Reply-To: References: Message-ID: Of the languages listed, I think Ruby would be the best bet- though I am not familiar with cURL. Also with .NET you have a choice of languages, like C# or F# or Visual Basic (all made my Microsoft) and other languages made by others. Alas Perl is not in that list. From jackofnotrades at gmail.com Wed Aug 15 15:23:15 2012 From: jackofnotrades at gmail.com (Jeff Bragg) Date: Wed, 15 Aug 2012 15:23:15 -0700 Subject: [sf-perl] What language is most like perl? In-Reply-To: References: Message-ID: I think cURL is just a wrapper around the C URL library. At any rate, I've used it for things for which one might otherwise use wget when I didn't have wget available (for example, on my MacMini at work). On Wed, Aug 15, 2012 at 3:01 PM, yary wrote: > Of the languages listed, I think Ruby would be the best bet- though I > am not familiar with cURL. > > Also with .NET you have a choice of languages, like C# or F# or Visual > Basic (all made my Microsoft) and other languages made by others. Alas > Perl is not in that list. > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > -- There Are More Than Two Ways To Do It -------------- next part -------------- An HTML attachment was scrubbed... URL: From frimicc at gmail.com Wed Aug 15 15:31:42 2012 From: frimicc at gmail.com (Michael Friedman) Date: Wed, 15 Aug 2012 15:31:42 -0700 Subject: [sf-perl] What language is most like perl? In-Reply-To: References: Message-ID: <7366F9BB-9EB9-44FC-A1C8-6A7183916DF3@gmail.com> Yeah, I was about to say that the curl example is a shell script that wraps just a few calls to the appropriate URLs. https://github.com/abbyysdk/ocrsdk.com/blob/master/Bash_cURL/curl_recognize.sh The important bits seem to be the calls to curl: > echo "Uploading.." > response=`curl -s -S --user "$ApplicationId:$Password" --form "upload=@$SourceFile" "$ServerUrl/processImage?exportFormat=$OutFormat&language=$Language"` > > response=`curl -s -S --user "$ApplicationId:$Password" $ServerUrl/getTaskStatus?taskId=$taskId` > > response=`curl -s -S -o $TargetFile $resultUrl` > echo "Done." Figure out what the URLs and parameters are for each of those (relatively obvious from the variable names) and then use them in LWP calls and you've got yourself a Perl client. Good luck! -- Mike _________________ Michael Friedman frimicc at gmail.com On Aug 15, 2012, at 3:23 PM, Jeff Bragg wrote: > I think cURL is just a wrapper around the C URL library. At any rate, I've > used it for things for which one might otherwise use wget when I didn't > have wget available (for example, on my MacMini at work). > > On Wed, Aug 15, 2012 at 3:01 PM, yary wrote: > >> Of the languages listed, I think Ruby would be the best bet- though I >> am not familiar with cURL. >> >> Also with .NET you have a choice of languages, like C# or F# or Visual >> Basic (all made my Microsoft) and other languages made by others. Alas >> Perl is not in that list. >> _______________________________________________ >> SanFrancisco-pm mailing list >> SanFrancisco-pm at pm.org >> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm >> > > > > -- > There Are More Than Two Ways To Do It > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From fred at redhotpenguin.com Wed Aug 15 15:45:03 2012 From: fred at redhotpenguin.com (Fred Moyer) Date: Wed, 15 Aug 2012 15:45:03 -0700 Subject: [sf-perl] What language is most like perl? In-Reply-To: References: Message-ID: > WHich is most like perl? Syntactically, PHP is very close to Perl. It is basically Perl without strictures, warnings, hashes, and lexical variable declarations. And CPAN. On Wed, Aug 15, 2012 at 2:53 PM, Richard Reina wrote: > Hello all, > > I have a program that uses tesseract to try to classify documents on our > LAN. Tesseract comes up way short so I am looking into Abbyy. The problem I > have is that abbyy supplies sample code in everything but perl > http://ocrsdk.com/documentation/code-samples/ . Perl is the only language I > know, but I don't know it well enogh to re-write the sample code. Is it > time for me to learn a new language? If so does anyone have any > recommendations? WHich is most like perl? > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > From gatorreina at gmail.com Thu Aug 16 06:51:43 2012 From: gatorreina at gmail.com (Richard Reina) Date: Thu, 16 Aug 2012 08:51:43 -0500 Subject: [sf-perl] What language is most like perl? In-Reply-To: References: Message-ID: Thanks for the replies. The ruby script as it's written works ok, but I have a perl script that would need to run before it, breaking up multiple page pdf, and after it doing regex on the converted text file. Does anyone know how (if possible) to execute a ruby script from a perl script and pass it scalar variables? 2012/8/16 Paul Makepeace > JavaScript (really) and Ruby, without a doubt. The danger with Ruby is you > might not want to go back to Perl ;) (except on the command line where perl > is unassailable) > > Another option might be Python - it's *sort of* like Perl insofar as being > a scripting language with hashes etc but its learning curve is way less > which might be a net win if you're in a hurry and just doing this as a > one-off. > > Paul > > Written on my phone > On Aug 15, 2012 10:54 PM, "Richard Reina" wrote: > >> Hello all, >> >> I have a program that uses tesseract to try to classify documents on our >> LAN. Tesseract comes up way short so I am looking into Abbyy. The problem >> I have is that abbyy supplies sample code in everything but perl >> http://ocrsdk.com/documentation/code-samples/ . Perl is the only >> language I know, but I don't know it well enogh to re-write the sample >> code. Is it time for me to learn a new language? If so does anyone have >> any recommendations? WHich is most like perl? >> >> _______________________________________________ >> SanFrancisco-pm mailing list >> SanFrancisco-pm at pm.org >> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From garth.webb at gmail.com Thu Aug 16 07:04:40 2012 From: garth.webb at gmail.com (Garth Webb) Date: Thu, 16 Aug 2012 07:04:40 -0700 Subject: [sf-perl] What language is most like perl? In-Reply-To: References: Message-ID: <592C5D68-3EA1-4C67-B4E8-4D3E9ED6D0A5@gmail.com> Try: system("script.rb $var1 $var2"); Sent from my iPad On Aug 16, 2012, at 6:51 AM, Richard Reina wrote: > Thanks for the replies. The ruby script as it's written works ok, but I have a perl script that would need to run before it, breaking up multiple page pdf, and after it doing regex on the converted text file. Does anyone know how (if possible) to execute a ruby script from a perl script and pass it scalar variables? > > 2012/8/16 Paul Makepeace > JavaScript (really) and Ruby, without a doubt. The danger with Ruby is you might not want to go back to Perl ;) (except on the command line where perl is unassailable) > > Another option might be Python - it's *sort of* like Perl insofar as being a scripting language with hashes etc but its learning curve is way less which might be a net win if you're in a hurry and just doing this as a one-off. > > Paul > > > Written on my phone > > On Aug 15, 2012 10:54 PM, "Richard Reina" wrote: > Hello all, > > I have a program that uses tesseract to try to classify documents on our LAN. Tesseract comes up way short so I am looking into Abbyy. The problem I have is that abbyy supplies sample code in everything but perl http://ocrsdk.com/documentation/code-samples/ . Perl is the only language I know, but I don't know it well enogh to re-write the sample code. Is it time for me to learn a new language? If so does anyone have any recommendations? WHich is most like perl? > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From merlyn at stonehenge.com Thu Aug 16 11:19:27 2012 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Thu, 16 Aug 2012 11:19:27 -0700 Subject: [sf-perl] What language is most like perl? In-Reply-To: (Fred Moyer's message of "Wed, 15 Aug 2012 15:45:03 -0700") References: Message-ID: <86a9xu1yz4.fsf@red.stonehenge.com> >>>>> "Fred" == Fred Moyer writes: Fred> Syntactically, PHP is very close to Perl. It is basically Perl without Fred> strictures, warnings, hashes, and lexical variable declarations. And Fred> CPAN. "How do you write PHP so well?" "I think of Perl, and I take away reason and accountability." (http://www.imdb.com/title/tt0119822/quotes?qt=qt0361412) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion From garth.webb at gmail.com Thu Aug 16 22:23:47 2012 From: garth.webb at gmail.com (Garth Webb) Date: Thu, 16 Aug 2012 22:23:47 -0700 Subject: [sf-perl] What language is most like perl? In-Reply-To: <66E63177-0DDF-42FB-B54D-3111553F27A2@me.com> References: <592C5D68-3EA1-4C67-B4E8-4D3E9ED6D0A5@gmail.com> <66E63177-0DDF-42FB-B54D-3111553F27A2@me.com> Message-ID: How is IPC::Run safer than system? Also he doesn't need to communicate with the script; he just need to run Ruby code, which he is not familiar with, from Perl, which he is familiar with. IPC::Run seems like overkill for this. On Thu, Aug 16, 2012 at 8:32 PM, Kevin Frost wrote: > Try IPC::Run - that system() below is pretty dangerous if you don't > strictly control the vars. > > my $var2 = '; /bin/rm -rf .'; > > > -- frosty > > On Aug 16, 2012, at 16:04, Garth Webb wrote: > > Try: > > system("script.rb $var1 $var2"); > > Sent from my iPad > > On Aug 16, 2012, at 6:51 AM, Richard Reina wrote: > > Thanks for the replies. The ruby script as it's written works ok, but I > have a perl script that would need to run before it, breaking up multiple > page pdf, and after it doing regex on the converted text file. Does anyone > know how (if possible) to execute a ruby script from a perl script and pass > it scalar variables? > > 2012/8/16 Paul Makepeace > >> JavaScript (really) and Ruby, without a doubt. The danger with Ruby is >> you might not want to go back to Perl ;) (except on the command line where >> perl is unassailable) >> >> Another option might be Python - it's *sort of* like Perl insofar as >> being a scripting language with hashes etc but its learning curve is way >> less which might be a net win if you're in a hurry and just doing this as a >> one-off. >> >> Paul >> >> Written on my phone >> On Aug 15, 2012 10:54 PM, "Richard Reina" wrote: >> >>> Hello all, >>> >>> I have a program that uses tesseract to try to classify documents on our >>> LAN. Tesseract comes up way short so I am looking into Abbyy. The problem >>> I have is that abbyy supplies sample code in everything but perl >>> http://ocrsdk.com/documentation/code-samples/ . Perl is the only >>> language I know, but I don't know it well enogh to re-write the sample >>> code. Is it time for me to learn a new language? If so does anyone have >>> any recommendations? WHich is most like perl? >>> >>> _______________________________________________ >>> SanFrancisco-pm mailing list >>> SanFrancisco-pm at pm.org >>> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm >>> >>> > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott.gust at gmail.com Fri Aug 17 00:05:25 2012 From: scott.gust at gmail.com (Scott Gust) Date: Fri, 17 Aug 2012 00:05:25 -0700 Subject: [sf-perl] What language is most like perl? In-Reply-To: References: <592C5D68-3EA1-4C67-B4E8-4D3E9ED6D0A5@gmail.com> <66E63177-0DDF-42FB-B54D-3111553F27A2@me.com> Message-ID: much safer to call system this way: system("script.rb", $var1, $var2); On Thu, Aug 16, 2012 at 10:23 PM, Garth Webb wrote: > How is IPC::Run safer than system? Also he doesn't need > to communicate with the script; he just need to run Ruby code, which he is > not familiar with, from Perl, which he is familiar with. IPC::Run seems > like overkill for this. > > On Thu, Aug 16, 2012 at 8:32 PM, Kevin Frost wrote: > >> Try IPC::Run - that system() below is pretty dangerous if you don't >> strictly control the vars. >> >> my $var2 = '; /bin/rm -rf .'; >> >> >> -- frosty >> >> On Aug 16, 2012, at 16:04, Garth Webb wrote: >> >> Try: >> >> system("script.rb $var1 $var2"); >> >> Sent from my iPad >> >> On Aug 16, 2012, at 6:51 AM, Richard Reina wrote: >> >> Thanks for the replies. The ruby script as it's written works ok, but I >> have a perl script that would need to run before it, breaking up multiple >> page pdf, and after it doing regex on the converted text file. Does anyone >> know how (if possible) to execute a ruby script from a perl script and pass >> it scalar variables? >> >> 2012/8/16 Paul Makepeace >> >>> JavaScript (really) and Ruby, without a doubt. The danger with Ruby is >>> you might not want to go back to Perl ;) (except on the command line where >>> perl is unassailable) >>> >>> Another option might be Python - it's *sort of* like Perl insofar as >>> being a scripting language with hashes etc but its learning curve is way >>> less which might be a net win if you're in a hurry and just doing this as a >>> one-off. >>> >>> Paul >>> >>> Written on my phone >>> On Aug 15, 2012 10:54 PM, "Richard Reina" wrote: >>> >>>> Hello all, >>>> >>>> I have a program that uses tesseract to try to classify documents on >>>> our LAN. Tesseract comes up way short so I am looking into Abbyy. The >>>> problem I have is that abbyy supplies sample code in everything but perl >>>> http://ocrsdk.com/documentation/code-samples/ . Perl is the only >>>> language I know, but I don't know it well enogh to re-write the sample >>>> code. Is it time for me to learn a new language? If so does anyone have >>>> any recommendations? WHich is most like perl? >>>> >>>> _______________________________________________ >>>> SanFrancisco-pm mailing list >>>> SanFrancisco-pm at pm.org >>>> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm >>>> >>>> >> _______________________________________________ >> SanFrancisco-pm mailing list >> SanFrancisco-pm at pm.org >> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm >> >> _______________________________________________ >> SanFrancisco-pm mailing list >> SanFrancisco-pm at pm.org >> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm >> >> > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jackofnotrades at gmail.com Fri Aug 17 00:21:19 2012 From: jackofnotrades at gmail.com (Jeff Bragg) Date: Fri, 17 Aug 2012 00:21:19 -0700 Subject: [sf-perl] What language is most like perl? In-Reply-To: References: <592C5D68-3EA1-4C67-B4E8-4D3E9ED6D0A5@gmail.com> <66E63177-0DDF-42FB-B54D-3111553F27A2@me.com> Message-ID: I would argue that if you're running your script/application with enough privileges for something like rm -rf to work, unless absolutely necessary, maybe that's more of a problem than using system() (or backticks, or whatever). On Thu, Aug 16, 2012 at 10:23 PM, Garth Webb wrote: > How is IPC::Run safer than system? Also he doesn't need > to communicate with the script; he just need to run Ruby code, which he is > not familiar with, from Perl, which he is familiar with. IPC::Run seems > like overkill for this. > > On Thu, Aug 16, 2012 at 8:32 PM, Kevin Frost wrote: > >> Try IPC::Run - that system() below is pretty dangerous if you don't >> strictly control the vars. >> >> my $var2 = '; /bin/rm -rf .'; >> >> >> -- frosty >> >> On Aug 16, 2012, at 16:04, Garth Webb wrote: >> >> Try: >> >> system("script.rb $var1 $var2"); >> >> Sent from my iPad >> >> -- There Are More Than Two Ways To Do It -------------- next part -------------- An HTML attachment was scrubbed... URL: From jackofnotrades at gmail.com Fri Aug 17 00:22:12 2012 From: jackofnotrades at gmail.com (Jeff Bragg) Date: Fri, 17 Aug 2012 00:22:12 -0700 Subject: [sf-perl] What language is most like perl? In-Reply-To: References: <592C5D68-3EA1-4C67-B4E8-4D3E9ED6D0A5@gmail.com> <66E63177-0DDF-42FB-B54D-3111553F27A2@me.com> Message-ID: Slight correction: I meant to say rm -rf /. On Fri, Aug 17, 2012 at 12:21 AM, Jeff Bragg wrote: > I would argue that if you're running your script/application with enough > privileges for something like rm -rf to work, unless absolutely necessary, > maybe that's more of a problem than using system() (or backticks, or > whatever). > > On Thu, Aug 16, 2012 at 10:23 PM, Garth Webb wrote: > >> How is IPC::Run safer than system? Also he doesn't need >> to communicate with the script; he just need to run Ruby code, which he is >> not familiar with, from Perl, which he is familiar with. IPC::Run seems >> like overkill for this. >> >> On Thu, Aug 16, 2012 at 8:32 PM, Kevin Frost wrote: >> >>> Try IPC::Run - that system() below is pretty dangerous if you don't >>> strictly control the vars. >>> >>> my $var2 = '; /bin/rm -rf .'; >>> >>> >>> -- frosty >>> >>> On Aug 16, 2012, at 16:04, Garth Webb wrote: >>> >>> Try: >>> >>> system("script.rb $var1 $var2"); >>> >>> Sent from my iPad >>> >>> -- > There Are More Than Two Ways To Do It > > -- There Are More Than Two Ways To Do It -------------- next part -------------- An HTML attachment was scrubbed... URL: From earl at ruby.org Mon Aug 20 17:13:53 2012 From: earl at ruby.org (Earl Ruby) Date: Mon, 20 Aug 2012 17:13:53 -0700 Subject: [sf-perl] Timezone question Message-ID: Does anyone know of a CPAN function that, when passed the name of a timezone from zoneinfo (e.g. "America/Los_Angeles") and whether or not daylight savings time is in effect will return the UTC offset in seconds? I've looked through CPAN and several modules look like they do this but don't. Either they don't work with the zones from zoneinfo or they won't give the offsets for standard and daylight time (only "current" time). I used to run /usr/sbin/zdump and then parse the output, but the maintainers of zdump removed the GMT offset value that used to be returned. So now instead of getting this: America/Los_Angeles Sun Mar 14 10:00:00 2021 UTC = Sun Mar 14 03:00:00 2021 PDT isdst=1 gmtoff=-25200 I now get this: America/Los_Angeles Sun Mar 14 10:00:00 2021 UTC = Sun Mar 14 03:00:00 2021 PDT isdst=1 I want something that does something like this: my $isdst = 1; my $offset = get_utc_offset('America/Los_Angeles', $isdst); print "$offset\n"; # prints -25200 $isdst = 0; $offset = get_utc_offset('America/Los_Angeles', $isdst); print "$offset\n"; # prints -28800 -- Earl Ruby http://earlruby.org/ @earlruby From doom at kzsu.stanford.edu Mon Aug 20 17:56:13 2012 From: doom at kzsu.stanford.edu (Joseph Brenner) Date: Mon, 20 Aug 2012 17:56:13 -0700 Subject: [sf-perl] Timezone question In-Reply-To: References: Message-ID: Earl Ruby wrote: > Does anyone know of a CPAN function that, when passed the name of a > timezone from zoneinfo (e.g. "America/Los_Angeles") and whether or not > daylight savings time is in effect will return the UTC offset in > seconds? > > I've looked through CPAN and several modules look like they do this > but don't. Either they don't work with the zones from zoneinfo or they > won't give the offsets for standard and daylight time (only "current" > time). Have you looked at DateTime::TimeZone? http://search.cpan.org/~drolsky/DateTime-TimeZone-1.48/lib/DateTime/TimeZone.pm You can use it like this to get the offset: use DateTime; use DateTime::TimeZone; my $tz = DateTime::TimeZone->new( name => 'America/Chicago' ); my $dt = DateTime->now(); my $offset = $tz->offset_for_datetime($dt); And I would guess you could use "is_dst_for_datetime" to determine if you're in daylight savings time. From earl at ruby.org Tue Aug 21 10:58:36 2012 From: earl at ruby.org (Earl Ruby) Date: Tue, 21 Aug 2012 10:58:36 -0700 Subject: [sf-perl] Timezone question In-Reply-To: References: Message-ID: I'd looked at Time::Timezone, Time::Zone, Time::ZoneInfo, and some other packages under Time::, but not DateTime::TimeZone. Thanks, I'll check it out. On Mon, Aug 20, 2012 at 5:56 PM, Joseph Brenner wrote: > Earl Ruby wrote: >> Does anyone know of a CPAN function that, when passed the name of a >> timezone from zoneinfo (e.g. "America/Los_Angeles") and whether or not >> daylight savings time is in effect will return the UTC offset in >> seconds? >> >> I've looked through CPAN and several modules look like they do this >> but don't. Either they don't work with the zones from zoneinfo or they >> won't give the offsets for standard and daylight time (only "current" >> time). > > Have you looked at DateTime::TimeZone? > > http://search.cpan.org/~drolsky/DateTime-TimeZone-1.48/lib/DateTime/TimeZone.pm > > You can use it like this to get the offset: > > use DateTime; > use DateTime::TimeZone; > > my $tz = DateTime::TimeZone->new( name => 'America/Chicago' ); > > my $dt = DateTime->now(); > my $offset = $tz->offset_for_datetime($dt); > > > And I would guess you could use "is_dst_for_datetime" to > determine if you're in daylight savings time. -- Earl Ruby http://earlruby.org/ @earlruby From fred at redhotpenguin.com Thu Aug 23 13:34:22 2012 From: fred at redhotpenguin.com (Fred Moyer) Date: Thu, 23 Aug 2012 13:34:22 -0700 Subject: [sf-perl] [meeting] OOPS! Nearly transparent data persistence. Message-ID: Our regularly scheduled meeting will be next Tuesday at 7pm at Mother Jones. Hope to see you there! http://www.meetup.com/San-Francisco-Perl-Mongers/events/79068602/ What: OOPS! Nearly transparent data persistence. When: Tuesday, August 28, 2012 7:00 PM Where: Mother Jones 222 Sutter Street Suite 600 San Francisco, CA 94108 David Sharnoff will be talking about OOPS on Tuesday August 28th. OOPS is a transaction-safe schema-less data persistence module. This talk will cover both the usage, strengths and weaknesses of the module and the difficulties encountered when creating the module. Did you know that you can make a reference to a hash key? What happens when you delete that key from your hash? Do blessings live with the reference or with the referred object? OOPS on CPAN: http://search.cpan.org/~muir/OOPS-0.2005/ MUIR on CPAN: http://search.cpan.org/~muir/ From fred at redhotpenguin.com Thu Aug 23 13:37:06 2012 From: fred at redhotpenguin.com (Fred Moyer) Date: Thu, 23 Aug 2012 13:37:06 -0700 Subject: [sf-perl] [meeting] SVPerl field trip on September 6th Message-ID: SVPerl is having a meeting on September 6th. If you're interested in carpooling to the event as part of an SF.pm contingent, RSVP here and also on their meetup page (which is linked). I can drive and take 3 passengers. http://www.meetup.com/San-Francisco-Perl-Mongers/events/76145992/ From doomvox at gmail.com Thu Aug 23 14:47:06 2012 From: doomvox at gmail.com (Joseph Brenner) Date: Thu, 23 Aug 2012 14:47:06 -0700 Subject: [sf-perl] [meeting] OOPS! Nearly transparent data persistence. In-Reply-To: References: Message-ID: Actually, there was some mis-communication this month, and it turns out we're still looking for a space for this talk. So stand-by for further notice, but remember it's not at Mother Jones this time. And if anyone's got any suggestions, please do let us know. Fred Moyer wrote: > Our regularly scheduled meeting will be next Tuesday at 7pm at Mother > Jones. Hope to see you there! > > http://www.meetup.com/San-Francisco-Perl-Mongers/events/79068602/ > > What: OOPS! Nearly transparent data persistence. > When: Tuesday, August 28, 2012 7:00 PM > > Where: Mother Jones > 222 Sutter Street Suite 600 > San Francisco, CA 94108 > > David Sharnoff will be talking about OOPS on Tuesday August 28th. > > OOPS is a transaction-safe schema-less data persistence module. This > talk will cover both the usage, strengths and weaknesses of the module > and the difficulties encountered when creating the module. Did you > know that you can make a reference to a hash key? What happens when > you delete that key from your hash? Do blessings live with the > reference or with the referred object? > > > OOPS on CPAN: > http://search.cpan.org/~muir/OOPS-0.2005/ > > MUIR on CPAN: > http://search.cpan.org/~muir/ > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From chris.mueller at dreamhost.com Fri Aug 24 14:14:00 2012 From: chris.mueller at dreamhost.com (Chris Mueller) Date: Fri, 24 Aug 2012 14:14:00 -0700 Subject: [sf-perl] [job] DreamHost is looking for Perl Developers Message-ID: Greetings Mongers, DreamHost is looking to add two Perl Mongers (known as Hosting Developers internally) to the Software Development team. We've got an office on Battery and Pine in San Francisco, which would be the ideal location for these new hires. Have a look at the specs if you're considering a career move. We're an awesome company to work for, and are in the midst of some exciting and boundary pushing projects. Feel free to reach out to me directly, or apply online, if this looks of interest. Senior Developer; Hosting Tracking Code 42-401 Job Description: DreamHost is a successful web hosting company with over 300,000 customers. We?ve been in business since 1997 and offer our clients shared hosting, virtual private servers, dedicated hosting, and domain registration. DreamHost is currently building out our hosted cloud computing products (cloud compute and cloud storage) and we?re also the creators and primary sponsors of the Open Source project, Ceph. DreamHost is also an awesome place to work and we?re looking for great people to join our team! To support our growth, we?re hiring a Senior Developer to work on our amazing hosting products. Strategy & Planning: Design, implement and maintain multiple product modules. Participate in sprint planning meetings and daily stand-ups. Acquisition & Deployment: Build public hosting products that will be used by hundreds of thousands of customers. Perform complex product design activities which may require extensive research and analysis. Troubleshoot and fix bugs on modules that you?re responsible for. Document the development work that you?re responsible for. Required Skills: Flexible attitude, ability to perform under pressure. A commitment to quality and a thorough approach to the work. Able to work alone on a broad variety of projects. Able to establish and maintain healthy working relationships with people in course of work. Good professional appearance. Strong level of influence and negotiation skills. Able to deliver effective results, meet tight deadlines and targets. Good judgment and decision-making skills. Able to motivate and empower others to reach organizational goals. Required Experience: Be able to thrive in an agile development environment (Scrum) Understand the DevOps model and how that practically applies to a hosting company Possess a burning passion regarding innovation and new technologies 6-10 years experience designing and writing complex, scalable applications Experience solving large scaling issues Flexible enough to quickly adapt and learn new technology 6+ years developing application on Linux operating system environments. 3+ years of hands-on networking experience including functional knowledge of HTTP, DNS, TCP/IP and related networking protocols and technologies. Strong familiarity with SSH, FTP, SCP, HTTP, DNS protocols. Solid, functional understanding of Client/Server fundamentals. Strong familiarity with virtualized environments (KVM). Experience with Redmine or similar defect-tracking system. Experience with source control systems (git/svn). Experience with Linux operating system/application development. Proven problem solving ability. Expert knowledge in Python, Perl. C, C++ a big plus. Experience with virtualization, preferably on multiple hypervisors. Experience with hosting companies is a plus. Job Location San Francisco/Los Angeles, CA, US. Position Type Full-Time/Regular -- Regards, Chris Mueller Technical Recruiting Manager DreamHost Connect with me on LinkedIn: http://www.linkedin.com/in/christopherjamesmueller DreamHost Job Openings: http://dreamhost.com/about-us/jobs/ From cpan at goess.org Fri Aug 24 16:24:57 2012 From: cpan at goess.org (Kevin Goess) Date: Fri, 24 Aug 2012 16:24:57 -0700 Subject: [sf-perl] [job] Bepress is looking for Perl developers Message-ID: Bepress is looking for Perl developers. We're a small outfit in downtown Berkeley, been around since 1999, a big push now to modernize our infrastructure and practices. We need someone who is strong in Perl and wants to work in a small environment making big changes. Our older products are in need of some TLC so that we can continue to support our growth. We also need more heads and hands developing new products. Each member of our DevOps team has an impact on our systems end-to-end. Bepress is a SaaS provider offering services to the academic community to showcase and share their work. Our Digital Commons product is the leading hosted Institutional Repository and our growth has been exponential. We have a feel-good mission helping to promote the open access movement that is changing the world of scholarly exchange. Requirements: Great with Perl. Really good with some other things. Python would be great but Ruby, Java or C counts too. Postgres, or at least some SQL DB. Real application development for high traffic web applications. Experience with the LAMP stack. Significant re-engineering/re-architecting projects. JavaScript. Experience with object oriented programming, MVC and multi-tiered architectures. Understanding of deployment issues in a multi-tiered/multi-tenant hosted environment. Strong communication skills. Seriously! Willingness to join the on-call rotation. Ability to laugh, especially at yourself. What we offer: Friendly, collaborative environment Bicycle friendly downtown Berkley location Challenging yet realistic goals Really smart co-workers (no, really!) Money Matching IRA plan Medical and dental plans Contact me if you're interested. From vlb at cfcl.com Mon Aug 27 12:34:46 2012 From: vlb at cfcl.com (Vicki Brown) Date: Mon, 27 Aug 2012 12:34:46 -0700 Subject: [sf-perl] Internal Documentation and Content Management Message-ID: Disclaimer: this is a self-promotional posting. I'm looking for work. What's the status of the internal documentation at your company (eg, docs for engineers and project managers)? Is it up-to-date? Do you know where to find what you're looking for? _Can_ you find what you're looking for? Are your internal processes clearly documented? Or do you need someone to help you tidy up, organize, archive, edit, and enhance? Extra points if your team uses a wiki! I am an information technologist, web weaver, problem solver, and technical writer/editor (with emphasis on editing, formatting, and organization). I have a passion for enhancing productivity through improvements in communication. I love to work on projects that help make my fellow employees (usually engineers) more productive. As a former programmer myself (in awk, C, and Perl), I have years of experience talking to and working with engineers. My work with TWiki and other web sites has given me experience with HTML, CSS, and JavaScript. My wiki experience has also enhanced my skills in information architecture, particularly in designing navigable structures for complex documentation sets. I am currently looking for work, preferably contract positions, long- or short- term, fulltime or part-time. If you think your team might need someone like me, please take a look at my professional website, http://philtres.com. There you will find my resume, writing samples, and feedback from satisfied past customers. We now return you to your regular discussion topics. Thanks for reading. -- Vicki Vicki Brown http://philtres.com/ http://linkedin.com/in/vlbrown -------------- next part -------------- An HTML attachment was scrubbed... URL: From fred at redhotpenguin.com Mon Aug 27 12:46:33 2012 From: fred at redhotpenguin.com (Fred Moyer) Date: Mon, 27 Aug 2012 12:46:33 -0700 Subject: [sf-perl] [meeting] "OOPS! Nearly transparent data persistence" tomorrow evening Message-ID: Just a quick reminder, our next meeting is tomorrow at 7pm. The updated location is Satellite66 Gallery. See the meetup post for details - please RSVP by 4pm tomorrow. http://www.meetup.com/San-Francisco-Perl-Mongers/events/79068602/ From clp302 at poda.net Mon Aug 27 16:40:19 2012 From: clp302 at poda.net (C Poda) Date: Mon, 27 Aug 2012 16:40:19 -0700 Subject: [sf-perl] Internal Documentation and Content Management In-Reply-To: References: Message-ID: On Mon, 27 Aug 2012 12:34:46 -0700, Vicki Brown wrote: > Disclaimer: this is a self-promotional posting. I'm looking for work. > Hi, I've recently posted a page at the SV Perl wiki w/ job hunting links: some general, some specific to the Si Valley. See it here: http://www.svperl.org/twiki/bin/view/SVPerl/JobHuntingResourceList I will update it w/ links to some useful CPAN modules for job hunting. Thanks & good luck. clpoda From doom at kzsu.stanford.edu Mon Aug 27 22:54:32 2012 From: doom at kzsu.stanford.edu (Joseph Brenner) Date: Mon, 27 Aug 2012 22:54:32 -0700 Subject: [sf-perl] [meeting] "OOPS! Nearly transparent data persistence" tomorrow evening In-Reply-To: References: Message-ID: Fred Moyer wrote: > Just a quick reminder, our next meeting is tomorrow at 7pm. The > updated location is Satellite66 Gallery. See the meetup post for > details - please RSVP by 4pm tomorrow. > > http://www.meetup.com/San-Francisco-Perl-Mongers/events/79068602/ David Sharnoff's "OOPS" project is interesting in a number of ways: this is an attempt at getting as close as possible to a no-brainer database-backed object-persistence layer, and from David's lightning talk some month's back, I think it's safe to say that the engineering effort that's gone into this is interesting to hear about even if you don't have any immediate plans to use the software. I like the way he guarantees backwards compatibility using a versioned plug-in architecture... This is a new location for us, a small art gallery on 6th street -- complete with a display of what they advertise as Bad Art It's not far from the Powell Street BART station to the-- uh-- *happening* 6th Street scene. Please do RSVP soon if you're interested... we're going to be having some food-like stuff (pizza?) delivered, and it'll be good to know how many people will be there (though actually, there's no guard or doorman to deal with at this setting, so if you just show up and knock on the door, you'll get in). From vlb at cfcl.com Tue Aug 28 00:14:53 2012 From: vlb at cfcl.com (Vicki Brown) Date: Tue, 28 Aug 2012 00:14:53 -0700 Subject: [sf-perl] Internal Documentation and Content Management In-Reply-To: References: Message-ID: <7C64AB07-1681-4771-9C4D-F6D5E896D4B2@cfcl.com> Thanks, but I'm going for the "hidden 80% that can only be reached through networking". :-) -- Vicki cfcl.com/vlb twitter.com/vlb On Aug 27, 2012, at 16:40 , sanfrancisco-pm-request at pm.org wrote: > I've recently posted a page at the SV Perl wiki w/ job hunting > links: some general, some specific to the Si Valley. See it here: -------------- next part -------------- An HTML attachment was scrubbed... URL: From fred at redhotpenguin.com Thu Aug 30 21:04:43 2012 From: fred at redhotpenguin.com (Fred Moyer) Date: Thu, 30 Aug 2012 21:04:43 -0700 Subject: [sf-perl] Perl: The Next Generation Message-ID: This is Michael Schwern's YAPC 2012 keynote. A good watch on the different facets of Perl programmers. http://www.youtube.com/watch?v=TAOxGjNbp_Y