From qw at sf.pm.org Mon Feb 6 20:32:43 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Mon, 6 Feb 2006 20:32:43 -0800 Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) Message-ID: <20060207043243.GB93266@cfcl.com> (( For Thai food, RSVP to qw at sf.pm.org. )) There's been a lot of talk about Perl IDEs on and off, and it's not hard to see why. Our editors mediate our hacking experience; they have the power to make it really annoying or smooth as silk. In this talk, three speakers will present three IDEs for Perl, explaining how they aid in development: - Matisse Enzer will present Eclipse, with an eye towards Extreme Programming. - Josh Berkus will present ActiveState's Komodo. - Joe Brenner will present Emacs plus perlnow.el, an excellent extension he wrote to create boilerplate and automate testing. (Of course I'm biased because I use it daily. ;) ) I will order Thai food from BKK (both vegetarian and non-). RSVP so I know how much to order, and please bring some cash to pitch in. When: February 28, 2006, 8:00 p.m. Where: Perpetual Entertainment: Fifth floor, 149 New Montgomery Street, San Francisco, CA RSVP: qw at sf.pm.org PS: I am bringing some O'Reilly books to give away (_Regular Expression Reference_ and _Learning Perl_.) ActiveState may also furnish some schwag. -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From josh at agliodbs.com Mon Feb 6 20:56:05 2006 From: josh at agliodbs.com (Josh Berkus) Date: Mon, 06 Feb 2006 20:56:05 -0800 Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) In-Reply-To: <20060207043243.GB93266@cfcl.com> References: <20060207043243.GB93266@cfcl.com> Message-ID: <43E82865.3020908@agliodbs.com> Quinn, > PS: I am bringing some O'Reilly books to give away (_Regular Expression > Reference_ and _Learning Perl_.) ActiveState may also furnish some schwag. Dibs on the regex reference, unless you're going to raffle it off. ;-) --Josh From fred at redhotpenguin.com Mon Feb 6 21:45:27 2006 From: fred at redhotpenguin.com (Fred Moyer) Date: Mon, 06 Feb 2006 21:45:27 -0800 Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) In-Reply-To: <20060207043243.GB93266@cfcl.com> References: <20060207043243.GB93266@cfcl.com> Message-ID: <43E833F7.6090809@redhotpenguin.com> Quinn Weaver wrote: > (( For Thai food, RSVP to qw at sf.pm.org. )) > > There's been a lot of talk about Perl IDEs on and off, and it's not hard to > see why. Our editors mediate our hacking experience; they have the power to > make it really annoying or smooth as silk. > > In this talk, three speakers will present three IDEs for Perl, explaining > how they aid in development: > > - Matisse Enzer will present Eclipse, with an eye towards Extreme Programming. > > - Josh Berkus will present ActiveState's Komodo. > > - Joe Brenner will present Emacs plus perlnow.el, an excellent extension he > wrote to create boilerplate and automate testing. (Of course I'm > biased because I use it daily. ;) ) Any chance of a Vim presentation? Or Kate? Is the queue full or is all that required is someone to give the presentation? From josh at agliodbs.com Tue Feb 7 09:41:27 2006 From: josh at agliodbs.com (Josh Berkus) Date: Tue, 07 Feb 2006 09:41:27 -0800 Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) In-Reply-To: <43E833F7.6090809@redhotpenguin.com> References: <20060207043243.GB93266@cfcl.com> <43E833F7.6090809@redhotpenguin.com> Message-ID: <43E8DBC7.3030702@agliodbs.com> Fred, > Any chance of a Vim presentation? Or Kate? Is the queue full or is all > that required is someone to give the presentation? Another Kate user! Yay. I think Quinn was trying to focus on stuff with specific Perl functionality, though. Regardless, I think doing more than 3 in one meeting would be pushing it. Maybe a follow-up? --Josh From matt at cloudfactory.org Tue Feb 7 09:46:45 2006 From: matt at cloudfactory.org (Matthew Lanier) Date: Tue, 7 Feb 2006 09:46:45 -0800 (PST) Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) In-Reply-To: <43E8DBC7.3030702@agliodbs.com> Message-ID: i'm all for hearing about perl-specific VIM tricks, if they exist. m@ On Tue, 7 Feb 2006, Josh Berkus wrote: > Fred, > > > Any chance of a Vim presentation? Or Kate? Is the queue full or is all > > that required is someone to give the presentation? > > Another Kate user! Yay. > > I think Quinn was trying to focus on stuff with specific Perl > functionality, though. Regardless, I think doing more than 3 in one > meeting would be pushing it. Maybe a follow-up? > > --Josh > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > Matthew D. P. K. Strelchun-Lanier matt at cloudfactory.org From paul at makepeace.net Tue Feb 7 10:06:52 2006 From: paul at makepeace.net (Paul Makepeace) Date: Tue, 7 Feb 2006 18:06:52 +0000 Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) In-Reply-To: <20060207043243.GB93266@cfcl.com> References: <20060207043243.GB93266@cfcl.com> Message-ID: <20060207180652.GF18958@mythix.realprogrammers.com> Too bad this isn't a week later, else I'd actually be in the Bay again :-) I'm with m@ on anything perl-specific in vim... Paul (three months Google training in Mountain View Mar-May) Je 2006-02-07 04:32:43 +0000, Quinn Weaver skribis: > (( For Thai food, RSVP to qw at sf.pm.org. )) > > There's been a lot of talk about Perl IDEs on and off, and it's not hard to > see why. Our editors mediate our hacking experience; they have the power to > make it really annoying or smooth as silk. -- Paul Makepeace .............................. http://paulm.com/inchoate/ "If you wish to find God split open a monks head with an axe, then only suicide bombers feel safe in london." -- http://paulm.com/toys/surrealism/ From david at fetter.org Tue Feb 7 12:38:16 2006 From: david at fetter.org (David Fetter) Date: Tue, 7 Feb 2006 12:38:16 -0800 Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) In-Reply-To: <20060207180652.GF18958@mythix.realprogrammers.com> References: <20060207043243.GB93266@cfcl.com> <20060207180652.GF18958@mythix.realprogrammers.com> Message-ID: <20060207203815.GB19730@fetter.org> On Tue, Feb 07, 2006 at 06:06:52PM +0000, Paul Makepeace wrote: > Too bad this isn't a week later, else I'd actually be in the Bay > again :-) Lemme know when you get here :) > I'm with m@ on anything perl-specific in vim... I've got something on development environments, and vim plays a part. Re: more presentations, I think that's actually a good thing. If you can't figure out how to say what you need to in twenty minutes--or ten, or five, if you have to--you probably shouldn't stand up anyhow ;) > Paul (three months Google training in Mountain View Mar-May) Cheers, D (Brazil in late April for FISL-7.0, but here otherwise) -- David Fetter david at fetter.org http://fetter.org/ phone: +1 415 235 3778 Remember to vote! From Jeff.Thalhammer at barclaysglobal.com Tue Feb 7 12:41:08 2006 From: Jeff.Thalhammer at barclaysglobal.com (Thalhammer, Jeffrey BGI SF) Date: Tue, 7 Feb 2006 12:41:08 -0800 Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) Message-ID: <5489416797D9C546B92C7C787523B20501A24B9E@calnte2k036.insidelive.net> Speaking of perl-specific VIM tricks, check out http://vim.sourceforge.net/scripts/script.php?script_id=556 And it has built-in support for my favorite perl module :) http://search.cpan.org/dist/Perl-Critic -Jeff -----Original Message----- From: sanfrancisco-pm-bounces+jeffrey.thalhammer=barclaysglobal.com at pm.org [mailto:sanfrancisco-pm-bounces+jeffrey.thalhammer=barclaysglobal.com at pm .org] On Behalf Of Matthew Lanier Sent: Tuesday, February 07, 2006 9:47 AM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) i'm all for hearing about perl-specific VIM tricks, if they exist. m@ On Tue, 7 Feb 2006, Josh Berkus wrote: > Fred, > > > Any chance of a Vim presentation? Or Kate? Is the queue full or is > > all that required is someone to give the presentation? > > Another Kate user! Yay. > > I think Quinn was trying to focus on stuff with specific Perl > functionality, though. Regardless, I think doing more than 3 in one > meeting would be pushing it. Maybe a follow-up? > > --Josh > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > Matthew D. P. K. Strelchun-Lanier matt at cloudfactory.org _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm This message and any attachments are confidential, proprietary, and may be privileged. If this message was misdirected, Barclays Global Investors (BGI) does not waive any confidentiality or privilege. If you are not the intended recipient, please notify us immediately and destroy the message without disclosing its contents to anyone. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of BGI, unless the author is authorized by BGI to express such views or opinions on its behalf. All email sent to or from this address is subject to electronic storage and review by BGI. Although BGI operates anti-virus programs, it does not accept responsibility for any damage whatsoever caused by viruses being passed. From fred at redhotpenguin.com Tue Feb 7 11:00:19 2006 From: fred at redhotpenguin.com (Fred Moyer) Date: Tue, 7 Feb 2006 11:00:19 -0800 (PST) Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) In-Reply-To: <43E8DBC7.3030702@agliodbs.com> References: <20060207043243.GB93266@cfcl.com> <43E833F7.6090809@redhotpenguin.com> <43E8DBC7.3030702@agliodbs.com> Message-ID: On Tue, 7 Feb 2006, Josh Berkus wrote: > Fred, > >> Any chance of a Vim presentation? Or Kate? Is the queue full or is all >> that required is someone to give the presentation? > > Another Kate user! Yay. > > I think Quinn was trying to focus on stuff with specific Perl > functionality, though. Regardless, I think doing more than 3 in one > meeting would be pushing it. Maybe a follow-up? That makes sense, 3 is fairly full plate. Maybe the discussion regarding vim tricks can take place after. I've been a vim user for the last five years but have recently started getting back into emacs and just integrated Perltidy into the editor. Good stuff! > > --Josh > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > From qw at sf.pm.org Wed Feb 8 10:16:04 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Wed, 8 Feb 2006 10:16:04 -0800 Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) In-Reply-To: References: <20060207043243.GB93266@cfcl.com> <43E833F7.6090809@redhotpenguin.com> <43E8DBC7.3030702@agliodbs.com> Message-ID: <20060208181604.GA74726@cfcl.com> On Tue, Feb 07, 2006 at 11:00:19AM -0800, Fred Moyer wrote: [...] > >> Any chance of a Vim presentation? Or Kate? Is the queue full or is all > >> that required is someone to give the presentation? > > [...] > That makes sense, 3 is fairly full plate. Maybe the discussion regarding > vim tricks can take place after. I've been a vim user for the last five > years but have recently started getting back into emacs and just > integrated Perltidy into the editor. Good stuff! It would be great if we had time for an informal vim discussion, but with three speakers, three computers to hook up to the projector, Q&A, and food, I doubt we will. However, I'm happy to set aside time for vim in the next meeting. Fred, are you willing to demo some vim tricks? How about you, Jeff? -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From vlb at cfcl.com Wed Feb 8 10:48:53 2006 From: vlb at cfcl.com (Vicki Brown) Date: Wed, 8 Feb 2006 10:48:53 -0800 Subject: [sf-perl] Vim tricks In-Reply-To: References: Message-ID: Yall know about taglist, yes? taglist.vim : Source code browser (supports C/C++, java, perl, python, tcl, sql, php, etc) The "Tag List" plugin is a source code browser for the Vim editor. It provides an overview of the structure of source code files and allows you to efficiently browse through source code files in different programming languages. It is the top-rated and most-downloaded plugin for the Vim editor. The taglist plugin groups and displays the functions, classes, structures, enumerations, macro definitions and other parts of a source code file in a Vim window. The taglist plugin will automatically highlight the current tag. You can jump to the definition of a tag by selecting the tag name from the taglist window. For a list of features supported by the taglist plugin, visit the features page. http://www.vim.org/scripts/script.php?script_id=273 http://www.geocities.com/yegappan/taglist/ The "Tag List" plugin requires the "exuberant ctags" utility http://ctags.sourceforge.net/ -- - Vicki ZZZ zzZ San Francisco Bay Area, CA z |\ _,,,---,,_ Books, Cats, Tech zz /,`.-'`' -. ;-;;,_ http://cfcl.com/vlb |,4- ) )-,_. ,\ ( `'-' http://heatercats.com '---''(_/--' `-'\_) http://cfcl.com/vlb/weblog From shift8 at digitrash.com Wed Feb 8 11:41:37 2006 From: shift8 at digitrash.com (shift8) Date: Wed, 08 Feb 2006 11:41:37 -0800 Subject: [sf-perl] Vim tricks In-Reply-To: References: Message-ID: <1139427697.28024.15.camel@localhost.localdomain> wow - thanks Vicki! that's a super nice util. On Wed, 2006-02-08 at 10:48 -0800, Vicki Brown wrote: > Yall know about taglist, yes? > > taglist.vim : Source code browser (supports C/C++, java, perl, python, tcl, > sql, php, etc) > > The "Tag List" plugin is a source code browser for the Vim editor. It > provides an overview of the structure of source code files and allows you to > efficiently browse through source code files in different programming > languages. It is the top-rated and most-downloaded plugin for the Vim editor. > > The taglist plugin groups and displays the functions, classes, structures, > enumerations, macro definitions and other parts of a source code file in a > Vim window. The taglist plugin will automatically highlight the current tag. > You can jump to the definition of a tag by selecting the tag name from the > taglist window. For a list of features supported by the taglist plugin, > visit the features page. > > http://www.vim.org/scripts/script.php?script_id=273 > > http://www.geocities.com/yegappan/taglist/ > > > > The "Tag List" plugin requires the "exuberant ctags" utility > http://ctags.sourceforge.net/ > From fred at redhotpenguin.com Wed Feb 8 10:35:20 2006 From: fred at redhotpenguin.com (Fred Moyer) Date: Wed, 8 Feb 2006 10:35:20 -0800 (PST) Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) In-Reply-To: <20060208181604.GA74726@cfcl.com> References: <20060207043243.GB93266@cfcl.com> <43E833F7.6090809@redhotpenguin.com> <43E8DBC7.3030702@agliodbs.com> <20060208181604.GA74726@cfcl.com> Message-ID: > It would be great if we had time for an informal vim discussion, but > with three speakers, three computers to hook up to the projector, Q&A, > and food, I doubt we will. > > However, I'm happy to set aside time for vim in the next meeting. Fred, > are you willing to demo some vim tricks? How about you, Jeff? I'm by no means a vim expert but I'd be happy to share what I know, and study up to learn a few more tricks. The areas which are most central to my perl development in terms of functionality would be: Integration with CVS/Subversion Integration with Perltidy ( in some ways this is a compile check also ) Integration with the perl debugger All of which are at least five to ten minutes worth of speaking time to deliver value to the audience. I'd be willing to present one of those topics but am not a guru in any of them yet. So if there's a guru who wants to talk about one of these, give a shout, else I'll study on the perl debugger integration and put together a short talk on it. - Fred From qw at sf.pm.org Thu Feb 9 11:10:47 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Thu, 9 Feb 2006 11:10:47 -0800 Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) In-Reply-To: References: <20060207043243.GB93266@cfcl.com> <43E833F7.6090809@redhotpenguin.com> <43E8DBC7.3030702@agliodbs.com> <20060208181604.GA74726@cfcl.com> Message-ID: <20060209191047.GA75244@cfcl.com> On Wed, Feb 08, 2006 at 10:35:20AM -0800, Fred Moyer wrote: [...] > The areas which are most central to > my perl development in terms of functionality would be: > > Integration with CVS/Subversion > Integration with Perltidy ( in some ways this is a compile check also ) > Integration with the perl debugger > > All of which are at least five to ten minutes worth of speaking time to > deliver value to the audience. I'd be willing to present one of those > topics but am not a guru in any of them yet. So if there's a guru who > wants to talk about one of these, give a shout, else I'll study on the > perl debugger integration and put together a short talk on it. Excellent! Many thanks. -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From vlb at cfcl.com Fri Feb 10 09:30:31 2006 From: vlb at cfcl.com (Vicki Brown) Date: Fri, 10 Feb 2006 09:30:31 -0800 Subject: [sf-perl] JOB: With Yahoo Message-ID: > At 09:55 -0800 02/09/2006, Laurel Griffin wrote: >> Hi All, >> >> I'm looking for mid to senior level perl developers with some MYSQL >> experience for Yahoo! in Sunnyvale. C++ and PHP would be pluses but >> not required. Please contact Laurel directly. Tell her I sent the note to the SF Perl Users group email. -- - Vicki ZZZ zzZ San Francisco Bay Area, CA z |\ _,,,---,,_ Books, Cats, Tech zz /,`.-'`' -. ;-;;,_ http://cfcl.com/vlb |,4- ) )-,_. ,\ ( `'-' http://heatercats.com '---''(_/--' `-'\_) http://cfcl.com/vlb/weblog From vlb at cfcl.com Fri Feb 10 13:53:55 2006 From: vlb at cfcl.com (Vicki Brown) Date: Fri, 10 Feb 2006 13:53:55 -0800 Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) In-Reply-To: <20060208181604.GA74726@cfcl.com> References: <20060207043243.GB93266@cfcl.com> <43E833F7.6090809@redhotpenguin.com> <43E8DBC7.3030702@agliodbs.com> <20060208181604.GA74726@cfcl.com> Message-ID: At 10:16 -0800 02/08/2006, Quinn Weaver wrote: > I'm happy to set aside time for vim in the next meeting. Fred, > are you willing to demo some vim tricks? How about you, Jeff? I can do some BBEdit tricks to spice things up (Rich, you can stop twisting my arm now) -- - Vicki ZZZ zzZ San Francisco Bay Area, CA z |\ _,,,---,,_ Books, Cats, Tech zz /,`.-'`' -. ;-;;,_ http://cfcl.com/vlb |,4- ) )-,_. ,\ ( `'-' http://heatercats.com '---''(_/--' `-'\_) http://cfcl.com/vlb/weblog From qw at sf.pm.org Sun Feb 12 22:44:41 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Sun, 12 Feb 2006 22:44:41 -0800 Subject: [sf-perl] [Meeting] Perl IDEs head to head (February 28, 2006) In-Reply-To: References: <20060207043243.GB93266@cfcl.com> <43E833F7.6090809@redhotpenguin.com> <43E8DBC7.3030702@agliodbs.com> <20060208181604.GA74726@cfcl.com> Message-ID: <20060213064441.GA29180@cfcl.com> On Fri, Feb 10, 2006 at 01:53:55PM -0800, Vicki Brown wrote: > At 10:16 -0800 02/08/2006, Quinn Weaver wrote: > > I'm happy to set aside time for vim in the next meeting. Fred, > > are you willing to demo some vim tricks? How about you, Jeff? > > I can do some BBEdit tricks to spice things up (Rich, you can stop twisting > my arm now) That's excellent. Also, today I ran into Blake from Airwave, who is interested in talking about their in-house Emacs extensions. It appears we have enough material for a second IDE meeting. :) -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From rdm at cfcl.com Wed Feb 15 10:56:47 2006 From: rdm at cfcl.com (Rich Morin) Date: Wed, 15 Feb 2006 10:56:47 -0800 Subject: [sf-perl] RE oddity Message-ID: I'm a big fan of extended regular expressions, but I just wrote one that didn't work as I expected. This code: $line =~ s|[\000-\010 # nul-bs \012-\037 # nl-us \177-\377'] # del-... and ' ||gx; # Punt weird characters. produced the nastygram: Invalid [] range "l-b" in regex; marked by <-- HERE in m/[\000-\010 # nul-b <-- HERE s \012-\037 # nl-us \177-\377'] # del-... / at /home/rdm/bin/log_load.pl line 206. but this code: $line =~ s|[\000-\010\012-\037\177-\377']||g; sails right through. Is this a bug or a (mis-)feature? -r P.S. "This is perl, v5.8.6 built for x86_64-linux-thread-multi" -- Technical editing and writing, programming, and web development: http://www.cfcl.com/rdm/resume Contact information: rdm at cfcl.com, +1 650-873-7841 From rdm at cfcl.com Wed Feb 15 11:10:08 2006 From: rdm at cfcl.com (Rich Morin) Date: Wed, 15 Feb 2006 11:10:08 -0800 Subject: [sf-perl] RE oddity In-Reply-To: References: Message-ID: Actually, I'm not sure how Perl could act as I want here, while dealing correctly with sharp signs in character classes. So, let's refocus the question: How should this code be written, in order to be fast and well-documented? -r -- Technical editing and writing, programming, and web development: http://www.cfcl.com/rdm/resume Contact information: rdm at cfcl.com, +1 650-873-7841 From qw at sf.pm.org Wed Feb 15 12:59:35 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Wed, 15 Feb 2006 12:59:35 -0800 Subject: [sf-perl] RE oddity In-Reply-To: References: Message-ID: <20060215205935.GE71058@cfcl.com> On Wed, Feb 15, 2006 at 11:10:08AM -0800, Rich Morin wrote: > Actually, I'm not sure how Perl could act as I want here, > while dealing correctly with sharp signs in character > classes. So, let's refocus the question: > > How should this code be written, in order to be fast > and well-documented? # Punt weird characters. $line =~ s|[\000-\010\012-\037\177-\377']||g; # ^^^^^^^ ^^^^^^^^ ^^^^^^^^^ # nul-bs nl-us del-... and ' You can omit the ^^^^'s if you wish, but I find they help direct my eyes to the right part of the regex. In addition, I would probably expand "nl", "bs", and "us" to something more verbose. You could take an additional line to do it: # Punt weird characters. $line =~ s|[\000-\010\012-\037\177-\377']||g; # ^^^^^^^ ^^^^^^^^ ^^^^^^^ ^ # nul- nl- del- ' (single quote) # backspace whatever ..., Here I took the further liberty of breaking out the single quote into its own comment "field". Finally, I would change "Punt" to "Ignore", since not everyone understands US football metaphors. Hope this helps. I spend a lot of time trying to optimize for maintainability, so I have lots of opinions on the issue. ;) PS: If you're interested in optimizing for maintainability, Damian's _Perl Best Practices_ is a great place to start. -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From extasia at extasia.org Wed Feb 15 13:10:13 2006 From: extasia at extasia.org (David Alban) Date: Wed, 15 Feb 2006 13:10:13 -0800 Subject: [sf-perl] RE oddity In-Reply-To: References: Message-ID: <4c714a9c0602151310h6f6f9ba0k7c1d3f31edcce7a@mail.gmail.com> The following works: $line =~ s| # foo [\000-\010 \012-\037 \177-\377'] # bar # bat ||gx; # Punt weird characters. I think perl is considering your comments part of the character class in your original example, even though you've used /x. On 2/15/06, Rich Morin wrote: > I'm a big fan of extended regular expressions, but I just > wrote one that didn't work as I expected. This code: > > $line =~ s|[\000-\010 # nul-bs > \012-\037 # nl-us > \177-\377'] # del-... and ' > ||gx; # Punt weird characters. > > produced the nastygram: > > Invalid [] range "l-b" in regex; > marked by <-- HERE in m/[\000-\010 # nul-b <-- HERE s > \012-\037 # nl-us > \177-\377'] # del-... > / at /home/rdm/bin/log_load.pl line 206. -- Live in a world of your own, but always welcome visitors. From rdm at cfcl.com Wed Feb 15 13:23:58 2006 From: rdm at cfcl.com (Rich Morin) Date: Wed, 15 Feb 2006 13:23:58 -0800 Subject: [sf-perl] RE oddity In-Reply-To: <20060215205935.GE71058@cfcl.com> References: <20060215205935.GE71058@cfcl.com> Message-ID: At 12:59 PM -0800 2/15/06, Quinn Weaver wrote: > # Punt weird characters. > $line =~ s|[\000-\010\012-\037\177-\377']||g; > # ^^^^^^^ ^^^^^^^^ ^^^^^^^ ^ > # nul- nl- del- ' (single quote) > # backspace whatever ..., I like the general approach. Here's my variant: $line =~ s|[\000-\010\012-\037\177-\377']||g; # Remove weird chars. # <-------><-------><------->^ # nul-bs nl-us del-... ' (single quote) > Finally, I would change "Punt" to "Ignore", since not everyone > understands US football metaphors. I agree about not using slang; that one slipped in. > PS: If you're interested in optimizing for maintainability, > Damian's _Perl Best Practices_ is a great place to start. Yes, excellent book. I was amused to find that I had been using an unnecessary construct for several years: while (defined($line=)) { Apparently, recent versions of Perl silently wrap a defined into certain constructions such as: while ($line=) { -r -- Technical editing and writing, programming, and web development: http://www.cfcl.com/rdm/resume Contact information: rdm at cfcl.com, +1 650-873-7841 From doom at kzsu.stanford.edu Fri Feb 17 12:39:06 2006 From: doom at kzsu.stanford.edu (Joseph Brenner) Date: Fri, 17 Feb 2006 12:39:06 -0800 Subject: [sf-perl] RE oddity In-Reply-To: References: Message-ID: <200602172039.k1HKd6X94114@mail0.rawbw.com> Rich Morin wrote: > I'm a big fan of extended regular expressions, but I just > wrote one that didn't work as I expected. This code: > > $line =~ s|[\000-\010 # nul-bs > \012-\037 # nl-us > \177-\377'] # del-... and ' > ||gx; # Punt weird characters. > > produced the nastygram: > > Invalid [] range "l-b" in regex; > marked by <-- HERE in m/[\000-\010 # nul-b <-- HERE s > \012-\037 # nl-us > \177-\377'] # del-... > / at /home/rdm/bin/log_load.pl line 206. > > but this code: > > $line =~ s|[\000-\010\012-\037\177-\377']||g; > > sails right through. Is this a bug or a (mis-)feature? man perlre: The "/x" modifier itself needs a little more explanation. It tells the regular expression parser to ignore whitespace that is neither back- slashed nor within a character class. It's documented. It's a feature. The gotcha I usually get stung on is assuming that /x does something to the right hand side of a s///x: s{ ^ (.*?) # capture first word to $1 /s # seperated by a space (.*?) $ # capture second word to $2 }{$1 $2}x That'll remove a space from between two items and then put it right back again. (Of course, if you were trying to convert tabs to spaces, then this could be useful). From qw at sf.pm.org Tue Feb 21 10:13:09 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Tue, 21 Feb 2006 10:13:09 -0800 Subject: [sf-perl] O'Reilly rough cuts Message-ID: <20060221181309.GA16717@cfcl.com> I don't normally pimp O'Reilly products, but this one is pretty cool. It's a service called Rough Cuts that gives you early access to unpublished (electronic) manuscripts. http://www.oreilly.com/roughcuts/faq.csp It's useful if you're interested in a cutting-edge technology that has scant documentation. Ruby* on Rails is a case in point: lots of people are using it, even in production, but the O'Reilly book is not out yet. But it is one of the pilot Rough Cuts titles ( http://www.oreilly.com/roughcuts/ ). Also of interest are _Perl Hacks_ and _AJAX Hacks_). Unfortunately there's no freebie deal for Perl Mongers. :/ However, the pricing is cheap by O'Reilly standards, in keeping with the work-in-progress nature of the product. * Yes , this is a Perl Mongers group, but I'ver decided Ruby is an alternate spelling of Perl. -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From rdm at cfcl.com Tue Feb 21 19:47:56 2006 From: rdm at cfcl.com (Rich Morin) Date: Tue, 21 Feb 2006 19:47:56 -0800 Subject: [sf-perl] Beer & Scripting SIG - last-minute reminder Message-ID: 8:00 pm, Wednesday, February 22, 2006 Wild Pepper 3601 26th St. (near San Jose Ave.) San Francisco, California, USA http://www.cfcl.com/rdm/bass -r -- Technical editing and writing, programming, and web development: http://www.cfcl.com/rdm/resume Contact information: rdm at cfcl.com, +1 650-873-7841 From qw at sf.pm.org Fri Feb 24 13:13:27 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Fri, 24 Feb 2006 13:13:27 -0800 Subject: [sf-perl] [Meeting] Reminder: Perl IDEs Tuesday Message-ID: <20060224211327.GA61945@cfcl.com> (( For Thai food, RSVP to qw at sf.pm.org. )) Hi, all, This is a reminder that the IDE meeting is this coming Tuesday. The details are at http://sf.pm.org/weblog, and below. Hope to see you there. :) * * * There's been a lot of talk about Perl IDEs on and off, and it's not hard to see why. Our editors mediate our hacking experience; they have the power to make it really annoying or smooth as silk. In this talk, three speakers will present three IDEs for Perl, explaining how they aid in development: - Matisse Enzer will present Eclipse, with an eye towards Extreme Programming. - Josh Berkus will present ActiveState's Komodo. - Joe Brenner will present Emacs plus perlnow.el, an excellent extension he wrote to create boilerplate and automate testing. (Of course I'm biased because I use it daily. ;) ) I will order Thai food from BKK (both vegetarian and non-). RSVP so I know how much to order, and please bring some cash to pitch in. When: February 28, 2006, 8:00 p.m. Where: Perpetual Entertainment: Fifth floor, 149 New Montgomery Street, San Francisco, CA RSVP: qw at sf.pm.org PS: I am bringing some O'Reilly books to give away (_Regular Expression Reference_ and _Learning Perl_.) ActiveState may also furnish some schwag. -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut