From vlb at cfcl.com Fri Feb 2 09:53:27 2007 From: vlb at cfcl.com (Vicki Brown) Date: Fri, 2 Feb 2007 09:53:27 -0800 Subject: [sf-perl] JOB: mod_perl and JavaScript Message-ID: A friend and former co-worker of mine is now doing high-tech recruiting. She's looking for Perl developer who knows mod_perl and Javascript. The company uses a Perl - PHP - JavaScript environment backed by MySQL. Location: mid-peninsula. Contact Beth Fox and tell her you heard about this from me via the SF Perl Users group. Thanks. -- - Vicki ZZZ zzZ San Francisco Bay Area, CA z |\ _,,,---,,_ Books, Cats, Tech zz /,`.-'`' -. ;-;;,_ http://cfcl.com/vlb |,4- ) )-,_. ,\ ( `'-' http://cfcl.com/vlb/weblog '---''(_/--' `-'\_) http://vlb.typepad.com/commentary/ From extasia at extasia.org Wed Feb 7 13:24:24 2007 From: extasia at extasia.org (David Alban) Date: Wed, 7 Feb 2007 13:24:24 -0800 Subject: [sf-perl] Net::Domain and system() In-Reply-To: <4c714a9c0701292038x5193a177hf6d91e3b8d678fa2@mail.gmail.com> References: <4c714a9c0701291941m4e4bbe49ib1dd2f638e36fbab@mail.gmail.com> <20070130042408.GB7968@hank.org> <4c714a9c0701292038x5193a177hf6d91e3b8d678fa2@mail.gmail.com> Message-ID: <4c714a9c0702071324o186790cdo88afdddcfc1ed86e@mail.gmail.com> Actually, is there any kind of groovy symbol table or other trick I can use in programs that use my module that will have the effect of telling the compiler that any call like: system ... ; is CORE::system(), and thus avoid having to type CORE::system in the code every place "system" would normally be used? I thought maybe something like this would work: *system = CORE::system; It didn't. I still got the warning. I tried this: sub system { &CORE::system; }; system "ls"; and got: Prototype mismatch: sub main::system () vs none at junk.perl line 10. Subroutine system redefined at junk.perl line 10. Ambiguous call resolved as CORE::system(), qualify as such or use & at junk.perl line 12. followed by a directory listing. If not, are there any other fairly simple tricks I can tell users they can use to avoid typing CORE::system all over the place? Assume I can't upgrade the ancient perl we're using. On 1/29/07, David Alban wrote: > On 1/29/07, Bill Moseley wrote: > > Isn't 5.8.0 from about 2002? Maybe that's the problem? > > Quite possibly. The code experiencing the problem is at work. At > home I fail, as you did, to reproduce the problem on mac os x running > perl 5.8.6. > > O.K. I'll just tell folks at work that they have to use: > > CORE::system ...; > > when they use my module, if they don't want the error. > > Thanks. > > P.S. system( ... ); didn't solve the problem on the work machine. > Only adding CORE:: did. -- Live in a world of your own, but always welcome visitors. From extasia at extasia.org Wed Feb 7 13:27:33 2007 From: extasia at extasia.org (David Alban) Date: Wed, 7 Feb 2007 13:27:33 -0800 Subject: [sf-perl] Net::Domain and system() In-Reply-To: <4c714a9c0702071324o186790cdo88afdddcfc1ed86e@mail.gmail.com> References: <4c714a9c0701291941m4e4bbe49ib1dd2f638e36fbab@mail.gmail.com> <20070130042408.GB7968@hank.org> <4c714a9c0701292038x5193a177hf6d91e3b8d678fa2@mail.gmail.com> <4c714a9c0702071324o186790cdo88afdddcfc1ed86e@mail.gmail.com> Message-ID: <4c714a9c0702071327w3496b91bwf025e28a802b4daa@mail.gmail.com> Or (it's ugly but...) I can tell them that after they finish testing their program, to add: no warnings 'ambigous'; Yeah, scary. I'd stil like to find a better solution. On 2/7/07, David Alban wrote: > Actually, is there any kind of groovy symbol table or other trick I > can use in programs that use my module that will have the effect of > telling the compiler that any call like: > > system ... ; > > is CORE::system(), and thus avoid having to type CORE::system in the > code every place "system" would normally be used? -- Live in a world of your own, but always welcome visitors. From james at actionmessage.com Thu Feb 8 18:41:43 2007 From: james at actionmessage.com (James Briggs) Date: Thu, 8 Feb 2007 18:41:43 -0800 Subject: [sf-perl] Job: Full-time Perl/PHP Programmer for Graphics Software Company Message-ID: <20070209023427.M93592@actionmessage.com> Hi Guys. James Briggs here. I'm looking for a Perl/PHP web programmer for a telecommute/SF opening. FrameFree has several world-class programmers on staff with clue. (I've been a Perl CPAN author since 1998.) Please take a look and let me know if you're interested. Please reply to james at framefree.us with a subject of "WEB1: resume - your name". Thanks, James. Manager of Web Operations, FrameFree Technologies. Job title: Full-time Perl/PHP Programmer for Graphics Software Company Company name: FrameFree Technologies Internal ID: WEB1 Location: United States, California, San Francisco or Telecommute Pay rate: Market Travel: 0% Terms of employment: Salaried employee Length of employment: Permanent Hours: Full time Onsite: some Description: FrameFree develops advanced graphics software and has offices in 3 countries. There is an open position in the Bay Area for a staff web programmer for our online store and community. We use the usual LAMP stack. Required skills: - Expert in either Perl or PHP, knowledgeable in the other - JavaScript programming experience - experienced with database programming with MySQL and/or Oracle - web programming experience on Linux/Unix - web ecommerce experience, especially reporting - reliable - good communications skills - either telecommute or in-office (both acceptable), but if telecommute must be available on Skype chat daily and willing to meet at least one day per week in the San Francisco area Desired skills: Nice to have optional skills (in order of decreasing importance): - Familiar with reliable, high-performance web architectures - Linux/Unix systems administration experience - AJAX programming experience - web scalability/load balancing - web security experience - SEO - XML - source revision control experience with Perforce, CVS or Subversion - advanced SQL query experience - i18n programming experience - web design experience (HTML, CSS, JavaScript) - C/C++ or Java experience - release packaging experience - Win32 programming experience URL for more information: http://www.framefree.com/ end From mkenley at yahoo.com Sat Feb 10 02:40:06 2007 From: mkenley at yahoo.com (martin) Date: Sat, 10 Feb 2007 02:40:06 -0800 (PST) Subject: [sf-perl] Job: Full-time Perl/PHP Programmer for Graphics Software Company Message-ID: <20070210104006.43679.qmail@web51509.mail.yahoo.com> James, I have an opening at where I work - doing QA automation. Let me know if you are interested, we do network attached storage, and write our automation scripts using Perl. It's a good environment, great company, it's in Sunnyvale. Cheers, Martin ----- Original Message ---- From: James Briggs To: sanfrancisco-pm at pm.org Sent: Thursday, February 8, 2007 6:41:43 PM Subject: [sf-perl] Job: Full-time Perl/PHP Programmer for Graphics Software Company Hi Guys. James Briggs here. I'm looking for a Perl/PHP web programmer for a telecommute/SF opening. FrameFree has several world-class programmers on staff with clue. (I've been a Perl CPAN author since 1998.) Please take a look and let me know if you're interested. Please reply to james at framefree.us with a subject of "WEB1: resume - your name". Thanks, James. Manager of Web Operations, FrameFree Technologies. Job title: Full-time Perl/PHP Programmer for Graphics Software Company Company name: FrameFree Technologies Internal ID: WEB1 Location: United States, California, San Francisco or Telecommute Pay rate: Market Travel: 0% Terms of employment: Salaried employee Length of employment: Permanent Hours: Full time Onsite: some Description: FrameFree develops advanced graphics software and has offices in 3 countries. There is an open position in the Bay Area for a staff web programmer for our online store and community. We use the usual LAMP stack. Required skills: - Expert in either Perl or PHP, knowledgeable in the other - JavaScript programming experience - experienced with database programming with MySQL and/or Oracle - web programming experience on Linux/Unix - web ecommerce experience, especially reporting - reliable - good communications skills - either telecommute or in-office (both acceptable), but if telecommute must be available on Skype chat daily and willing to meet at least one day per week in the San Francisco area Desired skills: Nice to have optional skills (in order of decreasing importance): - Familiar with reliable, high-performance web architectures - Linux/Unix systems administration experience - AJAX programming experience - web scalability/load balancing - web security experience - SEO - XML - source revision control experience with Perforce, CVS or Subversion - advanced SQL query experience - i18n programming experience - web design experience (HTML, CSS, JavaScript) - C/C++ or Java experience - release packaging experience - Win32 programming experience URL for more information: http://www.framefree.com/ end _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm ____________________________________________________________________________________ Need a quick answer? Get one in minutes from people who know. Ask your question on www.Answers.yahoo.com From cfcl at cfcl.com Wed Feb 14 01:56:46 2007 From: cfcl at cfcl.com (Rich and Vicki) Date: Wed, 14 Feb 2007 01:56:46 -0800 Subject: [sf-perl] "A mini Mac Solution", by us... Message-ID: Vicki and I are pleased to announce that we got an article published in MacDevCenter: "A mini Mac Solution" http://www.oreillynet.com/pub/a/mac/2007/02/13/a-mini-mac-solution.html It's a high-level overview of the move of cfcl.com from an ailing FreeBSD 4.7 system to a Mac mini and the latest version of Mac OS X. -r -- -- ZZz Vicki Brown zZ P.O. Box 1269 Rich Morin zz |\ _,,,---,,_ San Bruno, CA Bebop, Squirrel, /,`.-'`' -. ;-;;,_ 94066 USA Mezzaluna & Raven |,4- ) )-,_. ,\ ( `'-' http://www.cfcl.com/ '---''(_/--' `-'\_) +1-650-873-7842 From rdm at cfcl.com Fri Feb 16 08:56:55 2007 From: rdm at cfcl.com (Rich Morin) Date: Fri, 16 Feb 2007 08:56:55 -0800 Subject: [sf-perl] In case you were wondering... Message-ID: http://xkcd.com/c224.html -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development From david at fetter.org Fri Feb 16 09:57:29 2007 From: david at fetter.org (David Fetter) Date: Fri, 16 Feb 2007 09:57:29 -0800 Subject: [sf-perl] In case you were wondering... In-Reply-To: References: Message-ID: <20070216175729.GF21379@fetter.org> On Fri, Feb 16, 2007 at 08:56:55AM -0800, Rich Morin wrote: > http://xkcd.com/c224.html Outstanding! Cheers, D -- David Fetter http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! From quinn at fairpath.com Fri Feb 16 10:06:40 2007 From: quinn at fairpath.com (Quinn Weaver) Date: Fri, 16 Feb 2007 10:06:40 -0800 Subject: [sf-perl] In case you were wondering... In-Reply-To: References: Message-ID: <20070216180640.GA95736@fu.funkspiel.org> On Fri, Feb 16, 2007 at 08:56:55AM -0800, Rich Morin wrote: > http://xkcd.com/c224.html bioperl? :) -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ From extasia at extasia.org Sat Feb 17 14:02:47 2007 From: extasia at extasia.org (David Alban) Date: Sat, 17 Feb 2007 14:02:47 -0800 Subject: [sf-perl] /usr/local/foo/ for cpan and locally grown modules In-Reply-To: <4c714a9c0701291801h2d0ba3aemba3ed6e91529a699@mail.gmail.com> References: <4c714a9c0701241953n510935dfub98888e94af90d9e@mail.gmail.com> <200701250923.l0P9N2SU023884@kzsu.stanford.edu> <20070125193313.GA33310@fu.funkspiel.org> <4c714a9c0701291801h2d0ba3aemba3ed6e91529a699@mail.gmail.com> Message-ID: <4c714a9c0702171402m1d09e3fci6d06eda23076b979@mail.gmail.com> FYI, this didn't work: perl Makefile.PL PREFIX=/usr/local/FOO That is, using PREFIX=/usr/local/FOO didn't cause a cpan module to be installed in the /usr/local/FOO tree such that I could include it with: use lib "/usr/local/FOO/lib/perl"; use Some::Module; But this does work (/usr/local/FOO/lib/perl is a symlink to perl5): perl Makefile.PL LIB=/usr/local/FOO/perl5 It caused, for example, Crypt::PasswdMD5 to be installed as: /usr/local/FOO/lib/perl5/Crypt/PasswdMD5.pm Which is the same location I'm putting home grown modules. So now I have a single: use lib "/usr/local/FOO/lib/perl"; statement that works both for home grown and installed-from-cpan modules. Yay! On 1/29/07, David Alban wrote: > (Assume I'm not allowed to update the "live" perl installation, so I'm > installing modules in the /usr/local/FOO tree.) I have: > > $ find /usr/local/FOO/lib/perl5 -type f > /usr/local/FOO/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Crypt/PasswdMD5/.packlist > /usr/local/FOO/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/perllocal.pod > /usr/local/FOO/lib/perl5/site_perl/5.8.0/Crypt/PasswdMD5.pm > /usr/local/FOO/lib/perl5/Log/Transcript.pm > > Crypt::PasswdMD5 is from CPAN. I took Garth's suggestion and did: > > $ perl Makefile.PL PREFIX=/usr/local/FOO > > and the files were installed as shown above. Log::Transcript is the > module I wrote. > > Ideally, I'd like to have users be able to include a single "use ..." > statement in the code.[1] I'd like it to be: > > use lib "/usr/local/FOO/lib/perl5"; > # or /usr/local/FOO/lib/perl if I make the latter a symlink to > the former > > Not two: > > use lib "/usr/local/FOO/lib/perl5"; > use lib "/usr/local/FOO/lib/perl5/site_perl"; > > Based on Quinn's suggestion, I thought the former might allow a > program to pick up both Log::Transcript (or, home-grown modules) and > Crypt::PasswdMD5 (or, cpan installed modules). But it doesn't pick up > the site_perl tree: > > $ unset PERL5LIB; perl -I/usr/local/FOO/lib/perl5 -MCrypt::PasswdMD5 -e 1 > Can't locate Crypt/PasswdMD5.pm in @INC (@INC contains: > /usr/local/FOO/lib/perl5/5.8.0/i386-linux-thread-multi > /usr/local/FOO/lib/perl5/5.8.0 /usr/local/FOO/lib/perl5 > /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl > /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .). > BEGIN failed--compilation aborted. > > It's a little clearer here: > > $ unset PERL5LIB; perl -I/usr/local/FOO/lib/perl5 -e 'print join "\n", @INC' > /usr/local/FOO/lib/perl5/5.8.0/i386-linux-thread-multi > /usr/local/FOO/lib/perl5/5.8.0 > /usr/local/FOO/lib/perl5 > /usr/lib/perl5/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/5.8.0 > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.0 > /usr/lib/perl5/site_perl > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.0 > /usr/lib/perl5/vendor_perl > /usr/lib/perl5/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/5.8.0 > > Am I missing something that I can use to get a single: > > use lib "/usr/local/FOO/lib/perl5"; > > statement to work (i.e., to include the site_perl tree, too)? > > Thanks, > David > > [1] There's no hope of getting them to set PERL5LIB in their environment > > On 1/25/07, Quinn Weaver wrote: > > Right. And in this case, you'd do > > > > export PERL5LIB=/usr/local/FOO/lib/perl5 # bash syntax > > > > ... then Perl automatically searches under there for site_perl, > > site_perl/5.8.0, and all those other weirdly named subdirs that > > Perl uses to install things. -- Live in a world of your own, but always welcome visitors. From mbudash at sonic.net Sat Feb 17 14:11:26 2007 From: mbudash at sonic.net (Michael Budash) Date: Sat, 17 Feb 2007 14:11:26 -0800 Subject: [sf-perl] /usr/local/foo/ for cpan and locally grown modules In-Reply-To: <4c714a9c0702171402m1d09e3fci6d06eda23076b979@mail.gmail.com> References: <4c714a9c0701241953n510935dfub98888e94af90d9e@mail.gmail.com> <200701250923.l0P9N2SU023884@kzsu.stanford.edu> <20070125193313.GA33310@fu.funkspiel.org> <4c714a9c0701291801h2d0ba3aemba3ed6e91529a699@mail.gmail.com> <4c714a9c0702171402m1d09e3fci6d06eda23076b979@mail.gmail.com> Message-ID: <7BF9637A-0641-44E1-A636-3C96BD3F4197@sonic.net> perldoc -q 'your question here' is your friend! this is what comes back for "perldoc -q 'my own'": Found in /usr/lib/perl5/5.8.5/pod/perlfaq8.pod How do I keep my own module/library directory? When you build modules, use the PREFIX and LIB options when generating Makefiles: perl Makefile.PL PREFIX=/mydir/perl LIB=/mydir/perl/lib then either set the PERL5LIB environment variable before you run scripts that use the modules/libraries (see perlrun) or say use lib ?/mydir/perl/lib?; This is almost the same as BEGIN { unshift(@INC, ?/mydir/perl/lib?); } except that the lib module checks for machine-dependent subdirectories. See Perl?s lib for more information. On Feb 17, 2007, at 2:02 PM, David Alban wrote: > FYI, this didn't work: > > perl Makefile.PL PREFIX=/usr/local/FOO > > That is, using PREFIX=/usr/local/FOO didn't cause a cpan module to be > installed in the /usr/local/FOO tree such that I could include it > with: > > use lib "/usr/local/FOO/lib/perl"; > use Some::Module; > > But this does work (/usr/local/FOO/lib/perl is a symlink to perl5): > > perl Makefile.PL LIB=/usr/local/FOO/perl5 > > It caused, for example, Crypt::PasswdMD5 to be installed as: > > /usr/local/FOO/lib/perl5/Crypt/PasswdMD5.pm > > Which is the same location I'm putting home grown modules. > > So now I have a single: > > use lib "/usr/local/FOO/lib/perl"; > > statement that works both for home grown and installed-from-cpan > modules. > > Yay! > > On 1/29/07, David Alban wrote: >> (Assume I'm not allowed to update the "live" perl installation, so >> I'm >> installing modules in the /usr/local/FOO tree.) I have: >> >> $ find /usr/local/FOO/lib/perl5 -type f >> /usr/local/FOO/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/ >> auto/Crypt/PasswdMD5/.packlist >> /usr/local/FOO/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/ >> perllocal.pod >> /usr/local/FOO/lib/perl5/site_perl/5.8.0/Crypt/PasswdMD5.pm >> /usr/local/FOO/lib/perl5/Log/Transcript.pm >> >> Crypt::PasswdMD5 is from CPAN. I took Garth's suggestion and did: >> >> $ perl Makefile.PL PREFIX=/usr/local/FOO >> >> and the files were installed as shown above. Log::Transcript is the >> module I wrote. >> >> Ideally, I'd like to have users be able to include a single "use ..." >> statement in the code.[1] I'd like it to be: >> >> use lib "/usr/local/FOO/lib/perl5"; >> # or /usr/local/FOO/lib/perl if I make the latter a >> symlink to >> the former >> >> Not two: >> >> use lib "/usr/local/FOO/lib/perl5"; >> use lib "/usr/local/FOO/lib/perl5/site_perl"; >> >> Based on Quinn's suggestion, I thought the former might allow a >> program to pick up both Log::Transcript (or, home-grown modules) and >> Crypt::PasswdMD5 (or, cpan installed modules). But it doesn't >> pick up >> the site_perl tree: >> >> $ unset PERL5LIB; perl -I/usr/local/FOO/lib/perl5 - >> MCrypt::PasswdMD5 -e 1 >> Can't locate Crypt/PasswdMD5.pm in @INC (@INC contains: >> /usr/local/FOO/lib/perl5/5.8.0/i386-linux-thread-multi >> /usr/local/FOO/lib/perl5/5.8.0 /usr/local/FOO/lib/perl5 >> /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 >> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi >> /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl >> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi >> /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl >> /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .). >> BEGIN failed--compilation aborted. >> >> It's a little clearer here: >> >> $ unset PERL5LIB; perl -I/usr/local/FOO/lib/perl5 -e 'print join >> "\n", @INC' >> /usr/local/FOO/lib/perl5/5.8.0/i386-linux-thread-multi >> /usr/local/FOO/lib/perl5/5.8.0 >> /usr/local/FOO/lib/perl5 >> /usr/lib/perl5/5.8.0/i386-linux-thread-multi >> /usr/lib/perl5/5.8.0 >> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi >> /usr/lib/perl5/site_perl/5.8.0 >> /usr/lib/perl5/site_perl >> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi >> /usr/lib/perl5/vendor_perl/5.8.0 >> /usr/lib/perl5/vendor_perl >> /usr/lib/perl5/5.8.0/i386-linux-thread-multi >> /usr/lib/perl5/5.8.0 >> >> Am I missing something that I can use to get a single: >> >> use lib "/usr/local/FOO/lib/perl5"; >> >> statement to work (i.e., to include the site_perl tree, too)? >> >> Thanks, >> David >> >> [1] There's no hope of getting them to set PERL5LIB in their >> environment >> >> On 1/25/07, Quinn Weaver wrote: >>> Right. And in this case, you'd do >>> >>> export PERL5LIB=/usr/local/FOO/lib/perl5 # bash syntax >>> >>> ... then Perl automatically searches under there for site_perl, >>> site_perl/5.8.0, and all those other weirdly named subdirs that >>> Perl uses to install things. > > -- > Live in a world of your own, but always welcome visitors. From extasia at extasia.org Sat Feb 17 15:50:54 2007 From: extasia at extasia.org (David Alban) Date: Sat, 17 Feb 2007 15:50:54 -0800 Subject: [sf-perl] /usr/local/foo/ for cpan and locally grown modules In-Reply-To: <7BF9637A-0641-44E1-A636-3C96BD3F4197@sonic.net> References: <4c714a9c0701241953n510935dfub98888e94af90d9e@mail.gmail.com> <200701250923.l0P9N2SU023884@kzsu.stanford.edu> <20070125193313.GA33310@fu.funkspiel.org> <4c714a9c0701291801h2d0ba3aemba3ed6e91529a699@mail.gmail.com> <4c714a9c0702171402m1d09e3fci6d06eda23076b979@mail.gmail.com> <7BF9637A-0641-44E1-A636-3C96BD3F4197@sonic.net> Message-ID: <4c714a9c0702171550j3d8ec538u811b5444e01419c6@mail.gmail.com> Excellent. Thank you. On 2/17/07, Michael Budash wrote: > Found in /usr/lib/perl5/5.8.5/pod/perlfaq8.pod > How do I keep my own module/library directory? > > When you build modules, use the PREFIX and LIB options when > generating Makefiles: > > perl Makefile.PL PREFIX=/mydir/perl LIB=/mydir/perl/lib > > then either set the PERL5LIB environment variable before you > run scripts that use the modules/libraries (see > perlrun) or say > > use lib '/mydir/perl/lib'; > > This is almost the same as > > BEGIN { > unshift(@INC, '/mydir/perl/lib'); > } > > except that the lib module checks for machine-dependent > subdirectories. See Perl's lib for more information. -- Live in a world of your own, but always welcome visitors. From garth.webb at gmail.com Mon Feb 19 16:42:38 2007 From: garth.webb at gmail.com (Garth Webb) Date: Mon, 19 Feb 2007 16:42:38 -0800 Subject: [sf-perl] /usr/local/foo/ for cpan and locally grown modules In-Reply-To: <4c714a9c0702171402m1d09e3fci6d06eda23076b979@mail.gmail.com> References: <4c714a9c0701241953n510935dfub98888e94af90d9e@mail.gmail.com> <200701250923.l0P9N2SU023884@kzsu.stanford.edu> <20070125193313.GA33310@fu.funkspiel.org> <4c714a9c0701291801h2d0ba3aemba3ed6e91529a699@mail.gmail.com> <4c714a9c0702171402m1d09e3fci6d06eda23076b979@mail.gmail.com> Message-ID: On 2/17/07, David Alban wrote: > > FYI, this didn't work: > > perl Makefile.PL PREFIX=/usr/local/FOO > > That is, using PREFIX=/usr/local/FOO didn't cause a cpan module to be > installed in the /usr/local/FOO tree such that I could include it > with: > > use lib "/usr/local/FOO/lib/perl"; > use Some::Module; You don't need to include it as "/usr/local/FOO/lib/perl". If you use PREFIX just use that same value for 'use lib', ie: $ perl Makefile.PL PREFIX /usr/local/FOO ... $ cat yourprog.pl #!/usr/bin/perl -w use lib qw(/usr/local/FOO); ... 'lib' knows how to find your modules. Garth But this does work (/usr/local/FOO/lib/perl is a symlink to perl5): > > perl Makefile.PL LIB=/usr/local/FOO/perl5 > > It caused, for example, Crypt::PasswdMD5 to be installed as: > > /usr/local/FOO/lib/perl5/Crypt/PasswdMD5.pm > > Which is the same location I'm putting home grown modules. > > So now I have a single: > > use lib "/usr/local/FOO/lib/perl"; > > statement that works both for home grown and installed-from-cpan modules. > > Yay! > > On 1/29/07, David Alban wrote: > > (Assume I'm not allowed to update the "live" perl installation, so I'm > > installing modules in the /usr/local/FOO tree.) I have: > > > > $ find /usr/local/FOO/lib/perl5 -type f > > > /usr/local/FOO/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Crypt/PasswdMD5/.packlist > > > /usr/local/FOO/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/perllocal.pod > > /usr/local/FOO/lib/perl5/site_perl/5.8.0/Crypt/PasswdMD5.pm > > /usr/local/FOO/lib/perl5/Log/Transcript.pm > > > > Crypt::PasswdMD5 is from CPAN. I took Garth's suggestion and did: > > > > $ perl Makefile.PL PREFIX=/usr/local/FOO > > > > and the files were installed as shown above. Log::Transcript is the > > module I wrote. > > > > Ideally, I'd like to have users be able to include a single "use ..." > > statement in the code.[1] I'd like it to be: > > > > use lib "/usr/local/FOO/lib/perl5"; > > # or /usr/local/FOO/lib/perl if I make the latter a symlink to > > the former > > > > Not two: > > > > use lib "/usr/local/FOO/lib/perl5"; > > use lib "/usr/local/FOO/lib/perl5/site_perl"; > > > > Based on Quinn's suggestion, I thought the former might allow a > > program to pick up both Log::Transcript (or, home-grown modules) and > > Crypt::PasswdMD5 (or, cpan installed modules). But it doesn't pick up > > the site_perl tree: > > > > $ unset PERL5LIB; perl -I/usr/local/FOO/lib/perl5 -MCrypt::PasswdMD5 -e > 1 > > Can't locate Crypt/PasswdMD5.pm in @INC (@INC contains: > > /usr/local/FOO/lib/perl5/5.8.0/i386-linux-thread-multi > > /usr/local/FOO/lib/perl5/5.8.0 /usr/local/FOO/lib/perl5 > > /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 > > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi > > /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl > > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi > > /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl > > /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .). > > BEGIN failed--compilation aborted. > > > > It's a little clearer here: > > > > $ unset PERL5LIB; perl -I/usr/local/FOO/lib/perl5 -e 'print join "\n", > @INC' > > /usr/local/FOO/lib/perl5/5.8.0/i386-linux-thread-multi > > /usr/local/FOO/lib/perl5/5.8.0 > > /usr/local/FOO/lib/perl5 > > /usr/lib/perl5/5.8.0/i386-linux-thread-multi > > /usr/lib/perl5/5.8.0 > > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi > > /usr/lib/perl5/site_perl/5.8.0 > > /usr/lib/perl5/site_perl > > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi > > /usr/lib/perl5/vendor_perl/5.8.0 > > /usr/lib/perl5/vendor_perl > > /usr/lib/perl5/5.8.0/i386-linux-thread-multi > > /usr/lib/perl5/5.8.0 > > > > Am I missing something that I can use to get a single: > > > > use lib "/usr/local/FOO/lib/perl5"; > > > > statement to work (i.e., to include the site_perl tree, too)? > > > > Thanks, > > David > > > > [1] There's no hope of getting them to set PERL5LIB in their environment > > > > On 1/25/07, Quinn Weaver wrote: > > > Right. And in this case, you'd do > > > > > > export PERL5LIB=/usr/local/FOO/lib/perl5 # bash syntax > > > > > > ... then Perl automatically searches under there for site_perl, > > > site_perl/5.8.0, and all those other weirdly named subdirs that > > > Perl uses to install things. > > -- > Live in a world of your own, but always welcome visitors. > _______________________________________________ > 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: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20070219/892bd498/attachment.html From moseley at hank.org Mon Feb 19 16:59:49 2007 From: moseley at hank.org (Bill Moseley) Date: Mon, 19 Feb 2007 16:59:49 -0800 Subject: [sf-perl] /usr/local/foo/ for cpan and locally grown modules In-Reply-To: References: <4c714a9c0701241953n510935dfub98888e94af90d9e@mail.gmail.com> <200701250923.l0P9N2SU023884@kzsu.stanford.edu> <20070125193313.GA33310@fu.funkspiel.org> <4c714a9c0701291801h2d0ba3aemba3ed6e91529a699@mail.gmail.com> <4c714a9c0702171402m1d09e3fci6d06eda23076b979@mail.gmail.com> Message-ID: <20070220005948.GA10096@hank.org> On Mon, Feb 19, 2007 at 04:42:38PM -0800, Garth Webb wrote: > You don't need to include it as "/usr/local/FOO/lib/perl". If you use > PREFIX just use that same value for 'use lib', ie: > > $ perl Makefile.PL PREFIX /usr/local/FOO > ... > $ cat yourprog.pl > #!/usr/bin/perl -w > > use lib qw(/usr/local/FOO); > ... > > 'lib' knows how to find your modules. Not that I've seen. Either have to specify LIB or add additional paths to @INC. $ perl Makefile.PL PREFIX=$HOME/crypt $ make install Installing /home/moseley/crypt/share/perl/5.8.8/Crypt/PasswdMD5.pm Installing /home/moseley/crypt/man/man3/Crypt::PasswdMD5.3pm Writing /home/moseley/crypt/lib/perl/5.8.8/auto/Crypt/PasswdMD5/.packlist Appending installation info to /home/moseley/crypt/lib/perl/5.8.8/perllocal.pod $ PERL5LIB=$HOME/crypt perl -MCrypt::PasswdMD5 Can't locate Crypt/PasswdMD5.pm in @INC (@INC contains: /home/moseley/crypt /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/local/lib/perl/5.8.2 /usr/local/share/perl/5.8.2 /usr/local/lib/perl/5.8.1 /usr/local/share/perl/5.8.1 /usr/local/lib/perl/5.8.0 /usr/local/share/perl/5.8.0 .). BEGIN failed--compilation aborted. $ perl Makefile.PL PREFIX=$HOME/crypt LIB=$HOME/crypt $ make install Manifying blib/man3/Crypt::PasswdMD5.3pm Installing /home/moseley/crypt/Crypt/PasswdMD5.pm $ PERL5LIB=$HOME/crypt perl -MCrypt::PasswdMD5 -e 1 -- Bill Moseley moseley at hank.org From quinn at fairpath.com Tue Feb 20 12:31:15 2007 From: quinn at fairpath.com (Quinn Weaver) Date: Tue, 20 Feb 2007 12:31:15 -0800 Subject: [sf-perl] Wednesday, February 28: Beer and Scripting SIG Message-ID: <20070220203115.GA41210@fu.funkspiel.org> Once again we're merging with Rich's excellent Beer and Scripting SIG (BASS). More people + more perspectives = better meeting. In fact, last month's meeting was so successful that I'm making this the default for dinner meetings. Thanks, Rich! All the details are here: http://www.cfcl.com/rdm/bass/ RSVPs are appreciated. Thanks, -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ From quinn at fairpath.com Tue Feb 20 12:40:17 2007 From: quinn at fairpath.com (Quinn Weaver) Date: Tue, 20 Feb 2007 12:40:17 -0800 Subject: [sf-perl] TWiki talk March 27 Message-ID: <20070220204017.GB41210@fu.funkspiel.org> Mark your calendars: Peter Thoeny, author of TWiki, has agreed to speak in March. TWiki is a professional-quality, GPL'ed Perl wiki; Peter has built a company around it. I still need to get venue confirmation, but I thought I'd mention it now so y'all can mark your calendars. -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ From quinn at fairpath.com Wed Feb 21 11:10:40 2007 From: quinn at fairpath.com (Quinn Weaver) Date: Wed, 21 Feb 2007 11:10:40 -0800 Subject: [sf-perl] [george@metaart.org: [oak perl] Fwd: [conspire] RMS speaking at Berkley] Message-ID: <20070221191040.GA50438@fu.funkspiel.org> Sorry for the late notice, but... RMS is speaking at Berkeley today and again on Friday (they're different talks). It's probably nothing we haven't heard before, but it never hurts to go to the tent and get some revival. ;) ----- Forwarded message from George Woolley ----- From: George Woolley Date: Mon, 19 Feb 2007 14:29:29 -0800 To: oakland at pm.org Subject: [oak perl] Fwd: [conspire] RMS speaking at Berkley ---------- Forwarded Message ---------- Subject: [conspire] RMS speaking at Berkley Date: Monday 19 February 2007 13:18 From: "Steve Bibayoff" To: conspire at linuxmafia.com Hello, I just noticed that the BALUG mailing list is down. Could someone, if they don't mind, forward this info to any and all of the UG's that are in the area that may be interested. Thanks, Steve. If anyone is interested, Richard Stallman will be giving a couple of talks at Berkley this week. There both suppose to be open to the public. The first talk is titled "Copyright vs. Community in the Age of Computer Networks" and is on Wed, Feb. 21 from 4:00-5:00pm at University of California - Berkeley, HP Auditorium, 306 Soda Hall, Berkeley CA 91720. Information here: http://www.fsf.org/events/universityofcaliforniaberkeleyspeech http://www.eecs.berkeley.edu/Colloquium/Archives/06-07/Spring2007/stallman.sh tml The second talk is titled "The Free Software Movement and the GNU/Linux Operating System" and is on Fri, Feb 23 from 5:00-6:30pm at same hall and place, University of California Berkeley, HP Auditorium, 306 Soda Hall, Berkeley CA 91720. More information is here: http://www.fsf.org/events/ucberkeleyspeech2 And, if anybody interested that will be UC Davis area, he will be giving a talk there on Thursday, Feb 22 from 3:00-4:00pm at University of California, Davis, 1065 Kemper Hall, 1 Shields Avenue, Davis CA 95616. More information about this talk is here: http://www.fsf.org/events/ucdavisspeech http://thistle.cs.ucdavis.edu:8080/seminars/?type=1&talkid=70 Please forward to anyone(or group) who may be interested. Any other questions, please ask them at rms-assist at gnu.org ,as I don't know any more info than what I have just posted. Thanks, Steve _______________________________________________ conspire mailing list conspire at linuxmafia.com http://linuxmafia.com/mailman/listinfo/conspire ------------------------------------------------------- _______________________________________________ Oakland mailing list Oakland at pm.org http://mail.pm.org/mailman/listinfo/oakland ----- End forwarded message ----- -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ From nheller at silcon.com Wed Feb 21 21:20:53 2007 From: nheller at silcon.com (Neil Heller) Date: Wed, 21 Feb 2007 21:20:53 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <20070221191040.GA50438@fu.funkspiel.org> Message-ID: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> I would like to find out if someone can offer me a recommendation for an IDE or an editor for writing Perl scripts? Any comments are appreciated. From andy at petdance.com Wed Feb 21 21:27:29 2007 From: andy at petdance.com (Andy Lester) Date: Wed, 21 Feb 2007 23:27:29 -0600 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> Message-ID: <12737175-3DEE-4C30-AB64-CE6757E3B2D5@petdance.com> On Feb 21, 2007, at 11:20 PM, Neil Heller wrote: > > I would like to find out if someone can offer me a recommendation > for an IDE > or an editor for writing Perl scripts? perldoc -q searches the Perl FAQ for words, if you don't want to use Google to search the Perl FAQ. $ perlfaq -q ide Found in /System/Library/Perl/5.8.6/pods/perlfaq3.pod Is there an IDE or Windows Perl Editor? ... and it goes from there. xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From friedman at highwire.stanford.edu Wed Feb 21 21:42:37 2007 From: friedman at highwire.stanford.edu (Michael Friedman) Date: Wed, 21 Feb 2007 21:42:37 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> Message-ID: If you're on a Mac, I've found that TextMate is a fantastic editor for Perl. (And nearly any other language I can think of...) It also has compile, run, and debugger support built in, as long as you're doing the compiling, running, and debugging on your local machine. (You can add remote compile and run support using scripts, but remote debugging is harder.) http://www.macromates.com/ Personally, I use TextMate instead of using separate Perl, SQL, Java, and XML/XSLT IDEs. I have one interface and don't have to keep switching tools during my day. That said -- it's not quite as good as IntelliJ IDEA for Java or some of the custom SQL IDEs -- but it's good enough. If you're using a Windows OS, there is now a "version" of TextMate for Windows: "E Text Editor". I haven't used it, but it seems to be nearly the same thing. See the website for details. http://e-texteditor.com/blog/2006/textmate_on_windows On Unix systems, well, there's always emacs or vim. Both can be reasonably good IDEs, with a little customization. I had one coworker who had emacs set up to do everything you'd possibly expect from a Perl IDE and another coworker who did the same for vim. -- Mike On Feb 21, 2007, at 9:20 PM, Neil Heller wrote: > > I would like to find out if someone can offer me a recommendation > for an IDE > or an editor for writing Perl scripts? > > Any comments are appreciated. > > > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm --------------------------------------------------------------------- Michael Friedman HighWire Press Phone: 650-725-1974 Stanford University FAX: 270-721-8034 --------------------------------------------------------------------- From friedman at highwire.stanford.edu Wed Feb 21 21:48:51 2007 From: friedman at highwire.stanford.edu (Michael Friedman) Date: Wed, 21 Feb 2007 21:48:51 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <12737175-3DEE-4C30-AB64-CE6757E3B2D5@petdance.com> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> <12737175-3DEE-4C30-AB64-CE6757E3B2D5@petdance.com> Message-ID: Wow. That was a trip down memory lane... One of these days I'm going to have to go back and read the rest of the perlfaq. If you do try Eclipse, be sure you have *lots* of free memory. It's also a multi-language IDE with great features, but it's a bit of a pig. -- Mike On Feb 21, 2007, at 9:27 PM, Andy Lester wrote: > > On Feb 21, 2007, at 11:20 PM, Neil Heller wrote: > >> >> I would like to find out if someone can offer me a recommendation >> for an IDE >> or an editor for writing Perl scripts? > > perldoc -q searches the Perl FAQ for words, if you don't want to use > Google to search the Perl FAQ. > > $ perlfaq -q ide > > Found in /System/Library/Perl/5.8.6/pods/perlfaq3.pod > Is there an IDE or Windows Perl Editor? > ... > > and it goes from there. > > xoxo, > Andy > > -- > Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance > > > > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm --------------------------------------------------------------------- Michael Friedman HighWire Press Phone: 650-725-1974 Stanford University FAX: 270-721-8034 --------------------------------------------------------------------- From rick at linuxmafia.com Wed Feb 21 22:54:57 2007 From: rick at linuxmafia.com (Rick Moen) Date: Wed, 21 Feb 2007 22:54:57 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> Message-ID: <20070222065456.GE18594@linuxmafia.com> Quoting Michael Friedman (friedman at highwire.stanford.edu): > On Unix systems, well, there's always emacs or vim. Both can be > reasonably good IDEs, with a little customization. In addition, my "IDEs" page on http://linuxmafia.com/kb/Devtools/ lists these for Perl development: ActiveState's Komodo PerlComposer WideStudio wxPerl Some in the "General/Editors" category probably also qualify. -- Cheers, "Here, sanity ... niiiiiice sanity, come to daddy ... okay, Rick Moen that's a good sanity ... {*THWONK!*} _Got_ the bastard." rick at linuxmafia.com --AdB From doom at kzsu.stanford.edu Thu Feb 22 13:08:40 2007 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Thu, 22 Feb 2007 13:08:40 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> Message-ID: <200702222108.l1ML8eM5089953@kzsu.stanford.edu> Michael Friedman wrote: > Neil Heller wrote: > > I would like to find out if someone can offer me a recommendation > > for an IDE > > or an editor for writing Perl scripts? > On Unix systems, well, there's always emacs or vim. Both can be > reasonably good IDEs, with a little customization. I had one coworker > who had emacs set up to do everything you'd possibly expect from a > Perl IDE and another coworker who did the same for vim. If someone needs help getting emacs set-up for perl work I can probably help a little. There are some vim fans around, also. From dave at wrightpopcorn.com Thu Feb 22 13:37:38 2007 From: dave at wrightpopcorn.com (Dave Turner) Date: Thu, 22 Feb 2007 13:37:38 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <200702222108.l1ML8eM5089953@kzsu.stanford.edu> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> <200702222108.l1ML8eM5089953@kzsu.stanford.edu> Message-ID: <45DE0D22.3060601@wrightpopcorn.com> If you're on a Windows system, look at context http://www.context.cx In addition to being free, it has syntax highlighters for numerous languages. Joe Brenner wrote: > Michael Friedman wrote: > > >> Neil Heller wrote: >> > > >>> I would like to find out if someone can offer me a recommendation >>> for an IDE >>> or an editor for writing Perl scripts? >>> > > >> On Unix systems, well, there's always emacs or vim. Both can be >> reasonably good IDEs, with a little customization. I had one coworker >> who had emacs set up to do everything you'd possibly expect from a >> Perl IDE and another coworker who did the same for vim. >> > > If someone needs help getting emacs set-up for perl work I can probably > help a little. There are some vim fans around, also. > > _______________________________________________ > 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: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20070222/05b24e0e/attachment.html From extasia at extasia.org Thu Feb 22 15:45:37 2007 From: extasia at extasia.org (David Alban) Date: Thu, 22 Feb 2007 15:45:37 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <45DE0D22.3060601@wrightpopcorn.com> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> <200702222108.l1ML8eM5089953@kzsu.stanford.edu> <45DE0D22.3060601@wrightpopcorn.com> Message-ID: <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> [with all due respect to those who like syntax highlighting] I once stopped using speed dialing because it made me forget the phone numbers eventually. I wonder if using syntax highlighting can make you less effective eventually if you have to use an editor that doesn't have it... I personally don't like syntax highlighting (but not for the reason above). I find the flashing changing colors annoying and distracting. I wonder if I'm in the minority... On 2/22/07, Dave Turner wrote: > In addition to being free, it has syntax highlighters for numerous > languages. -- Live in a world of your own, but always welcome visitors. From dave at wrightpopcorn.com Thu Feb 22 16:04:58 2007 From: dave at wrightpopcorn.com (Dave Turner) Date: Thu, 22 Feb 2007 16:04:58 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> <200702222108.l1ML8eM5089953@kzsu.stanford.edu> <45DE0D22.3060601@wrightpopcorn.com> <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> Message-ID: <45DE2FAA.8030703@wrightpopcorn.com> The time I really find it useful is when I've got mismatched parens, brackets or curly braces. Then they're much easier to track down as Context highlights pairs. Other than that I could give a rip about highlighted syntax. David Alban wrote: > [with all due respect to those who like syntax highlighting] > > I once stopped using speed dialing because it made me forget the phone > numbers eventually. I wonder if using syntax highlighting can make > you less effective eventually if you have to use an editor that > doesn't have it... > > I personally don't like syntax highlighting (but not for the reason > above). I find the flashing changing colors annoying and distracting. > I wonder if I'm in the minority... > > On 2/22/07, Dave Turner wrote: > >> In addition to being free, it has syntax highlighters for numerous >> languages. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20070222/e4dc2a3c/attachment.html From quinn at fairpath.com Thu Feb 22 16:48:15 2007 From: quinn at fairpath.com (Quinn Weaver) Date: Thu, 22 Feb 2007 16:48:15 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> <200702222108.l1ML8eM5089953@kzsu.stanford.edu> <45DE0D22.3060601@wrightpopcorn.com> <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> Message-ID: <20070223004815.GA60943@fu.funkspiel.org> On Thu, Feb 22, 2007 at 03:45:37PM -0800, David Alban wrote: > [with all due respect to those who like syntax highlighting] > > I once stopped using speed dialing because it made me forget the phone > numbers eventually. I wonder if using syntax highlighting can make > you less effective eventually if you have to use an editor that > doesn't have it... > > I personally don't like syntax highlighting (but not for the reason > above). I find the flashing changing colors annoying and distracting. > I wonder if I'm in the minority... Dunno. I go through phases with it; sometimes I use it and sometimes I don't. I find code position is more salient than color, so I try to indent my code well. If I do that, I don't really need syntax highlighting (or sigils, braces, and semicolons, for that matter-- Python reads at least as well as Perl to me). All this kinda matches the graphic design research on perceptual primitives like value, size, and position... kinda. I wonder if anyone has ever researched the way these primitives work in the coding domain. -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ From andy at petdance.com Thu Feb 22 16:54:45 2007 From: andy at petdance.com (Andy Lester) Date: Thu, 22 Feb 2007 18:54:45 -0600 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <20070223004815.GA60943@fu.funkspiel.org> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> <200702222108.l1ML8eM5089953@kzsu.stanford.edu> <45DE0D22.3060601@wrightpopcorn.com> <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> <20070223004815.GA60943@fu.funkspiel.org> Message-ID: <3ABDFF6B-1FCF-485C-AC36-CC5472972970@petdance.com> On Feb 22, 2007, at 6:48 PM, Quinn Weaver wrote: > I find code position is more salient than color, so I try to > indent my code well. If I do that, I don't really need syntax > highlighting (or sigils, braces, and semicolons, for that matter-- > Python reads at least as well as Perl to me). For me, vim's color coding is part of everything I do. If I do anything wrong, it just feels wrong. For example, if I close a quote incorrectly, the rest of my code is purple. Even if I can't tell exactly what's wrong, I just FEEL that there's a problem, and I stop until I figure it out. xoa -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From friedman at highwire.stanford.edu Thu Feb 22 17:03:36 2007 From: friedman at highwire.stanford.edu (Michael Friedman) Date: Thu, 22 Feb 2007 17:03:36 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <3ABDFF6B-1FCF-485C-AC36-CC5472972970@petdance.com> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> <200702222108.l1ML8eM5089953@kzsu.stanford.edu> <45DE0D22.3060601@wrightpopcorn.com> <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> <20070223004815.GA60943@fu.funkspiel.org> <3ABDFF6B-1FCF-485C-AC36-CC5472972970@petdance.com> Message-ID: <3F718A35-8ED6-46FD-A295-9C4C96C88BD3@highwire.stanford.edu> On Feb 22, 2007, at 4:54 PM, Andy Lester wrote: > For me, vim's color coding is part of everything I do. If I do > anything wrong, it just feels wrong. For example, if I close a quote > incorrectly, the rest of my code is purple. Even if I can't tell > exactly what's wrong, I just FEEL that there's a problem, and I stop > until I figure it out. I use syntax coloring for the same reason. However, I'm now a big fan of perltidy, which automatically "fixes" any location-of-code errors I make accidentally. Between the two, it lets me both catch problems more quickly and understand someone else's code more easily. Since I work in a group with about 20 people all writing their own idiosyncratic Perl code, quickly understanding someone else's code is extremely helpful. (And don't ask why we don't enforce some coding standards. I've tried, but the Boss refuses to let me use Perl::Critic or even forced-tidying. :-( ) To bring this back to IDEs, both TextMate and BBEdit on the Mac have shortcut key access to running perltidy on a file. You can set up a similar thing in any editor that can run outside scripts, if it doesn't already have it. To me, integrated perltidy support is a Required Feature of any Perl IDE. -- Mike --------------------------------------------------------------------- Michael Friedman HighWire Press Phone: 650-725-1974 Stanford University FAX: 270-721-8034 --------------------------------------------------------------------- From dan at keller.com Thu Feb 22 17:09:29 2007 From: dan at keller.com (Dan Keller) Date: Thu, 22 Feb 2007 17:09:29 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <3ABDFF6B-1FCF-485C-AC36-CC5472972970@petdance.com> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> <200702222108.l1ML8eM5089953@kzsu.stanford.edu> <45DE0D22.3060601@wrightpopcorn.com> <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> <20070223004815.GA60943@fu.funkspiel.org> <3ABDFF6B-1FCF-485C-AC36-CC5472972970@petdance.com> Message-ID: <6.2.3.4.2.20070222170215.02759170@mail.keller.com> At 04:54 PM 2/22/2007, Andy Lester wrote: >For me, vim's color coding is part of everything I do. If I do >anything wrong, it just feels wrong. For example, if I close a quote >incorrectly, the rest of my code is purple. Even if I can't tell >exactly what's wrong, I just FEEL that there's a problem, and I stop >until I figure it out. I agree, when the colors look funny I know something's mismatched and I better look harder. Truly a productivity boost, at least for me. What drives me nuts (and I'm sure it's just a misconfiguration but I haven't figured it out yet) is vim's "smart" indenting. Good old vi had a much more rudimentary auto-indent -- it just indented the same as the previous line -- but vim tries to be clever, and screws up my own indents. So here's my question for you vim wizards: is there a way to tell vim to just be vi? Or at least to just auto-indent the old- fashioned way? :-) Dan Keller dan at keller.com http://www.keller.com/dan +1 415 861-4500 (voice) +1 415 861-4593 (fax) From Adam.Morgan at safeway.com Thu Feb 22 17:42:12 2007 From: Adam.Morgan at safeway.com (Adam Morgan) Date: Thu, 22 Feb 2007 18:42:12 -0700 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <6.2.3.4.2.20070222170215.02759170@mail.keller.com> Message-ID: <5113C869AE8FD844B3589414188D35A9AD9B13@PHITPR05EXC01.safeway01.ad.safeway.com> You could try setting the indentexpr="", which takes away any special routines for handling the indentation, then you want to set autoindent so that it behaves in the way you like it. If this works then you should add it to your vimrc file so it is used on every invocation. -----Original Message----- From: sanfrancisco-pm-bounces+adam.morgan=safeway.com at pm.org [mailto:sanfrancisco-pm-bounces+adam.morgan=safeway.com at pm.org] On Behalf Of Dan Keller Sent: Thursday, February 22, 2007 5:09 PM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] IDEs and/or Editors At 04:54 PM 2/22/2007, Andy Lester wrote: >For me, vim's color coding is part of everything I do. If I do >anything wrong, it just feels wrong. For example, if I close a quote >incorrectly, the rest of my code is purple. Even if I can't tell >exactly what's wrong, I just FEEL that there's a problem, and I stop >until I figure it out. I agree, when the colors look funny I know something's mismatched and I better look harder. Truly a productivity boost, at least for me. What drives me nuts (and I'm sure it's just a misconfiguration but I haven't figured it out yet) is vim's "smart" indenting. Good old vi had a much more rudimentary auto-indent -- it just indented the same as the previous line -- but vim tries to be clever, and screws up my own indents. So here's my question for you vim wizards: is there a way to tell vim to just be vi? Or at least to just auto-indent the old- fashioned way? :-) Dan Keller dan at keller.com http://www.keller.com/dan +1 415 861-4500 (voice) +1 415 861-4593 (fax) _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm "MMS " made the following annotations. ------------------------------------------------------------------------------ Warning: All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient. This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s). If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. ============================================================================== From rick at linuxmafia.com Thu Feb 22 18:00:59 2007 From: rick at linuxmafia.com (Rick Moen) Date: Thu, 22 Feb 2007 18:00:59 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <5113C869AE8FD844B3589414188D35A9AD9B13@PHITPR05EXC01.safeway01.ad.safeway.com> References: <6.2.3.4.2.20070222170215.02759170@mail.keller.com> <5113C869AE8FD844B3589414188D35A9AD9B13@PHITPR05EXC01.safeway01.ad.safeway.com> Message-ID: <20070223020059.GM18594@linuxmafia.com> Quoting Adam Morgan (Adam.Morgan at safeway.com): > You could try setting the indentexpr="", which takes away any special > routines for handling the indentation, then you want to set autoindent > so that it behaves in the way you like it. If this works then you should > add it to your vimrc file so it is used on every invocation. If, OTOH, the desire is full bug-for-bug compatibility with nvi, just $ echo "set nocp" >> ~/.vimrc -- Cheers, "If these walls could talk... they'd probably say 'No! Rick Moen Not the nails again! Not the hammer! NOT THE HAMMER!!!!'" rick at linuxmafia.com -- Jennifer A. Ford From rick at linuxmafia.com Thu Feb 22 18:02:47 2007 From: rick at linuxmafia.com (Rick Moen) Date: Thu, 22 Feb 2007 18:02:47 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <20070223020059.GM18594@linuxmafia.com> References: <6.2.3.4.2.20070222170215.02759170@mail.keller.com> <5113C869AE8FD844B3589414188D35A9AD9B13@PHITPR05EXC01.safeway01.ad.safeway.com> <20070223020059.GM18594@linuxmafia.com> Message-ID: <20070223020247.GN18594@linuxmafia.com> I wrote; > If, OTOH, the desire is full bug-for-bug compatibility with nvi, just > $ echo "set nocp" >> ~/.vimrc Er, without the "no" would be more a propos, in this case. ;-> From doom at kzsu.stanford.edu Thu Feb 22 18:09:41 2007 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Thu, 22 Feb 2007 18:09:41 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <3F718A35-8ED6-46FD-A295-9C4C96C88BD3@highwire.stanford.edu> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> <200702222108.l1ML8eM5089953@kzsu.stanford.edu> <45DE0D22.3060601@wrightpopcorn.com> <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> <20070223004815.GA60943@fu.funkspiel.org> <3ABDFF6B-1FCF-485C-AC36-CC5472972970@petdance.com> <3F718A35-8ED6-46FD-A295-9C4C96C88BD3@highwire.stanford.edu> Message-ID: <200702230209.l1N29fac094639@kzsu.stanford.edu> Michael Friedman wrote: > Andy Lester wrote: > > For me, vim's color coding is part of everything I do. If I do > > anything wrong, it just feels wrong. For example, if I close a quote > > incorrectly, the rest of my code is purple. Even if I can't tell > > exactly what's wrong, I just FEEL that there's a problem, and I stop > > until I figure it out. > > I use syntax coloring for the same reason. I've gotten used to emacs' syntax coloring of late, and I suppose it does help me fix some errors sooner... for example, I like to intermix pod and code (contra-Conway), but pod has some annoying white-space sensitivity to it (you're supposed to bracket pod tags with *empty* lines, not just blank ones). Syntax highlighting helps a lot with this: I don't often run podchecker any more. On the other hand, there's a suprising number of cases where I don't get what the syntax coloring is trying to tell me until after I figure it out ("Oh, *duh* that's a reserved word..."). I do find that emacs' auto-indentation features often highlight simple syntax problems (dropped semi-colons, etc)... > However, I'm now a big fan of perltidy, which automatically "fixes" > any location-of-code errors I make accidentally. Between the two, it > lets me both catch problems more quickly and understand someone else's > code more easily. perltidy essentially performs the same job as the emacs/cperl-mode indent features. > To me, integrated perltidy support is a Required Feature of any Perl IDE. I don't think the need is as great in the emacs world, but there are methods of doing anything like this you might imagine... Heh, just stumbled across a new "perltidy-mode": http://search.cpan.org/dist/perltidy-mode/ This guy is doing some interesting stuff... http://use.perl.org/~jjore/journal/30321 From doom at kzsu.stanford.edu Thu Feb 22 18:16:11 2007 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Thu, 22 Feb 2007 18:16:11 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> <200702222108.l1ML8eM5089953@kzsu.stanford.edu> <45DE0D22.3060601@wrightpopcorn.com> <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> Message-ID: <200702230216.l1N2GBxZ094753@kzsu.stanford.edu> David Alban wrote: > [with all due respect to those who like syntax highlighting] > > I once stopped using speed dialing because it made me forget the phone > numbers eventually. I wonder if using syntax highlighting can make > you less effective eventually if you have to use an editor that > doesn't have it... I know the sort of problem you're talking about, but syntax highlighting isn't likely to do it to you. On the other hand, I'm a fan of using templates for things of late, and they genuinely can make it harder to remember the details of things I've got in my templates... I personally just don't care very much. I've always got the templates, and I know how to look the stuff up if need be. (But I can imagine it could be embarrassing on a job interview: "I thought you said you know how to use this"). > I personally don't like syntax highlighting (but not for the reason > above). I find the flashing changing colors annoying and distracting. I can sympathize, but it probably just means you need to use *different* syntax highlighting. For example, I like cperl-mode in emacs well enough, but there's a *really* stupid feature in it where by default it likes to highlight spaces at the end of a line with an underscore: it's too irritating to be believed, (and figuring out how to make it go away isn't as easy as it should be, either)... From fred at redhotpenguin.com Thu Feb 22 18:20:36 2007 From: fred at redhotpenguin.com (Fred Moyer) Date: Thu, 22 Feb 2007 18:20:36 -0800 (PST) Subject: [sf-perl] IDEs and/or Editors In-Reply-To: <200702230209.l1N29fac094639@kzsu.stanford.edu> References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> <200702222108.l1ML8eM5089953@kzsu.stanford.edu> <45DE0D22.3060601@wrightpopcorn.com> <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> <20070223004815.GA60943@fu.funkspiel.org> <3ABDFF6B-1FCF-485C-AC36-CC5472972970@petdance.com> <3F718A35-8ED6-46FD-A295-9C4C96C88BD3@highwire.stanford.edu> <200702230209.l1N29fac094639@kzsu.stanford.edu> Message-ID: On Thu, 22 Feb 2007, Joe Brenner wrote: > Michael Friedman wrote: > perltidy essentially performs the same job as the emacs/cperl-mode > indent features. > >> To me, integrated perltidy support is a Required Feature of any Perl IDE. > > I don't think the need is as great in the emacs world, but there > are methods of doing anything like this you might imagine... I've been using the perltidy macro in Perlnow and have been really happy with it - http://obsidianrook.com/perlnow/emacs_as_perl_ide.html#perltidy (note shameless plug of Joe's emacs ide, which I've been quite happy with) One other killer feature I've found that I can't live without is auto-complete. There's a vim autocomplete feature in the vim scripts archive, but I've been in emacs mode lately and managed to hack in autocomplete (well, more like hack in someone else's solution to my .emacs file :) ) - http://use.perl.org/~Phred/journal/32324 From doom at kzsu.stanford.edu Thu Feb 22 20:13:06 2007 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Thu, 22 Feb 2007 20:13:06 -0800 Subject: [sf-perl] IDEs and/or Editors In-Reply-To: References: <000601c75641$3c99e4d0$27130618@your0agqlnep7i> <200702222108.l1ML8eM5089953@kzsu.stanford.edu> <45DE0D22.3060601@wrightpopcorn.com> <4c714a9c0702221545o50849151naff296acd255155b@mail.gmail.com> <20070223004815.GA60943@fu.funkspiel.org> <3ABDFF6B-1FCF-485C-AC36-CC5472972970@petdance.com> <3F718A35-8ED6-46FD-A295-9C4C96C88BD3@highwire.stanford.edu> <200702230209.l1N29fac094639@kzsu.stanford.edu> Message-ID: <200702230413.l1N4D6nq096377@kzsu.stanford.edu> Fred Moyer wrote: > Joe Brenner wrote: > > Michael Friedman wrote: > > perltidy essentially performs the same job as the emacs/cperl-mode > > indent features. > > > >> To me, integrated perltidy support is a Required Feature of any Perl IDE. > > > > I don't think the need is as great in the emacs world, but there > > are methods of doing anything like this you might imagine... > > I've been using the perltidy macro in Perlnow and have been really happy > with it - http://obsidianrook.com/perlnow/emacs_as_perl_ide.html#perltidy > (note shameless plug of Joe's emacs ide, which I've been quite happy with) Thanks, I was wondering where I put that note. I was thinking about adding minimal perltidy support like that to the next version of perlnow.el... but if there's a perltidy minor mode maybe it's not needed. > One other killer feature I've found that I can't live without is > auto-complete. Which in emacs is essentially just M-C / without any setup needed. Myself, I've never gotten into using that, though... I'm more inclinced to use the emacs "registers" a lot. Any long identifier I expect to need to re-use, I stash in a register. For example, to save the region to register "1", you do a "C-x r s 1" and to insert it somewhere else you do a " C-x r i 1" (though myself, I keep the "insert" key bound to "insert-register" because it's not good for much else). > I've been in emacs mode lately and managed to hack in > autocomplete (well, more like hack in someone else's solution to my .emacs > file :) ) - http://use.perl.org/~Phred/journal/32324 Ah, I think I see... you seed the autocomplete system with a list of words you expect to be using. Otherwise I guess it just uses the current buffer as a source of completions. From doom at kzsu.stanford.edu Sat Feb 24 01:54:14 2007 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Sat, 24 Feb 2007 01:54:14 -0800 Subject: [sf-perl] a reason to goto Message-ID: <200702240954.l1O9sExN065612@kzsu.stanford.edu> I found a reason to use a goto! if ($RANDOMIZE) { DO_OVER: do { $i = pick_numeric(0, $numb_cards-1); $j = pick_numeric(0, $numb_cards-1); unless( $REFLEXIVE ) { if ($i == $j) { goto DO_OVER; } } }; My first thought was to just say "redo", but that's a runtime error: you can't use redo outside of a loop. Not even inside a "do" block... which I think counts as another perl oddity. Of course, this could be re-written something like this, but I wouldn't call it an improvement: if ($RANDOMIZE) { do { $i = pick_numeric(0, $numb_cards-1); $j = pick_numeric(0, $numb_cards-1); } until ( not( $REFLEXIVE ) && ($i != $j) ) } From quinn at fairpath.com Sat Feb 24 09:07:33 2007 From: quinn at fairpath.com (Quinn Weaver) Date: Sat, 24 Feb 2007 09:07:33 -0800 Subject: [sf-perl] a reason to goto In-Reply-To: <200702240954.l1O9sExN065612@kzsu.stanford.edu> References: <200702240954.l1O9sExN065612@kzsu.stanford.edu> Message-ID: <20070224170733.GA77688@fu.funkspiel.org> On Sat, Feb 24, 2007 at 01:54:14AM -0800, Joe Brenner wrote: > > I found a reason to use a goto! > > if ($RANDOMIZE) { > DO_OVER: do { > $i = pick_numeric(0, $numb_cards-1); > $j = pick_numeric(0, $numb_cards-1); > unless( $REFLEXIVE ) { > if ($i == $j) { > goto DO_OVER; > } > } > }; Hmmn! > My first thought was to just say "redo", but that's a runtime > error: you can't use redo outside of a loop. Not even inside a > "do" block... which I think counts as another perl oddity. > > Of course, this could be re-written something like this, but I > wouldn't call it an improvement: > > if ($RANDOMIZE) { > do { > $i = pick_numeric(0, $numb_cards-1); > $j = pick_numeric(0, $numb_cards-1); > } until ( not( $REFLEXIVE ) && ($i != $j) ) > } Furthermore, wouldn't this cause an infinite loop if $REFLEXIVE is true? -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ From doom at kzsu.stanford.edu Sat Feb 24 10:48:32 2007 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Sat, 24 Feb 2007 10:48:32 -0800 Subject: [sf-perl] a reason to goto In-Reply-To: <20070224170733.GA77688@fu.funkspiel.org> References: <200702240954.l1O9sExN065612@kzsu.stanford.edu> <20070224170733.GA77688@fu.funkspiel.org> Message-ID: <200702241848.l1OImWAn071324@kzsu.stanford.edu> Quinn Weaver wrote: > Joe Brenner wrote: > > > > I found a reason to use a goto! > > > > if ($RANDOMIZE) { > > DO_OVER: do { > > $i = pick_numeric(0, $numb_cards-1); > > $j = pick_numeric(0, $numb_cards-1); > > unless( $REFLEXIVE ) { > > if ($i == $j) { > > goto DO_OVER; > > } > > } > > }; > > Hmmn! > > > My first thought was to just say "redo", but that's a runtime > > error: you can't use redo outside of a loop. Not even inside a > > "do" block... which I think counts as another perl oddity. > > > > Of course, this could be re-written something like this, but I > > wouldn't call it an improvement: > > > > if ($RANDOMIZE) { > > do { > > $i = pick_numeric(0, $numb_cards-1); > > $j = pick_numeric(0, $numb_cards-1); > > } until ( not( $REFLEXIVE ) && ($i != $j) ) > > } > > Furthermore, wouldn't this cause an infinite loop if $REFLEXIVE is true? Well you know, I said "*something* like this", not "exactly". None of my booleans are to be trusted without extensive testing. (I should put that in a .sig file.) From doom at kzsu.stanford.edu Sat Feb 24 11:09:43 2007 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Sat, 24 Feb 2007 11:09:43 -0800 Subject: [sf-perl] a reason to goto In-Reply-To: <200702240954.l1O9sExN065612@kzsu.stanford.edu> References: <200702240954.l1O9sExN065612@kzsu.stanford.edu> Message-ID: <200702241909.l1OJ9h9P071626@kzsu.stanford.edu> Joe Brenner wrote: > I found a reason to use a goto! > > if ($RANDOMIZE) { > DO_OVER: do { > $i = pick_numeric(0, $numb_cards-1); > $j = pick_numeric(0, $numb_cards-1); > unless( $REFLEXIVE ) { > if ($i == $j) { > goto DO_OVER; > } > } > }; > > > My first thought was to just say "redo", but that's a runtime > error: you can't use redo outside of a loop. Not even inside a > "do" block... which I think counts as another perl oddity. Reviewing the docs, this looks like the correct way of saying "I've never needed to use a goto in my life": my $count = 0; if ($RANDOMIZE) { {{ $i = pick_numeric(0, $numb_cards-1); $j = pick_numeric(0, $numb_cards-1); unless( $REFLEXIVE ) { if ($i == $j) { redo; } } }} } The extra brackets create a loop which is excuted only once. That's clear, right? From extasia at extasia.org Sat Feb 24 13:09:35 2007 From: extasia at extasia.org (David Alban) Date: Sat, 24 Feb 2007 13:09:35 -0800 Subject: [sf-perl] a reason to goto In-Reply-To: <200702240954.l1O9sExN065612@kzsu.stanford.edu> References: <200702240954.l1O9sExN065612@kzsu.stanford.edu> Message-ID: <4c714a9c0702241309n4fff27a8v192c4906abf2e938@mail.gmail.com> What about making a subroutine out of it, to which you pass $REFLEXIVE (and maybe $i and $j)? If after calling pick_numeric( ... ) $REFLEXIVE doesn't have the value you want, you recursively call the subroutine? I know some folks don't like recursion, and if you anticipate a large number of recursive calls it could be a performance issue, but I thought I'd ask. On 2/24/07, Joe Brenner wrote: > I found a reason to use a goto! > > if ($RANDOMIZE) { > DO_OVER: do { > $i = pick_numeric(0, $numb_cards-1); > $j = pick_numeric(0, $numb_cards-1); > unless( $REFLEXIVE ) { > if ($i == $j) { > goto DO_OVER; > } > } > }; -- Live in a world of your own, but always welcome visitors. From nheller at silcon.com Sat Feb 24 18:55:15 2007 From: nheller at silcon.com (Neil Heller) Date: Sat, 24 Feb 2007 18:55:15 -0800 Subject: [sf-perl] a reason to goto In-Reply-To: <4c714a9c0702241309n4fff27a8v192c4906abf2e938@mail.gmail.com> Message-ID: <000001c75888$6535f520$27130618@your0agqlnep7i> In addition to a performance hit (which can be significant, depending on the memory requirements of the recursive function) you might also run into a trashing scenario. Buying new hard disks can get expensive and reinstalling all your software can suck. Neil Heller nheller at silcon.com -----Original Message----- From: sanfrancisco-pm-bounces+nheller=silcon.com at pm.org [mailto:sanfrancisco-pm-bounces+nheller=silcon.com at pm.org] On Behalf Of David Alban Sent: Saturday, February 24, 2007 1:10 PM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] a reason to goto What about making a subroutine out of it, to which you pass $REFLEXIVE (and maybe $i and $j)? If after calling pick_numeric( ... ) $REFLEXIVE doesn't have the value you want, you recursively call the subroutine? I know some folks don't like recursion, and if you anticipate a large number of recursive calls it could be a performance issue, but I thought I'd ask. On 2/24/07, Joe Brenner wrote: > I found a reason to use a goto! > > if ($RANDOMIZE) { > DO_OVER: do { > $i = pick_numeric(0, $numb_cards-1); > $j = pick_numeric(0, $numb_cards-1); > unless( $REFLEXIVE ) { > if ($i == $j) { > goto DO_OVER; > } > } > }; -- Live in a world of your own, but always welcome visitors. _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From quinn at fairpath.com Sat Feb 24 20:39:00 2007 From: quinn at fairpath.com (Quinn Weaver) Date: Sat, 24 Feb 2007 20:39:00 -0800 Subject: [sf-perl] a reason to goto In-Reply-To: <000001c75888$6535f520$27130618@your0agqlnep7i> References: <4c714a9c0702241309n4fff27a8v192c4906abf2e938@mail.gmail.com> <000001c75888$6535f520$27130618@your0agqlnep7i> Message-ID: <20070225043900.GA79944@fu.funkspiel.org> On Sat, Feb 24, 2007 at 06:55:15PM -0800, Neil Heller wrote: > In addition to a performance hit (which can be significant, depending on the > memory requirements of the recursive function) you might also run into a > trashing scenario. Buying new hard disks can get expensive and reinstalling > all your software can suck. What do you mean by "trashing scenario"? Do you mean "thrashing", as in swapping memory to disk, which could overstress the hard drive (I guess)? http://catb.org/esr/jargon/html/T/thrash.html -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ From doom at kzsu.stanford.edu Sat Feb 24 23:25:23 2007 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Sat, 24 Feb 2007 23:25:23 -0800 Subject: [sf-perl] a reason to goto In-Reply-To: <000001c75888$6535f520$27130618@your0agqlnep7i> References: <000001c75888$6535f520$27130618@your0agqlnep7i> Message-ID: <200702250725.l1P7PN29006277@kzsu.stanford.edu> David Alban wrote: > What about making a subroutine out of it, to which you pass $REFLEXIVE (and > maybe $i and $j)? If after calling pick_numeric( ... ) $REFLEXIVE doesn't > have the value you want, you recursively call the subroutine? I know some > folks don't like recursion, and if you anticipate a large number of > recursive calls it could be a performance issue, but I thought I'd ask. I don't have any particular dislike of recursion [1] -- except that I find that it *still* takes me forever to debug recursive code -- but I probably wouldn't resort to it for something like this. The code as written strikes me as fairly straight-forward, it's just that perl's quirks were getting in the way of getting it working. In case it's not clear, the idea is simply that I want to randomly choose two integers, but under normal conditions I'd rather that they not be the same numbers (however if $REFLEXIVE is set, then two identical picks are okay). I don't know if it made it out to the list (I think my mail is acting flaky at the moment) but the perlish way of doing it is probably this: if ($RANDOMIZE) { {{ $i = pick_numeric(0, $numb_cards-1); $j = pick_numeric(0, $numb_cards-1); unless( $REFLEXIVE ) { if ($i == $j) { redo; } } }} } Though if "pick_numeric" were an expensive function, I might prefer not to redo both picks, and I'd go for *something* like this: if ($RANDOMIZE) { { $i = pick_numeric(0, $numb_cards-1); do { $j = pick_numeric(0, $numb_cards-1); } until ($j != $i) || ($REFLEXIVE); } } [1] As for worrying about disk thrashing: it's not particuarly difficult to use a counter to error out if you've exceeded 10000 levels of recursion or so. From quinn at fairpath.com Sun Feb 25 11:19:01 2007 From: quinn at fairpath.com (Quinn Weaver) Date: Sun, 25 Feb 2007 11:19:01 -0800 Subject: [sf-perl] a reason to goto In-Reply-To: <200702250725.l1P7PN29006277@kzsu.stanford.edu> References: <000001c75888$6535f520$27130618@your0agqlnep7i> <200702250725.l1P7PN29006277@kzsu.stanford.edu> Message-ID: <20070225191901.GA87926@fu.funkspiel.org> On Sat, Feb 24, 2007 at 11:25:23PM -0800, Joe Brenner wrote: > [...] > I don't know if it made it out to the list (I think my mail is acting > flaky at the moment) but the perlish way of doing it is probably this: > > if ($RANDOMIZE) { > {{ > $i = pick_numeric(0, $numb_cards-1); > $j = pick_numeric(0, $numb_cards-1); > unless( $REFLEXIVE ) { > if ($i == $j) { > redo; > } > } > }} > } FYI, it did make it to the list. -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ From nheller at silcon.com Sun Feb 25 15:00:03 2007 From: nheller at silcon.com (Neil Heller) Date: Sun, 25 Feb 2007 15:00:03 -0800 Subject: [sf-perl] a reason to goto In-Reply-To: <200702250725.l1P7PN29006277@kzsu.stanford.edu> Message-ID: <000301c75930$afb9a530$27130618@your0agqlnep7i> If I remember correctly (and I may be wrong) this discussion came up with reference to using "goto" to break out of recursive algorithm. If I'm right, what would be the remaining state of the program's internal stack? Neil Heller nheller at silcon.com (510) 862-4387 -----Original Message----- From: sanfrancisco-pm-bounces+nheller=silcon.com at pm.org [mailto:sanfrancisco-pm-bounces+nheller=silcon.com at pm.org] On Behalf Of Joe Brenner Sent: Saturday, February 24, 2007 11:25 PM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] a reason to goto David Alban wrote: > What about making a subroutine out of it, to which you pass $REFLEXIVE > (and maybe $i and $j)? If after calling pick_numeric( ... ) > $REFLEXIVE doesn't have the value you want, you recursively call the > subroutine? I know some folks don't like recursion, and if you > anticipate a large number of recursive calls it could be a performance > issue, but I thought I'd ask. I don't have any particular dislike of recursion [1] -- except that I find that it *still* takes me forever to debug recursive code -- but I probably wouldn't resort to it for something like this. The code as written strikes me as fairly straight-forward, it's just that perl's quirks were getting in the way of getting it working. In case it's not clear, the idea is simply that I want to randomly choose two integers, but under normal conditions I'd rather that they not be the same numbers (however if $REFLEXIVE is set, then two identical picks are okay). I don't know if it made it out to the list (I think my mail is acting flaky at the moment) but the perlish way of doing it is probably this: if ($RANDOMIZE) { {{ $i = pick_numeric(0, $numb_cards-1); $j = pick_numeric(0, $numb_cards-1); unless( $REFLEXIVE ) { if ($i == $j) { redo; } } }} } Though if "pick_numeric" were an expensive function, I might prefer not to redo both picks, and I'd go for *something* like this: if ($RANDOMIZE) { { $i = pick_numeric(0, $numb_cards-1); do { $j = pick_numeric(0, $numb_cards-1); } until ($j != $i) || ($REFLEXIVE); } } [1] As for worrying about disk thrashing: it's not particuarly difficult to use a counter to error out if you've exceeded 10000 levels of recursion or so. _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From nheller at silcon.com Sun Feb 25 15:00:03 2007 From: nheller at silcon.com (Neil Heller) Date: Sun, 25 Feb 2007 15:00:03 -0800 Subject: [sf-perl] a reason to goto In-Reply-To: <20070225043900.GA79944@fu.funkspiel.org> Message-ID: <000401c75930$b2da6d30$27130618@your0agqlnep7i> Yes, exactly. The only time I use recursion is when traversing trees. Neil Heller nheller at silcon.com -----Original Message----- From: sanfrancisco-pm-bounces+nheller=silcon.com at pm.org [mailto:sanfrancisco-pm-bounces+nheller=silcon.com at pm.org] On Behalf Of Quinn Weaver Sent: Saturday, February 24, 2007 8:39 PM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] a reason to goto On Sat, Feb 24, 2007 at 06:55:15PM -0800, Neil Heller wrote: > In addition to a performance hit (which can be significant, depending > on the memory requirements of the recursive function) you might also > run into a trashing scenario. Buying new hard disks can get expensive > and reinstalling all your software can suck. What do you mean by "trashing scenario"? Do you mean "thrashing", as in swapping memory to disk, which could overstress the hard drive (I guess)? http://catb.org/esr/jargon/html/T/thrash.html -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From rdm at cfcl.com Mon Feb 26 19:41:39 2007 From: rdm at cfcl.com (Rich Morin) Date: Mon, 26 Feb 2007 19:41:39 -0800 Subject: [sf-perl] Fwd: Technology and Developing World: Peace Corps, Geekcorps, and the One Laptop Message-ID: This could be interesting... -r > Your Organizer, Bosco So, sent the following message to the > members of The San Francisco Ruby Meetup Group: > ---------------------------------------------------------------- > Sorry for the late notice... > > Wayan Vota, director of Geekcorps, is in town and will be > talking informally about Technology and the Developing World - > from Peace Corps, Geekcorps, to the One Laptop. > > Date - Tuesday, Feb 27, 2007 > Time - 6:30 PM > Venue - 21st Amendment, at 563 2nd St, San Francisco. > > Come on by, have a drink, and chat with Wayan. > ---------------------------------------------------------------- > > To visit The San Francisco Ruby Meetup Group, go here: > http://ruby.meetup.com/6/ -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development From quinn at fairpath.com Wed Feb 28 11:58:50 2007 From: quinn at fairpath.com (Quinn Weaver) Date: Wed, 28 Feb 2007 11:58:50 -0800 Subject: [sf-perl] [quinn@fairpath.com: Wednesday, February 28: Beer and Scripting SIG] Message-ID: <20070228195849.GA18181@fu.funkspiel.org> Hi, everyone, This is a reminder that we have a Perl Mongers/BASS dinner meeting tonight. Unfortunately, I won't be there, as I'm sick. :( ----- Forwarded message from Quinn Weaver ----- Once again we're merging with Rich's excellent Beer and Scripting SIG (BASS). More people + more perspectives = better meeting. In fact, last month's meeting was so successful that I'm making this the default for dinner meetings. Thanks, Rich! All the details are here: http://www.cfcl.com/rdm/bass/ RSVPs are appreciated. Thanks, -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ ----- End forwarded message ----- -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/