From george at metaart.org Tue Mar 2 18:58:28 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] March Meeting: Tuesday the 9th 7:30pm Message-ID: <200403021658.28921.george@metaart.org> One week from today. March Oakland.pm Meeting Announcement snipped from http://oakland.pm.org/ --------------------------------------------- Next meeting when: Tue. March 9 at 7:30-9:30pm. (We meet 2nd Tuesdays.) where: Joshua Wait's place 1903 Virginia Street Apt. 3 Berkeley, CA 94709 directions: [Joshua's pdf map and directions] [George's directions and ascii map] what: introductions giveaways talk (see below) talk: talk by author Tony Stubblebine entitled "Regular Expression Best Practices" similar to his article [5 Habits for Successful Regex] See [author's blurb] on talk who: open to anyone interested. how much: no fee for our meetings. Key: [ ... ] indicates ... is a link that can be followed from the website. From george at metaart.org Wed Mar 3 15:50:15 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] "Practical C++ Programming" Review Message-ID: <200403031350.15174.george@metaart.org> Adrien recently gave me the go ahead to add his review of "Practical C++ Programming" to our site. If you wish to read it, it's at http://oakland.pm.org/reviews/c++.html You may may have seen an earlier version on Slashdot. From george at metaart.org Thu Mar 4 19:08:39 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Review of "Dancing Barefoot" - completed Message-ID: <200403041708.39822.george@metaart.org> There's a review of "Dancing Barefoot" by Wil Wheaton (Leslie Crusher of the Starship Enterprise for some of us) on the Oakland.pm site at http://oakland.pm.org/reviews/short_barefoot.html George P.S. to Marsee: I put a really short version on the O'Reilly site with a link to this review. From george at metaart.org Thu Mar 4 19:48:11 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Fwd: Newsletter from O'Reilly UG Program, March 4 Message-ID: <200403041748.11418.george@metaart.org> ================================================================ O'Reilly News for User Group Members March 4, 2004 ================================================================ ---------------------------------------------------------------- Book News ---------------------------------------------------------------- -Mac OS X Panther for Unix Geeks -Dancing Barefoot -WebLogic: The Definitive Guide -Mac OS X 10.3 Panther Little Black Book -Adobe Photoshop CS One-on-One -Dreamweaver MX 2004: The Missing Manual ---------------------------------------------------------------- Upcoming Events ---------------------------------------------------------------- -Tim O'Reilly, Open Source Business Conference, San Francisco, CA--March 17 -Mac User Group Day at O'Reilly in Sebastopol, CA--April 24 ---------------------------------------------------------------- Conferences ---------------------------------------------------------------- -Outstanding Keynotes Announced for the Sixth Annual O'Reilly Open Source Convention ---------------------------------------------------------------- News ---------------------------------------------------------------- -We're Bringing Back RepKover Lay-Flat Bindings -The Uganda Digital Bookmobile -Wallace Wang's Unusual Career: Stand-up Comedian & Computer Book Author -Amazon and Open Source -Mod_python's PSP: Python Server Pages -Day in the Life of #Apache -Cleaning iPhoto -bash on Mac OS X -Inside IIS 6 -Protect Yourself Against Kerberos Attacks -Configuring JBoss 4.0 JDBC Connectivity -The Ideal Digital Photographer's Workflow, Part 3 -O'Reilly Learning Lab's .NET Certificate Series -Developing Web-Service-Driven, Smart Mobile Applications ---------------------------------------------------------------- News From Your Peers ---------------------------------------------------------------- Check out the new O'Reilly User Group Wiki for the latest news ================================================ Book News ================================================ Did you know you can request a free book to review for your group? Ask your group leader for more information. For book review writing tips and suggestions, go to: http://ug.oreilly.com/bookreviews.html Don't forget, you can receive 20% off any O'Reilly, No Starch, Paraglyph, or Syngress book you purchase directly from O'Reilly. Just use code DSUG when ordering online or by phone 800-998-9938. http://www.oreilly.com/ ***Free ground shipping is available for online orders of at least $29.95 that go to a single U.S. address. This offer applies to U.S. delivery addresses in the 50 states and Puerto Rico. For more details, go to: http://www.oreilly.com/news/freeshipping_0703.html ---------------------------------------------------------------- New Releases ---------------------------------------------------------------- ***Mac OS X Panther for Unix Geeks Publisher: O'Reilly ISBN: 0596006071 If you are disoriented by the new Mac environment, this book will get you acclimated. It's a guide to understanding the BSD Unix system and challenging Panther-specific components. It includes an overview of the Terminal application and Panther's filesystem and startup processes, as well as coverage of LDAP and NetInfo, Fink and Darwin Ports, and the Apple X11 distribution for running X Windows applications. The book also features a manpage-style reference to the undocumented commands that come with Panther. http://www.oreilly.com/catalog/mpantherunix/ Chapter 14, "MySQL and PostgreSQL," is available free online: http://www.oreilly.com/catalog/mpantherunix/chapter/index.html ***Dancing Barefoot--Finally Available! Publisher: O'Reilly ISBN: 0596006748 Wil Wheaton--blogger, geek, and Star Trek: The Next Generation's Wesley Crusher--gives us five true tales of life, love, and the absurdities of Hollywood in "Dancing Barefoot." Far from the usual celebrity tell-all, this book is a vivid, personal account of Wil's search for his true self. If you've ever fallen in love, attended a Star Trek convention, or pondered the meaning of life, you'll find a kindred soul in the pages of "Dancing Barefoot." http://www.oreilly.com/catalog/barefoot/ ***WebLogic: The Definitive Guide Publisher: O'Reilly ISBN: 059600432X "WebLogic: The Definitive Guide" presents a 360-degree view of the world of WebLogic. An exhaustive treatment of the WebLogic server and management console answers any question that developers, administrators, and system architects might think to ask. From building, packaging, and deploying applications to optimizing the runtime WebLogic environment, dealing with security issues, and understanding Enterprise APIs, this book provides detailed analysis, thorough explanations, and clear examples to help you master this powerful and complex application server. http://www.oreilly.com/catalog/weblogictdg/ Chapter 18, "XML," is available free online: http://www.oreilly.com/catalog/weblogictdg/chapter/index.html ***Mac OS X 10.3 Panther Little Black Book Publisher: Paraglyph Press ISBN: 1932111867 "Mac OS X 10.3 Panther Little Black Book" features techniques to help intermediate and experienced Mac users get the most out of the new Panther operating system. This book includes extensive coverage of Panther's new networking and printing features, high-speed Finder searching capabilities, system preferences, font manager, Font Book, applications including iChat AV and iPhoto, and the much improved mail system. With access to hundreds of immediate solutions to everyday dilemmas, you'll learn how to solve problems, perform critical tasks, and maximize your use of OS X. http://www.oreilly.com/catalog/1932111867/ ***Adobe Photoshop CS One-on-One Publisher: O'Reilly ISBN: 0596006187 "Adobe Photoshop CS One-on-One" clears the fog, taking you from graphics newbie to Photoshop warrior. This full-color book from Photoshop master Deke McClelland includes a CD with nearly two hours of professionally produced video tutorials that feature Deke and relate to the book's written instructions, giving you an up-close and personal training experience that simulates the classroom environment. You'll travel step by step through real-world projects that help you gain Photoshop proficiency, and along the way, you'll get a good dose of graphics theory, best practices, and tips for avoiding Photoshop disasters. http://www.oreilly.com/catalog/adobephoto/ ***Dreamweaver MX 2004: The Missing Manual Publisher: O'Reilly ISBN: 0596006314 "Dreamweaver MX 2004: The Missing Manual" helps first-time and experienced web designers bring stunning, interactive web sites to life. A step-by-step annotated tutorial takes readers through the construction of a state-of-the-art commercial web site, complete with Flash buttons, Cascading Style Sheets, and dynamic databases. You'll learn how to create and when it's appropriate to use web features such as forms, animations, and pop-up windows. And you'll learn scores of undocumented workarounds and shortcuts. With over 500 illustrations and a handcrafted index, this book is the ultimate atlas for Dreamweaver MX 2004. http://www.oreilly.com/catalog/dreammx2004tmm/ ================================================ Upcoming Events ================================================ ***For more events, please see: http://events.oreilly.com/ ***Tim O'Reilly, Open Source Business Conference, San Francisco, CA--March 17 "Rethinking the Boundaries of 'Open Source'" is Tim's topic at OSBC 2004. For more information, go to: http://www.osbc2004.com/index.html ***Mac User Group Day at O'Reilly in Sebastopol, CA--April 24 Join O'Reilly and NCMUG for a special Mac User Group Day in Sebastopol, California on Saturday, April 24 from 2-6pm. Speakers include Derrick Story ("Digital Photography Pocket Guide, 2nd Edition," "iPhoto 2: The Missing Manual"), Chris Stone ("Mac OS X Panther in a Nutshell"), Tom Negrino & Dori Smith ("Mac OS X Unwired"), and Scott Fullam ("Hardware Hacking Projects for Geeks"). For more information and a complete schedule of events, go to: http://ug.oreilly.com/banners/macugday_hi_res.pdf Please RSVP to let us know you will be attending at mugevent@oreilly.com. Mac User Group Day 2:00pm-6:00pm, Saturday, April 24 O'Reilly 1005 Gravenstein Hwy North Sebastopol, CA 95472 800-998-9938 Ext. 7103 For directions, go to: http://www.oreilly.com/oreilly/seb_directions.html The 58th Annual Sebastopol Apple Blossom Festival will be also be happening. Come to Sebastopol early to watch the parade downtown. It starts at 10am. ================================================ Conference News ================================================ ***Outstanding Keynotes Announced for the Sixth Annual O'Reilly Open Source Convention Three members of the distinguished Dyson family--Esther, George, and Freeman--will share a keynote address; Robert Lefkowitz, one of OSCON 2003's most riveting speakers, will return; Milton Ngan will also return to discuss the "Lord of the Rings" trilogy; and Tim O'Reilly will also be a keynote speaker. The convention is slated for July 26-30, 2004, at the Portland Marriott Downtown, Portland, Oregon. http://conferences.oreillynet.com/os2004/ Registration will open early April. View photos, interviews, and press coverage from OSCON 2003 here: http://www.oreillynet.com/oscon2003/ ================================================ News From O'Reilly & Beyond ================================================ --------------------- General News --------------------- ***We're Bringing Back RepKover Lay-Flat Bindings Lay-flat bindings are back. Readers of O'Reilly books will once again be able to plop their book next to a terminal or on a cafe table and be sure that it will stay open to the page they're perusing. O'Reilly is reinstating the RepKover binding, which allows the interior of a book to "float" free from its cover. More durable and flexible than a traditional perfect binding, the RepKover binding allows the interior of a book to lay flat when open. The bindings will start appearing in bookstores immediately. Going forward, all new books will be produced with the much-loved lay-flat binding (except for books that are too thin or thick for the RepKover process). ***The Uganda Digital Bookmobile Inspired by his experience on the road with the Internet Bookmobile, Richard Koman, along with Brad deGraf, founded Anywhere Books, an organization dedicated to deploying the bookmobile approach in development contexts. In turn, Koman and deGraf partnered with the National Library of Uganda to create the Uganda Digital Bookmobile. Koman writes about his experience in Uganda with this project, which included the set up of scanning stations and a printing system at the National Library in Kampala. http://www.oreillynet.com/pub/q/articles ***Wallace Wang's Unusual Career: Stand-up Comedian & Computer Book Author "Wally Wang, 'Steal This Computer Book 3,' knows firsthand the importance of sticking with even the most far-reaching New Year's resolutions. On Jan. 1, 1990, the Detroit native resolved to dive headfirst into a stand-up comedy career. The decision might not have been a monumental one, except that Wang had never even set foot in a comedy club." Read the rest of this story in this recent "Las Vegas Sun" article: http://www.lasvegassun.com/sunbin/stories/read/2004/jan/23/516226302.html Steal This Computer Book 3 Publisher: No Starch Press ISBN: 1593270003 http://www.oreilly.com/catalog/1593270003/ --------------------- Open Source --------------------- ***Amazon and Open Source Amazon realized early on that amazon.com was more than just a book site, more in fact than just an e-commerce site. It was becoming an e-commerce platform. Open source has been a key part of the Amazon story, and although Amazon has closed code, it has created its own "architecture of participation" that may be even richer than that of many open source software development communities. Tim shares his thoughts in the latest Ask Tim. http://www.oreilly.com/pub/a/oreilly/ask_tim/2004/amazon_0204.html ***Mod_python's PSP: Python Server Pages For simple web sites, inlining code in the pages themselves is shockingly effective. For more complex sites, it can even work with good MVC design. Fear not, Pythonistas, mod_python's PSP brings the power and clarity of Python to web programming. Grisha Trubetskoy explains. http://www.onlamp.com/pub/a/python/2004/02/26/python_server_pages.html ***Day in the Life of #Apache Rich Bowen tackles yet another common Apache dilemma in the latest installment in this series based on his conversations on the IRC channel, #apache. This week he delves into the sometimes confusing world of modules: when to enable them, when to disable them, and why. http://www.onlamp.com/pub/a/apache/2004/02/26/apacheckbk.html --------------------- Mac --------------------- ***Cleaning iPhoto When you have thousands of images in iPhoto and don't have time to cull them manually, scripting starts to look very appealing. brian d foy shows you some helpful AppleScripts and Perl scripts you can use to clean up your iPhoto libraries. http://www.macdevcenter.com/pub/a/mac/2004/02/27/cleaning_iphoto.html ***bash on Mac OS X In the migration from Jaguar to Panther, one of the lesser-discussed changes has been the switch from tcsh to bash as the default shell (for new accounts). In this article, David Miller delves into affected areas, such as aliases and environment variables, to help you make the transition. http://www.macdevcenter.com/pub/a/mac/2004/02/24/bash.html --------------------- Windows --------------------- ***Inside IIS 6 With the release of Windows Server 2003, Microsoft has made significant changes in how IIS works. Mitch Tulloch brings you up to speed on what's new, and gives you insider tips on how to take advantage of it. http://www.windowsdevcenter.com/pub/a/windows/2004/03/02/inside_iis.html ***Protect Yourself Against Kerberos Attacks The only way to defend yourself is to understand your attacker in-depth. This excerpt from the recently released "Security Warrior" by Cyrus Peikari and Anton Chuvakin details Kerberos attacks. Read it and prepare yourself. http://www.windowsdevcenter.com/pub/a/windows/excerpt/swarrior_ch14/index1.ht ml --------------------- Java --------------------- ***Configuring JBoss 4.0 JDBC Connectivity JBoss uses the HypersonicDB by default, but with a few configuration changes, it can use any JDBC-equipped database. Deepak Vohra shows how to use Oracle, Sybase, MySQL and other databases with JBoss. http://www.onjava.com/pub/a/onjava/2004/02/25/jbossjdbc.html --------------------- Web --------------------- ***The Ideal Digital Photographer's Workflow, Part 3 You can achieve greater control over the quality of the images produced by your new digital camera if you shoot them in RAW format. Trouble is, it can take an inordinate amount of time to convert RAW images into something your image-editing program can use. In Part 3 of Ken Milburn's series on creating ideal digital photography workflows, he details several steps you can take to save hours of RAW-process work after every shoot. Ken is the author of the upcoming "Digital Photography: Expert Techniques." http://www.oreillynet.com/pub/a/javascript/2004/02/24/digital_photography.htm l --------------------- .NET --------------------- ***O'Reilly Learning Lab's .NET Certificate Series Learn .NET programming skills and earn a .NET Programming Certificate from the University of Illinois Office of Continuing Education. The .NET Certificate Series is comprised of three courses that give you the foundation you need to do .NET programming well. The courses are: Learn XML; Learn Object-Oriented Programming Using Java; and Learn C#. Enroll now in all three courses and save over $500. http://oreilly.useractive.com/courses/dotnet.php3 ***Developing Web-Service-Driven, Smart Mobile Applications Working with web services and other network protocols that were designed with broadband in mind can become a real burden to making applications really mobile. But there is hope. Michael Yaun walks through the design and implementation of a complete end-to-end mobile application that solves these difficult problems. http://www.ondotnet.com/pub/a/dotnet/2004/02/23/mobilewebserviceapps.html ================================================ News From Your Peers ================================================ ***Check out the new O'Reilly User Group Wiki for the latest news You can look for a meeting, user group, or post information any time you want. http://wiki.oreillynet.com/usergroups/view?HomePage Until next time-- Marsee ------------------------------------------------------- From george at metaart.org Mon Mar 8 15:06:51 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] March Oakland.pm Meeting: Tuesday Message-ID: <200403081306.51038.george@metaart.org> I'm looking forward to Tony's talk and, for that matter, what precedes and follows it. I'm also pleased that a number of people say they are coming. See some of you tomorrow (Tuesday) evening. George Snip from home page of Oakland.pm http://oakland.pm.org/ ........................................................... when: Tue. March 9 at 7:30-9:30pm. (We meet 2nd Tuesdays.) where: Joshua Wait's place 1903 Virginia Street Apt. 3 Berkeley, CA 94709 directions: [Joshua's pdf map and directions] [George's directions and ascii map] what: introductions giveaways talk (see below) talk: talk by author Tony Stubblebine entitled "Regular Expression Best Practices" similar to his article [5 Habits for Successful Regex] See author's [blurb] on talk who: open to anyone interested. how much: no fee for our meetings. Note: [ ... ] indicates that ... is a link you can follow from our home page From george at metaart.org Wed Mar 10 14:47:32 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Welcome to Guest Subscriber Tony Stubblebine Message-ID: <200403101247.32331.george@metaart.org> Tony, Welcome to our mailing list. Thanks for your excellent talk last night! And thanks for joining the mailing list as a guest! George All, Here's the arrangement as I understand it. If you show some regex code you have written and request so, Tony will comment on it. He'll be around for a month, but may sometimes take a while to respond. Note that the deal is that you provide some regex code in your request. George Tony, Please feel free to correct or reframe anything above that is amiss. Also, very possibly, you have things to add. Enjoy! George ========================== Oakland subscription notification Date: Today 11:37:18 am From: mailman-bounces@mail.pm.org To: oakland-owner@mail.pm.org Tony Stubblebine has been successfully subscribed to Oakland. From tonys at oreillynet.com Wed Mar 10 14:55:36 2004 From: tonys at oreillynet.com (Tony Stubblebine) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <200403101247.32331.george@metaart.org> References: <200403101247.32331.george@metaart.org> Message-ID: <404F80C8.8000704@oreillynet.com> Thanks George. I'm curious to see what sort of regular expressions people are writing, good and bad. And I'd love to start a discussion on regex style or technique. Here's my crazy phone number regex, which I thought was fun to write but in hindsight probably not all that useful. It's got nested if-then-else constructs, that was the fun part. #!/usr/bin/perl my @tests = ( #These match "314-555-4000", "800-555-4400", "(314)555-4000", "314.555.4000", "1 800-555-4000", "1-800-555-4000", #These Fail "1 800 555 5555", "(800) 555 5555", "800 555 5555", "8005554444", "1888-555-5555", "1-800.555.4000", "1-800-555.4000", "1 800 555-4444", "1-800 555-4000", "800.555-4000", "555-4000", "aasdklfjklas", "1234-123-12345", "(800-555-1212", "800)555-1212", "800)-555-1212", "800555-1212", ); foreach my $test (@tests) { if ( $test =~ m/ ^ (?: (?: 1 (?: \s | ([-.]) ) # 1 followed by optional separator \d\d\d # followed by area code ( (?(1) \1 | [-.] ) ) # followed by separator ) | # ... or ... (?: \(\d\d\d\) \s? ) # area code with parens | # ... or ... (?: \d\d\d ([-.]) ) # area code with separator ) \d\d\d # prefix (?(2) # match separator from "1 followed by..." \2 # clause | (?(3) \3 | [-.] ) # or match separator from "area code with ) # separator" clause \d\d\d\d # exchange $ /x ) { print "Matched on $test [ $1 : $2 : $3 ]\n"; } else { print "Failed match on $test\n"; } } George Woolley wrote: >Tony, >Welcome to our mailing list. >Thanks for your excellent talk last night! >And thanks for joining the mailing list as a guest! >George > > >All, >Here's the arrangement as I understand it. >If you show some regex code you have written >and request so, >Tony will comment on it. > >He'll be around for a month, >but may sometimes take a while to respond. >Note that the deal is that you provide some regex code >in your request. >George > > >Tony, >Please feel free to correct or reframe anything above >that is amiss. >Also, very possibly, you have things to add. > >Enjoy! >George > >========================== >Oakland subscription notification >Date: Today 11:37:18 am >From: mailman-bounces@mail.pm.org >To: oakland-owner@mail.pm.org > >Tony Stubblebine has been successfully subscribed >to Oakland. > >_______________________________________________ >Oakland mailing list >Oakland@mail.pm.org >http://mail.pm.org/mailman/listinfo/oakland > > From blyman at iii.com Wed Mar 10 19:16:48 2004 From: blyman at iii.com (Belden Lyman) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <404F80C8.8000704@oreillynet.com> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> Message-ID: <1078967446.27757.98.camel@ls104> On Wed, 2004-03-10 at 12:55, Tony Stubblebine wrote: > Thanks George. > > I'm curious to see what sort of regular expressions people are writing, > good and bad. And I'd love to start a discussion on regex style or > technique. > I wanted to find all 2 letter words in /usr/dict/words, so cut over to Perl after finding myself a few pipes deep: $ grep '^..$' /usr/dict/words | grep -v '[A-Z][A-Z]' | grep -i '[aeiouy]' So long as I was doing this in Perl, I decided to make the program find all N-length words, with N defaulting to 2. If this looks like an exercise for someone learning (?=) and (?!), there's a reason for that ;) #!/usr/bin/perl -s use strict; use warnings; our $length; $length = 2 unless $length; @ARGV = '/usr/dict/words'; print grep { m/ (?=^[A-Za-z]{$length}$) # entry must be $length letters long (?!^[A-Z]+$) # ignore all-caps words (?i-: # this next part is case insensitive: (?: # we must have either [aeiouy]. # a vowel, then any letter | # or .[aeiouy] # any letter, then a vowel ) ) /xo } (<>); __END__ Belden From david at fetter.org Wed Mar 10 19:51:16 2004 From: david at fetter.org (David Fetter) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <1078967446.27757.98.camel@ls104> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> <1078967446.27757.98.camel@ls104> Message-ID: <20040311015116.GG31575@fetter.org> On Wed, Mar 10, 2004 at 05:10:46PM -0800, Belden Lyman wrote: > > On Wed, 2004-03-10 at 12:55, Tony Stubblebine wrote: > > Thanks George. > > > > I'm curious to see what sort of regular expressions people are writing, > > good and bad. And I'd love to start a discussion on regex style or > > technique. > > I wanted to find all 2 letter words in /usr/dict/words, so cut over > to Perl after finding myself a few pipes deep: > > $ grep '^..$' /usr/dict/words | grep -v '[A-Z][A-Z]' | grep -i '[aeiouy]' > > So long as I was doing this in Perl, I decided to make the program find > all N-length words, with N defaulting to 2. > > If this looks like an exercise for someone learning (?=) and (?!), > there's a reason for that ;) > > #!/usr/bin/perl -s > > use strict; > use warnings; > > our $length; > $length = 2 unless $length; > > @ARGV = '/usr/dict/words'; > > print grep { > m/ > (?=^[A-Za-z]{$length}$) # entry must be $length letters long > (?!^[A-Z]+$) # ignore all-caps words > (?i-: # this next part is case insensitive: > (?: # we must have either > [aeiouy]. # a vowel, then any letter > | # or > .[aeiouy] # any letter, then a vowel > ) > ) > /xo > } > (<>); > > __END__ Belden, hats off for the ingenious use of regex, but...I don't quite get this approach. Why try to cram it all into one regex? Here's how I'd do a thing like this. I suppose I lose obfuscation points, but it's easy to use, understand, modify, maintain, &c., and it's bumpin' fast. #!/usr/bin/perl -wl use strict; use warnings; use Getopt::Long; my $file = '/usr/dict/words'; my $length = 2; my $result = GetOptions( "length=i" => \$length , "file=s" => \$file ); open F, "<$file" or die "Couldn't open $file: $!\n"; while() { chomp; next unless length == $length; # Quickly removes most things we don't want. next if $_ eq uc($_); # No shouting. next unless /[aeiouwy]/io; # cwm is a word. # more simple tests, if needed. print; } close F; Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From george at metaart.org Wed Mar 10 20:09:09 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Mac User Group Day at O'Reilly in Sebastopol, CA--April 24 Message-ID: <200403101809.09801.george@metaart.org> Marsee is aware that there are a number of MAC users in our group. If you are a MAC user in our group, you are welcome at MAC user group day; however, note that you'll need to RSVP to the email address indicated. George ---------- Forwarded Message ---------- Date: Wednesday 10 March 2004 3:39 pm From: Marsee Henon ... We are taking RSVP so I can know how many chairs etc to set out. ... Mac User Group Day at O'Reilly in Sebastopol, CA--April 24 Join O'Reilly and NCMUG for a special Mac User Group Day in Sebastopol, California on Saturday, April 24 from 2-6pm. Speakers include Derrick Story ("Digital Photography Pocket Guide, 2nd Edition," "iPhoto 2: The Missing Manual"), Chris Stone ("Mac OS X Panther in a Nutshell"), Tom Negrino & Dori Smith ("Mac OS X Unwired"), and Scott Fullam ("Hardware Hacking Projects for Geeks"). For more information and a complete schedule of events, go to: http://ug.oreilly.com/banners/macugday_hi_res.pdf Please RSVP to let us know you will be attending at mugevent@oreilly.com. Mac User Group Day 2:00pm-6:00pm, Saturday, April 24 O'Reilly 1005 Gravenstein Hwy North Sebastopol, CA 95472 800-998-9938 Ext. 7103 For directions, go to: http://www.oreilly.com/oreilly/seb_directions.html The 58th Annual Sebastopol Apple Blossom Festival will be also be happening. Come to Sebastopol early to watch the parade downtown. It starts at 10am. Hope you are enjoying the sun! Marsee ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Marsee Henon O'Reilly & Associates 1005 Gravenstein Highway North Sebastopol, CA 95472 707-827-7103 800-998-9938 Fax 707-829-0104 marsee@oreilly.com http://ug.oreilly.com/ http://www.oreilly.com/ http://conferences.oreilly.com/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ------------------------------------------------------- From david at kineticode.com Thu Mar 11 10:43:57 2004 From: david at kineticode.com (David Wheeler) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <404F80C8.8000704@oreillynet.com> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> Message-ID: <4A7289A2-737B-11D8-9742-000A95972D84@kineticode.com> On Mar 10, 2004, at 12:55 PM, Tony Stubblebine wrote: > I'm curious to see what sort of regular expressions people are > writing, good and bad. And I'd love to start a discussion on regex > style or technique. Here's the most complex regex I've written to date. I use it in activitymail to parse out the file name and revision numbers from the file list passed to CVS commits. my $regex = qr/^(.*?)(?:,([\d.]+.\d|NONE))?(?:,([\d.]+.\d|NONE))?$/; The file list spec from CVS can look like these: no.gmo,NONE,1.1.2.1 no.po,1.1.2.1,NONE tr.gmo,1.13,1.13.4.1 tr.po,1.13,1.13.4.1 It's used like this: my ($file, $old, $new) = $spec =~ $regex; Ugly, ain't it? It does the trick, though. Regards, David From blyman at iii.com Thu Mar 11 10:58:54 2004 From: blyman at iii.com (Belden Lyman) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <20040311015116.GG31575@fetter.org> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> <1078967446.27757.98.camel@ls104> <20040311015116.GG31575@fetter.org> Message-ID: <1079023972.2430.38.camel@ls104> On Wed, 2004-03-10 at 17:51, David Fetter wrote: > On Wed, Mar 10, 2004 at 05:10:46PM -0800, Belden Lyman wrote: > > Belden, hats off for the ingenious use of regex, but...I don't quite > get this approach. Why try to cram it all into one regex? > To prove to myself that it can all be done in one regex. > Here's how I'd do a thing like this. I suppose I lose obfuscation > points, but it's easy to use, understand, modify, maintain, &c., and > it's bumpin' fast. > Sure, I wouldn't use anything like the above (err, the snipped?) in production code, exactly for the reasons you mentioned. It was an exercise, not much more. > #!/usr/bin/perl -wl > use strict; > use warnings; > use Getopt::Long; > > my $file = '/usr/dict/words'; > my $length = 2; > my $result = GetOptions( > "length=i" => \$length > , "file=s" => \$file > ); > > open F, "<$file" or die "Couldn't open $file: $!\n"; > while() { > chomp; next unless /^\w+$/; # ignore contractions > next unless length == $length; # Quickly removes most things we don't want. > next if $_ eq uc($_); # No shouting. > next unless /[aeiouwy]/io; # cwm is a word. > # more simple tests, if needed. > print; > } > close F; Benchmarking certainly upholds your claim of bumpin' fast! Belden From oaklandpm at eli.users.panix.com Thu Mar 11 12:20:41 2004 From: oaklandpm at eli.users.panix.com (B.E.G) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] regexp for discussion Message-ID: <200403111820.i2BIKfO14069@panix2.panix.com> Two regular expressions for this free for all. This one comes from a spam filter (applied to Subject: and body) I used actively from about 1996 to 1999. It was one of my first very long regexps, presented here with original whitespace and commenting. (Yes, I really did use dollar-sign pound-sign as a global variable, that relies on a iso-8859-1 encoding for the code, this message is utf-8 encoded, so I'm not sure if it will run for you.) # Used in the scan_* routines for currencies (perl considers this # a reserved global, since it is a one char non-alphabetic variable, # but it is unlikely to be used). $?='$#???'; # [...] # Be very generous about accepting "only US$15,- p min" text. /(\b(?:to|just|only)|^)# first they try to de-emphasize it \s+(?:[a-z]{2}\s*)? # Sometimes with something for the currency (?:[$?]\s*)? # Sometimes a currency notation ($?='$#?') (?:\d+[o\d]* # A number (?:[.,](?:[o\d]{2} # with an optional fractional portion |-)?)? # or a hyphen for 00 |\.[o\d]+) # or exclusively fractional (?:\s*cents)? # an alternative currency location \s*(?:\/|p(?:er|\.)?) # "per" and variations \s*(?:m(?:in(?:ute)?)?# "minute" and variations |h(?:ou)?r? # or "hour" '' '' |da?y? # or "day" '' '' |w(?:ee)k? # or "week" '' '' |mo?n(?:th)? # or "month" '' '' |y(?:ea)?r?) # or "year" '' '' /ix # Ignore case and use free-format regexp Now one from a log parser I use (Hi George, did iPro parse like this?). The particular parser understands (== has regexps for) four different formats. As George likes to attest, this is not expected to work on all log lines of the target format, just better than 99% of them. combined => [ # Standard apache 'combined' log format # Column names, for (captures) [ 'ip', 'identd', 'username', 'date', 'time', 'tz', 'method', 'file', 'protocol', 'status', 'bytes', 'referer', 'client', 'other', ], # Regexp qr%^ # anchor ([\w.]+) # IP \s+ # whitespace (\S+) # ident check \s+ # whitespace (\S+) # auth user \s+ # whitespace \[(\d\d/\w\w\w/\d\d\d\d) # date :(\d\d:\d\d:\d\d) # time \s+([\d-]+)\] # timezone \s+ # whitespace "(\w+) # GET/POST/HEAD, etc \s+ # whitespace (\S+) # URI/URL (?: # grouping for optional version \s+ # whitespace (HTTP/[\d.]+) # protocol version )? # end grouping " # end of request line \s+ # whitespace (\d\d\d) # response code, 200 success, etc \s+ # whitespace (\d+|-) # bytes written \s+ # whitespace "(\S+)" # referrer \s+ # whitespace "([^"]+)" # user agent \s* # whitespace (.*) # other $ # anchor %xi, ], I don't use the Apache 'combined' format for most of my logs anymore because of parsing ambiguities, but I've got 20-odd servers and some of the lessor ones haven't been migrated to something better. I expect the 'combined' format is rather popular with others, though. Problems I've seen the auth-user value have spaces in it (always with "401 Not Authorized" errors for me), some non-compliant tools send URLs with un-encoded spaces in the GET line, some user-agents have quotes in them. The script that runs this has a debug mode which prints all non-matching lines to STDERR, and I use them as fodder for fixing regexp bugs. Sometimes the lines simply aren't well formed, and those ones I don't try to accomodate for sanity. Last week I noticed a couple of lines that were missing the " before the GET in the request line. Some sort of log writing bug I guess, and better ignored. Elijah From david at fetter.org Thu Mar 11 13:25:35 2004 From: david at fetter.org (David Fetter) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <1079023972.2430.38.camel@ls104> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> <1078967446.27757.98.camel@ls104> <20040311015116.GG31575@fetter.org> <1079023972.2430.38.camel@ls104> Message-ID: <20040311192535.GB19400@fetter.org> On Thu, Mar 11, 2004 at 08:52:52AM -0800, Belden Lyman wrote: > On Wed, 2004-03-10 at 17:51, David Fetter wrote: > > On Wed, Mar 10, 2004 at 05:10:46PM -0800, Belden Lyman wrote: > > > > Belden, hats off for the ingenious use of regex, but...I don't > > quite get this approach. Why try to cram it all into one regex? > > > > To prove to myself that it can all be done in one regex. Cool :) > > Here's how I'd do a thing like this. I suppose I lose obfuscation > > points, but it's easy to use, understand, modify, maintain, &c., > > and it's bumpin' fast. > > Sure, I wouldn't use anything like the above (err, the snipped?) heh > in production code, exactly for the reasons you mentioned. It was > an exercise, not much more. Roight. > > #!/usr/bin/perl -wl > > use strict; > > use warnings; > > use Getopt::Long; > > > > my $file = '/usr/dict/words'; > > my $length = 2; > > my $result = GetOptions( > > "length=i" => \$length > > , "file=s" => \$file > > ); > > > > open F, "<$file" or die "Couldn't open $file: $!\n"; > > while() { > > chomp; > next unless /^\w+$/; # ignore contractions > > next unless length == $length; # Quickly removes most things we don't want. > > next if $_ eq uc($_); # No shouting. > > next unless /[aeiouwy]/io; # cwm is a word. > > # more simple tests, if needed. > > print; > > } > > close F; > > Benchmarking certainly upholds your claim of bumpin' fast! :) I suspect it might be even faster if you put the length test first. The algorithmic principle for mine is that it discards 1st--think of an increasingly fine-meshed set of filters on a water intake. First, something that excludes furniture, then something that excludes bottles & cans, then bits of paper, then sand, then volatile organics, sulfur... Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From tonys at oreillynet.com Thu Mar 11 11:25:52 2004 From: tonys at oreillynet.com (Tony Stubblebine) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <1078967446.27757.98.camel@ls104> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> <1078967446.27757.98.camel@ls104> Message-ID: <4050A120.9020706@oreillynet.com> Belden, I like how you're using lookahead (and comments and whitespace). Your third lookahead is checking to make sure there's at least one vowel. The alternation is fine for two character words, but doesn't work for longer words like "strength," where the first vowel is in position four. Does anyone know of a word that starts with four consonants? #!/usr/bin/perl -s use strict; use warnings; our $length; $length = 8 unless $length; # A word can't start with more than three consonants (AFAIK) my $max_consonants = $length < 3 ? $length : 3; @ARGV = '/usr/share/dict/words'; print grep { m/ (?=^[A-Za-z]{$length}$) # entry must be $length letters long (?!^[A-Z]+$) # ignore all-caps words (?i: # Check for a vowel early in the # word. (?=^[^aeiouy]{0,$max_consonants} [aeiouy] ) ) /xo } (<>); Belden Lyman wrote: >On Wed, 2004-03-10 at 12:55, Tony Stubblebine wrote: > > >>Thanks George. >> >>I'm curious to see what sort of regular expressions people are writing, >>good and bad. And I'd love to start a discussion on regex style or >>technique. >> >> >> > >I wanted to find all 2 letter words in /usr/dict/words, so cut over >to Perl after finding myself a few pipes deep: > > $ grep '^..$' /usr/dict/words | grep -v '[A-Z][A-Z]' | grep -i '[aeiouy]' > >So long as I was doing this in Perl, I decided to make the program find >all N-length words, with N defaulting to 2. > >If this looks like an exercise for someone learning (?=) and (?!), >there's a reason for that ;) > > #!/usr/bin/perl -s > > use strict; > use warnings; > > our $length; > $length = 2 unless $length; > > @ARGV = '/usr/dict/words'; > > print grep { > m/ > (?=^[A-Za-z]{$length}$) # entry must be $length letters long > (?!^[A-Z]+$) # ignore all-caps words > (?i-: # this next part is case insensitive: > (?: # we must have either > [aeiouy]. # a vowel, then any letter > | # or > .[aeiouy] # any letter, then a vowel > ) > ) > /xo > } > (<>); > > __END__ > >Belden > >_______________________________________________ >Oakland mailing list >Oakland@mail.pm.org >http://mail.pm.org/mailman/listinfo/oakland > > From oaklandpm at eli.users.panix.com Thu Mar 11 14:58:56 2004 From: oaklandpm at eli.users.panix.com (B.E.G.) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions Message-ID: <200403112058.i2BKwui15174@panix2.panix.com> Tony asks: > Does anyone know of a word that starts with four consonants? Turn to Yiddish and find "schmaltz". I seem to recall someone with the name "Schwartz", if you'll allow proper names. Probably not here, and I doubt Scrabble recognizes any eponymous words from that name, eg "schwartzian transform". Elijah ------ five is harder to find From blyman at iii.com Thu Mar 11 17:32:15 2004 From: blyman at iii.com (Belden Lyman) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <4050A120.9020706@oreillynet.com> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> <1078967446.27757.98.camel@ls104> <4050A120.9020706@oreillynet.com> Message-ID: <1079047574.2430.586.camel@ls104> On Thu, 2004-03-11 at 09:25, Tony Stubblebine wrote: > Belden, > > I like how you're using lookahead (and comments and whitespace). > > Your third lookahead is checking to make sure there's at least one > vowel. The alternation is fine for two character words, but doesn't work > for longer words like "strength," where the first vowel is in position four. > This surprises me, because this works: $ echo 'strength' | perl -ne '/(?:.[aeiouy]|[aeiouy].)/ and print' but this fails: $ echo 'strength' | perl -ne '/(?=^\w+$)(?:.[aeiouy]|[aeiouy].)/ and print' It appears that adding "(?=^\w+$)" is affecting my subsequent "(?:)" so the whole regex acts as /^.[aeiouy]|[aeiouy].$/ Obviously it's the addition of the lookahead that's making things go pear shaped. Reading and re-reading perlre.pod's description of "(?=pattern)" isn't helping me understand this change in behavior. Can anyone explain this? Belden From david at fetter.org Thu Mar 11 17:37:33 2004 From: david at fetter.org (David Fetter) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <1079047574.2430.586.camel@ls104> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> <1078967446.27757.98.camel@ls104> <4050A120.9020706@oreillynet.com> <1079047574.2430.586.camel@ls104> Message-ID: <20040311233733.GI19400@fetter.org> On Thu, Mar 11, 2004 at 03:26:14PM -0800, Belden Lyman wrote: > On Thu, 2004-03-11 at 09:25, Tony Stubblebine wrote: > > Belden, > > > > I like how you're using lookahead (and comments and whitespace). > > > > Your third lookahead is checking to make sure there's at least one > > vowel. The alternation is fine for two character words, but > > doesn't work for longer words like "strength," where the first > > vowel is in position four. > > This surprises me, because this works: > > $ echo 'strength' | perl -ne '/(?:.[aeiouy]|[aeiouy].)/ > and print' > > but this fails: > > $ echo 'strength' | perl -ne '/(?=^\w+$)(?:.[aeiouy]|[aeiouy].)/ > and print' > > It appears that adding "(?=^\w+$)" is affecting my subsequent > "(?:)" so the whole regex acts as > > /^.[aeiouy]|[aeiouy].$/ > > Obviously it's the addition of the lookahead that's making things > go pear shaped. Reading and re-reading perlre.pod's description of > "(?=pattern)" isn't helping me understand this change in behavior. > > Can anyone explain this? Um, yeah. You're writing code as cleverly as possible, and here's what Kernighan had to say about that: Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. Belden, you're a smart, sensible guy. Why are you doing this to yourself? Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From tonys at oreillynet.com Thu Mar 11 17:37:35 2004 From: tonys at oreillynet.com (Tony Stubblebine) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <1079047574.2430.586.camel@ls104> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> <1078967446.27757.98.camel@ls104> <4050A120.9020706@oreillynet.com> <1079047574.2430.586.camel@ls104> Message-ID: <4050F83F.7080407@oreillynet.com> Belden-- The lookahead is a positional construct. It has to match at the position right before your alternation. Since there's another positional construct in your lookahead (^), you've effectively anchored the entire regex to the start of the string. In this case there isn't a vowel in the first two letters of "strength." I suppose you could put a \w* between the lookahead and the alternation clause. That would allow the lookahead to anchor at the start of the string and your alternation to float across the rest of the string. --Tony Belden Lyman wrote: >On Thu, 2004-03-11 at 09:25, Tony Stubblebine wrote: > > >>Belden, >> >>I like how you're using lookahead (and comments and whitespace). >> >>Your third lookahead is checking to make sure there's at least one >>vowel. The alternation is fine for two character words, but doesn't work >>for longer words like "strength," where the first vowel is in position four. >> >> >> > >This surprises me, because this works: > > $ echo 'strength' | perl -ne '/(?:.[aeiouy]|[aeiouy].)/ > and print' > >but this fails: > > $ echo 'strength' | perl -ne '/(?=^\w+$)(?:.[aeiouy]|[aeiouy].)/ > and print' > >It appears that adding "(?=^\w+$)" is affecting my subsequent >"(?:)" so the whole regex acts as > > /^.[aeiouy]|[aeiouy].$/ > >Obviously it's the addition of the lookahead that's making things >go pear shaped. Reading and re-reading perlre.pod's description of >"(?=pattern)" isn't helping me understand this change in behavior. > >Can anyone explain this? > >Belden > >_______________________________________________ >Oakland mailing list >Oakland@mail.pm.org >http://mail.pm.org/mailman/listinfo/oakland > > From george at metaart.org Thu Mar 11 18:58:22 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] regexp for discussion In-Reply-To: <200403111820.i2BIKfO14069@panix2.panix.com> References: <200403111820.i2BIKfO14069@panix2.panix.com> Message-ID: <200403111658.22451.george@metaart.org> On Thursday 11 March 2004 10:20 am, B.E.G wrote: > ... > Now one from a log parser I use (Hi George, did iPro parse like this?). Hi, Elijah. Yes, some of the filters used a regex something like the one you show below. Many of the filters, however, began with a split. > The particular parser understands (== has regexps for) four different > formats. As George likes to attest, this is not expected to work on > all log lines of the target format, just better than 99% of them. Right, I don't recall anyone being concerned with losing 1% of the data. For some accounts even 2% might be OK. > combined => [ # Standard apache 'combined' log format > # Column names, for (captures) > [ 'ip', 'identd', 'username', 'date', 'time', 'tz', 'method', 'file', > 'protocol', 'status', 'bytes', 'referer', 'client', 'other', ], > # Regexp > qr%^ # anchor > ([\w.]+) # IP > \s+ # whitespace > (\S+) # ident check > \s+ # whitespace > (\S+) # auth user > \s+ # whitespace > \[(\d\d/\w\w\w/\d\d\d\d) # date > > :(\d\d:\d\d:\d\d) # time > > \s+([\d-]+)\] # timezone > \s+ # whitespace > "(\w+) # GET/POST/HEAD, etc > \s+ # whitespace > (\S+) # URI/URL > (?: # grouping for optional version > \s+ # whitespace > (HTTP/[\d.]+) # protocol version > )? # end grouping > " # end of request line > \s+ # whitespace > (\d\d\d) # response code, 200 success, etc > \s+ # whitespace > (\d+|-) # bytes written > \s+ # whitespace > "(\S+)" # referrer > \s+ # whitespace > "([^"]+)" # user agent > \s* # whitespace > (.*) # other > $ # anchor > %xi, > ], > ... > Elijah From george at metaart.org Thu Mar 11 19:28:21 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <200403112058.i2BKwui15174@panix2.panix.com> References: <200403112058.i2BKwui15174@panix2.panix.com> Message-ID: <200403111728.21480.george@metaart.org> Ah, yes Schwartz, a name beloved to many of us. And then, according to a dictionary on my system, there's: McBride McClain McClellan McClure McCluskey McCracken McGrath McGraw McGregor McKnight McPherson Schlesinger Schlitz Schloss Schmidt Schmitt Schnabel Schneider Schroeder Schroedinger Schwab Schweitzer Oh, my. On the other hand, we have: Jones King Lewis Lyman Woolley etc. Help! ----------------------------------------------------------- Belden: Are people's names included or excluded? ----------------------------------------------------------- George ============================================ On Thursday 11 March 2004 12:58 pm, B.E.G. wrote: > Tony asks: > > Does anyone know of a word that starts with four consonants? > > Turn to Yiddish and find "schmaltz". I seem to recall someone with > the name "Schwartz", if you'll allow proper names. Probably not here, > and I doubt Scrabble recognizes any eponymous words from that name, > eg "schwartzian transform". > > Elijah > ------ > five is harder to find From george at metaart.org Thu Mar 11 19:47:12 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <1078967446.27757.98.camel@ls104> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> <1078967446.27757.98.camel@ls104> Message-ID: <200403111747.12710.george@metaart.org> Belden, Thanks for getting things started! And thanks also for including code as suggested! And I see Tony's practice #1 embodied in your code. :) :) :) But I don't see any test cases as encouraged by practice #2. :( IMO, this would be very important if this were more than exercise. It would also help you to clarify what you meant by word in this context. George On Wednesday 10 March 2004 5:10 pm, Belden Lyman wrote: > On Wed, 2004-03-10 at 12:55, Tony Stubblebine wrote: > > Thanks George. > > > > I'm curious to see what sort of regular expressions people are writing, > > good and bad. And I'd love to start a discussion on regex style or > > technique. > > I wanted to find all 2 letter words in /usr/dict/words, so cut over > to Perl after finding myself a few pipes deep: > > $ grep '^..$' /usr/dict/words | grep -v '[A-Z][A-Z]' | grep -i > '[aeiouy]' > > So long as I was doing this in Perl, I decided to make the program find > all N-length words, with N defaulting to 2. > > If this looks like an exercise for someone learning (?=) and (?!), > there's a reason for that ;) > > #!/usr/bin/perl -s > > use strict; > use warnings; > > our $length; > $length = 2 unless $length; > > @ARGV = '/usr/dict/words'; > > print grep { > m/ > (?=^[A-Za-z]{$length}$) # entry must be $length letters > long (?!^[A-Z]+$) # ignore all-caps words > (?i-: # this next part is case > insensitive: (?: # we must have either [aeiouy]. > # a vowel, then any letter > > | # or > > .[aeiouy] # any letter, then a vowel > ) > ) > /xo > } > (<>); > > __END__ > > Belden > > _______________________________________________ > Oakland mailing list > Oakland@mail.pm.org > http://mail.pm.org/mailman/listinfo/oakland From blyman at iii.com Fri Mar 12 10:14:14 2004 From: blyman at iii.com (Belden Lyman) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <200403111747.12710.george@metaart.org> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> <1078967446.27757.98.camel@ls104> <200403111747.12710.george@metaart.org> Message-ID: <1079107692.12428.0.camel@ls104> On Thu, 2004-03-11 at 17:47, George Woolley wrote: > Belden, > Thanks for getting things started! > And thanks also for including code as suggested! > And I see Tony's practice #1 embodied in your code. :) :) :) > > But I don't see any test cases as encouraged by practice #2. :( > IMO, this would be very important > if this were more than exercise. > It would also help you to clarify what you meant by word > in this context. I'll be sure to send a full test suite in the future. From blyman at iii.com Fri Mar 12 12:30:36 2004 From: blyman at iii.com (Belden Lyman) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <4050F83F.7080407@oreillynet.com> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> <1078967446.27757.98.camel@ls104> <4050A120.9020706@oreillynet.com> <1079047574.2430.586.camel@ls104> <4050F83F.7080407@oreillynet.com> Message-ID: <1079115876.12428.259.camel@ls104> On Thu, 2004-03-11 at 15:37, Tony Stubblebine wrote: > Belden-- > > The lookahead is a positional construct. It has to match at the position > right before your alternation. Since there's another positional > construct in your lookahead (^), you've effectively anchored the entire > regex to the start of the string. In this case there isn't a vowel in > the first two letters of "strength." > Got it! Thanks Tony. > I suppose you could put a \w* between the lookahead and the alternation > clause. That would allow the lookahead to anchor at the start of the > string and your alternation to float across the rest of the string. > > --Tony At some point in my playing I discovered that /(?=^[A-z]+$).*?[aeiouy].*?/ does what I want. But I like (?=^[^aeiouy]{0,$max_consonants}[aeiouy]) better for this program. Belden From blyman at iii.com Fri Mar 12 12:41:24 2004 From: blyman at iii.com (Belden Lyman) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <20040311233733.GI19400@fetter.org> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> <1078967446.27757.98.camel@ls104> <4050A120.9020706@oreillynet.com> <1079047574.2430.586.camel@ls104> <20040311233733.GI19400@fetter.org> Message-ID: <1079116546.12428.272.camel@ls104> On Thu, 2004-03-11 at 15:37, David Fetter wrote: > On Thu, Mar 11, 2004 at 03:26:14PM -0800, Belden Lyman wrote: > > > > > > Can anyone explain this? > > Um, yeah. You're writing code as cleverly as possible, and here's > what Kernighan had to say about that: > > Debugging is twice as hard as writing the code in the first > place. Therefore, if you write the code as cleverly as possible, > you are, by definition, not smart enough to debug it. > Emerson: I hate quotations. Tell me what you know. > Belden, you're a smart, sensible guy. Why are you doing this to > yourself? > Confucius: Learning without thought is labor lost; thought without learning is perilous. Belden, replying in kind From david at fetter.org Fri Mar 12 12:58:35 2004 From: david at fetter.org (David Fetter) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <1079116546.12428.272.camel@ls104> References: <200403101247.32331.george@metaart.org> <404F80C8.8000704@oreillynet.com> <1078967446.27757.98.camel@ls104> <4050A120.9020706@oreillynet.com> <1079047574.2430.586.camel@ls104> <20040311233733.GI19400@fetter.org> <1079116546.12428.272.camel@ls104> Message-ID: <20040312185835.GE24125@fetter.org> On Fri, Mar 12, 2004 at 10:35:46AM -0800, Belden Lyman wrote: > On Thu, 2004-03-11 at 15:37, David Fetter wrote: > > On Thu, Mar 11, 2004 at 03:26:14PM -0800, Belden Lyman wrote: > > > > > > Can anyone explain this? > > > > Um, yeah. You're writing code as cleverly as possible, and here's > > what Kernighan had to say about that: > > > > Debugging is twice as hard as writing the code in the first > > place. Therefore, if you write the code as cleverly as > > possible, you are, by definition, not smart enough to debug > > it. > > > > Emerson: > > I hate quotations. Tell me what you know. I know that what Kernighan said about debugging is the truth. The reason I quoted him was to add the weight of experience--not just mine, but that of one of the people who actually developed Unix and C--to what I said. > > Belden, you're a smart, sensible guy. Why are you doing this to > > yourself? > > Confucius: > > Learning without thought is labor lost; thought without > learning is perilous. So why the labor lost, or the peril? To what purpose would one attempt to learn how to write code that by its nature is impossible to debug or maintain? Yes, there are obfuscated coding contests, and they reward exactly the wrong behavior. And no, I don't buy the idea that obfuscating code shows anything good about the person's other coding skills. I have found that the correllation is, in fact, negative. What would you think about the entrants--never mind the winners--in an obfuscated English contest? Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From blyman at iii.com Fri Mar 12 15:56:19 2004 From: blyman at iii.com (Belden Lyman) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regular Expressions In-Reply-To: <200403111728.21480.george@metaart.org> References: <200403112058.i2BKwui15174@panix2.panix.com> <200403111728.21480.george@metaart.org> Message-ID: <1079128219.12428.591.camel@ls104> On Thu, 2004-03-11 at 17:28, George Woolley wrote: > ----------------------------------------------------------- > Belden: Are people's names included or excluded? > ----------------------------------------------------------- Up to you. I was originally generating word lists for Scrabble (Eli figured that out straight away), so I'm not terribly interested in proper names. Then again, my original code didn't discard words that start with a capital letter, so they're fair game. Up to you. Belden From tonys at oreillynet.com Sat Mar 13 00:15:02 2004 From: tonys at oreillynet.com (Tony Stubblebine) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Perl 6 Regular Expressions In-Reply-To: <1079128219.12428.591.camel@ls104> References: <200403112058.i2BKwui15174@panix2.panix.com> <200403111728.21480.george@metaart.org> <1079128219.12428.591.camel@ls104> Message-ID: <4052A6E6.6080108@oreillynet.com> Perl 6 grammars are going to be awesome: http://www.perlmonks.org/index.pl?node_id=179555 Improved readability, writeability, modularity, and abstraction. From george at metaart.org Sat Mar 13 01:19:20 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Perl 6 Regular Expressions In-Reply-To: <4052A6E6.6080108@oreillynet.com> References: <200403112058.i2BKwui15174@panix2.panix.com> <1079128219.12428.591.camel@ls104> <4052A6E6.6080108@oreillynet.com> Message-ID: <200403122319.20488.george@metaart.org> On Friday 12 March 2004 10:15 pm, Tony Stubblebine wrote: > Perl 6 grammars are going to be awesome: > > http://www.perlmonks.org/index.pl?node_id=179555 > > Improved readability, writeability, modularity, and abstraction. Thanks for the link. RAE. I thought some of the comments were interesting too. I concur with your assessment of Perl 6 grammars: awesome. Yeah! From george at metaart.org Tue Mar 16 00:24:48 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regex Practices #1: separate lines? Message-ID: <200403152224.48514.george@metaart.org> Tony, When writing very simple regular expressions like ^key= :$ do you recommend using several lines? Example: if ( $line =~ m/ ^ key= /x ) { # ... } Example: if ( $line !~ m/ : $ /x ) { } George From extasia at extasia.org Tue Mar 16 01:22:44 2004 From: extasia at extasia.org (David Alban) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] SIG-BEER-WEST this Saturday 3/20 in San Francisco Message-ID: <20040315232244.A14407@gerasimov.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 http://extasia.org/sig-beer-west/ SIG-beer-west Saturday, March 20, 2004 at 6:00pm San Francisco, CA Beer. Mental stimulation. This event: Saturday, 03/20/2004, 6:00pm, at the 21st Amendment Brew Pub, San Francisco directions: http://www.21st-amendment.com/location/index.html beer: http://www.21st-amendment.com/beer/index.html food: http://www.21st-amendment.com/food/food2.html#dinner Coming events (third Saturdays): Saturday, 04/17/2004, 6:00pm, location to be determined Saturday, 05/15/2004, 6:00pm, location to be determined Saturday, 06/19/2004, 6:00pm, location to be determined Saturday, 07/17/2004, 6:00pm, location to be determined San Francisco's next social event for techies and their friends, sig-beer-west, will take place at 6:00pm on Saturday, March 20, 2004 at [6]21st Amendment Brew Pub in San Francisco, CA. [6] http://www.21st-amendment.com/21A.html 21st Amendment's selection of beer includes their own delightful [7]brews, and a fair selection of guest brews. They have a full [8]food menu and I can personally recommend the sweet potato straws and the grilled Monterey Bay squid. Festivities will start at 6:00pm and continue until we've all left. [7] http://www.21st-amendment.com/beer/index.html [8] http://www.21st-amendment.com/food/food2.html#dinner Directions to 21st Amendment can be found on their [9]directions page. They're about a fifteen minute walk down 2nd St. from the Montgomery BART station. [9] http://www.21st-amendment.com/location/index.html When you show up, you should look for some kind of home made sig-beer-west sign. We will try to make it obvious who we are. :-) Note: Please look for the sig-beer-west sign, not for a particular person. sig-beer-west may have different hosts from month to month. Everyone is welcome at this event. We mean it! Please feel free to forward this information and to invite friends, co-workers, and others (all of legal drinking age) who might enjoy lifting a glass with interesting folks from all over the place. Can't come this month? Mark your calendar for next month. (Do it now before you forget!) sig-beer-west occurs on the third Saturday of the month. Any questions, comments, suggestions of things to do later on that evening, or new venue suggestions ... email the current sig-beer-west Instigator. The Instigator's Username is extasia. The Instigator's email address is *the Username* at *the Username* dot *org*. sig-beer-west FAQ 1. Q: Your announcement says "techies and their friends". How do I know if I'm a techie, or a friend of one? A: Well, actually, you don't have to be a techie to attend. You just have to be able to find the sig-beer-west sign at this month's event. That's it. Simple, huh? 2. Q: I'm not really a beer person. In fact I'm interested in hanging out, but not in drinking. Would I be welcome? A: Absolutely! The point is to hang out with fun, interesting folks. Please do join us. 3. Q: Is parking difficult in the city, like maybe I should factor this into my travel time? A: Yes. Note for March 2004: 21st Amendment is a fifteen minute walk from Montgomery BART. You may want to consider [10]BARTing and not worrying at all about parking. [10] http://www.bart.gov/ ______________________________________________________________________ sig-beer-west was started in February 2002 when a couple Washington, D.C. based systems administrators who moved to the San Francisco Bay area wanted to continue a [11]dc-sage tradition, sig-beer, which is described in dc-sage web space as: SIG-beer, as in "Special Interest Group - Beer" ala ACM, or as in "send the BEER signal to that process". The original SIG-beer gathering takes place in Washington DC, usually on the first Saturday night of the month. [11] http://www.dc-sage.org/ ______________________________________________________________________ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFAVgxiPh0M9c/OpdARAoaVAJ9JL1/g2wrF8azJ6gXm0hKaXTKNsACcCfvw m4fzLtH6aHHtVicUNOiJCkc= =rUm+ -----END PGP SIGNATURE----- From tonys at oreillynet.com Tue Mar 16 11:02:29 2004 From: tonys at oreillynet.com (Tony Stubblebine) Date: Mon Aug 2 21:33:38 2004 Subject: [oak perl] Regex Practices #1: separate lines? In-Reply-To: <200403152224.48514.george@metaart.org> References: <200403152224.48514.george@metaart.org> Message-ID: <40573325.2080709@oreillynet.com> Only if each line is commented. I have trouble reading if there's too much whitespace. George Woolley wrote: >Tony, > >When writing very simple regular expressions like > ^key= > :$ >do you recommend using several lines? > >Example: > if ( $line =~ m/ > ^ > key= > > /x ) { > # ... > } > >Example: > if ( $line !~ m/ > > : > $ > /x ) { > } > >George > >_______________________________________________ >Oakland mailing list >Oakland@mail.pm.org >http://mail.pm.org/mailman/listinfo/oakland > > From david at fetter.org Tue Mar 16 11:14:27 2004 From: david at fetter.org (David Fetter) Date: Mon Aug 2 21:33:39 2004 Subject: [oak perl] Regex Practices #1: separate lines? In-Reply-To: <200403152224.48514.george@metaart.org> References: <200403152224.48514.george@metaart.org> Message-ID: <20040316171427.GD18092@fetter.org> On Mon, Mar 15, 2004 at 10:24:48PM -0800, George Woolley wrote: > Tony, > > When writing very simple regular expressions like > ^key= > :$ > do you recommend using several lines? Hrm. I tend to keep my regexes simple enough that they fit on one line. Complex things are break-up-able into several regexes, at least IME. Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From george at metaart.org Tue Mar 16 21:08:17 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:39 2004 Subject: [oak perl] Fwd: Newsletter from O'Reilly UG Program, March 16 Message-ID: <200403161908.17922.george@metaart.org> ---------- Forwarded Message ---------- Subject: Newsletter from O'Reilly UG Program, March 16 Date: Tuesday 16 March 2004 4:49 pm From: Marsee Henon To: george@metaart.org ... ================================================================ O'Reilly News for User Group Members March 16, 2004 ================================================================ ---------------------------------------------------------------- Book News ---------------------------------------------------------------- -Hardcore Java -MCSE Designing Security for a Windows Server 2003 Network Exam 70-298 Study Guide & DVD Training System -MCSE Designing a Windows Server 2003 Active Directory and Network Infrastructure Exam 70-297 Study Guide & DVD Training System ---------------------------------------------------------------- Upcoming Events ---------------------------------------------------------------- -Robbie Allen, ("DNS on Windows Server 2003," "Active Directory"), Directory Experts Conference--March 21-24 -Dave Taylor ("Wicked Cool Shell Scripts," "Learning Unix for Mac OS X Panther"), TriState Oracle Users Group Author Event, Amarillo, TX--March 23 -CJ Rayhill, O'Reilly CIO, CATS Conference 2004, San Luis Obispo, CA--March 24-26 -Adam Trachtenberg ("PHP Cookbook"), PHP Quebec Conference--March 25-26 -Mac User Group Day at O'Reilly in Sebastopol, CA--April 24 ---------------------------------------------------------------- Conferences ---------------------------------------------------------------- -Enter to Win a Free Conference Pass ---------------------------------------------------------------- News ---------------------------------------------------------------- -End of Shutter Lag? The Contax SL300R T* Might Be the Sign of Good Things to Come -New Titles on Safari -Next-Generation File Sharing with Social Networks -Will Mono Become the Preferred Platform for Linux Development? -Homemade Embedded BSD Systems -Tapping RSS with Shell Scripts -Tell Us What You Think: The 2nd Mac DevCenter Survey -Setting Up a Virtual Private Network -Windows Server 2003 Add-Ons, Part 2 -BlackMamba: A Swing Case Study -Job Scheduling in Java -Graphical Composition in Avalon -O'Reilly Learning Lab's .NET Certificate Series ---------------------------------------------------------------- News From Your Peers ---------------------------------------------------------------- Check out the new O'Reilly User Group Wiki for the latest news ================================================ Book News ================================================ Did you know you can request a free book to review for your group? Ask your group leader for more information. For book review writing tips and suggestions, go to: http://ug.oreilly.com/bookreviews.html Don't forget, you can receive 20% off any O'Reilly, No Starch, Paraglyph, or Syngress book you purchase directly from O'Reilly. Just use code DSUG when ordering online or by phone 800-998-9938. http://www.oreilly.com/ ***Free ground shipping is available for online orders of at least $29.95 that go to a single U.S. address. This offer applies to U.S. delivery addresses in the 50 states and Puerto Rico. For more details, go to: http://www.oreilly.com/news/freeshipping_0703.html ---------------------------------------------------------------- New Releases ---------------------------------------------------------------- ***Hardcore Java Publisher: O'Reilly ISBN: 0596005687 "Hardcore Java" focuses on the little-touched but critical parts of the Java programming language that the expert programmers use. Learn about extremely powerful and useful programming techniques such as reflection, advanced data modeling, advanced GUI design, and advanced aspects of JDO, EJB, and XML-based web clients. This unique book reveals the true wizardry behind the complex and often mysterious Java environment. http://www.oreilly.com/catalog/hardcorejv/index.html Chapter 2, "The Final Story," is available free online: http://www.oreilly.com/catalog/hardcorejv/chapter/index.html ***MCSE Designing Security for a Windows Server 2003 Network Exam 70-298 Study Guide & DVD Training System Publisher: Syngress ISBN: 1932266550 http://www.oreilly.com/catalog/1932266550/ ***MCSE Designing a Windows Server 2003 Active Directory and Network Infrastructure Exam 70-297 Study Guide & DVD Training System Publisher: Syngress ISBN: 1-932266-54-2 http://www.oreilly.com/catalog/1932266542/ Both of these study guides are an integration of text, DVD-quality instructor led training, and web-based exam simulation and remediation. This system provides readers 100% coverage of the official Microsoft exam objectives plus test preparation software for the edge needed to pass the exam on the first try. ================================================ Upcoming Events ================================================ ***For more events, please see: http://events.oreilly.com/ ***Robbie Allen, ("DNS on Windows Server 2003," "Active Directory"), Directory Experts Conference--March 21-24 Robbie is a featured speaker at NetPro's spring event. Hyatt Regency, Reston, VA. http://netpro.com/events/decadspring04/index.cfm ***Dave Taylor ("Wicked Cool Shell Scripts," "Learning Unix for Mac OS X Panther"), TriState Oracle Users Group Author Event, Amarillo, TX--March 23 The TriState Oracle Users Group welcomes author Dave Taylor of Intuitive Systems. Dave has promised a fun and entertaining talk and will bring several of his top-selling books. This event is open to the public; please RSVP to April Wells at AWells@csedge.com. http://groups.yahoo.com/group/TSOUG/ ***CJ Rayhill, O'Reilly CIO, CATS Conference 2004, San Luis Obispo, CA--March 24-26 Besides being O'Reilly's CIO, CJ is also the General Manager of our new Education Division. She will be discussing the connection between the open source movement and education at the seventh annual Community of Academic Technology Staff Conference. Cal Poly San Luis Obispo, San Luis Obispo, CA http://cats.cdl.edu/conf2004/ ***Adam Trachtenberg ("PHP Cookbook"), PHP Quebec Conference--March 25-26 Adam presents a session on "Web Services in PHP" at this bilingual event. Montreal, Quebec, Canada http://conf.phpquebec.org/main.php/en/conf2004/main ***Mac User Group Day at O'Reilly in Sebastopol, CA--April 24 Join O'Reilly and NCMUG for a special Mac User Group Day in Sebastopol, California on Saturday, April 24 from 2-6pm. Speakers include Derrick Story ("Digital Photography Pocket Guide, 2nd Edition," "iPhoto 2: The Missing Manual"), Chris Stone ("Mac OS X Panther in a Nutshell"), Tom Negrino & Dori Smith ("Mac OS X Unwired"), and Scott Fullam ("Hardware Hacking Projects for Geeks"). For more information and a complete schedule of events, go to: http://ug.oreilly.com/banners/macugday_hi_res.pdf Please RSVP to let us know you will be attending at mugevent@oreilly.com. Mac User Group Day 2:00pm-6:00pm, Saturday, April 24 O'Reilly 1005 Gravenstein Hwy North Sebastopol, CA 95472 800-998-9938 Ext. 7103 For directions, go to: http://www.oreilly.com/oreilly/seb_directions.html The 58th Annual Sebastopol Apple Blossom Festival will be also be happening. Come to Sebastopol early to watch the parade downtown. It starts at 10am and ends by noon, followed by a festival in Ives Park. For more info, go to: http://www.sebastopolappleblossom.org/ ================================================ Conference News ================================================ ***Enter to Win a Free Conference Pass Join our mailing list to receive the latest information on all of the O'Reilly Conferences. You'll be automatically entered to win one free conference pass (good for one year). Make your plans now for this year's O'Reilly Open Source Convention (oscon), July 23-26 in Portland, Oregon. http://www.oreillynet.com/cs/elists/query/q/725 ================================================ News From O'Reilly & Beyond ================================================ --------------------- General News --------------------- ***End of Shutter Lag? The Contax SL300R T* Might Be the Sign of Good Things to Come Kyocera's RTUNE technology provides amazing performance in a digital camera that fits easily in your shirt pocket. Is this the beginning of the end for shutter lag? Derrick Story examines the Contax SL300R T* and shows you how the bar has been raised for pocket digicams. http://www.macdevcenter.com/pub/a/mac/2004/03/09/contax.html ***New Titles on Safari Search, annotate, and read your favorite O'Reilly books on the O'Reilly Network Safari Bookshelf. New titles include: "Windows XP Pro: The Missing Manual;" "Oracle Essentials: Oracle Database 10g, 3rd Edition"; "Squid: The Definitive Guide"; "Java Examples in a Nutshell, 3rd Edition"; "Security Warrior"; "Java Servlet & JSP Cookbook"; and ".NET Windows Forms in a Nutshell." If you haven't gone on Safari yet, get a free trial. https://secure.safaribooksonline.com/promo.asp?code=ORA14&portal=oreilly&CMP= BAC-TP2974244892 ***Next-Generation File Sharing with Social Networks At the recent O'Reilly Emerging Technology Conference in San Diego, CA, Robert Kaye lead a talk on "Next-Generation File Sharing with Social Software." For those who were able to attend, this essay builds upon that session. And if you missed the talk altogether, you can now get up to speed. http://www.openp2p.com/pub/a/p2p/2004/03/05/file_share.html --------------------- Open Source --------------------- ***Will Mono Become the Preferred Platform for Linux Development? Miguel de Icaza recently led a two-day meeting that brought together developers and early adopters of the Mono project, an open source effort to create a free implementation of the .NET Development Framework. Edd Dumbill attended the gathering and reports on how Mono could become the first-choice platform for Linux software development. http://www.onlamp.com/pub/a/onlamp/2004/03/11/mono.html ***Homemade Embedded BSD Systems BSD runs nicely on older PCs, but they can be noisy and time-consuming to set up. Worse yet, the hardware may be at the end of its life. Is there a better alternative to dedicated (and closed) hardware devices? Michael Lucas demonstrates using BSD on a low-power, low-fuss Soekris box. http://www.onlamp.com/pub/a/bsd/2004/03/11/Big_Scary_Daemons.html --------------------- Mac --------------------- ***Tapping RSS with Shell Scripts Here's how to write a shell script that watches the news from Slashdot.org. After applying the code in this article by Dave Taylor, coauthor of "Learning Unix for Mac OS X Panther," all you'll have to do is launch the Terminal to see the latest Slash headlines. http://www.macdevcenter.com/pub/a/mac/2004/03/12/rss_scripting.html ***Tell Us What You Think: The 2nd Mac DevCenter Survey We're asking Mac DevCenter readers to participate in our second online survey. We've sweetened the pot with a chance to win books. http://www.macdevcenter.com/pub/a/mac/2004/03/09/survey.html --------------------- Windows --------------------- ***Setting Up a Virtual Private Network What to do if you want to securely access your network when you're out of the office? The quickest and safest way is to set up a VPN. Wei-Meng Lee shows you how. http://www.windowsdevcenter.com/pub/a/windows/2004/03/09/vpn_connection.html ***Windows Server 2003 Add-Ons, Part 2 Looking to power up Windows Server 2003? It's only a year old, but already there are dozens of ways you can increase its effectiveness and make it easier to manage. In this second article of a multi-part series, Mitch Tulloch shows you how to get the most out of Windows Server 2003 with three more feature packs. http://www.windowsdevcenter.com/pub/a/windows/2004/03/09/ws_addons2.html --------------------- Java --------------------- ***BlackMamba: A Swing Case Study It's one thing to learn the bits and pieces of a Swing GUI--how to create a model and wire it up to a JTable or JTree. It's quite another to think through and develop a full-blown application. Ashwin Jayaprakash uses an email client, BlackMamba, to show how the pieces of a Swing application fit together. http://www.onjava.com/pub/a/onjava/2004/03/10/blackmamba.html ***Job Scheduling in Java Scheduling recurring execution of a piece of code is a common task for Java developers. The Timer class has its place, but as Dejan Bosanac explains, developers with more sophisticated requirements might want to check out the Quartz API. http://www.onjava.com/pub/a/onjava/2004/03/10/quartz.html --------------------- .NET --------------------- ***Graphical Composition in Avalon Longhorn introduces significant new graphics technology, code-named "Avalon." Avalon renders an application's visual elements onto the screen using a much more sophisticated approach than Windows has previously used. In this article, Ian Griffiths show how this new graphical composition model solves various limitations of Win32, what new user interface design techniques this enables, and what it means to developers. http://www.ondotnet.com/pub/a/dotnet/2004/03/08/winfs_detail_3.html ***O'Reilly Learning Lab's .NET Certificate Series Learn .NET programming skills and earn a .NET Programming Certificate from the University of Illinois Office of Continuing Education. The .NET Certificate Series is comprised of three courses that give you the foundation you need to do .NET programming well. The courses are: Learn XML; Learn Object-Oriented Programming Using Java; and Learn C#. Limited time offer: Enroll today in all three courses and save $895. http://oreilly.useractive.com/courses/dotnet.php3 ================================================ News From Your Peers ================================================ ***Check out the new O'Reilly User Group Wiki for the latest news You can look for a meeting, user group, or post information any time you want. http://wiki.oreillynet.com/usergroups/view?HomePage Until next time-- Marsee ------------------------------------------------------- From george at metaart.org Fri Mar 19 17:37:16 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:39 2004 Subject: [oak perl] Thanks and request for Internet Gripes Message-ID: <200403191537.16822.george@metaart.org> Marsee has sent thanks again for Annoyances past you have sent her. Now she's requesting Internet Annoyances. See snipped forwarded message from her below my "signature". George ---------- Forwarded Message ---------- Subject: Internet Annoyances Needed for New Book Date: Friday 19 March 2004 10:30 am ... we have yet another book in the wings--this one focusing on Internet annoyances. Some of the annoying areas: Email (and spam), connecting to the Net (via dialup, DSL, cable, configuration and all that), wireless annoyances (from WiFi hassles to hotspots to fiddling with WEP), web sites (namely creating, hosting, and maintaining your own web site), browsing and browsers (Internet Explorer, Netscape, and others), AOL, instant messaging, using search sites, security annoyances, and of course, shopping and auctions. Got Internet gripes/annoyances/kvetches? Send 'em our way by having your members email me (marsee@oreilly.com) with "Internet Annoyance" in the subject line and we'll put our author on the job. ... --Marsee *** An example: Pictureless Pages Predicament THE ANNOYANCE: There are some great pictures available on the Web, but certain pictures don't appear on web pages I visit. Instead I see a red X or a funny little icon where the picture is supposed to be. THE FIX: Several circumstances can keep pictures from appearing: * There's a logjam at the web server or somewhere along the miles of wires between the web server and your browser. Try refreshing the page (press F5 or click the Refresh button on the toolbar). But you probably already tried that. * Something's wrong with the web server. The picture might not be on the server, or the programmer who created the web page might have put in the wrong path to the picture. * Internet Explorer may be configured so that it doesn't show pictures, a common setup for those with slow dialup connections who don't want to waste time downloading pictures. (If this option is set, you can selectively display pictures by right-clicking the X or the icon and choosing Show Picture.) To undo this setting in Internet Explorer, choose Tools-->Internet Options. Click the Advanced tab, and in the Multimedia section, check the Show Pictures box to make your pictures appear. * An invalid value in the Windows Registry is preventing pictures from appearing. It's an easy fix, even for those who are squeamish about poking around in the Registry. (Before you mess around with the Registry, back it up as per the instructions in the sidebar on page 47.) Select Start-->Run, type in regedit, and hit Enter. In Registry Editor, navigate to \HKEY_CLASSES_ROOT\.gif. In the right pane, click the Content Type item; its value should be image/gif. Then check \HKEY_CLASSES_ ROOT\.jpg; Content Type should be set to image/jpg or image/jpeg. For more information about this fix, see Microsoft Knowledge Base article 307239. From george at metaart.org Wed Mar 24 02:57:38 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:39 2004 Subject: [oak perl] Fwd: [pm_groups] YAPC::Australia::2004 Message-ID: <200403240057.38138.george@metaart.org> ---------- Forwarded Message ---------- Subject: [pm_groups] YAPC::Australia::2004 Date: Tuesday 23 March 2004 6:39 pm From: Scott Penrose To: pm_groups@pm.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Dudes. Can you point out to your groups that we have now announced YAPC::Australia::2004 YAPC::Australia::2004 is to be held on the 1st, 2nd and 3rd of December 2004 in Melbourne Australia at Monash University. You can find details and submit outlines http://yapc.dlist.com.au/ Thanks Scott - -- Scott Penrose VP in charge of Pancakes http://linux.dd.com.au/ scottp@dd.com.au Dismaimer: If you receive this email in error - please eat it immediately to prevent it from falling into the wrong hands. Please do not send me Word or PowerPoint attachments. See http://www.fsf.org/philosophy/no-word-attachments.html -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFAYPTjDCFCcmAm26YRApqbAJ9FO3TMHNhhWP7Gg8KsfdwQvrIOOwCggAlZ yFHoLomXAUwXh7EfR4lZoNE= =oz1F -----END PGP SIGNATURE----- _______________________________________________ pm_groups mailing list pm_groups@pm.org http://www.pm.org/mailman/listinfo/pm_groups ------------------------------------------------------- From alamozzz at yahoo.com Sun Mar 28 20:26:29 2004 From: alamozzz at yahoo.com (Adrien Lamothe) Date: Mon Aug 2 21:33:39 2004 Subject: [oak perl] Perl in Telco applications. Message-ID: <20040329022629.81054.qmail@web80809.mail.yahoo.com> I came across an interesting article in Open Enterprise Trends, about an Australian company that produces Perl tools for real-time telco applications. The URL is: www.oetrends.com/news.php?action=view_record&idnum=312 -- Adrien --------------------------------- Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/oakland/attachments/20040328/ceb187cd/attachment.htm From george at metaart.org Sun Mar 28 22:04:01 2004 From: george at metaart.org (George Woolley) Date: Mon Aug 2 21:33:39 2004 Subject: [oak perl] Perl in Telco applications. In-Reply-To: <20040329022629.81054.qmail@web80809.mail.yahoo.com> References: <20040329022629.81054.qmail@web80809.mail.yahoo.com> Message-ID: <200403282004.01936.george@metaart.org> Adrien, Thanks. RAEBNC. George On Sunday 28 March 2004 6:26 pm, Adrien Lamothe wrote: > I came across an interesting article in Open Enterprise Trends, about an > Australian company that produces Perl tools for real-time telco > applications. The URL is: > > www.oetrends.com/news.php?action=view_record&idnum=312 > > -- Adrien > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Finance Tax Center - File online. File on time. From robert-kuropkat at comcast.net Mon Mar 29 12:33:30 2004 From: robert-kuropkat at comcast.net (Robert Kuropkat) Date: Mon Aug 2 21:33:39 2004 Subject: [oak perl] Oct/Nov TPJ Message-ID: <200403291832.i2TIWad05635@mail.pm.org> Hey All, Anyone else here subscribe to TPJ? Somewhere between my home and work computer I managed to lose my October and November issues of TPJ. Anyone who has them and wouldn't mind sending me them, I would appreciate it. If you want proof I subscribe then I guess I can send you one I do have or something like that... Robert Kuropkat From applyonline at dice.com Wed Mar 31 00:23:36 2004 From: applyonline at dice.com (alamozzz@yahoo.com) Date: Mon Aug 2 21:33:39 2004 Subject: [oak perl] Check out this dice.com position: sk108PerlSol Message-ID: <7837648.1080714221981.JavaMail.verity@app2.gemini.dice.com> I found this great opportunity at Dice, and thought it might be helpful in your job search. http://seeker.dice.com/jobsearch/servlet/JobSearch?op=1002&dockey=xml/c/8/c8b891cb55d7f0b6825883273ef5efcb@activejobs0&source=3 ======== Came across this on DICE. Looks like something David Alban may be interested in. From blyman at iii.com Wed Mar 31 12:52:39 2004 From: blyman at iii.com (Belden Lyman) Date: Mon Aug 2 21:33:39 2004 Subject: [JOB] Re: [oak perl] Check out this dice.com position: sk108PerlSol In-Reply-To: <7837648.1080714221981.JavaMail.verity@app2.gemini.dice.com> References: <7837648.1080714221981.JavaMail.verity@app2.gemini.dice.com> Message-ID: <1080758761.18669.15.camel@ls104> On Tue, 2004-03-30 at 22:23, alamozzz@yahoo.com wrote: > I found this great opportunity at Dice, and thought it might be helpful in your job search. > http://seeker.dice.com/jobsearch/servlet/JobSearch?op=1002&dockey=xml/c/8/c8b891cb55d7f0b6825883273ef5efcb@activejobs0&source=3 > ======== > > Came across this on DICE. Looks like something David Alban may be interested in. Hi Adrien, Last I heard, David Alban had found a full-time job. (David, please stand up and take a bow.) For those that can't be bothered to click the link above (I couldn't), the job posted is a temp job working for http://www.taos.com for 3+ months in Sunnyvale (no telecommute). Advertised skills are "Perl scripting and Solaris/Linux". No pay rate is given. Belden ps - Adrien- your mail is identifying you as alamozzz@yahoo.com rather than 'Adrien Lamoth' Accident or design?