From jeremy at marzhillstudios.com Thu Jan 1 09:19:49 2009 From: jeremy at marzhillstudios.com (jeremy at marzhillstudios.com) Date: Thu, 1 Jan 2009 11:19:49 -0600 Subject: [Chicago-talk] January Meeting In-Reply-To: <49d805d70812310831i617e6c17n171044f01db642ff@mail.gmail.com> References: <49d805d70812310831i617e6c17n171044f01db642ff@mail.gmail.com> Message-ID: <69d143cd0901010919i60cd2bf6nbbe831b16b27f005@mail.gmail.com> If there is enough interest I'd be up for talking about development with couchdb and my accompanying CPAN module. On 12/31/08, Joshua McAdams wrote: > Let's kick off the new year right and start holding regular meetings > again. I'll reserve some space at Google for January 27th, so mark > your calendars! > > There have been a few topics of discussion thrown around including a > "Chart-Off" and an update on Andrew's FRDCSA update. Anyone else got > something that they'd like to talk about or hear a talk about? Once > we nail down a few topics, I'll post an announcement on the > chicago.pm.org site. > > BTW, the site might go down for a little while today... I'm moving it > to a new sever. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -- Jeremy Wall http://jeremy.marzhillstudios.com Jeremy at marzhillstudios.com From richard at rushlogistics.com Fri Jan 9 09:13:58 2009 From: richard at rushlogistics.com (Richard Reina) Date: Fri, 09 Jan 2009 12:13:58 -0500 (EST) Subject: [Chicago-talk] =?utf-8?q?Do_I_need_a_fork_for_this=3F?= Message-ID: <20090109171358.30735B2D9A@swiftsure.xo.com> I am trying to spin off a process (subroutine actually) so that my program and will go on to do other things ( namely ask the user from some input ) while the the subroutine is doing it's work. Something like: # this sub is going to take a few minutes my ($results) = list_compiler($id); # this is where we get hung up waiting for the above sub to finish. # Sure would be nice to be able to get some info from the user while we # are waiting. Like: print "While I am compiling this list for you, can you tell me how many people are working in the office today?\n"; Can someone tell me how I can go about doing this? Thanks, Richard From imranjj at gmail.com Fri Jan 9 09:50:37 2009 From: imranjj at gmail.com (imran javaid) Date: Fri, 9 Jan 2009 11:50:37 -0600 Subject: [Chicago-talk] Do I need a fork for this? In-Reply-To: <20090109171358.30735B2D9A@swiftsure.xo.com> References: <20090109171358.30735B2D9A@swiftsure.xo.com> Message-ID: Try threads http://search.cpan.org/~jdhedden/threads-1.71/threads.pm On Fri, Jan 9, 2009 at 11:13 AM, Richard Reina wrote: > I am trying to spin off a process (subroutine actually) so that my program and will go on to do other things ( namely ask the user from some input ) while the the subroutine is doing it's work. > > Something like: > > # this sub is going to take a few minutes > my ($results) = list_compiler($id); > > # this is where we get hung up waiting for the above sub to finish. > # Sure would be nice to be able to get some info from the user while we > # are waiting. Like: > print "While I am compiling this list for you, can you tell me how many people are working in the office today?\n"; > > > > Can someone tell me how I can go about doing this? > > Thanks, > > Richard > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From richard at rushlogistics.com Fri Jan 9 10:37:07 2009 From: richard at rushlogistics.com (Richard Reina) Date: Fri, 09 Jan 2009 13:37:07 -0500 (EST) Subject: [Chicago-talk] =?utf-8?q?Do_I_need_a_fork_for_this=3F?= In-Reply-To: <20090109171358.30735B2D9A@swiftsure.xo.com> Message-ID: <20090109183707.04062359C@centaur.xo.com> I'm pretty sure I can't as this code is going to have to run on some older machine in the office that run older versions of perl and cannot be updated. Is there an easy way to do it with fork? ---- Chicago.pm chatter wrote: > > Try threads > http://search.cpan.org/~jdhedden/threads-1.71/threads.pm > > On Fri, Jan 9, 2009 at 11:13 AM, Richard Reina > wrote: > > I am trying to spin off a process (subroutine actually) so that my program and will go on to do other things ( namely ask the user from some input ) while the the subroutine is doing it's work. > > > > Something like: > > > > # this sub is going to take a few minutes > > my ($results) = list_compiler($id); > > > > # this is where we get hung up waiting for the above sub to finish. > > # Sure would be nice to be able to get some info from the user while we > > # are waiting. Like: > > print "While I am compiling this list for you, can you tell me how many people are working in the office today?\n"; > > > > > > > > Can someone tell me how I can go about doing this? > > > > Thanks, > > > > Richard > > > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk at pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From drench+chipm at gmail.com Fri Jan 9 12:27:43 2009 From: drench+chipm at gmail.com (Dan Rench) Date: Fri, 9 Jan 2009 14:27:43 -0600 Subject: [Chicago-talk] Do I need a fork for this? In-Reply-To: <20090109183707.04062359C@centaur.xo.com> References: <20090109171358.30735B2D9A@swiftsure.xo.com> <20090109183707.04062359C@centaur.xo.com> Message-ID: On Fri, Jan 9, 2009 at 12:37 PM, Richard Reina wrote: > I'm pretty sure I can't as this code is going to have to run on some older machine in the office that run older versions of perl and cannot be updated. Is there an easy way to do it with fork? If you can't update Perl but can install CPAN modules, http://search.cpan.org/dist/forks/ is pretty neat. It emulates threads with fork and ipc tricks. If that's not an option either, then fork() (or more likely something like open(FH, '-|') ) should do what you want, but the fun part is sending the results back to the parent process. What kind of return values do you expect from list_compiler()? From richard at rushlogistics.com Fri Jan 9 13:05:17 2009 From: richard at rushlogistics.com (Richard Reina) Date: Fri, 09 Jan 2009 16:05:17 -0500 (EST) Subject: [Chicago-talk] =?utf-8?q?Do_I_need_a_fork_for_this=3F?= In-Reply-To: <20090109171358.30735B2D9A@swiftsure.xo.com> <20090109183707.04062359C@centaur.xo.com> Message-ID: <20090109210517.2B7F42309@courageux.xo.com> What kind of return > values do you expect from list_compiler()? An array reference and a hash reference ($TR_array, $cr_hash) = list_compiler(); From drench+chipm at gmail.com Sun Jan 11 15:48:34 2009 From: drench+chipm at gmail.com (Dan Rench) Date: Sun, 11 Jan 2009 17:48:34 -0600 Subject: [Chicago-talk] Do I need a fork for this? In-Reply-To: <20090109210517.2B7F42309@courageux.xo.com> References: <20090109171358.30735B2D9A@swiftsure.xo.com> <20090109183707.04062359C@centaur.xo.com> <20090109210517.2B7F42309@courageux.xo.com> Message-ID: Since nobody's biting... On Fri, Jan 9, 2009 at 3:05 PM, Richard Reina wrote: > > What kind of return >> values do you expect from list_compiler()? > > An array reference and a hash reference > > ($TR_array, $cr_hash) = list_compiler(); Here's one way to do it: use Storable qw(store_fd fd_retrieve); sub bg_run { my $subref = shift; my $pid = open(H, '-|'); if (! defined $pid) { die "Can't fork: $!"; } if ($pid) { # parent (reader) return sub { return fd_retrieve(\*H) }; # get return value from child } else { # child (writer) my $r = $subref->(@_); # run the subroutine store_fd($r, *STDOUT); # send return value to the parent exit 0; } } my $get_result = bg_run(sub { return [ list_compiler() ] }); # bg_run() just started a background process to run list_compiler() # $get_result is a reference to a sub that, um, gets the results. # Some dummy user input: print 'Enter something while we wait: '; my $in = ; chomp $in; print "You entered '$in'.\n"; # If list_compiler() is already done, $get_result->() will # return immediately. Otherwise we wait until the result comes in: my ($TR_array, $cr_hash) = @{$get_result->()}}; If you can change list_compiler() to return an array ref instead of the 2-element list, the bg_run() call could go like this instead: my $get_result = bg_run(\&list_compiler); If list_compliler() needs arguments: my $get_result = bg_run(\&list_compiler, $arg1, $arg2, ...); There's a lot more you could do with this. You could add something to detect when list_compliler() is still working to let the user know your program isn't hanging, it's just waiting an a result. From joshua.mcadams at gmail.com Mon Jan 12 11:40:44 2009 From: joshua.mcadams at gmail.com (Joshua McAdams) Date: Mon, 12 Jan 2009 19:40:44 +0000 Subject: [Chicago-talk] January 2009 Chicago.pm Meeting Message-ID: <00163616413b60e4f604604e4888@google.com> If you have trouble viewing or submitting this form, you can fill it out online: https://spreadsheets.google.com/viewform?key=pOCmTCN6VWDa6dHIE4W9HEQ January 2009 Chicago.pm Meeting On January 27th we'll kick off the new year of Chicago.pm with a meeting with not one, but two featured talks! Jeremy Wall will be talking about development with CouchDB. He'll be highlighting the differences between CouchDB and a traditional RDBMS. During his talk you will see how to set up a CouchDB schema and write views to retrieve data from the CouchDB Schema. He'll also share some of his experience and point out some of the gotcha's you might encounter when writing views. And of course, the Perl tie-in... Jeremy will show off his CPAN Module for CouchDB. For those who don't know, CouchDB, or more formally, Apache CouchDB, is a free and open source document-oriented database written in the Erlang programming language. It is designed for extreme scalability and is easily deployed to multi-core or multi-server clusters. We'll also hear from Andrew Dougherty, who will give us an update of his FRDCSA project. FRDCSA is an advanced Artificial Intelligence created by automatically scouring the web for advanced AI systems, retrieving and packaging them for various operating systems, and finally building upon these packages. Incidentally, many systems not considered to be AI are also necessary as part of the operating system infrastructure. There you have it... databases written in functional programming languages and advanced topics in artificial analysis. If that's not enough technical goodness to get you to brave the Chicago cold, I'm not sure what is. See you on the 27th. Meeting Details: Date: Tuesday 27th January 2009 Time: 7pm-9pm, typically with a journey for drinks immediately afterward Where: 20 W Kinzie, 8th Floor Please be sure to RSVP so that you don't get hassled at the front door :) Name Powered by Google Docs Terms of Service - Additional Terms -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshua.mcadams at gmail.com Mon Jan 12 11:52:30 2009 From: joshua.mcadams at gmail.com (Joshua McAdams) Date: Mon, 12 Jan 2009 13:52:30 -0600 Subject: [Chicago-talk] January 2009 Chicago.pm Meeting In-Reply-To: <00163616413b60e4f604604e4888@google.com> References: <00163616413b60e4f604604e4888@google.com> Message-ID: <49d805d70901121152k6ac9ff98ub9cba47169b04986@mail.gmail.com> If you were on the fence about attending, this might help. Marsee from O'Reilly saw that we were talking about CouchDB and offered five access codes to the rough cut of their upcoming CouchDB book (http://oreilly.com/catalog/9780596158163/index.html). We'll be giving those away at the meeting... you have to be present to win :) Thanks Marsee! On Mon, Jan 12, 2009 at 1:40 PM, Joshua McAdams wrote: > If you have trouble viewing or submitting this form, you can fill it out > online: > https://spreadsheets.google.com/viewform?key=pOCmTCN6VWDa6dHIE4W9HEQ > > January 2009 Chicago.pm Meeting > > On January 27th we'll kick off the new year of Chicago.pm with a meeting > with not one, but two featured talks! > > Jeremy Wall will be talking about development with CouchDB. He'll be > highlighting the differences between CouchDB and a traditional RDBMS. During > his talk you will see how to set up a CouchDB schema and write views to > retrieve data from the CouchDB Schema. He'll also share some of his > experience and point out some of the gotcha's you might encounter when > writing views. And of course, the Perl tie-in... Jeremy will show off his > CPAN Module for CouchDB. > > For those who don't know, CouchDB, or more formally, Apache CouchDB, is a > free and open source document-oriented database written in the Erlang > programming language. It is designed for extreme scalability and is easily > deployed to multi-core or multi-server clusters. > > We'll also hear from Andrew Dougherty, who will give us an update of his > FRDCSA project. FRDCSA is an advanced Artificial Intelligence created by > automatically scouring the web for advanced AI systems, retrieving and > packaging them for various operating systems, and finally building upon > these packages. Incidentally, many systems not considered to be AI are also > necessary as part of the operating system infrastructure. > > There you have it... databases written in functional programming languages > and advanced topics in artificial analysis. If that's not enough technical > goodness to get you to brave the Chicago cold, I'm not sure what is. See > you on the 27th. > > Meeting Details: > > Date: Tuesday 27th January 2009 > Time: 7pm-9pm, typically with a journey for drinks immediately afterward > Where: 20 W Kinzie, 8th Floor > > Please be sure to RSVP so that you don't get hassled at the front door :) > > ________________________________ > Name > > Powered by Google Docs > > Terms of Service - Additional Terms > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From tigerpeng2001 at yahoo.com Mon Jan 12 12:10:13 2009 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Mon, 12 Jan 2009 12:10:13 -0800 (PST) Subject: [Chicago-talk] process multiple file on windows Message-ID: <680381.68939.qm@web58702.mail.re1.yahoo.com> Hello, Could anyone tell me how to process multiple files with command line on Windows? Here is what I got: perl -nle "print if /abv/" *.txt Can't open *.txt: Invalid argument. Thanks Tiger -------------- next part -------------- An HTML attachment was scrubbed... URL: From jon-chicagotalk at jrock.us Mon Jan 12 12:16:22 2009 From: jon-chicagotalk at jrock.us (Jonathan Rockway) Date: Mon, 12 Jan 2009 14:16:22 -0600 Subject: [Chicago-talk] process multiple file on windows In-Reply-To: <680381.68939.qm@web58702.mail.re1.yahoo.com> (tiger peng's message of "Mon, 12 Jan 2009 12:10:13 -0800 (PST)") References: <680381.68939.qm@web58702.mail.re1.yahoo.com> Message-ID: <87fxjo46w9.fsf@bar.jrock.us> * On Mon, Jan 12 2009, tiger peng wrote: > Hello, > > Could anyone tell me how to process multiple files with command line on Windows? > > Here is what I got: > perl -nle "print if /abv/" *.txt > Can't open *.txt: Invalid argument. Are there any files named *.txt? If so, use cygwin or use glob inside your script. -- print just => another => perl => hacker => if $,=$" From Andy_Bach at wiwb.uscourts.gov Mon Jan 12 13:48:15 2009 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach at wiwb.uscourts.gov) Date: Mon, 12 Jan 2009 15:48:15 -0600 Subject: [Chicago-talk] process multiple file on windows In-Reply-To: <680381.68939.qm@web58702.mail.re1.yahoo.com> References: <680381.68939.qm@web58702.mail.re1.yahoo.com> Message-ID: > Could anyone tell me how to process multiple files with >command line on Windows? >Here is what I got: perl -nle "print if /abv/" *.txt Can't open *.txt: Invalid argument. Yeah, I couldn't get and command line expansion either. While dir *.txt works, nothing else does. You can create a .bat file like: for %%f in ( %1 ) do perl -nle "print if /abv" %%f and (say it's p.bat) C:\perl> p.bat *.tmp worked here. C:\perl> help for gives a fairly confusing (but oddly powerful) explanation of the 'for' op but it includes a mention of 'Command line Extensions' as an option. This may be worth persuing for more ... er, command line options. a ------------------- Andy Bach Systems Mangler Internet: andy_bach at wiwb.uscourts.gov Voice: (608) 261-5738; Cell: (608) 658-1890 I like to believe that people in the long run are going to do more to promote peace than our governments. Indeed, I think that people want peace so much that one of these days governments had better get out ofthe way and let them have it. -- Dwight D. Eisenhower From lembark at wrkhors.com Sun Jan 25 14:56:36 2009 From: lembark at wrkhors.com (Steven Lembark) Date: Sun, 25 Jan 2009 17:56:36 -0500 Subject: [Chicago-talk] Do I need a fork for this? In-Reply-To: <20090109171358.30735B2D9A@swiftsure.xo.com> References: <20090109171358.30735B2D9A@swiftsure.xo.com> Message-ID: <497CEE24.7000209@wrkhors.com> Forks have an enormous coding advantage: you don't have to understand threads to use them. Threading in perl is somewhat easier than in many other languages but isn't for the faint of heart. They also don't require your copy of perl to be compiled with threading enabled, which is a general performance hit in any case. Forks works most easily for handling a task that has all of its information available when it starts (e.g., cleaning out a temp directory all you really need to know is the directory path). In that case all you really care about is that the job finished and whether it failed or not. You can get the stats back with a CHLD handler (see perldoc perlipc for an example). The basic idea is that when the child process exits its parent gets a SIGCHLD and can then look in $? to find the status: $SIG{ CHLD } = sub { my $status = $?; # check $status w/ code from perlipc # docs here. }; ... if( my $pid = fork ) { # parent may want to record the pid for # posterity -- or to kill running jobs # on exit. then again, it may not want # to bother... } elsif( defined $pid ) { # child Does The Deed and then # [please pay attention] MUST # EXIT TO AVOID CAUSING A FORK # STORM AND CRASHING THE SYSTEM! my $status = do_something @argz; exit $status || 0; } else { die "Phorkafobia: $!"; } Whatever you want done gets dealt with in the child. This can also be helpful for dealing with things that fail in ways that eval won't trap easily (i.e., they crash your process): fork the child, let IT croak if necessary, snag the exit status, and report it. In that case you use a wait to get the child's exit status: # notice the lack of $SIG{ CHLD } my $running_pidz = (); sub phork_a_job { if( my $pid = fork ) { $running_pidz{ $pid } = $exit_message; ... } elsif( define $pid ) { ... } else { die "Phorkafobia: $!"; } if( ( my $pid = wait ) > 0 ) { # there was something to wait for. my $status = $?; my $message = $running_pidz{ $pid }; # dissect $status if( $clean ) { print "Your $message completed"; } else { carp "Your $message filed: $reason"; } } } -- Steven Lembark 85-09 90th St. Workhorse Computing Woodhaven, NY, 11421 lembark at wrkhors.com +1 888 359 3508 From joshua.mcadams at gmail.com Tue Jan 13 07:11:40 2009 From: joshua.mcadams at gmail.com (Joshua McAdams) Date: Tue, 13 Jan 2009 09:11:40 -0600 Subject: [Chicago-talk] Fwd: Summer of Code 2009 - engaging with students In-Reply-To: <200901082324.22666.scratchcomputing@gmail.com> References: <200901082324.22666.scratchcomputing@gmail.com> Message-ID: <49d805d70901130711j7f53676ah614bcb928a969561@mail.gmail.com> Eric Wilhelm, who organized Perl's SoC efforts last year, is looking for PM groups to help get students to sign up for Perl projects this year... let's do it! If anyone works at a University and would like to help get the students and/or teachers involved, let me know and we can coordinate. If anyone is going to a University now, you're probably eligible for the $4500 SoC grant... speak up if you're interested and we'll try to help you out. Josh ---------- Forwarded message ---------- From: Eric Wilhelm Date: Fri, Jan 9, 2009 at 1:24 AM Subject: Summer of Code 2009 - engaging with students To: pm_groups at pm.org Cc: tpf-steering at perl.org, directors at lists.parrot.org Hi everybody, It's very cold here. Time to start thinking about summer! The student proposals for Google's Summer of Code will be due in a couple short months and Google has just given word that the program will indeed be on again this year. For 2008, we had a great turnout of willing and able mentors, but only about 16 student applications. This implies that we need to try to reach more students and encourage them to apply for summer of code this year. We'll probably start to see more information from Google about SOC 2009 within a month or so. For now: http://tinyurl.com/9r55v3 Last year taught us that the returning organizations which started early were more successful in recruiting students. While we can't say for sure that Perl/Parrot will be accepted as mentor organizations, we'll get a very late start if we wait. If it (knock on wood) doesn't happen, the Perl community will still benefit from efforts to connect with more students. The following are just a few ideas of what your local Perl Mongers group could do to help. Please forward this to your mailing list or discuss it at your next meeting. Find out if your local university has Perl in the curriculum. If so, get in touch with the professors and let them know about your local Perl Mongers group. Ask if they would be interested in you speaking to their class or giving a presentation on-campus. If the computer science department doesn't seem interested in Perl, you might find users (or potential users) in other departments. Think about all of the niche data-crunching for which Perl gets used. Find grad students who might be doing that - whatever their major might be. Are any members of your group recently graduated? If so, the contacts they still have might be a great place to start, especially in non-cs disciplines. Even in very specialized applications, the chances are that the Perl community contains a mentor with a related background. Finally, I would be interested in hearing from any Perl Mongers groups which have been involved with on-campus activities or are meeting on campus. Please send me mail about what you are doing, or even write about it on use.perl. Thanks, Eric From hwigoda at mindspring.com Tue Jan 13 07:26:59 2009 From: hwigoda at mindspring.com (Hal Wigoda) Date: Tue, 13 Jan 2009 09:26:59 -0600 Subject: [Chicago-talk] Fwd: Summer of Code 2009 - engaging with students In-Reply-To: <49d805d70901130711j7f53676ah614bcb928a969561@mail.gmail.com> References: <200901082324.22666.scratchcomputing@gmail.com> <49d805d70901130711j7f53676ah614bcb928a969561@mail.gmail.com> Message-ID: <4349E2A9-6509-4144-8C90-9CB82D6D9987@mindspring.com> Sent from my iPhone On Jan 13, 2009, at 9:11 AM, "Joshua McAdams" wrote: > Eric Wilhelm, who organized Perl's SoC efforts last year, is looking > for PM groups to help get students to sign up for Perl projects this > year... let's do it! If anyone works at a University and would like > to help get the students and/or teachers involved, let me know and we > can coordinate. If anyone is going to a University now, you're > probably eligible for the $4500 SoC grant... speak up if you're > interested and we'll try to help you out. > > Josh > > ---------- Forwarded message ---------- > From: Eric Wilhelm > Date: Fri, Jan 9, 2009 at 1:24 AM > Subject: Summer of Code 2009 - engaging with students > To: pm_groups at pm.org > Cc: tpf-steering at perl.org, directors at lists.parrot.org > > > Hi everybody, > > It's very cold here. Time to start thinking about summer! > > The student proposals for Google's Summer of Code will be due in a > couple short months and Google has just given word that the program > will indeed be on again this year. > > For 2008, we had a great turnout of willing and able mentors, but only > about 16 student applications. This implies that we need to try to > reach more students and encourage them to apply for summer of code > this > year. > > We'll probably start to see more information from Google about SOC > 2009 > within a month or so. For now: > > http://tinyurl.com/9r55v3 > > Last year taught us that the returning organizations which started > early > were more successful in recruiting students. While we can't say for > sure that Perl/Parrot will be accepted as mentor organizations, we'll > get a very late start if we wait. If it (knock on wood) doesn't > happen, the Perl community will still benefit from efforts to connect > with more students. > > The following are just a few ideas of what your local Perl Mongers > group > could do to help. Please forward this to your mailing list or discuss > it at your next meeting. > > Find out if your local university has Perl in the curriculum. If so, > get in touch with the professors and let them know about your local > Perl Mongers group. Ask if they would be interested in you speaking > to > their class or giving a presentation on-campus. > > If the computer science department doesn't seem interested in Perl, > you > might find users (or potential users) in other departments. Think > about all of the niche data-crunching for which Perl gets used. Find > grad students who might be doing that - whatever their major might be. > > Are any members of your group recently graduated? If so, the contacts > they still have might be a great place to start, especially in non-cs > disciplines. Even in very specialized applications, the chances are > that the Perl community contains a mentor with a related background. > > Finally, I would be interested in hearing from any Perl Mongers groups > which have been involved with on-campus activities or are meeting on > campus. Please send me mail about what you are doing, or even write > about it on use.perl. > > Thanks, > Eric > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From tigerpeng2001 at yahoo.com Wed Jan 14 19:30:21 2009 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Wed, 14 Jan 2009 19:30:21 -0800 (PST) Subject: [Chicago-talk] Calculate Date on SunOS Message-ID: <313322.84496.qm@web58708.mail.re1.yahoo.com> Is there any easy way to calculate the date on SouOS 5.10? It's date command does not take date string. There is only core Perl installed on the box so I cannot use Data::Calc. Thanks in advance, -------------- next part -------------- An HTML attachment was scrubbed... URL: From arodland at comcast.net Wed Jan 14 19:36:06 2009 From: arodland at comcast.net (Andrew Rodland) Date: Wed, 14 Jan 2009 21:36:06 -0600 Subject: [Chicago-talk] Calculate Date on SunOS In-Reply-To: <313322.84496.qm@web58708.mail.re1.yahoo.com> References: <313322.84496.qm@web58708.mail.re1.yahoo.com> Message-ID: <200901142136.06289.arodland@comcast.net> On Wednesday 14 January 2009 09:30:21 pm tiger peng wrote: > Is there any easy way to calculate the date on SouOS 5.10? It's date > command does not take date string. > > There is only core Perl installed on the box so I cannot use Data::Calc. > > Thanks in advance, 1) You can do plenty of date calculation with core perl if you can work localtime and you're handy with arithmetic (and a little bit of modular arithmetic) 2) If you have a working C compiler you can install Date::Calc in your home directory. If you don't, I bet you can find some pure-perl module that does what you need. Andrew From tzz at lifelogs.com Wed Jan 14 19:43:58 2009 From: tzz at lifelogs.com (Ted Zlatanov) Date: Wed, 14 Jan 2009 21:43:58 -0600 Subject: [Chicago-talk] Calculate Date on SunOS In-Reply-To: <313322.84496.qm@web58708.mail.re1.yahoo.com> (tiger peng's message of "Wed, 14 Jan 2009 19:30:21 -0800 (PST)") References: <313322.84496.qm@web58708.mail.re1.yahoo.com> Message-ID: On Wed, 14 Jan 2009 19:30:21 -0800 (PST) tiger peng wrote: tp> Is there any easy way to calculate the date on SouOS 5.10? It's date tp> command does not take date string. There is only core Perl tp> installed on the box so I cannot use Data::Calc. You can compile or download the GNU coreutils, which include a better version of `date'. If you can be more precise about what you're calculating, you'll get better answers. If all you're doing is strftime(), look in the standard Perl POSIX module, it has a strftime() that behaves almost exactly like the C version. Ted From tigerpeng2001 at yahoo.com Wed Jan 14 19:49:55 2009 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Wed, 14 Jan 2009 19:49:55 -0800 (PST) Subject: [Chicago-talk] Calculate Date on SunOS References: <313322.84496.qm@web58708.mail.re1.yahoo.com> <200901142136.06289.arodland@comcast.net> Message-ID: <485747.15858.qm@web58701.mail.re1.yahoo.com> Actually, I only want something as simple as GNU's date command: -> date --date=yesterday +%Y%m%d 20090113 -> date --date="next week" +%Y%m%d 20090121 ________________________________ From: Andrew Rodland To: Chicago.pm chatter Sent: Wednesday, January 14, 2009 9:36:06 PM Subject: Re: [Chicago-talk] Calculate Date on SunOS On Wednesday 14 January 2009 09:30:21 pm tiger peng wrote: > Is there any easy way to calculate the date on SouOS 5.10? It's date > command does not take date string. > > There is only core Perl installed on the box so I cannot use Data::Calc. > > Thanks in advance, 1) You can do plenty of date calculation with core perl if you can work localtime and you're handy with arithmetic (and a little bit of modular arithmetic) 2) If you have a working C compiler you can install Date::Calc in your home directory. If you don't, I bet you can find some pure-perl module that does what you need. Andrew _______________________________________________ Chicago-talk mailing list Chicago-talk at pm.org http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From arodland at comcast.net Wed Jan 14 19:57:52 2009 From: arodland at comcast.net (Andrew Rodland) Date: Wed, 14 Jan 2009 21:57:52 -0600 Subject: [Chicago-talk] Calculate Date on SunOS In-Reply-To: <485747.15858.qm@web58701.mail.re1.yahoo.com> References: <313322.84496.qm@web58708.mail.re1.yahoo.com> <200901142136.06289.arodland@comcast.net> <485747.15858.qm@web58701.mail.re1.yahoo.com> Message-ID: <200901142157.52424.arodland@comcast.net> On Wednesday 14 January 2009 09:49:55 pm tiger peng wrote: > Actually, I only want something as simple as GNU's date command: > > -> date --date=yesterday +%Y%m%d > 20090113 > -> date --date="next week" +%Y%m%d > 20090121 > $ perl -MPOSIX=strftime -le 'print strftime "%Y%m%d",localtime (time - 86400)' 20090113 $ perl -MPOSIX=strftime -le 'print strftime "%Y%m%d",localtime (time+7*86400)' 20090121 Andrew From tigerpeng2001 at yahoo.com Wed Jan 14 20:47:57 2009 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Wed, 14 Jan 2009 20:47:57 -0800 (PST) Subject: [Chicago-talk] Calculate Date on SunOS References: <313322.84496.qm@web58708.mail.re1.yahoo.com> <200901142136.06289.arodland@comcast.net> <485747.15858.qm@web58701.mail.re1.yahoo.com> <200901142157.52424.arodland@comcast.net> Message-ID: <726697.74983.qm@web58708.mail.re1.yahoo.com> Thanks, that's what I am looking for. ________________________________ From: Andrew Rodland To: Chicago.pm chatter Sent: Wednesday, January 14, 2009 9:57:52 PM Subject: Re: [Chicago-talk] Calculate Date on SunOS On Wednesday 14 January 2009 09:49:55 pm tiger peng wrote: > Actually, I only want something as simple as GNU's date command: > > -> date --date=yesterday +%Y%m%d > 20090113 > -> date --date="next week" +%Y%m%d > 20090121 > $ perl -MPOSIX=strftime -le 'print strftime "%Y%m%d",localtime (time - 86400)' 20090113 $ perl -MPOSIX=strftime -le 'print strftime "%Y%m%d",localtime (time+7*86400)' 20090121 Andrew _______________________________________________ Chicago-talk mailing list Chicago-talk at pm.org http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard at rushlogistics.com Thu Jan 15 06:55:15 2009 From: richard at rushlogistics.com (Richard Reina) Date: Thu, 15 Jan 2009 09:55:15 -0500 (EST) Subject: [Chicago-talk] =?utf-8?q?Do_I_need_a_fork_for_this=3F?= In-Reply-To: <20090109171358.30735B2D9A@swiftsure.xo.com> Message-ID: <20090115145515.EA31B35DA@centaur.xo.com> Steve and Dan, Thanks so much for your reply. For now I am taking the easy way out and waiting for the process to finish instead of forking it. However, I do plan on taking this up again soon and I appreciate your responses. Thanks again, Richard ---- Steven Lembark wrote: > > > Forks have an enormous coding advantage: you don't > have to understand threads to use them. Threading > in perl is somewhat easier than in many other > languages but isn't for the faint of heart. > > They also don't require your copy of perl to be > compiled with threading enabled, which is a > general performance hit in any case. > > Forks works most easily for handling a task that > has all of its information available when it > starts (e.g., cleaning out a temp directory all > you really need to know is the directory path). > In that case all you really care about is that > the job finished and whether it failed or not. > > You can get the stats back with a CHLD handler > (see perldoc perlipc for an example). The basic > idea is that when the child process exits its > parent gets a SIGCHLD and can then look in $? > to find the status: > > $SIG{ CHLD } > = sub > { > my $status = $?; > > # check $status w/ code from perlipc > # docs here. > }; > > ... > > if( my $pid = fork ) > { > # parent may want to record the pid for > # posterity -- or to kill running jobs > # on exit. then again, it may not want > # to bother... > } > elsif( defined $pid ) > { > # child Does The Deed and then > # [please pay attention] MUST > # EXIT TO AVOID CAUSING A FORK > # STORM AND CRASHING THE SYSTEM! > > my $status = do_something @argz; > > exit $status || 0; > } > else > { > die "Phorkafobia: $!"; > } > > Whatever you want done gets dealt with in the child. > > This can also be helpful for dealing with things that > fail in ways that eval won't trap easily (i.e., they > crash your process): fork the child, let IT croak if > necessary, snag the exit status, and report it. In > that case you use a wait to get the child's exit > status: > > # notice the lack of $SIG{ CHLD } > > my $running_pidz = (); > > sub phork_a_job > { > > > if( my $pid = fork ) > { > $running_pidz{ $pid } = $exit_message; > ... > } > elsif( define $pid ) > { > ... > } > else > { > die "Phorkafobia: $!"; > } > > if( ( my $pid = wait ) > 0 ) > { > # there was something to wait for. > > my $status = $?; > > my $message = $running_pidz{ $pid }; > > # dissect $status > > if( $clean ) > { > print "Your $message completed"; > } > else > { > carp "Your $message filed: $reason"; > } > > } > } > > -- > Steven Lembark 85-09 90th St. > Workhorse Computing Woodhaven, NY, 11421 > lembark at wrkhors.com +1 888 359 3508 > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From lembark at wrkhors.com Wed Jan 21 09:40:02 2009 From: lembark at wrkhors.com (Steven Lembark) Date: Wed, 21 Jan 2009 12:40:02 -0500 Subject: [Chicago-talk] Java serialization data, version 5 Message-ID: <49775DF2.6070906@wrkhors.com> Some Fine Idiots decided that mime-64 encoding a gzip of java data was "portable". The mime and gzip I've handled, but App::Serialize doesn't like the stuff. Q: Does anyone know how to parse this stuff into usable data structures in perl or C? Or of a module that does? thanx -- Steven Lembark 85-09 90th St. Workhorse Computing Woodhaven, NY, 11421 lembark at wrkhors.com +1 888 359 3508 From me at heyjay.com Sat Jan 24 15:45:04 2009 From: me at heyjay.com (Jay Strauss) Date: Sat, 24 Jan 2009 17:45:04 -0600 Subject: [Chicago-talk] Testing a module installation Message-ID: <39eaccc10901241545p1b4c4f8cn85f60418cb62dca3@mail.gmail.com> Hi, I've built a module, its on CPAN, Finance::InteractiveBrokers::TWS. I want to test that it installs properly from cpan and pulls down any required modules and works. I want to simulate a fresh install on a new host. How does one go about this? I have though maybe using a VM with a fresh OS install, but that seems like overkill, and I'm sure its unnecessary. What's the proper why to simulate a bare bones Perl installation? Thanks Jay From arodland at comcast.net Sat Jan 24 15:57:24 2009 From: arodland at comcast.net (Andrew Rodland) Date: Sat, 24 Jan 2009 17:57:24 -0600 Subject: [Chicago-talk] Testing a module installation In-Reply-To: <39eaccc10901241545p1b4c4f8cn85f60418cb62dca3@mail.gmail.com> References: <39eaccc10901241545p1b4c4f8cn85f60418cb62dca3@mail.gmail.com> Message-ID: <200901241757.24899.arodland@comcast.net> On Saturday 24 January 2009 05:45:04 pm Jay Strauss wrote: > Hi, > > I've built a module, its on CPAN, Finance::InteractiveBrokers::TWS. > > I want to test that it installs properly from cpan and pulls down any > required modules and works. > > I want to simulate a fresh install on a new host. How does one go > about this? I have though maybe using a VM with a fresh OS install, > but that seems like overkill, and I'm sure its unnecessary. > > What's the proper why to simulate a bare bones Perl installation? Two answers: one slightly unixy, one very unixy. 1) Build a new perl with -Dprefix= and install it, then make sure to use /path/to/that/perl -MCPAN -e shell to install your module. That perl's compiled-in @INC will have paths under the prefix, so it won't see anything that you might have installed through your "system perl". However if you're doing any XS, it may well pull libraries from your system library path, so the test is a bit less than perfect. 2) Short of a fresh install in a VM, there's a fresh install in a chroot. I know that Debian, Redhat, and FreeBSD all have tools to make this quite simple, and I'm sure that other systems do as well. Debian's build procedures for their package repository actually work this way :) Andrew From me at heyjay.com Sat Jan 24 16:57:49 2009 From: me at heyjay.com (Jay Strauss) Date: Sat, 24 Jan 2009 18:57:49 -0600 Subject: [Chicago-talk] Testing a module installation In-Reply-To: <200901241757.24899.arodland@comcast.net> References: <39eaccc10901241545p1b4c4f8cn85f60418cb62dca3@mail.gmail.com> <200901241757.24899.arodland@comcast.net> Message-ID: <39eaccc10901241657qff30899mfdb8c8860fddb9d@mail.gmail.com> > Two answers: one slightly unixy, one very unixy. > > 1) Build a new perl with -Dprefix= and install it, then make sure to > use /path/to/that/perl -MCPAN -e shell to install your module. That perl's > compiled-in @INC will have paths under the prefix, so it won't see anything > that you might have installed through your "system perl". However if you're > doing any XS, it may well pull libraries from your system library path, so > the test is a bit less than perfect. > > 2) Short of a fresh install in a VM, there's a fresh install in a chroot. I > know that Debian, Redhat, and FreeBSD all have tools to make this quite > simple, and I'm sure that other systems do as well. Debian's build procedures > for their package repository actually work this way :) > > Andrew I'm running on Ubuntu. I'll have to investigate how to do #2. Seems like there should be some easy way. Thanks Jay From warren.lindsey at gmail.com Sun Jan 25 10:16:20 2009 From: warren.lindsey at gmail.com (Warren Lindsey) Date: Sun, 25 Jan 2009 12:16:20 -0600 Subject: [Chicago-talk] Testing a module installation In-Reply-To: <39eaccc10901241657qff30899mfdb8c8860fddb9d@mail.gmail.com> References: <39eaccc10901241545p1b4c4f8cn85f60418cb62dca3@mail.gmail.com> <200901241757.24899.arodland@comcast.net> <39eaccc10901241657qff30899mfdb8c8860fddb9d@mail.gmail.com> Message-ID: <841e880a0901251016t4cb1d8c7n11a6ccd138a831c5@mail.gmail.com> Well, you probably already have additional modules in your existing Perl library, so you will need to install a fresh perl anyway. Once that is done you could either: 1. Tar up directory, perform module install, test, erase, untar 2. LVM supports snapshots. Instead of restoring the entire VM, just rollback to the previous snapshot. http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html Cheers, Warren On Sat, Jan 24, 2009 at 6:57 PM, Jay Strauss wrote: >> Two answers: one slightly unixy, one very unixy. >> >> 1) Build a new perl with -Dprefix= and install it, then make sure to >> use /path/to/that/perl -MCPAN -e shell to install your module. That perl's >> compiled-in @INC will have paths under the prefix, so it won't see anything >> that you might have installed through your "system perl". However if you're >> doing any XS, it may well pull libraries from your system library path, so >> the test is a bit less than perfect. >> >> 2) Short of a fresh install in a VM, there's a fresh install in a chroot. I >> know that Debian, Redhat, and FreeBSD all have tools to make this quite >> simple, and I'm sure that other systems do as well. Debian's build procedures >> for their package repository actually work this way :) >> >> Andrew > > I'm running on Ubuntu. I'll have to investigate how to do #2. > > Seems like there should be some easy way. > > Thanks > Jay > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From lembark at wrkhors.com Sun Jan 25 23:16:35 2009 From: lembark at wrkhors.com (Steven Lembark) Date: Mon, 26 Jan 2009 02:16:35 -0500 Subject: [Chicago-talk] Testing a module installation In-Reply-To: <39eaccc10901241545p1b4c4f8cn85f60418cb62dca3@mail.gmail.com> References: <39eaccc10901241545p1b4c4f8cn85f60418cb62dca3@mail.gmail.com> Message-ID: <497D6353.8080201@wrkhors.com> > I've built a module, its on CPAN, Finance::InteractiveBrokers::TWS. > > I want to test that it installs properly from cpan and pulls down any > required modules and works. > > I want to simulate a fresh install on a new host. How does one go > about this? I have though maybe using a VM with a fresh OS install, > but that seems like overkill, and I'm sure its unnecessary. > > What's the proper why to simulate a bare bones Perl installation? Hack 'use' to only find things that you know are in the core disto. Your F::IB::TWS::MinimalInstall module would supply a copy of use that dies on or ignores any use requests for non-core modules: use Symbol qw( qualify_to_ref ); my %core_modz = (); @core_modz{ qw( modules you want to exist ) } = (); sub use { my $module = shift; my $caller = caller; exists $core_modz{ $_[0] } or { warn "Unavailable module: $_[0]; return }; eval "require $module"; if( my $sub = $module->can( import ) ) { local $" = ","; # push any side effects into the caller's space. eval "package $caller; $sub->( $module, @_ )"; } 1 } You can get a list from "perldoc perlmodlib". Check the Perl Test Notebook for a complete example of overriding language behavior (they hack the system call). You are probably better off just including what you need in the Makefile.PL. -- Steven Lembark 85-09 90th St. Workhorse Computing Woodhaven, NY, 11421 lembark at wrkhors.com +1 888 359 3508 From jon-chicagotalk at jrock.us Mon Jan 26 11:41:33 2009 From: jon-chicagotalk at jrock.us (Jonathan Rockway) Date: Mon, 26 Jan 2009 13:41:33 -0600 Subject: [Chicago-talk] Testing a module installation In-Reply-To: <39eaccc10901241545p1b4c4f8cn85f60418cb62dca3@mail.gmail.com> (Jay Strauss's message of "Sat, 24 Jan 2009 17:45:04 -0600") References: <39eaccc10901241545p1b4c4f8cn85f60418cb62dca3@mail.gmail.com> Message-ID: <87myddsvma.fsf@bar.jrock.us> * On Sat, Jan 24 2009, Jay Strauss wrote: > Hi, > > I've built a module, its on CPAN, Finance::InteractiveBrokers::TWS. > > I want to test that it installs properly from cpan and pulls down any > required modules and works. The CPAN Testers will do this for you, automatically. If there any problems installing your module, you'll get an email about it. Here are the results for your module: http://testers.cpan.org/show/Finance-InteractiveBrokers-TWS.html Incidentally, it looks like the Testers are broken WRT Inline::Java, probably since they don't have java installed. Regards, Jonathan Rockway -- print just => another => perl => hacker => if $,=$" From me at heyjay.com Tue Jan 27 05:24:06 2009 From: me at heyjay.com (Jay Strauss) Date: Tue, 27 Jan 2009 07:24:06 -0600 Subject: [Chicago-talk] Testing a module installation In-Reply-To: <87myddsvma.fsf@bar.jrock.us> References: <39eaccc10901241545p1b4c4f8cn85f60418cb62dca3@mail.gmail.com> <87myddsvma.fsf@bar.jrock.us> Message-ID: <39eaccc10901270524l6e3545afle39d142645a8a44d@mail.gmail.com> Oh, that's nice page to see. Once Java, Inline, and Inline::Java is installed my module installs fine. But I doubt the testers will ever have the proper env setup for me to have a clean install. Thanks Jay On Mon, Jan 26, 2009 at 1:41 PM, Jonathan Rockway wrote: > * On Sat, Jan 24 2009, Jay Strauss wrote: >> Hi, >> >> I've built a module, its on CPAN, Finance::InteractiveBrokers::TWS. >> >> I want to test that it installs properly from cpan and pulls down any >> required modules and works. > > The CPAN Testers will do this for you, automatically. If there any > problems installing your module, you'll get an email about it. > > Here are the results for your module: > > http://testers.cpan.org/show/Finance-InteractiveBrokers-TWS.html > > Incidentally, it looks like the Testers are broken WRT Inline::Java, > probably since they don't have java installed. > > Regards, > Jonathan Rockway > > -- > print just => another => perl => hacker => if $,=$" > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From joshua.mcadams at gmail.com Tue Jan 27 06:38:08 2009 From: joshua.mcadams at gmail.com (Joshua McAdams) Date: Tue, 27 Jan 2009 08:38:08 -0600 Subject: [Chicago-talk] Fwd: [Chicago-pm, WindyCity-pm] January 2009 Chicago.pm Meeting In-Reply-To: <000e0cd47c326169a404604e485d@google.com> References: <000e0cd47c326169a404604e485d@google.com> Message-ID: <49d805d70901270638s7a5faa9aq621abdede63c290e@mail.gmail.com> Hi everyone, I wanted to remind you all that we are having a Chicago.pm Meeting tonight at 7pm in the Google office at 20 W Kinzie. The featured talks will cover the FRDCSA project and CouchDB. It looks like we'll be on the 17th floor tonight. ---------- Forwarded message ---------- From: Joshua McAdams Date: Mon, Jan 12, 2009 at 1:40 PM Subject: [WindyCity-pm] January 2009 Chicago.pm Meeting To: windycity-pm at pm.org If you have trouble viewing or submitting this form, you can fill it out online: https://spreadsheets.google.com/viewform?key=pOCmTCN6VWDa6dHIE4W9HEQ January 2009 Chicago.pm Meeting On January 27th we'll kick off the new year of Chicago.pm with a meeting with not one, but two featured talks! Jeremy Wall will be talking about development with CouchDB. He'll be highlighting the differences between CouchDB and a traditional RDBMS. During his talk you will see how to set up a CouchDB schema and write views to retrieve data from the CouchDB Schema. He'll also share some of his experience and point out some of the gotcha's you might encounter when writing views. And of course, the Perl tie-in... Jeremy will show off his CPAN Module for CouchDB. For those who don't know, CouchDB, or more formally, Apache CouchDB, is a free and open source document-oriented database written in the Erlang programming language. It is designed for extreme scalability and is easily deployed to multi-core or multi-server clusters. We'll also hear from Andrew Dougherty, who will give us an update of his FRDCSA project. FRDCSA is an advanced Artificial Intelligence created by automatically scouring the web for advanced AI systems, retrieving and packaging them for various operating systems, and finally building upon these packages. Incidentally, many systems not considered to be AI are also necessary as part of the operating system infrastructure. There you have it... databases written in functional programming languages and advanced topics in artificial analysis. If that's not enough technical goodness to get you to brave the Chicago cold, I'm not sure what is. See you on the 27th. Meeting Details: Date: Tuesday 27th January 2009 Time: 7pm-9pm, typically with a journey for drinks immediately afterward Where: 20 W Kinzie, 8th Floor Please be sure to RSVP so that you don't get hassled at the front door :) ________________________________ Name Powered by Google Docs Terms of Service - Additional Terms _______________________________________________ WindyCity-pm mailing list WindyCity-pm at pm.org http://mail.pm.org/mailman/listinfo/windycity-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From sidd.basu at gmail.com Tue Jan 27 08:41:19 2009 From: sidd.basu at gmail.com (Siddhartha Basu) Date: Tue, 27 Jan 2009 10:41:19 -0600 Subject: [Chicago-talk] mod_perl config help Message-ID: <497f3931.c6c1f10a.6735.ffff9fb5@mx.google.com> Hi, I am trying to source some environmental variables for my web app through mod_perl2 and apache2. Here are my configs .... The legacy conf file looks like this(bunch of bash export calls) .... ------------------- export LD_LIBRARY_PATH=/usr/local/instantclient_10_2 export SITE_NAME=dictyBaseDP export BLAST_PORT=8080 export BLAST_SERVER_USER=ubuntu export IDENTIFIER_PREFIX=DPU export ORGANISM_GENUS=Dictyostelium ------------------------------ The relevant apache config section ...... use File::Spec::Functions; use IO::File; use Apache2::PerlSections; $Apache2::PerlSections::Save = 1; my $s = Apache2::PerlSections->server(); my $conf_file = catfile('/etc','apache2','conf.d,'conf.sh'); my $handler = IO::File->new($conf_file,'r') ; while (my $line = $handler->getline()) { chomp $line; if ($line =~ /export\s+(\w+)=(.+)/) { $s->add_config(["PerlSetEnv $1 $2"]); } } $handler->close(); However, starting apache throws error .... Syntax error on line 49 of /etc/apache2/sites-enabled/mod_dictyBaseDP.conf: \t(in cleanup) $s->add_config() has failed: PerlSetEnv takes two arguments, PerlSetEnv at /etc/apache2/sites-enabled/mod_dictyBaseDP.conf line 63, line 53.\n ...fail! It works with 'PerlPassEnv' argument, $s->add_config(["PerlPassEnv $1"]); I need to pass key => value option so 'PerlPassEnv' is not suitable for me. So, any idea why it is failing on 'PassSetEnv'. -siddhartha From drench+chipm at gmail.com Tue Jan 27 12:05:46 2009 From: drench+chipm at gmail.com (Dan Rench) Date: Tue, 27 Jan 2009 14:05:46 -0600 Subject: [Chicago-talk] mod_perl config help In-Reply-To: <497f3931.c6c1f10a.6735.ffff9fb5@mx.google.com> References: <497f3931.c6c1f10a.6735.ffff9fb5@mx.google.com> Message-ID: My guess is your "legacy conf file" has a line like: export SOMEVAR=^I (where ^I is a literal tab character) Given your regex, the culprit might even be a line that was meant to be commented out with a leading "#"... (PS: apologies if you're reading this for a 2nd time) From sean at blanton.com Tue Jan 27 16:05:23 2009 From: sean at blanton.com (Sean Blanton) Date: Tue, 27 Jan 2009 18:05:23 -0600 Subject: [Chicago-talk] Getting new modules into the standard Perl distribution. Message-ID: <497FA143.3080702@blanton.com> I am huge fan and user of the XML::Twig and Config::Properties modules. After all, these address handling of some of the most common resources found today. When I download Perl, however, they are not there, and the third most popular scripting language does not have good XML support "out-of-the-box". Yeah, TIMTOWTDI, but XML::Twig is the undisputed king of the universe imho. Add all generally accepted XML modules in fact - the more the better. The long sad story is that it is not easy for larger companies with standard Perl distributions to add modules. One of our customers has an "open source review board" where new modules need to be reviewed and approved and maybe tested with a number of different apps (most of the time it is most likely just ours). And, there better be a good reason to do so and it must be easy enough to understand and believed cost-effective for management to go forward with it. It's easier for them to pick up new modules on an upgrade. And, that is only one customer. We have hundreds. Our product uses Perl at one layer, but we had to stop distributing Perl for Windows because ActiveState wanted to charge for it, so that ended our control. We do distribute some simple CPAN modules, but, that's a tricky business considering module dependencies and the fact we need to support Perl 5.6.x through 5.8.y So how are requirements managed anyway? How do I start the ball rolling even if it is a long uphill path and a heavy ball? Heading to the meeting shortly! From andy at petdance.com Tue Jan 27 19:25:48 2009 From: andy at petdance.com (Andy Lester) Date: Tue, 27 Jan 2009 21:25:48 -0600 Subject: [Chicago-talk] Getting new modules into the standard Perl distribution. In-Reply-To: <497FA143.3080702@blanton.com> References: <497FA143.3080702@blanton.com> Message-ID: On Jan 27, 2009, at 6:05 PM, Sean Blanton wrote: > So how are requirements managed anyway? How do I start the ball > rolling even if it is a long uphill path and a heavy ball? You get on the Perl5-porters mailing list. The chances of you getting an XML module added to core Perl are roughly nil, however. I've been on p5p for years (except for the last year) and it's antithetical to the thinking of how Perl 5 should be released. xoa -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From me at heyjay.com Wed Jan 28 06:13:17 2009 From: me at heyjay.com (Jay Strauss) Date: Wed, 28 Jan 2009 08:13:17 -0600 Subject: [Chicago-talk] mod_perl config help In-Reply-To: References: <497f3931.c6c1f10a.6735.ffff9fb5@mx.google.com> Message-ID: <39eaccc10901280613q60bde68etbc4b7a737f6161f3@mail.gmail.com> On Tue, Jan 27, 2009 at 2:05 PM, Dan Rench wrote: > My guess is your "legacy conf file" has a line like: > > export SOMEVAR=^I > > (where ^I is a literal tab character) > > Given your regex, the culprit might even be a line that was meant to > be commented out with a leading "#"... > > (PS: apologies if you're reading this for a 2nd time) > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > Great, the first question in months I have a chance of answering and I was beat to the punch :) Jay From me at heyjay.com Wed Jan 28 06:08:15 2009 From: me at heyjay.com (Jay Strauss) Date: Wed, 28 Jan 2009 08:08:15 -0600 Subject: [Chicago-talk] mod_perl config help In-Reply-To: <497f3931.c6c1f10a.6735.ffff9fb5@mx.google.com> References: <497f3931.c6c1f10a.6735.ffff9fb5@mx.google.com> Message-ID: <39eaccc10901280608h37491e09u385aa4700fa663ab@mail.gmail.com> I think you are probably getting some gunk from your regex or some other problem is happening during your parse. Have you tried building your hash and inspecting it first with Data::Dumper or some such before trying to set your $s->add_config() > ------------------- > export LD_LIBRARY_PATH=/usr/local/instantclient_10_2 > export SITE_NAME=dictyBaseDP > export BLAST_PORT=8080 > export BLAST_SERVER_USER=ubuntu > export IDENTIFIER_PREFIX=DPU > export ORGANISM_GENUS=Dictyostelium Maybe you left it out, but won't you also need: export ORACLE_HOME=/usr/local/instantclient_10_2 Jay From sean at blanton.com Wed Jan 28 07:11:23 2009 From: sean at blanton.com (Sean Blanton) Date: Wed, 28 Jan 2009 09:11:23 -0600 Subject: [Chicago-talk] Getting new modules into the standard Perl distribution. In-Reply-To: References: <497FA143.3080702@blanton.com> Message-ID: <4980759B.3060700@blanton.com> Thanks, I'll not pursue it then. Is it that it's an applied use of the core Perl functionality or because it's maintained outside the core distribution or both? Andy Lester wrote: > > On Jan 27, 2009, at 6:05 PM, Sean Blanton wrote: > >> So how are requirements managed anyway? How do I start the ball >> rolling even if it is a long uphill path and a heavy ball? > > > You get on the Perl5-porters mailing list. > > The chances of you getting an XML module added to core Perl are > roughly nil, however. I've been on p5p for years (except for the last > year) and it's antithetical to the thinking of how Perl 5 should be > released. > > xoa > > -- > Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From andy at petdance.com Wed Jan 28 07:16:17 2009 From: andy at petdance.com (Andy Lester) Date: Wed, 28 Jan 2009 09:16:17 -0600 Subject: [Chicago-talk] Getting new modules into the standard Perl distribution. In-Reply-To: <4980759B.3060700@blanton.com> References: <497FA143.3080702@blanton.com> <4980759B.3060700@blanton.com> Message-ID: <91C370FE-07FA-4D9A-A916-C87FBE47B8C7@petdance.com> On Jan 28, 2009, at 9:11 AM, Sean Blanton wrote: > Thanks, I'll not pursue it then. Is it that it's an applied use of > the core Perl functionality or because it's maintained outside the > core distribution or both? More that the core Perl has become so bloated by all the modules that have been added over the years where someone said "Yeah, this is used all the time!". Look at all the stuff that's in a core Perl install. Text::Soundex? File::Checktree? OS2::REXX? -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From sidd.basu at gmail.com Wed Jan 28 08:19:45 2009 From: sidd.basu at gmail.com (Siddhartha Basu) Date: Wed, 28 Jan 2009 10:19:45 -0600 Subject: [Chicago-talk] Re: mod_perl config help In-Reply-To: <39eaccc10901280613q60bde68etbc4b7a737f6161f3@mail.gmail.com> References: <497f3931.c6c1f10a.6735.ffff9fb5@mx.google.com> <39eaccc10901280613q60bde68etbc4b7a737f6161f3@mail.gmail.com> Message-ID: <498085a4.08b38c0a.0a60.4148@mx.google.com> On Wed, 28 Jan 2009, Jay Strauss wrote: > On Tue, Jan 27, 2009 at 2:05 PM, Dan Rench wrote: > > My guess is your "legacy conf file" has a line like: > > > > export SOMEVAR=^I > > > > (where ^I is a literal tab character) That seems to be the problem, i have a one like this with spaces(left out before) export QUICKSEARCH_CLASSES='dicty::UI::Search::Gene dicty::UI::Search::Gene_product dicty::UI::Search::Gene_description dicty::UI::Search::GO dicty::UI::Search::EST_DPUR dicty::UI::Search::Colleague dicty::UI::Search::Author dicty::UI::Search::Primary_id dicty::UI::Search::Webpages' in a single line which i took out and the code worked. Now have to figure out a way to get this in. thanks -siddhartha > > > > Given your regex, the culprit might even be a line that was meant to > > be commented out with a leading "#"... > > > > (PS: apologies if you're reading this for a 2nd time) > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk at pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > Great, the first question in months I have a chance of answering and I > was beat to the punch :) > > Jay > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From jeremy at marzhillstudios.com Wed Jan 28 15:58:18 2009 From: jeremy at marzhillstudios.com (Jeremy Wall) Date: Wed, 28 Jan 2009 17:58:18 -0600 Subject: [Chicago-talk] Getting new modules into the standard Perl distribution. In-Reply-To: <497FA143.3080702@blanton.com> References: <497FA143.3080702@blanton.com> Message-ID: <69d143cd0901281558q31475f85l2c425b17d1298b78@mail.gmail.com> On Tue, Jan 27, 2009 at 6:05 PM, Sean Blanton wrote: > I am huge fan and user of the XML::Twig and Config::Properties modules. > After all, these address handling of some of the most common resources found > today. > > When I download Perl, however, they are not there, and the third most > popular scripting language does not have good XML support "out-of-the-box". > Yeah, TIMTOWTDI, but XML::Twig is the undisputed king of the universe imho. > Add all generally accepted XML modules in fact - the more the better. > > The long sad story is that it is not easy for larger companies with > standard Perl distributions to add modules. One of our customers has an > "open source review board" where new modules need to be reviewed and > approved and maybe tested with a number of different apps (most of the time > it is most likely just ours). And, there better be a good reason to do so > and it must be easy enough to understand and believed cost-effective for > management to go forward with it. It's easier for them to pick up new > modules on an upgrade. And, that is only one customer. We have hundreds. Can't you ship the module with your app? You could build and ship for the target platform if it's missing. I wouldn't imagine that should be too difficult. And it solves the whole uphill battle in getting the module into core perl. Or would packaging the required modules still trigger a review? > > Our product uses Perl at one layer, but we had to stop distributing Perl > for Windows because ActiveState wanted to charge for it, so that ended our > control. We do distribute some simple CPAN modules, but, that's a tricky > business considering module dependencies and the fact we need to support > Perl 5.6.x through 5.8.y > > So how are requirements managed anyway? How do I start the ball rolling > even if it is a long uphill path and a heavy ball? > > Heading to the meeting shortly! > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -- Jeremy Wall http://jeremy.marzhillstudios.com Jeremy at marzhillstudios.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshua.mcadams at gmail.com Thu Jan 29 11:58:56 2009 From: joshua.mcadams at gmail.com (Joshua McAdams) Date: Thu, 29 Jan 2009 13:58:56 -0600 Subject: [Chicago-talk] Frozen Perl Message-ID: <49d805d70901291158i406fea6akb7849d94573c549b@mail.gmail.com> Hi everyone, frozen perl (http://www.frozen-perl.org/mpw2009/) is coming up soon... the first weekend in February! We have a few Chicago.pm/WindyCity.pm'ers who are speaking at the conference. brian d foy is teaching a class on Friday. Andy Lester is keynoting on Saturday. And Jon Rockway is closing out Saturday with a talk. If I missed anyone else from Chicago, please let us know that you are speaking. Also, if you are going and are trying to figure out how to get there, there are a few of us that are driving... I am at least :) I'm planning on heading out Friday afternoon and coming back Saturday night or Sunday afternoon (flexible schedule as of now). If you are interested in a ride, let me know and we can work something out. Also, if you were planning on driving already and wouldn't mind taking someone with you, please speak up. See you at Frozen Perl, Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: From lembark at wrkhors.com Fri Jan 30 07:35:04 2009 From: lembark at wrkhors.com (Steven Lembark) Date: Fri, 30 Jan 2009 10:35:04 -0500 Subject: [Chicago-talk] Testing a module installation In-Reply-To: <39eaccc10901270524l6e3545afle39d142645a8a44d@mail.gmail.com> References: <39eaccc10901241545p1b4c4f8cn85f60418cb62dca3@mail.gmail.com> <87myddsvma.fsf@bar.jrock.us> <39eaccc10901270524l6e3545afle39d142645a8a44d@mail.gmail.com> Message-ID: <49831E28.8030405@wrkhors.com> > Once Java, Inline, and Inline::Java is installed my module installs > fine. But I doubt the testers will ever have the proper env setup for > me to have a clean install. Then you need to include the proper dependencies in your metadata (e.g., Makefile.PL) and add some sanity checks into the first few tests that puke if there isn't any way to get the java working properly. Look at what ./configure does in compiling a collection of trivial programs that probe small parts of the build environment. For example you might have the minimal piece of Inline::Java that compiles a fifty-liner [whatever the shortest piece of Java takes...]. If that does not succeed you BAIL_OUT with a nastygram about having java installed. The test might require calling one of the Inline sub's to compile a piece of provided Java (vs just doing it at compile time via Inline::Java included block). The return from that would give you a useful error message (probably via $@) that Java ain't cuttin' it on the box. Fastest way would be to expropriate whatever tests in Inline::Java are used for this. You could probably paste them wholesale into ./t/00-Java-Sanity.t. -- Steven Lembark 85-09 90th St. Workhorse Computing Woodhaven, NY, 11421 lembark at wrkhors.com +1 888 359 3508 From sean at blanton.com Fri Jan 30 08:59:46 2009 From: sean at blanton.com (Sean Blanton) Date: Fri, 30 Jan 2009 10:59:46 -0600 Subject: [Chicago-talk] Getting new modules into the standard Perl distribution. In-Reply-To: <69d143cd0901281558q31475f85l2c425b17d1298b78@mail.gmail.com> References: <497FA143.3080702@blanton.com> <69d143cd0901281558q31475f85l2c425b17d1298b78@mail.gmail.com> Message-ID: <49833202.8090108@blanton.com> Yes, that's what we do now for some simple text modules, but supporting a compiled module with a lot of dependencies for a broad range of Perl versions get's trickier. You can have gcc or AIX/HP-UX/Sun compiler versions of Perl and compiled modules are not compatible - found that out after shipping to the customer. Some other applications that use Perl, like msysgit and slimserver/squeezbox ship an entire Perl distribution with the modules they need. That seems ideal. I don't know the terms for redistributing Strawberry Perl, but that makes it a lot more palatable than before to include Windows in t that. The effort's a bit high to justify just right now, just for me to use my favorite module, but maybe longer term. We may be in a position where we have to support implementations of 5.6, 5.8 and 5.10 outside our control and more things will start breaking. Strawberry Perl 5.8.8 also ships with a number of XML modules, so I was wrong about that - just doesn't have my fav. Thanks for all the input. Someone and Jon mentioned PAR's. There's some possibilities there, too. That might be the right amount of effort for the mid-term. Jeremy Wall wrote: > > > On Tue, Jan 27, 2009 at 6:05 PM, Sean Blanton > wrote: > > I am huge fan and user of the XML::Twig and Config::Properties > modules. After all, these address handling of some of the most > common resources found today. > > When I download Perl, however, they are not there, and the third > most popular scripting language does not have good XML support > "out-of-the-box". Yeah, TIMTOWTDI, but XML::Twig is the undisputed > king of the universe imho. Add all generally accepted XML modules > in fact - the more the better. > > The long sad story is that it is not easy for larger companies > with standard Perl distributions to add modules. One of our > customers has an "open source review board" where new modules need > to be reviewed and approved and maybe tested with a number of > different apps (most of the time it is most likely just ours). > And, there better be a good reason to do so and it must be easy > enough to understand and believed cost-effective for management to > go forward with it. It's easier for them to pick up new modules on > an upgrade. And, that is only one customer. We have hundreds. > > > Can't you ship the module with your app? > You could build and ship for the target platform if it's missing. I > wouldn't imagine that should be too difficult. And it solves the whole > uphill battle in getting the module into core perl. Or would packaging > the required modules still trigger a review? > > > > Our product uses Perl at one layer, but we had to stop > distributing Perl for Windows because ActiveState wanted to charge > for it, so that ended our control. We do distribute some simple > CPAN modules, but, that's a tricky business considering module > dependencies and the fact we need to support Perl 5.6.x through 5.8.y > > So how are requirements managed anyway? How do I start the ball > rolling even if it is a long uphill path and a heavy ball? > > Heading to the meeting shortly! > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > > -- > Jeremy Wall > http://jeremy.marzhillstudios.com > Jeremy at marzhillstudios.com > ------------------------------------------------------------------------ > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk