From Todd.Chapman at eprize.com Tue Mar 11 14:14:40 2008 From: Todd.Chapman at eprize.com (Todd Chapman) Date: Tue, 11 Mar 2008 17:14:40 -0400 Subject: [Detroit-pm] Next Detroit Perl Mongers / Dynamic Languages meeting Tuesday, March 18th at 7pm Message-ID: <2CB0627B78B5434B90E746FB3DFE491C02CFA8D3@bart.eprize.local> The next meeting of the Detroit Perl Mongers / Dynamic Languages group will be at 7pm on March 18th 2008. This month Bill Hess will be presenting on dynamic web application development using Meteor. What is Meteor (from http://meteorserver.org/) Meteor is an HTTP server which gives developers the freedom to think about web development in an entirely new way. It comprises the Meteor server and a standalone Javascript class which can be used in web pages to provide an abstraction layer for receiving data streams. Designed to be as simple and flexible as possible, Meteor offers a great solution for those wishing to add asynchronous functionality to their web projects. The presentation will include an introduction to this technology which is dubbed "Comet" which is related to "AJAX" - both are names of popular scrubbing powders - get it? A live working example will also be presented and the steps on how it was implemented. Some links to checkout prior to the meeting: http://meteorserver.org/ http://cometdaily.com/ Questions? The meeting location is One ePrize Drive, Pleasant Ridge, MI 48069. The meeting starts at 7pm with food provided by ePrize. Please RSVP to todd.chapman at eprize.com so we can be sure to order enough food for everyone. Todd Chapman todd.chapman at eprize.com Software Engineer ePrize From bhess at techrg.com Tue Mar 18 05:35:01 2008 From: bhess at techrg.com (Bill Hess) Date: Tue, 18 Mar 2008 08:35:01 -0400 Subject: [Detroit-pm] [pm_groups] Summer of Perl -- call for student proposals Message-ID: <47DFB6F5.7060709@techrg.com> Hi all, Please forward this to your groups. (Also feel free to break into a discussion as to whether or how students are involved in the perl community, what we can do to connect with more universities and etc.) The Perl Foundation is participating in Google's 2008 Summer of Code(tm) and we have a lot of capable, willing mentors looking forward to working with some talented, driven students. So, we would like you to help find those students (and quickly -- the students must apply before March 24th.) This is a rare opportunity for students to get a chance to get a paid summer of hacking on exciting projects like Parrot, Perl 6, Moose, Jifty, SVK, Catalyst, or their very own Perl modules or applications. It also brings new talent into the community and gives the student a hefty "real world" experience with a knowledgable mentor. Further, employers love to see this sort of demonstration of teamwork, handling deadlines, communication skills, resourcefulness and etc. We're looking for promising students who are interested in open source (or maybe you know someone who *should* be interested in open source.) Knowledge of Perl is optional if the project is Parrot-related. The student doesn't need to be an expert in the problem domain (after all, learning is part of the process), but should bring a big pile of creativity, problem-solving skills, and determination. Students should review the page of suggested projects, but are encouraged to bring their own proposals (those are often the best.) The most important first step is getting in touch with the community and discussing their project idea with potential mentors. http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_projects Additional information and links can be found here. http://www.perlfoundation.org/perl5/index.cgi?gsoc2008 Google has posted some flyers if you happen to have a university bulletin board or hallway handy: http://code.google.com/p/google-summer-of-code/wiki/GsocFlyers Additional info: http://code.google.com/soc/2008/ http://code.google.com/soc/2008/faqs.html (Note that google has particular requirements to do with the fact that they are paying the students. The student must be able to show their eligibility regarding enrollment and employability.) Remember, the Perl community draws talent from many fields, so if you came to Perl from a non-computer-science major and still have contacts in that department from your university, it is probably worth mentioning to them. Thanks, Eric -- Request pm.org Technical Support via support at pm.org pm_groups mailing list pm_groups at pm.org http://mail.pm.org/mailman/listinfo/pm_groups From Todd.Chapman at eprize.com Tue Mar 18 06:29:18 2008 From: Todd.Chapman at eprize.com (Todd Chapman) Date: Tue, 18 Mar 2008 09:29:18 -0400 Subject: [Detroit-pm] Next Detroit Perl Mongers / Dynamic Languages meeting Tuesday, March 18th at 7pm Message-ID: <2CB0627B78B5434B90E746FB3DFE491C02CFB667@bart.eprize.local> All, Reminder for our meeting today. If you have not RSVP'd please do so. Thanks! -Todd -----Original Message----- From: Todd Chapman Sent: Tuesday, March 11, 2008 5:15 PM To: 'Detroit Perl Mongers' Subject: Next Detroit Perl Mongers / Dynamic Languages meeting Tuesday, March 18th at 7pm The next meeting of the Detroit Perl Mongers / Dynamic Languages group will be at 7pm on March 18th 2008. This month Bill Hess will be presenting on dynamic web application development using Meteor. What is Meteor (from http://meteorserver.org/) Meteor is an HTTP server which gives developers the freedom to think about web development in an entirely new way. It comprises the Meteor server and a standalone Javascript class which can be used in web pages to provide an abstraction layer for receiving data streams. Designed to be as simple and flexible as possible, Meteor offers a great solution for those wishing to add asynchronous functionality to their web projects. The presentation will include an introduction to this technology which is dubbed "Comet" which is related to "AJAX" - both are names of popular scrubbing powders - get it? A live working example will also be presented and the steps on how it was implemented. Some links to checkout prior to the meeting: http://meteorserver.org/ http://cometdaily.com/ Questions? The meeting location is One ePrize Drive, Pleasant Ridge, MI 48069. The meeting starts at 7pm with food provided by ePrize. Please RSVP to todd.chapman at eprize.com so we can be sure to order enough food for everyone. Todd Chapman todd.chapman at eprize.com Software Engineer ePrize From bhess at techrg.com Wed Mar 19 13:32:50 2008 From: bhess at techrg.com (Bill Hess) Date: Wed, 19 Mar 2008 16:32:50 -0400 Subject: [Detroit-pm] [Fwd: Job Posting] Message-ID: <47E17872.1060908@techrg.com> -------- Original Message -------- Subject: Job Posting Date: Wed, 19 Mar 2008 15:03:34 -0400 From: David Szostek To: Hi Bill, Would you mind e-mailing this job opening to your PM group? Thanks, David Szostek UV Uptime -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/detroit-pm/attachments/20080319/75a05ebc/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: UVU - Perl Programmer 030608.pdf Type: application/pdf Size: 38014 bytes Desc: not available Url : http://mail.pm.org/pipermail/detroit-pm/attachments/20080319/75a05ebc/attachment-0001.pdf From treii28 at yahoo.com Thu Mar 27 11:55:50 2008 From: treii28 at yahoo.com (Scott Webster Wood) Date: Thu, 27 Mar 2008 11:55:50 -0700 (PDT) Subject: [Detroit-pm] Trying to stick a fork in it! Message-ID: <758651.33216.qm@web38008.mail.mud.yahoo.com> OK, I've done some simple forking in the past but never needed to do it with any level of interprocess communication. I get all the forking and I found some good examples of using stuff like Sockets to create a socket pair for talking back and forth with a single child. Perhaps I've just been looking at it too long but I'm not quite able to fully sort out how to talk to more than one using those examples. Basically I am interested in creating a handful of subprocesses to do some load testing, record their results and report back the result to the parent only when completed. The parent can just sit around and wait for each/all of the children to finish up then manipulates the data accordingly. Can anyone show me just a simple 2 child IPC using $pid = fork() style. I don't care if it's using sockets, threading or pipes just so long as it works! lol SW ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ From treii28 at yahoo.com Fri Mar 28 14:20:55 2008 From: treii28 at yahoo.com (Scott Webster Wood) Date: Fri, 28 Mar 2008 14:20:55 -0700 (PDT) Subject: [Detroit-pm] Trying to stick a fork in it! Message-ID: <781739.86061.qm@web38010.mail.mud.yahoo.com> OK, I briefly tried threading with some success until I found out the final tool was going to be on a machine running a pre-5.8 version of perl so I went back to pipes and sockets and here's what I came up with in case anyone is curious. I stripped out the bidirectional communication as I'm only talking from-child-to-parent but if anyone wants to see the two-directional code, just let me know (basically just imagine adding the code after the variable initialization from 'sub parent' to 'sub child' and vice versa and changing the verbage) --------------------------- cut here ----------------------------- #!/usr/bin/perl use Socket; use IO::Handle; my (@c, at p, at pid); # c=child handle, p=parent handle, pid=process ID for(my $s=0; $s<5; $s++) { $c[$s] = new IO::Handle; $p[$s] = new IO::Handle; socketpair($c[$s], $p[$s], AF_UNIX, SOCK_STREAM, PF_UNSPEC) or die "socketpair: $!"; $c[$s]->autoflush(1); $p[$s]->autoflush(1); if ($pid[$s] = fork()) { # is the parent close $p[$s]; # close unused parent stream &parent($c[$s], $s); close $c[$s]; # close the stream coming back from the child waitpid($pid[$s],0); # wait for child process to terminate } else { # is the child die "cannot fork: $!" unless defined $pid[$s]; # make sure pid == 0 close $c[$s]; # close the unused child stream &child($p[$s], $s); close $p[$s]; # close stream that was talking to the parent exit(0); } } sub parent() { # read data coming from child process(es) my $fh = shift; my $s = shift; while ($line = <$fh>) { # read data from child line by line until done chomp($line); print "Parent $s Pid $$ just read this: `$line'\n"; }; } sub child() { # send data back to parent through filehandle my $fh = shift; print $fh "Child Pid $$ is sending this\n"; print $fh "Child Pid $$ sends some more\n"; } # filehandles didn't behave well using array references and my ultimate solution # is going to create functions to perform tasks anyway so I just passed the # handles to subroutines -------------- cut ------------ $ ./test.pl Parent 0 Pid 25960 just read this: `Child Pid 25961 is sending this' Parent 0 Pid 25960 just read this: `Child Pid 25961 sends some more' Parent 1 Pid 25960 just read this: `Child Pid 25962 is sending this' Parent 1 Pid 25960 just read this: `Child Pid 25962 sends some more' Parent 2 Pid 25960 just read this: `Child Pid 25963 is sending this' Parent 2 Pid 25960 just read this: `Child Pid 25963 sends some more' Parent 3 Pid 25960 just read this: `Child Pid 25964 is sending this' Parent 3 Pid 25960 just read this: `Child Pid 25964 sends some more' Parent 4 Pid 25960 just read this: `Child Pid 25965 is sending this' Parent 4 Pid 25960 just read this: `Child Pid 25965 sends some more' ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ From unforgiven24 at gmail.com Sat Mar 29 13:19:59 2008 From: unforgiven24 at gmail.com (Mike Ward) Date: Sat, 29 Mar 2008 16:19:59 -0400 Subject: [Detroit-pm] Trying to stick a fork in it! In-Reply-To: <781739.86061.qm@web38010.mail.mud.yahoo.com> References: <781739.86061.qm@web38010.mail.mud.yahoo.com> Message-ID: <5aa434200803291319o2a648307p3291136c5c4ec196@mail.gmail.com> I've never actually done any forking in Perl and was curious, so thanks for posting the code. I wouldn't mind looking at the two-directional code as well, if it's no trouble. - Mike On Fri, Mar 28, 2008 at 5:20 PM, Scott Webster Wood wrote: > OK, I briefly tried threading with some success until I found out the > final tool was going to be on a machine running a pre-5.8 version of perl > so I went back to pipes and sockets and here's what I came up with in case > anyone is curious. > > I stripped out the bidirectional communication as I'm only talking > from-child-to-parent but if anyone wants to see the two-directional code, > just let me know (basically just imagine adding the code after the variable > initialization from 'sub parent' to 'sub child' and vice versa and changing > the verbage) > > > --------------------------- cut here ----------------------------- > #!/usr/bin/perl > > use Socket; > use IO::Handle; > > my (@c, at p, at pid); # c=child handle, p=parent handle, pid=process ID > for(my $s=0; $s<5; $s++) { > $c[$s] = new IO::Handle; > $p[$s] = new IO::Handle; > > socketpair($c[$s], $p[$s], AF_UNIX, SOCK_STREAM, PF_UNSPEC) > or die "socketpair: $!"; > > $c[$s]->autoflush(1); > $p[$s]->autoflush(1); > > > if ($pid[$s] = fork()) { # is the parent > close $p[$s]; # close unused parent stream > &parent($c[$s], $s); > close $c[$s]; # close the stream coming back from the child > waitpid($pid[$s],0); # wait for child process to terminate > } else { # is the child > die "cannot fork: $!" unless defined $pid[$s]; # make sure pid > == 0 > close $c[$s]; # close the unused child stream > &child($p[$s], $s); > close $p[$s]; # close stream that was talking to the parent > exit(0); > } > } > > sub parent() { # read data coming from child process(es) > my $fh = shift; > my $s = shift; > while ($line = <$fh>) { # read data from child line by line until done > chomp($line); > print "Parent $s Pid $$ just read this: `$line'\n"; > }; > } > > sub child() { # send data back to parent through filehandle > my $fh = shift; > print $fh "Child Pid $$ is sending this\n"; > print $fh "Child Pid $$ sends some more\n"; > } > > # filehandles didn't behave well using array references and my ultimate > solution > # is going to create functions to perform tasks anyway so I just passed > the > # handles to subroutines > > -------------- cut ------------ > $ ./test.pl > Parent 0 Pid 25960 just read this: `Child Pid 25961 is sending this' > Parent 0 Pid 25960 just read this: `Child Pid 25961 sends some more' > Parent 1 Pid 25960 just read this: `Child Pid 25962 is sending this' > Parent 1 Pid 25960 just read this: `Child Pid 25962 sends some more' > Parent 2 Pid 25960 just read this: `Child Pid 25963 is sending this' > Parent 2 Pid 25960 just read this: `Child Pid 25963 sends some more' > Parent 3 Pid 25960 just read this: `Child Pid 25964 is sending this' > Parent 3 Pid 25960 just read this: `Child Pid 25964 sends some more' > Parent 4 Pid 25960 just read this: `Child Pid 25965 is sending this' > Parent 4 Pid 25960 just read this: `Child Pid 25965 sends some more' > > > > > > ____________________________________________________________________________________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > _______________________________________________ > Detroit-pm mailing list > Detroit-pm at pm.org > http://mail.pm.org/mailman/listinfo/detroit-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/detroit-pm/attachments/20080329/6dcdfb5a/attachment.html From treii28 at yahoo.com Sat Mar 29 16:57:41 2008 From: treii28 at yahoo.com (Scott Webster Wood) Date: Sat, 29 Mar 2008 16:57:41 -0700 (PDT) Subject: [Detroit-pm] Trying to stick a fork in it! Message-ID: <173663.3067.qm@web38006.mail.mud.yahoo.com> Like I said, just flip the content between the two routines. I hadda tweak a bit because you can't have both waiting in a while loop or they both wait forever so I just sent a single line from the parent down. And keep in mind, the output looks screwy because the parents will be in order, but the children fire somewhat randomly between depending on when they execute their code. SW ----- Original Message ---- From: Mike Ward I wouldn't mind looking at the two-directional code as well, if it's no trouble. --------------------------- cut here ----------------------------- #!/usr/bin/perl use Socket; use IO::Handle; my (@c, at p, at pid); # c=child handle, p=parent handle, pid=process ID for(my $s=0; $s<5; $s++) { $c[$s] = new IO::Handle; $p[$s] = new IO::Handle; socketpair($c[$s], $p[$s], AF_UNIX, SOCK_STREAM, PF_UNSPEC) or die "socketpair: $!"; $c[$s]->autoflush(1); $p[$s]->autoflush(1); if ($pid[$s] = fork()) { # is the parent close $p[$s]; # close unused parent stream &parent($c[$s], $s); close $c[$s]; # close the stream coming back from the child waitpid($pid[$s],0); # wait for child process to terminate } else { # is the child die "cannot fork: $!" unless defined $pid[$s]; # make sure pid == 0 close $c[$s]; # close the unused child stream &child($p[$s], $s); close $p[$s]; # close stream that was talking to the parent exit(0); } } sub parent() { # read data coming from child process(es) my $fh = shift; my $s = shift; print $fh "Parent Pid $$ is sending this\n"; while ($line = <$fh>) { # read data from child line by line until done chomp($line); print "Parent $s Pid $$ just read this: `$line'\n"; }; } sub child() { # send data back to parent through filehandle my $fh = shift; print $fh "Child Pid $$ is sending this\n"; print $fh "Child Pid $$ sends some more\n"; chomp($line = <$fh>); print "Child $s Pid $$ just read this: `$line'\n"; } # filehandles didn't behave well using array references and my ultimate solution # is going to create functions to perform tasks anyway so I just passed the # handles to subroutines -------------- cut ------------ bash-3.2$ ./test.pl Parent 0 Pid 3784 just read this: `Child Pid 3800 is sending this' Parent 0 Pid 3784 just read this: `Child Pid 3800 sends some more' Child Pid 3800 just read this: `Parent Pid 3784 is sending this' Child Pid 3808 just read this: `Parent Pid 3784 is sending this' Parent 1 Pid 3784 just read this: `Child Pid 3808 is sending this' Parent 1 Pid 3784 just read this: `Child Pid 3808 sends some more' Parent 2 Pid 3784 just read this: `Child Pid 3288 is sending this' Parent 2 Pid 3784 just read this: `Child Pid 3288 sends some more' Child Pid 3288 just read this: `Parent Pid 3784 is sending this' Parent 3 Pid 3784 just read this: `Child Pid 2956 is sending this' Parent 3 Pid 3784 just read this: `Child Pid 2956 sends some more' Child Pid 2956 just read this: `Parent Pid 3784 is sending this' Child Pid 744 just read this: `Parent Pid 3784 is sending this' Parent 4 Pid 3784 just read this: `Child Pid 744 is sending this' Parent 4 Pid 3784 just read this: `Child Pid 744 sends some more' ____________________________________________________________________________________ You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/detroit-pm/attachments/20080329/77d7a44f/attachment.html