From LRW at clear.net.nz Wed Nov 1 15:48:34 2006 From: LRW at clear.net.nz (Lesley Walker) Date: Thu, 02 Nov 2006 12:48:34 +1300 Subject: [Wellington-pm] Accessing functions in modules Message-ID: <1162424914.1049.42.camel@localhost.localdomain> I'm sure this is covered by something in `man perlmod`, but doing that makes my brain hurt and I don't have time to teach myself how to understand it. I'm writing a script to do some SNMP stuff, and I'm using Net::SNMP, which contains (among other things I'm also using) a function oid_lex_sort(). What do I have to do so that I can call it by oid_lex_sort() or &oid_lex_sort() rather than the more cumbersome Net::SNMP::oid_lex_sort()? My use statement is just "use Net::SNMP" if that matters. Lesley W. From matt at catalyst.net.nz Wed Nov 1 16:12:13 2006 From: matt at catalyst.net.nz (Matthew Hunt) Date: Thu, 02 Nov 2006 13:12:13 +1300 Subject: [Wellington-pm] Accessing functions in modules In-Reply-To: <1162424914.1049.42.camel@localhost.localdomain> References: <1162424914.1049.42.camel@localhost.localdomain> Message-ID: <1162426333.8592.38.camel@euterpe.wgtn.cat-it.co.nz> On Thu, 2006-11-02 at 12:48 +1300, Lesley Walker wrote: > I'm sure this is covered by something in `man perlmod`, but doing that > makes my brain hurt and I don't have time to teach myself how to > understand it. > > I'm writing a script to do some SNMP stuff, and I'm using Net::SNMP, > which contains (among other things I'm also using) a function > oid_lex_sort(). > > What do I have to do so that I can call it by oid_lex_sort() or > &oid_lex_sort() rather than the more cumbersome > Net::SNMP::oid_lex_sort()? > > My use statement is just "use Net::SNMP" if that matters. It does, kindof (there's other ways to import the functions after you've done "use" without doing so, but I'm not going to go into them). One way of importing just that funciton to your namespace is: use Net::SNMP qw(&oid_lex_sort); Look for EXPORTS in the pod for the module and you'll see what else you could have imported. That function could also be imported by: use Net::SNMP qw(:snmp); or, of course: use Net::SNMP qw(:ALL); Matt. -- Matthew Hunt Catalyst IT Limited, PO Box 11053, Wellington 6142 Phone: +64 (4) 499 2267, Direct: +64 (4) 803 2216, Fax: +64 (4) 499 5596 http://catalyst.net.nz/ From ewen at naos.co.nz Wed Nov 1 16:44:26 2006 From: ewen at naos.co.nz (Ewen McNeill) Date: Thu, 02 Nov 2006 13:44:26 +1300 Subject: [Wellington-pm] Accessing functions in modules In-Reply-To: Message from Lesley Walker of "Thu, 02 Nov 2006 12:48:34 +1300." <1162424914.1049.42.camel@localhost.localdomain> Message-ID: <20061102004426.562C5112D88@wat.la.naos.co.nz> In message <1162424914.1049.42.camel at localhost.localdomain>, Lesley Walker write s: >What do I have to do so that I can call it by oid_lex_sort() or >&oid_lex_sort() rather than the more cumbersome >Net::SNMP::oid_lex_sort()? use Net::SNMP qw(:snmp); to pick up that and some related functions, or just: use Net::SNMP qw(oid_lex_sort); if that's the only one you want. (The :snmp, etc, tags are described near the end of the Net::SNMP documentation.) Ewen From ewen at naos.co.nz Sun Nov 5 20:04:52 2006 From: ewen at naos.co.nz (Ewen McNeill) Date: Mon, 06 Nov 2006 17:04:52 +1300 Subject: [Wellington-pm] Rethrowing exceptions Message-ID: <20061106040452.D13B844834@wat.la.naos.co.nz> Hi, In perl you can (sort of) do exception handling by doing: eval { # some stuff die "It broke"; }; if ($@) { print "Oh dear, it didn't work, because: $@\n"; } However I can't find any obvious way of rethrowing an exception (as opposed to generating a new exception), so that it's possible to catch the exception, do some cleanup, and then propogate the exception to let something else do the cleanup. What I'm looking for is something equivilent to rethrowing the same exception object in Java, or an empty throw in C++. I'm particularly interested in being able to, eg, get the code reference/stack trace at the point something actually went wrong, rather than at the point that the exception is rethrown. Is this possible? Ewen From michael at diaspora.gen.nz Sun Nov 5 20:18:59 2006 From: michael at diaspora.gen.nz (michael at diaspora.gen.nz) Date: Mon, 06 Nov 2006 17:18:59 +1300 Subject: [Wellington-pm] Rethrowing exceptions In-Reply-To: Your message of "Mon, 06 Nov 2006 17:04:52 +1300." <20061106040452.D13B844834@wat.la.naos.co.nz> Message-ID: >What I'm looking for is something equivilent to rethrowing the same >exception object in Java, or an empty throw in C++. I'm particularly >interested in being able to, eg, get the code reference/stack trace at >the point something actually went wrong, rather than at the point that >the exception is rethrown. I can't speak to fancy stack traces, and things, but this works for me: eval { eval { die "It broke"; }; if ($@) { print $@; die $@; } }; if ($@) { print $@; } Prints: It broke at t.pl line 2. It broke at t.pl line 2. So re-throwing is easy; the original exception was "re-thrown". Check out Grant's presentation from last month, specifically http://wellington.pm.org/archive/200610/exceptions/slide18.html and ff. -- michael. From daniel at rimspace.net Sun Nov 5 20:52:14 2006 From: daniel at rimspace.net (Daniel Pittman) Date: Mon, 06 Nov 2006 15:52:14 +1100 Subject: [Wellington-pm] Rethrowing exceptions In-Reply-To: (michael@diaspora.gen.nz's message of "Mon\, 06 Nov 2006 17\:18\:59 +1300") References: Message-ID: <87zmb5xjlt.fsf@rimspace.net> michael at diaspora.gen.nz writes: >>What I'm looking for is something equivilent to rethrowing the same >>exception object in Java, or an empty throw in C++. I'm particularly >>interested in being able to, eg, get the code reference/stack trace at >>the point something actually went wrong, rather than at the point that >>the exception is rethrown. > > I can't speak to fancy stack traces, and things, but this works for > me: man Carp use Carp; Regards, Daniel -- Digital Infrastructure Solutions -- making IT simple, stable and secure Phone: 0401 155 707 email: contact at digital-infrastructure.com.au http://digital-infrastructure.com.au/ From grant at mclean.net.nz Sun Nov 5 23:28:32 2006 From: grant at mclean.net.nz (Grant McLean) Date: Mon, 06 Nov 2006 20:28:32 +1300 Subject: [Wellington-pm] Rethrowing exceptions In-Reply-To: <20061106040452.D13B844834@wat.la.naos.co.nz> References: <20061106040452.D13B844834@wat.la.naos.co.nz> Message-ID: <1162798112.8371.22.camel@localhost.localdomain> On Mon, 2006-11-06 at 17:04 +1300, Ewen McNeill wrote: > Hi, > > In perl you can (sort of) do exception handling by doing: > > eval { > # some stuff > die "It broke"; > }; > > if ($@) { > print "Oh dear, it didn't work, because: $@\n"; > } > > However I can't find any obvious way of rethrowing an exception As Michael said, you re-throw an exception by saying: die $@; If you initially throw the exception by calling die like this ... die "too many squingles"; ... then if your string doesn't end with a newline, perl will append " at line .\n" to the string before storing it in $@. Consequently, if you re-throw the exception it will retain the filename and line number of where the exception originally occurred. If you want a stack trace rather than just a line number then Carp.pm (a core module) is the standard tool. You can either use 'confess' instead of die whenever you want a stack trace or you can enable 'verbose' mode and always use croak: use Carp qw(verbose croak); If you're testing whether an exception was something you can handle, then you probably want to use exception objects rather than passing a string to die and then later testing it with a regex. I can't say I've done that much myself, but Exception::Class seems to be an effective tool. The Error.pm module is an alternative tool for exception objects which offers some syntactic sugar in the form of try/catch blocks. Unfortunately, nesting them leads to memory leaks which kind of limits their usefulness. Cheers Grant From srdjan at catalyst.net.nz Mon Nov 6 12:31:25 2006 From: srdjan at catalyst.net.nz (Srdjan) Date: Tue, 07 Nov 2006 09:31:25 +1300 Subject: [Wellington-pm] Rethrowing exceptions In-Reply-To: <1162798112.8371.22.camel@localhost.localdomain> References: <20061106040452.D13B844834@wat.la.naos.co.nz> <1162798112.8371.22.camel@localhost.localdomain> Message-ID: <454F9B9D.3080706@catalyst.net.nz> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I will only second this by a more elaborate example: eval { # some stuff die MyExceptionObjectThatCapturesStackAndGodKnowsWhatElse->new("It broke"); }; if ($@) { my $reason = ref($@) ? $@->message() : $@; print "Oh dear, it didn't work, because: $reason\n"; die $@; } This way original stack trace is preserved. I don't know of any more elegant way. Srdjan Grant McLean wrote: > On Mon, 2006-11-06 at 17:04 +1300, Ewen McNeill wrote: >> Hi, >> >> In perl you can (sort of) do exception handling by doing: >> >> eval { >> # some stuff >> die "It broke"; >> }; >> >> if ($@) { >> print "Oh dear, it didn't work, because: $@\n"; >> } >> >> However I can't find any obvious way of rethrowing an exception > > As Michael said, you re-throw an exception by saying: > > die $@; > > > If you initially throw the exception by calling die like this ... > > die "too many squingles"; > > ... then if your string doesn't end with a newline, perl will append > " at line .\n" to the string before storing it in $@. > Consequently, if you re-throw the exception it will retain the filename > and line number of where the exception originally occurred. > > If you want a stack trace rather than just a line number then Carp.pm (a > core module) is the standard tool. You can either use 'confess' instead > of die whenever you want a stack trace or you can enable 'verbose' mode > and always use croak: > > use Carp qw(verbose croak); > > > If you're testing whether an exception was something you can handle, > then you probably want to use exception objects rather than passing a > string to die and then later testing it with a regex. I can't say I've > done that much myself, but Exception::Class seems to be an effective > tool. > > The Error.pm module is an alternative tool for exception objects which > offers some syntactic sugar in the form of try/catch blocks. > Unfortunately, nesting them leads to memory leaks which kind of limits > their usefulness. > > Cheers > Grant > > _______________________________________________ > Wellington-pm mailing list > Wellington-pm at pm.org > http://mail.pm.org/mailman/listinfo/wellington-pm > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFT5ucZtcHxCitRpgRAqEcAKCPK2NkoqHX4ZCnqrlLaVZRx3DqGgCggOCD K4f81xvEHYsS9/bmhlOnUbs= =itC+ -----END PGP SIGNATURE----- From dan.horne at redbone.co.nz Mon Nov 6 12:39:37 2006 From: dan.horne at redbone.co.nz (Dan Horne) Date: Tue, 7 Nov 2006 09:39:37 +1300 Subject: [Wellington-pm] Rethrowing exceptions In-Reply-To: <454F9B9D.3080706@catalyst.net.nz> Message-ID: <027c01c701e3$ad8ef660$6603a8c0@rdbxp02> Increasingly, I've been using Exception::Class in my apps because it allows me to declare and throw named exceptions. I'm not typically interested in the stack trace, but it does have a class method called Trace which may be useful. Dan > -----Original Message----- > From: wellington-pm-bounces+dan.horne=redbone.co.nz at pm.org > [mailto:wellington-pm-bounces+dan.horne=redbone.co.nz at pm.org] > On Behalf Of Srdjan > Sent: Tuesday, 7 November 2006 9:31 a.m. > To: Wellington Perl Mongers (Perl user group) > Subject: Re: [Wellington-pm] Rethrowing exceptions > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I will only second this by a more elaborate example: > > eval { > # some stuff > die > MyExceptionObjectThatCapturesStackAndGodKnowsWhatElse->new("It > broke"); }; > > if ($@) { > my $reason = ref($@) ? $@->message() : $@; > print "Oh dear, it didn't work, because: $reason\n"; > die $@; > } > > This way original stack trace is preserved. I don't know of > any more elegant way. > > Srdjan > > Grant McLean wrote: > > On Mon, 2006-11-06 at 17:04 +1300, Ewen McNeill wrote: > >> Hi, > >> > >> In perl you can (sort of) do exception handling by doing: > >> > >> eval { > >> # some stuff > >> die "It broke"; > >> }; > >> > >> if ($@) { > >> print "Oh dear, it didn't work, because: $@\n"; } > >> > >> However I can't find any obvious way of rethrowing an exception > > > > As Michael said, you re-throw an exception by saying: > > > > die $@; > > > > > > If you initially throw the exception by calling die like this ... > > > > die "too many squingles"; > > > > ... then if your string doesn't end with a newline, perl > will append " > > at line .\n" to the string before > storing it in $@. > > Consequently, if you re-throw the exception it will retain the > > filename and line number of where the exception originally occurred. > > > > If you want a stack trace rather than just a line number > then Carp.pm > > (a core module) is the standard tool. You can either use 'confess' > > instead of die whenever you want a stack trace or you can enable > > 'verbose' mode and always use croak: > > > > use Carp qw(verbose croak); > > > > > > If you're testing whether an exception was something you > can handle, > > then you probably want to use exception objects rather than > passing a > > string to die and then later testing it with a regex. I can't say > > I've done that much myself, but Exception::Class seems to be an > > effective tool. > > > > The Error.pm module is an alternative tool for exception > objects which > > offers some syntactic sugar in the form of try/catch blocks. > > Unfortunately, nesting them leads to memory leaks which > kind of limits > > their usefulness. > > > > Cheers > > Grant > > > > _______________________________________________ > > Wellington-pm mailing list > > Wellington-pm at pm.org > > http://mail.pm.org/mailman/listinfo/wellington-pm > > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.5 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFFT5ucZtcHxCitRpgRAqEcAKCPK2NkoqHX4ZCnqrlLaVZRx3DqGgCggOCD > K4f81xvEHYsS9/bmhlOnUbs= > =itC+ > -----END PGP SIGNATURE----- > _______________________________________________ > Wellington-pm mailing list > Wellington-pm at pm.org > http://mail.pm.org/mailman/listinfo/wellington-pm > From grant at mclean.net.nz Mon Nov 6 15:37:35 2006 From: grant at mclean.net.nz (Grant McLean) Date: Tue, 07 Nov 2006 12:37:35 +1300 Subject: [Wellington-pm] Meeting next Tuesday Message-ID: <1162856255.15977.4.camel@putnam.wgtn.cat-it.co.nz> Hi Mongers The next meeting of Wellington Perl Mongers is Tuesday November 14th (that's next week). http://wellington.pm.org/ We have two speakers lined up: * Sam Vilain is going to give us a preview of his OSDC talk comparing approaches to object-relational mapping. * Matt Hunt will be introducing us to LaTeX (through which you can produce lovely PDF documents) Meeting is at the usual time and place: 6:00pm Tuesday 14 November 2006 Level 2, Eagle Technology House 150 Willis Street Wellington Regards Grant From ewen at naos.co.nz Mon Nov 6 16:44:03 2006 From: ewen at naos.co.nz (Ewen McNeill) Date: Tue, 07 Nov 2006 13:44:03 +1300 Subject: [Wellington-pm] Rethrowing exceptions In-Reply-To: Message from michael@diaspora.gen.nz of "Mon, 06 Nov 2006 17:18:59 +1300." Message-ID: <20061107004403.A38FB112D88@wat.la.naos.co.nz> In message , michael at diaspora.gen.nz w rites: >>What I'm looking for is something equivilent to rethrowing the same >>exception object in Java, or an empty throw in C++. [....] > >I can't speak to fancy stack traces, and things, but this works for me:[...] > if ($@) { print $@; die $@; That does work for preserving the message and file/line number (providing you don't manage to lose the contents of $@ in your cleanup code -- which turned out to be my initial problem; "local $@" to the rescue there). Unfortunately it seems to confuse Devel::StackTrace (as used by Catalyst::Plugin::StackTrace), which means that the stack trace is around the second die, not the first one. (From the bit of Devel::StackTrace I read, this is due to it tracing the stack in a local DIE handler, using caller(), presumably because Perl "exceptions" don't include reliable stack information by default.) Carp or throwing special exceptions doesn't seem to solve my problem since I'm wanting to preserve an exception that I'm not generating, and interact with stack traceback code which I didn't write (and of which I don't want to maintain a custom version). The precise context is that I'm writing a Catalyst plugin which intercepts database action and does some actions of its own, and if the original database action fails then I want to cleanup my own actions before allowing the control flow to return. In message <1162798112.8371.22.camel at localhost.localdomain>, Grant McLean writes: >If you're testing whether an exception was something you can handle, >then you probably want to use exception objects rather than passing a >string to die and then later testing it with a regex. I can't say I've >done that much myself, but Exception::Class seems to be an effective >tool. As it happens I don't care what went wrong, only the binary situation "all went well"/"something went wrong". I just want to be able to catch the exception, do some cleanup, and then propogate the exception for further handling. Languages with "real" exceptions (Java, C++, etc) support this. Perl (5)'s exceptions seem to be a little too much of an afterthought to support this generically. So the answer appears to be that there's no generic way to rethrow an exception that was caught "as if" it were the continuing propogation of the original exception. But that if you control all the code you can do something which will simulate this. Thanks for the suggestions. I think I'll just live with the broken stack traceback. Ewen From jarich at perltraining.com.au Thu Nov 9 17:42:43 2006 From: jarich at perltraining.com.au (jarich at perltraining.com.au) Date: Fri, 10 Nov 2006 12:42:43 +1100 (EST) Subject: [Wellington-pm] OSDC 2006's tutorials Message-ID: <20061110014243.A11B4A8246@teddybear.perltraining.com.au> Time is running out to register for tutorials at the Open Source Developers' Conference 2006 tutorial program: http://www.osdc.com.au/registration/index.html The tutorials run on the 5th December, followed by the technical program on the 6th - 8th December. Most tutorials include printed reference material. Our tutorial program is included below: Room 1 Room 2 9:00am Cascading Style Sheets Open Source Python GIS Hacks 12:30pm Lunch Lunch 1:30pm Test Web Apps with Perl Drupal Tutorial 3:00pm Afternoon tea Afternoon tea 3:30pm Intro to Perl Template::Toolkit Large Scale Web Apps A morning tea break will occur roughly half way through the the 9am - 12:30pm tutorials. For more information on what each tutorial covers, please visit: http://www.osdc.com.au/papers/tutorials.html Prices and information on how to register can be found at: http://www.osdc.com.au/registration/index.html You can help us make this conference be the best developers' conference this year just by turning up and participating! We look forward to sharing this great conference with you. If your business would like to benefit from exposure to many of Australia's best open source developers then perhaps you should consider sponsorship. We have a wide range of sponsorship options, to find out more information please visit: http://www.osdc.com.au/sponsors/index.html Jacinta Richardson OSDC Publicity Officer From grant at mclean.net.nz Mon Nov 13 12:23:51 2006 From: grant at mclean.net.nz (Grant McLean) Date: Tue, 14 Nov 2006 09:23:51 +1300 Subject: [Wellington-pm] Meeting Tonight Message-ID: <1163449432.17895.1.camel@putnam.wgtn.cat-it.co.nz> Hi Mongers The November meeting of Wellington Perl Mongers is tonight. http://wellington.pm.org/ We have two speakers lined up: * Sam Vilain is going to give us a preview of his OSDC talk comparing approaches to object-relational mapping. * Matt Hunt will be introducing us to LaTeX (through which you can produce lovely PDF documents) Meeting is at the usual time and place: 6:00pm Tuesday 14 November 2006 Level 2, Eagle Technology House 150 Willis Street Wellington Regards Grant From sam at vilain.net Mon Nov 13 20:37:37 2006 From: sam at vilain.net (Sam Vilain) Date: Tue, 14 Nov 2006 17:37:37 +1300 Subject: [Wellington-pm] im in ur insid0ut 0bjex mut1n ur attr1but3s Message-ID: <45594811.6050008@vilain.net> package Ur::Base; use Class::InsideOut qw( public private register id ); use Carp; public d00dz => my %d00dz; sub new { my $class = shift; my $self = \( my $scalar ); # anonymous scalar bless $self, $class; register( shift ); $d00dz{ id $self } = "alive"; $self; } sub check { my $self = shift; return "my d00dz are $d00dz{ id $self }"; } *d00dz = sub { my $self = shift; my $are = shift; croak "ur not allowed" if $are ne "alive"; $d00dz{ id $self } = $are; }; package Im; $your_base = Ur::Base->new(); eval { $your_base->d00dz("dead") }; print "can't change via front door\n" if $@; print $your_base->check,"\n"; require PadWalker; my $pwned = PadWalker::peek_sub($your_base->can("d00dz"))->{'%d00dz'}; for ( keys %$pwned ) { $pwned->{$_} = "dead"; } print $your_base->check,"\n"; From grant at mclean.net.nz Wed Nov 15 01:36:06 2006 From: grant at mclean.net.nz (Grant McLean) Date: Wed, 15 Nov 2006 22:36:06 +1300 Subject: [Wellington-pm] Roundup of Tuesday night's meeting Message-ID: <1163583366.8017.38.camel@localhost.localdomain> Hi Mongers Thanks to everyone for another fun and informative meeting on Tuesday. I'm sure Sam is still keen to hear suggestions on how to fit more into his talk and make it shorter at the same time. Matt would also be delighted to hear that some of you have been tempted to give LaTeX a try. The slides from the two talks are up on the web site now: http://wellington.pm.org/archive/ As discussed, the last meeting of the year will be on Tuesday December 12th and a quiz night is planned. This will be a fun/social event rather than a serious competition. Teams will be assembled at random on the night and there's a possibility that one or two of the questions will have a Perl theme. Cheers Grant From grant at mclean.net.nz Wed Nov 15 23:30:00 2006 From: grant at mclean.net.nz (Grant McLean) Date: Thu, 16 Nov 2006 20:30:00 +1300 Subject: [Wellington-pm] [Fwd: Newsletter from O'Reilly UG Program, November 10] Message-ID: <1163662200.5429.1.camel@localhost.localdomain> -------- Forwarded Message -------- > From: Marsee Henon > Subject: Newsletter from O'Reilly UG Program, November 10 > Date: Fri, 10 Nov 2006 10:42:39 -0800 > > ================================================================ > O'Reilly News for User Group Members > November 10, 2006 > ================================================================ > ---------------------------------------------------------------- > New Releases > ---------------------------------------------------------------- > -40 Digital Photo Retouching Techniques with Photoshop Elements > -40 Digital Photography Techniques, 3rd Edition > -Automating InDesign with Regular Expressions > -A Grammar of Game Play > -The Book of Python > -Build Your Own Ruby on Rails Web Application > -Configuring Juniper Networks NetScreen & SSG Firewalls > -CRAFT: Volume 01 > -CSS: The Definitive Guide, Third Edition > -Essential CVS, Second Edition > -Fast Guide to Propellerhead Reason, Third Edition > -FISMA Certification & Accreditation Handbook > -Google Talking > -How to Build an RSS 2.0 Feed (PDF) > -Information Architecture for the World Wide Web, Third Edition > -Inside the Machine > -iPod: The Missing Manual, Fifth Edition > -Just Right Software Planning & Estimation > -Kismet Hacking > -Learning MySQL > -LINQ: The Future of Data Access in C# 3.0 (PDF) > -Mastering Landscape Photography > -MySQL Cookbook, Second Edition > -Network Monitoring with Nagios (PDF) > -Network Security Assessment > -Network Security Hacks > -O'Reilly Radar Web 2.0 Report > -Rails Deployment > -Rails for Java Developers > -Saving Money and Time with Virtual Server (PDF) > -Scanning Negatives and Slides > -SQL Hacks > -Web Scripting Little Black Book > -Windows Admin Programming with Visual C# 2005 Little Black Book > -MAKE & CRAFT Magazine Subscriptions > ---------------------------------------------------------------- > Upcoming Events > ---------------------------------------------------------------- > -Julieanne Kost ("Window Seat"), The May Gallery, St. Louis, MO > -Julia Wilkinson ("The eBay Price Guide"),29th Annual National Press > Club Book Fair, Washington, D.C--November 15 > -Visit O'Reilly at OpenCON 2006, Venice, Italy--December 2-3 > -Stephen Johnson ("Stephen Johnson on Digital Photography"), > Professional Image Editing Workshop, Pacifica, CA--December 2-5 > -O'Reilly Digital Media Authors at Book Passage, > Corte Madera, CA--January 7 > -Julieanne Kost ("Window Seat") Project: Photoshop Lightroom > School Tour > -Peter Krogh ("The DAM Book") ASMP/It's Your Business Event Series > -Eddie Tapp ("Photoshop Workflow Setups") Pro Tips Tour > ---------------------------------------------------------------- > Conference News > ---------------------------------------------------------------- > -Registration is Open for the 2007 Emerging Telephony Conference > -Speak at RailsConf > ---------------------------------------------------------------- > News > ---------------------------------------------------------------- > -You Choose: PDF or Print--More O'Reilly Titles Available in PDF > -Web 2.0 Summit Media Coverage > -Call Yourself a Programmer? > -User Group Members Receive a Special 30% Discount on > O'Reilly Learning Courses > -Work for O'Reilly > -Getting Started with WSGI > -Open Tools for MySQL Administrators > -Developing High Performance Asynchronous IO Applications > -Inside Aperture--Community for Serious Photographers > -Top Ten Aperture Features > -Winners of the Photoshop Cook-Off Contest announced at PhotoPlus > Expo 2006 > -Making a Smooth Move from .Mac to Google > -Text Tricks and More Text Tricks > -Creating Visual Studio Project Templates > -Top 10 Tips for Using Windows PowerShell > -Advanced Java Content Repository API > -Scaling Enterprise Java on 64-bit Multi-Core X86-Based Servers > -Demystifying LDAP Data > -OpenBSD 4.0: Pufferix's Adventures > -Ken Milburn Unplugged > -Deke McClelland on Software > -MAKE Podcast: Colin Berry reads Spinout > -Django Jumpstart: Build a To-Do List in 30 Minutes > -Bullet Proof HTML: 37 Steps to Perfect Markup > --------------------------------------------------------------- > New Releases--Books, PDFs, and Rough Cuts > ---------------------------------------------------------------- > Get 35% off books from O'Reilly, No Starch, Paraglyph, PC Publishing, > Pragmatic Bookshelf, SitePoint, Syngress, or YoungJin products you > purchase directly from O'Reilly. > > Just use code DSUG when ordering online or by phone 800-998-9938. > > > Free ground shipping on orders of $29.95 or more. > For more details, go to: > > > 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: > > > > ***40 Digital Photo Retouching Techniques with Photoshop Elements > Publisher: Young Jin > ISBN: 8931433700 > This easy to follow, full color guide shows all digital photographers > how to make their photos look their best with dozens of well-organized, > hands-on techniques. Readers learn how to change or replace a color, > enhance faces, fix burred images, correct poor exposures, create a slide > show and more. > > > > ***40 Digital Photography Techniques, 3rd Edition > Publisher: Young Jin > ISBN: 8931433697 > Digital Photography has truly reached the masses, and with this > friendly, full-color guide new users can immediately start having fun > with their digital cameras. It provides dozens of tips for taking better > pictures and getting creative with digital photography at a remarkably > affordable price. > > > > ***Automating InDesign with Regular Expressions > Publisher: O'Reilly > ISBN: 0596529376 > If you need to make automated changes to InDesign documents beyond what > basic search and replace can handle, you need regular expressions, and a > bit of scripting to make them work. This Short Cut explains both how to > write regular expressions, so you can find and replace the right things, > and how to use them in InDesign specifically. > > > > ***A Grammar of Game Play > Publisher: Paraglyph Press > ISBN: 1933097159 > In this sequel to his bestselling and award-winning book, master game > designer Raph Koster now takes on the inner workings of how games are > expertly designed by professionals. Using the latest thinking from game > studies as well as years of experience, games are broken down and > revealed as models of reality. > > > > ***The Book of Python > Publisher: No Starch Press > ISBN: 1593271034 > "The Book of Python" begins with a discussion of Python's programming > environment, then moves on to more advanced topics, including object > oriented programming, interacting with operating systems, creating GUIs > and database interfaces, network programming, XML, web programming, and > much more. > > > > ***Build Your Own Ruby on Rails Web Application > Publisher: SitePoint > ISBN: 0975841955 > This practical hands-on guide for first-time Ruby on Rails programmers > will show you exact how you get started, from installing the required > software on your computer to the intriciacies of Ruby syntax. > > > > ***Configuring Juniper Networks NetScreen & SSG Firewalls > Publisher: Syngress > ISBN: 1597491187 > Configuring Juniper Networks NetScreen & SSG Firewalls is the only > complete reference to this family of products. It covers all of the > newly released features of the product line as highlighted by Juniper > Networks, including Deep Inspection, Integrated Intrusion Prevention, > Centralized, policy-based management, Virtualization, Built-in high > availability and Rapid Deployment. > > > > ***CRAFT: Volume 01 > Publisher: O'Reilly > ISBN: 0596529287 > "Craft" is the first project-based magazine dedicated to the renaissance > that is occurring within the world of crafts. Volume 01, the premier > issue, features 23 projects with a twist! Make a programmable LED shirt, > turn dud shoes into great knitted boots, felt an iPod cocoon, embroider > a skateboard, and much more. > > > > ***CSS: The Definitive Guide, Third Edition > Publisher: O'Reilly > ISBN: 0596527330 > Updated to cover Internet Explorer 7, Microsoft's vastly improved > browser, this new edition includes content on positioning, lists and > generated content, table layout, user interface, paged media, and more. > > > > ***Essential CVS, Second Edition > Publisher: O'Reilly > ISBN: 0596527039 > This easy-to-follow reference shows a variety of professionals how to > use the Concurrent Versions System (CVS), the open source tool that lets > you manage versions of anything stored in files. > > > > ***Fast Guide to Propellerhead Reason, Third Edition > Publisher: PC Publishing > ISBN: 1870775279 > This in-depth guide, now in it's third edition, takes you through every > separate Reason device, including the analogue-style SubTractor synth, > the amazing Malstrom Graintrable synth, the two easy-to-use sample > players, the funky Dr:rex loop player, the vintage-style ReDrum drum > computer, the versatile Combinator, powerful MClass effects and the > quick and simple sequencer. > > > > ***FISMA Certification & Accreditation Handbook > Publisher: Syngress > ISBN: 1597491160 > All US federal agencies must certify and accredit all systems and > applications prior to putting them into operation. This is the only book > that instructs IT Managers to adhere to federally mandated certification > and accreditation requirements. > > > > ***Google Talking > Publisher: Syngress > ISBN: 1597490555 > Are you tired of running a dozen programs to stay in touch with the > people you care about? Are you looking for a way to call back home, > without spending an arm and a leg? Then you need to read Google Talking! > Discover the "Google way" to instant message your friends, with the > power of voice and text! Make calls from your computer to any phone in > the world! > > > > ***How to Build an RSS 2.0 Feed (PDF) > Publisher: O'Reilly > ISBN: 0596529384 > This Short Cut will give you the hands-on knowledge you need to build an > RSS 2.0 feed. Along the way you'll learn not only the mechanics of > building a feed, but industry-accepted best practices for creating feeds > that perform well in various situations. Are you ready? Roll up your > sleeves, crack open a text editor, and let's build some feeds. > > > > ***Information Architecture for the World Wide Web, Third Edition > Publisher: O'Reilly > ISBN: 0596527349 > This edition of the classic primer on web site design and navigation is > updated with recent examples, new scenarios, and new information on best > practices. > > > > ***Inside the Machine > Publisher: No Starch Press > ISBN: 1593271042 > Written by the co-founder of the highly respected Ars Technica site, > this book begins with the fundamentals of computing, defining what a > computer is and using analogies, numerous 4-color diagrams, and clear > explanations to communicate the concepts that form the basis of modern > computing. > > > > ***iPod: The Missing Manual, Fifth Edition > Publisher: O'Reilly > ISBN: 0596529783 > This new edition thoroughly covers the redesigned iPod Nanos, the video > iPod, the tiny Shuffle and the overhauled iTunes 7. Each page sports > easy-to-follow color graphics, crystal-clear explanations, and guidance > on the most useful things your iPod can do. > > > > ***Just Right Software Planning & Estimation > Publisher: Pragmatic Bookshelf > ISBN: 0977616622 > This book won't bore you with theoretical parametric models or tedious, > tree-killing paperwork-heavy processes. Instead, you get practical, > no-nonsense guidance for estimating and planning your software projects, > mining techniques that work from both "sides" of the methodological > boundaries. > > > > ***Kismet Hacking > Publisher: Syngress > ISBN: 1597491179 > "Kismet Hacking" focuses specifically on the use of the Kismet wireless > tool for Linux users. This book covers everything a reader would need to > know about Kismet, from the basic installation for the new user to > advanced topics such as creating Wireless Intrusion Detection Systems. > > > > ***Learning MySQL > Publisher: O'Reilly > ISBN: 0596008643 > "Learning MySQL" provides all the tools you need to set up and design an > effective database. This richly detailed tutorial will help you design > scalable and flexible databases, create powerful queries using SQL, and > configure MySQL for improved security. > > > > ***LINQ: The Future of Data Access in C# 3.0 (PDF) > Publisher: O'Reilly > ISBN: 0596528418 > Language Integrated Query (LINQ) is Microsoft's new technology for > powerful, general purpose data access. In this Short Cut you'll learn > about LINQ and the proposed C# 3.0 extensions that support it. > > > > ***Mastering Landscape Photography > Publisher: Rocky Nook > ISBN: 1933952067 > Thirteen essays on landscape photography by master photographer Alain > Briot. Topics include practical, technical, and aesthetic aspects of > photography to help photographers build and refine their skills. > > > > ***MySQL Cookbook, Second Edition > Publisher: O'Reilly > ISBN: 059652708X > You'll find dozens of short, focused pieces of code and hundreds of > worked-out examples that are perfect for programmers of all levels who > don't have the time (or expertise) to solve MySQL problems from scratch. > The new edition covers MySQL 5.0 and the older but still widespread > MySQL 4.1. > > > > ***Network Monitoring with Nagios (PDF) > Publisher: O'Reilly > ISBN: 0596528191 > With this Short Cut guide, we'll go over how Nagios fits in the overall > network monitoring puzzle. We'll also cover installation and basic > usage. Finally, we'll show you how to extend Nagios with other tools to > extend functionality. > > > > ***Network Security Assessment > Publisher: Syngress > ISBN: 1597491012 > This book is unique in that it details both the management and technical > skill and tools required to develop an effective vulnerability > management system. Business case studies and real world vulnerabilities > are used through the book. > > > > ***Network Security Hacks > Publisher: O'Reilly > ISBN: 0596527632 > This second edition of "Network Security Hacks" offers 125 concise and > practical hacks, including more information for Windows administrators, > hacks for wireless networking, and techniques to ensure privacy and > anonymity, including ways to evade network traffic analysis, encrypt > email and files, and protect against phishing attacks. > > > > ***O'Reilly Radar Web 2.0 Report > (Limited review copies available) > Publisher: O'Reilly > ISBN 0596527691 > "O'Reilly Radar's Web 2.0 Principles and Best Practices" lays out the > answers?the why, what, who, and how of Web 2.0. It's an indispensable > guide for technology decision-makers?executives, product strategists, > entrepreneurs, and thought leaders?who are ready to compete and prosper > in today's Web 2.0 world. > > > > ***Rails Deployment > Publisher: Pragmatic Bookshelf > ISBN: 0978739205 > This book will help you sleep better at night, knowing that your > application can handle anything that gets thrown at it. Come away with > the knowledge of how to optimize your Rails projects for speed and > concurrency. > > > > ***Rails for Java Developers > Publisher: Pragmatic Bookshelf > ISBN: 097761669X > If you are a Java programmer, you shouldn't have to start at the very > beginning. You already have deep experience with the design issues that > inspired Rails, and can use this background to quickly learn Ruby and > Rails. This book will be your guide to this new, but not strange, territory. > > > > ***Saving Money and Time with Virtual Server (PDF) > Publisher: O'Reilly > ISBN: 0596528019 > This guide is aimed at network administrators who are interested in ways > that Virtual Server 2005 can be implemented in their organizations in > order to save money and increase network productivity. It contains > information on setting up a virtual network, virtual consolidation, > virtual security, virtual honeypots, and more. > > > > ***Scanning Negatives and Slides > Publisher: Rocky Nook > ISBN: 1933952016 > The most common software tools for scanning (SilverFast, VueScan, > NikonScan) are not only covered extensively in the book, but are also > provided on a CD along with other useful tools for image editing, as > well as numerous sample scans. > > > > ***SQL Hacks > Publisher: O'Reilly > ISBN: 0596527993 > "SQL Hacks" offers 100 hacks--unique tips and tools--that bring you the > knowledge of experts who apply what they know in the real world to help > you take full advantage of the expressive power of SQL. You'll find > practical techniques to address complex data manipulation problems. > > > > ***Web Scripting Little Black Book > Publisher: Paraglyph Press > ISBN: 1933097191 > The Web Scripting Little Black Book will help administrators take full > advantage of the most popular scripting languages and extensions, > covering topics such as automating Web pages and managing content, > database setups and automation, essential e-commerce scripts, user > support topics, securing scripts, FTP access, and much more. > > > > ***Windows Admin Programming with Visual C# 2005 Little Black Book > Publisher: Paraglyph Press > ISBN: 1933097205 > The book covers a wide range of important Windows admin tasks from file > management to network management to backup and security. The hands-on > immediate solutions are especially designed to save programmers hundreds > of hours of valuable time. > > > > ***MAKE Magazine Subscriptions > MAKE Magazine Subscriptions > The annual subscription price for four issues is $34.95. When you > subscribe with this link, you'll get a free issue--one plus four > more for $34.95. So subscribe for yourself or friends with this > great offer for UG Members: five volumes for the cost of four. > Subscribe at: > > > > ***Craft Magazine Subscriptions > The annual subscription price for four issues is $34.95. When you > subscribe with this link, you'll get a free issue--the first one plus > four more for $34.95. So subscribe for yourself or friends with this > great offer for charter subscribers: five volumes for the cost of four. > Subscribe at: > > > ================================================ > Upcoming Events > ================================================ > ***For more events, please see: > > > > ***Julieanne Kost ("Window Seat"), The May Gallery, St. Louis, MO > Julieanne Kost work will be on display until November 24. > http://www.webster.edu/maygallery/ > > > ***Julia Wilkinson ("The eBay Price Guide"), > 29th Annual National Press Club Book Fair, Washington, D.C--November 15 > No Starch author Julia Wilkinson will be among those showcasing their > work at the 29th Annual National Press Club Book Fair in Washington, > D.C. The event attracts hundreds of fans who enjoy browsing the > children?s books, cookbooks, photography books, Washington expos?s, > histories, and best-selling fiction. Funds raised by the Book Fair will > benefit the Press Club?s Eric Friedheim Library & News Information > Center, a resource for journalists worldwide. The event opens to the > public at 6:00pm. > > > > ***Visit O'Reilly at OpenCON 2006, Venice, Italy--December 2-3 > OpenCON is the first conference entirely dedicated to OpenBSD and > organized by OpenBEER, the Italian OpenBSD users group. Topics include > information security, secure programming, and anything related to > OpenBSD. Come and visit the O'Reilly booth where you will be able to > purchase our books at a discount. > > > > ***Stephen Johnson ("Stephen Johnson on Digital Photography"), > Professional Image Editing Workshop, Pacifica, CA--December 2-5 > Photographer and author Stephen Johnson presents a four day workshop to > explore digital photographic editing. Hands-on help and demonstrations > of his use of editing tools with restraint and finesse will benefit all > of your digital photography work. > > > > ***O'Reilly Digital Media Authors at Book Passage, Corte Madera, CA--January 7 > Ask the experts. Leading digital photographers and authors, Mikkel > Aaland, Stephen Johnson, Ken Milburn, and Derrick Story will be around > to answer all your digital photography questions. > > > > ***Julieanne Kost ("Window Seat") Project: Photoshop Lightroom School Tour > Author Julieanne Kost will provide students with an in-depth seminar on > using Adobe Photoshop CS2 and Adobe Lightroom beta, highlighting their > combined support for a digital workflow. For a complete list of cities > and dates, go to: > > > > ***Peter Krogh ("The DAM Book"), ASMP/It's Your Business Event Series > Author Peter Krogh will be teaching the "Get Your DAM Stuff Together" > track for ASMP's "It's Your Business" Series. For a complete list of > cities and dates, go to: > > > > ***Eddie Tapp ("Photoshop Workflow Setups") Pro Tips Tour > Author Eddie Tapp will teach you the complete digital workflow from > capture to final output. During this seminar, Monte Zucker and Eddie > Tapp cover concept to completion--posing, pixels, Photoshop, and > printing--everything needed to create beautiful digital photographic > portraits. For a complete list of cities and dates, go to: > > > ================================================ > Conference News > ================================================ > ***Registration is now open for the 2007 Emerging Telephony Conference > Explore the strategies for taming disruption and exploit opportunities > being created by web telephony innovations. > > > Use code "etel07usrg" when you register, and receive 15% off > the early registration price. > > To register for the conference, go to: > > > ***Speak at RailsConf > O'Reilly Media and Ruby Central are seeking leaders for RailsConf > sessions and tutorials. Are you a hacker, Rubyist, trainer, web > developer, and/or entrepreneur with something to share? If so, submit a > proposal. > > > ================================================ > News From O'Reilly & Beyond > ================================================ > --------------------- > General News > --------------------- > You Choose: PDF or Print > > The following O'Reilly titles are now available in print or PDF: > > -ActionScript 3.0 Cookbook > > -Ajax Hacks > > -CSS Cookbook > > -DNS and BIND > > -HTML & XHTML: The Definitive Guide > > -Google Hacks > > -MCSE Core Elective Exams in a Nutshell > > -Ubuntu Hacks > > -Visual Basic 2005 Cookbook > > -Visual Basic 2005 in a Nutshell > > -Web Design in a Nutshell > > > ***Web 2.0 Summit 2006 Media Coverage > Read all the announcements, articles, blogs, photos, and podcasts > made at the Web 2.0 Summit in San Francisco. > > > > ***Call Yourself a Programmer? > Announcing the O'Reilly Code Quiz, a curiously addictive game that'll > stress test your coding knowledge. Brought to you by O'Reilly Labs, > where all good things begin as zeros and ones. > > > > ***User Group Members Receive a Special 30% Discount on > O'Reilly Learning Courses > As an O'Reilly User Group member, you save on all the courses in > the following University of Illinois Certificate Series: > -Linux/Unix System Administration > -Web Programming > -Open Source Programming > -.NET Programming > > To redeem, use Promotion Code "ORALL1," good for a 30% discount, > in Step #3 of the enrollment process. Each course comes with a free > O'Reilly book and a 7-day money-back guarantee. Register online: > > > > ***Work for O'Reilly > We have immediate openings for the following: > -Conferences Communications Associate > -Conferences Sales Associate > -Interactive Marketing Manager (Safari Books Online) > -Mac Systems Administrator > -Marketing Programs Manager (Safari Books Online) > -Publicist, Conferences > -Sales Manager, Conferences > -Senior Software Engineer (Java/Perl/MySQL/Linux/XML/Web Services) > -Sr. Systems Administrator > -Sr. Web Developer (Linux/Apache/MySql/Perl and Open Source) > -Sr. Web Producer > > For more information and more job openings, go to: > > > --------------------- > Open Source > --------------------- > ***Getting Started with WSGI > Python 2.5 added support for the WSGI standard. This is a specification > for web programming that allows interoperability between frameworks and > components. It's also terribly easy to use. Jason Briggs introduces WSGI > and gives the background you need to use it productively. > > > > ***Open Tools for MySQL Administrators > The MySQL distribution provides several tools for database developers > and administrators, but they don't always work everywhere. Fortunately, > the worldwide MySQL community has produced plenty of useful tools. Baron > Schwartz surveys the possibilities and offers suggestions for what you > should use. > > > > ***Developing High Performance Asynchronous IO Applications > When concurrency and latency are your bottlenecks, synchronous IO is a > problem--even in a multithreaded or multiprocess model. This is > especially evident when dealing with high volumes of incoming mail, > especially if much of it is spam. Stas Bekman and his team at > MailChannels recently built a scalable, modern, event-based system for > asynchronous IO. Here's how they did it. > > > --------------------- > Digital Media > --------------------- > ***Inside Aperture--Community for Serious Photographers > Our Inside Aperture site draws upon community expertise to > provide you with tips and real-life experiences from professional > shooters who use Apple's premier photo management application to > organize, edit, and output their images. This site features weblogs, > articles, podcasts, and tutorials?-all focused to help you improve your > digital photography workflow. > > > > ***Top Ten Aperture Features > Apple's ground-breaking, workflow tool for professional photographers > has caused quite a stir in the imaging community. After working with > Aperture for a year, I've decided that although it's not perfect, it has > some incredible and exciting features that photographers can really use. > > > > ***Winners of the Photoshop Cook-Off Contest announced at PhotoPlus Expo 2006 > Grand Prize Winner Suzanne Pitts and ten additional winners in five > categories were selected from hundreds of submissions created by > Photoshop aficionados. Entrants excitedly responded to the opportunity > to "cook" their digital entries using "recipes" from any of five > O'Reilly Cookbooks. Pitts, the grand prizewinner, received a prize > package worth more than $9,600, including a digital camera and printer. > The five category winners were awarded packages worth more than $3,000 > each. The total value of sponsors' prizes exceeds $27,000. Cook-Off > Sponsors included Adobe, iStockPhoto, Lowepro, and Epson. Learn more > about all the winners here, > > > --------------------- > Mac > --------------------- > ***Making a Smooth Move from .Mac to Google > Matthew Russell presents a practical approach for a smooth move from > .Mac to a Google-centric web experience. Getting your email, address > book, calendar, online storage, online photos, and blog squared away are > all covered in this detailed transition plan. > > > > ***Text Tricks and More Text Tricks > We've covered text editors here before. We know, from various posts at > the Mac DevCenter blog, that our readers are often as fanatical about > using plain text as we are. Tips on using your editor of choice are easy > to find, but we thought it would be fun to gather a whole bunch of them > together for the first time; not only to spread the word, but to invite > our readers to add their own tips and time-savers. We've also asked a > handful of Mac users to contribute their own favorite text tricks. > > > --------------------- > Windows/.NET > --------------------- > ***Creating Visual Studio Project Templates > Visual Studio 2005 offers a great tool for those who create largely > identical projects--custom project and item templates--that automates > project creation and eliminates the need to add the same references, > project items, or even largely identical code to new projects. Ron > Petrusha shows you how. > > > > ***Top 10 Tips for Using Windows PowerShell > PowerShell is Microsoft's newest replacement for the command line, and > it's far more powerful than any command-line prompt Microsoft has given > us before. Starting to learn it, unfortunately, can be a bit > overwhelming. Jeff Cogswell offers his top 10 tips for getting the most > out of it. > > > --------------------- > Java > --------------------- > ***Advanced Java Content Repository API > First presented in "What Is Java Content Repository," JSR-170 offers a > standard means for content management systems to present their > persistent data stores to Java applications. In this article, Sunil > Patil explores some of JCR's optional features--namely, the very useful > concepts of versioning and observability. > > > > ***Scaling Enterprise Java on 64-bit Multi-Core X86-Based Servers > Today's enterprise server--indeed, the environment--isn't what it was > when Java was born. Slow networked machines have been replaced by fast, > 64-bit multi-core servers that can house all your tiers in one box or > even virtualize servers within the server. This has a significant effect > on the design and deployment of your Java enterprise application, and > Michael Yuan and Dave Jaffe show you how to get the most out of your > hardware. > > > --------------------- > Sys Admin/Web > --------------------- > ***Demystifying LDAP Data > Is LDAP a database or a protocol? Is it understandable and deployable > without reading a thousand pages of explanation and documentation? Brian > Jones explains LDAP schemas and the layout of data to help you > understand what you can store and how you can retrieve it. > > > > ***OpenBSD 4.0: Pufferix's Adventures > On October 18th, OpenBSD celebrated its 11th birthday. Now it's time for > the release of OpenBSD 4.0. To celebrate both milestones, Federico > Biancuzzi interviewed over 20 developers to discuss the new features of > this release and the continual work to get hardware specifications from > vendors. > > > --------------------- > Podcasts > --------------------- > ***Ken Milburn Unplugged > Take a listen. The author of Digital Photography Expert Techniques, > Second Edition knew Dan Rather in college, started his career taking > publicity photos of Hollywood starlets, and shot album covers for > Capitol Records. Ken talks to O'Reilly staffer Sara Peyton about his > career, tips and tricks, and creating the wow factor. (16 minutes 25 > seconds) > > > > ******Deke McClelland on Software > O'Reilly author Deke McClelland talks to Mac Edition Radio's Harris > Fogel about his series of bestselling One-on-One books and Photoshop > Elements. > > > > ***MAKE Podcast: Colin Berry > Colin Berry reads "Spinout," the touching story he wrote for MAKE, Volume > 07, about his brother's efforts to build and race a car in the soap box > derby in Longmont, Colo. Unfortunately, he was up against more than just > his own bad luck. > > > --------------------- > Web > --------------------- > ***Django Jumpstart: Build a To-Do List in 30 Minutes > Django started life at a newspaper whose staff needed to develop > full-featured web applications to meet newsroom deadlines. The result? > One speedy framework! In this hands-on tutorial, James helps us build a > handy to-do list manager in just 30 minutes--perfect for your next > deadline. > > > > ***Bullet Proof HTML: 37 Steps to Perfect Markup > So, you want to code your own HTML? Perhaps you just want to polish your > skills, or have a few nagging questions answered. In this comprehensive > FAQ, Tommy gives you all the information you'll need to understand the > science--and practice the art--of HTML. > > > > Until next time-- > > Marsee Henon > > > ================================================================ > O'Reilly > 1005 Gravenstein Highway North > Sebastopol, CA 95472 > http://ug.oreilly.com/ http://ug.oreilly.com/creativemedia/ > ================================================================ From srdjan at catalyst.net.nz Sun Nov 19 13:41:11 2006 From: srdjan at catalyst.net.nz (Srdjan) Date: Mon, 20 Nov 2006 10:41:11 +1300 Subject: [Wellington-pm] State of Crypt::OpenPGP In-Reply-To: <1163662200.5429.1.camel@localhost.localdomain> References: <1163662200.5429.1.camel@localhost.localdomain> Message-ID: <4560CF77.3050103@catalyst.net.nz> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Good morning fellow mongers, Is there anyone who tried to use/install Crypt::OpenPGP lately? I've been less then successful (a couple of tests failed, Math::Pari bitched about version of libpari being too high etc.). I'm sort of favouring it over GnuPG and Crypt::GPG, I find it to be more flexible. Anyone willing to share views? Cheers, Srdjan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFYM93ZtcHxCitRpgRAmvnAJ9tYlfl9gfWKMM3KE+ZWocIiQ8AfQCfc36X ZekVEdnL0YYPH8FoiaepZO4= =rfRf -----END PGP SIGNATURE----- From enkidu at cliffp.com Mon Nov 27 22:23:40 2006 From: enkidu at cliffp.com (Cliff Pratt) Date: Tue, 28 Nov 2006 19:23:40 +1300 Subject: [Wellington-pm] Today's tricky perl teaser Message-ID: <456BD5EC.2000608@cliffp.com> I now know why, but can anyone spot why the regex will not compile on the date/time line? (Please ignore the inappropriate line breaks). Cheers, Cliff open LOGS, "/usr/apache2/logs/vr2-wg-prod-http-01.access.log" or die "Can't open logfile : $!" ; while () { @fields = /(^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) # Host IP address \s+(.+?) # Remote logname \s+(.+?) # Remote user \s+(\[.*\]) # Date / time \s+(\".+?\") # Request (first line) \s+(\d{3}) # Last status code \s+(\d+|-) # Bytes transferred \s+(\".*?\") # Referrer (from request header) \s+(\".*?\") # User-Agent (from request header) \s+(.+)$/x ; # Host (from request header) # if ($fields[5] eq '403') { print "$fields[0], $fields[2], refused connection\n" ; } } close LOGS ; From jarich at perltraining.com.au Mon Nov 27 23:30:27 2006 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Tue, 28 Nov 2006 18:30:27 +1100 Subject: [Wellington-pm] Today's tricky perl teaser In-Reply-To: <456BD5EC.2000608@cliffp.com> References: <456BD5EC.2000608@cliffp.com> Message-ID: <456BE593.6040800@perltraining.com.au> Cliff Pratt wrote: > I now know why, but can anyone spot why the regex will not compile on > the date/time line? (Please ignore the inappropriate line breaks). /x is special, but when Perl sees a regular expression it first looks for the end of the expression before it starts interpretting comments (because it has to get to the end in order to discover you're using /x mode). Your date time line says: \s+(\[.*\]) # Date / time ^ Perl sees the slash in your comment and decides that that's the end of the regular expression. Since it doesn't make sense to divide the result of your regular expression by the call to time() (which gets some very strange arguments), Perl realises something has gone wrong and complains. Change your regular expression to use m{ } instead and this will all get better: my @fields = m{ (^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) # Host IP address ... }; There are a number of ways you can simplify this regular expression and make it more efficient. I've shown a counter example below: my @files = m{ ([^S]+) # Host IP (stuff which isn't a space char) \s+ ([^S]+) # Remote logname \s+ ([^S]+) # Remote user \s+ \[ # start of date (.{26}) # Date / time (fixed length field) \] # Alternately: [^\]]+ stuff which isn't ] \s+ ("[^"]") # Request \s+ (\d{3}) # Status code \s+ (\d+|-) # Bytes transferred \s+ ("[^"]") # Referrer (from request header) \s+ ("[^"]") # User-Agent (from request header) \s+ \s+(.+) # Host (from request header) }; (un-tested, but probably close). This has many advantages because it does not require any back-tracking. Further it doesn't require all the messing around that .*? requires which is kind of like a car trip with kids: try to match next pattern (when will we get there?) match current character, try to match next pattern, (are we there yet?) match current character, try to match next pattern, (are we there yet?) match current character, try to match next pattern, (are we there yet?) match current character, try to match next pattern, (are we there yet?) ... match next pattern. All the best, J -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From grant at mclean.net.nz Tue Nov 28 00:30:20 2006 From: grant at mclean.net.nz (Grant McLean) Date: Tue, 28 Nov 2006 21:30:20 +1300 Subject: [Wellington-pm] Today's tricky perl teaser In-Reply-To: <456BD5EC.2000608@cliffp.com> References: <456BD5EC.2000608@cliffp.com> Message-ID: <1164702620.18889.21.camel@localhost.localdomain> On Tue, 2006-11-28 at 19:23 +1300, Cliff Pratt wrote: > I now know why, but can anyone spot why the regex will not compile on > the date/time line? (Please ignore the inappropriate line breaks). I'll confess that it wasn't obvious to me until I pasted the snippet into my favourite editor (gvim) and the syntax highlighting showed the regex ended at the slash between Date and time. Instead of /.../, I almost always use m{...} (as Jacinta suggested). This is especially useful when the regex spans multiple lines: @fields = m{ ... }x; As Jacinta probably intended to say, using \S+ to match strings of non-whitespace characters would simplify things. Also, this bit: \s+(\[.*\]) # Date / time Would be better written as: \s+(\[.*?\]) # Date / time Otherwise the .* will try to match to the end of the string and then will backtrack to the last ']'. This will slow things down but will be harmless as long as there is never another ']' on the line. I notice from some Apache logs I have handy that some Opera browsers seem to put a country code (?) in square brackets at the end of the user agent so you might encounter more square brackets than you're expecting. This still shouldn't cause a problem since you're requiring specific things after the ']' but it will require the regex engine to work harder than necessary. Also, when capturing the date/time, you probably want to move the square brackets so they're not part of what you capture: \s+\[(.*?)\] # Date / time Another approach to building up a complex regex like this one is to use variables to name the bits: my $spc = '\s+'; my $ip = '(\S+)'; my $user = '(\S+)'; my $date = '\[(.*?)\]'; my $log_match = qr{ ^ $ip $spc $user $spc $date ... }x; while() { @fields = $_ =~ $log_match; Cheers Grant From enkidu at cliffp.com Tue Nov 28 02:01:23 2006 From: enkidu at cliffp.com (Cliff Pratt) Date: Tue, 28 Nov 2006 23:01:23 +1300 Subject: [Wellington-pm] Today's tricky perl teaser In-Reply-To: <1164702620.18889.21.camel@localhost.localdomain> References: <456BD5EC.2000608@cliffp.com> <1164702620.18889.21.camel@localhost.localdomain> Message-ID: <456C08F3.1040003@cliffp.com> Grant McLean wrote: > On Tue, 2006-11-28 at 19:23 +1300, Cliff Pratt wrote: >> I now know why, but can anyone spot why the regex will not compile >> on the date/time line? (Please ignore the inappropriate line >> breaks). > > I'll confess that it wasn't obvious to me until I pasted the snippet > into my favourite editor (gvim) and the syntax highlighting showed > the regex ended at the slash between Date and time. > Well, I actually found it pretty quickly because I had the book open to the right page at the time, because I was looking for the multiline thing! It is pretty tricky though, isn't it? > > Instead of /.../, I almost always use m{...} (as Jacinta suggested). > This is especially useful when the regex spans multiple lines: > > @fields = m{ ... }x; > > As Jacinta probably intended to say, using \S+ to match strings of > non-whitespace characters would simplify things. > > Also, this bit: > > \s+(\[.*\]) # Date / time > > Would be better written as: > > \s+(\[.*?\]) # Date / time > > Otherwise the .* will try to match to the end of the string and then > will backtrack to the last ']'. This will slow things down but will > be harmless as long as there is never another ']' on the line. I > notice from some Apache logs I have handy that some Opera browsers > seem to put a country code (?) in square brackets at the end of the > user agent so you might encounter more square brackets than you're > expecting. This still shouldn't cause a problem since you're > requiring specific things after the ']' but it will require the regex > engine to work harder than necessary. > > Also, when capturing the date/time, you probably want to move the > square brackets so they're not part of what you capture: > > > \s+\[(.*?)\] # Date / time > Yes, I'd noticed that already, though it wasn't in the pasted snippet. I also included the ^ in the first (). Someone pointed that out to me. Would that have any unintended effect? > > > Another approach to building up a complex regex like this one is to > use variables to name the bits: > > my $spc = '\s+'; my $ip = '(\S+)'; my $user = '(\S+)'; my $date = > '\[(.*?)\]'; my $log_match = qr{ ^ $ip $spc $user $spc $date ... }x; > > while() { @fields = $_ =~ $log_match; > Cheers, Cliff From jarich at perltraining.com.au Tue Nov 28 02:13:41 2006 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Tue, 28 Nov 2006 21:13:41 +1100 Subject: [Wellington-pm] Today's tricky perl teaser In-Reply-To: <456BE593.6040800@perltraining.com.au> References: <456BD5EC.2000608@cliffp.com> <456BE593.6040800@perltraining.com.au> Message-ID: <456C0BD5.7070900@perltraining.com.au> Jacinta Richardson wrote: > my @files = m{ > ([^S]+) # Host IP (stuff which isn't a space char) As Grant said, this should be: \S+ as should the other similar ones below. J -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From grant at mclean.net.nz Tue Nov 28 11:50:46 2006 From: grant at mclean.net.nz (Grant McLean) Date: Wed, 29 Nov 2006 08:50:46 +1300 Subject: [Wellington-pm] Today's tricky perl teaser In-Reply-To: <456C08F3.1040003@cliffp.com> References: <456BD5EC.2000608@cliffp.com> <1164702620.18889.21.camel@localhost.localdomain> <456C08F3.1040003@cliffp.com> Message-ID: <1164743446.3319.3.camel@putnam.wgtn.cat-it.co.nz> On Tue, 2006-11-28 at 23:01 +1300, Cliff Pratt wrote: > Grant McLean wrote: > > Also, when capturing the date/time, you probably want to move the > > square brackets so they're not part of what you capture: > > > > > > \s+\[(.*?)\] # Date / time > > > Yes, I'd noticed that already, though it wasn't in the pasted snippet. I > also included the ^ in the first (). Someone pointed that out to me. > Would that have any unintended effect? No, ^ is a 'zero width assertion' so when it matches, no characters are contributed to any surrounding captures. Cheers Grant