Re: OT praise for the cookbook

2002-12-03 Thread Mark Swayne
Having become a fan of OOPerl I would really love to see some good 
treatment of using all those nifty Class::* modules. Especially with 
multiple inheritance. I have to admit that I've been a bit timid to do 
much in the way of experimentation...

BTW, any time anyone approaches me with a desire to learn Perl, I tell 
them to buy three books (in order), Learning Perl, Perl in a Nutshell 
and Perl Cookbook. The book has been a huge help, it spurred me into 
learning new things as a newbie and now with a few years under my belt, 
it is an invaluable reference. I've got high hope for a second edition.

---Mark

--
American ideas of freedom are bound up with a vision of information policy that counts information as social wealth owned by all. We believe we are entitled to say what we think, to think what we want, and to learn whatever were willing to explore. Part of the information ethos in the United States is that facts and ideas cannot be owned, suppressed, censored or regulated, they are meant to be found, studied, passed along and freely traded in the "marketplace of ideas".
 --  Jessica Litman 




Re: OT praise for the cookbook

2002-11-28 Thread Ken Williams

On Friday, November 29, 2002, at 08:33  AM, Vic Norton wrote:


I'll have to admit that I haven't gone through most of the 
cookbook, but I use

   sub commify { # commify a number. Perl Cookbook, 2.17, p. 64
  my $text = reverse $_[0];
  $text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/g;
  return scalar reverse $text;
}

every day. I like my numbers to look right.

I talked with Sean Burke a couple years ago at TPC, and he was 
advocating for a printf() format field that would do this 
natively, respecting locale settings.  Would be nice.

 -Ken



Re: OT praise for the cookbook

2002-11-28 Thread Vic Norton
I'll have to admit that I haven't gone through most of the cookbook, but I use

   sub commify { # commify a number. Perl Cookbook, 2.17, p. 64
  my $text = reverse $_[0];
  $text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/g;
  return scalar reverse $text;
}

every day. I like my numbers to look right.

Regards,

Vic

--
*---* mailto:[EMAIL PROTECTED]
| Uncle Bill, why didn't you ever marry?  - Gloria Jean
| I was in love with a beautiful blonde once, dear.
| Drove me to drink. That's the one thing I'm indebted
| to her for. - W.C. Fields
|   - Never Give A Sucker An Even Break
*---* http://vic.norton.name



Re: OT praise for the cookbook

2002-11-27 Thread Bruce Van Allen
At 1:31 PM -0500 11/27/02, Dan Sugalski wrote:

At 12:59 PM -0500 11/27/02, Chris Devers wrote:

On Wed, 27 Nov 2002, Nathan Torkington wrote:
\> I've been working with other editors at O'Reilly to free up my time so

  that I can work on the second edition.  Tom's been doing a lot of the



Cool. It may be silly to ask, but has there been any thought as to how the
release of a Perl Cookbook second edition will coincide with Perl6?


I don't think you want to wait that long. The cookbook for perl 6 
would likely lag behind perl 6's first major release by at least 18 
months--it's tough to document useful best practices for a language 
that's not out yet!

new version of the book would be nice -- if by the time Cookbook2 is ready
it looks like Perl6 will be right behind it, I'm not sure that I
personally would get a copy because I'd be worried about its shelf life.


I think we're safe there. Could be wrong, but I think we're safe.


At 12:41 PM -0700 11/27/02, Nathan Torkington wrote:


Yes.  We're not holding up any of the revisions to our Perl books for
Perl 6.  As we've all learned over the past years, it's impossible to
predict the pace...


I'd go further than that: it's not even about Larry's pace or the 
eventual release date.


Anyone reading this thread might want to keep in mind that Perl 5.x 
will be out there for *years* after Perl 6 is released. Language 
upgrades just aren't like getting the latest upgrade of BBEdit or 
your fave OS software.

There are Perl 4 programs still doing heavy lifting today all over 
the world, both on and off the Internet. Many installations of v. 5.x 
are still below 5.6.1, much less 5.8.

Yes, the proportions are shifting, especially with ActiveState's 
excellent packaging of Perl for Win32, and Apple's mass distribution 
of Perl in Mac OS X. And this is a good argument, Nat & Tom, for 
including sections specific to Mac and Windows: much of the growth in 
usage of Perl will be in those worlds. (My own request would be the 
converse: ample treatment of cross-platform issues. I avoid 
platform-unique stuff because I prefer my code to work wherever it 
lands.)

Despite what I expect will be a brilliant set of transition utilities 
for converting code to Perl 6 :-), very few sys admins will agree to 
switch; instead, at best, they'll install Perl 6 *and* maintain 5.x. 
So very few networked machines will be exclusively Perl 6. Mac OS X 
uses Perl for some of its internal ops, so that distribution won't 
change precipitously. This leaves local installations on developers' 
machines.

In my work today, even Perl 5.8 is irrelevant, because most of my 
software is deployed on other companies' machines, so I haven't 
bothered with installing it in my own (OS X) system.


Anyway, I heartily agree that the Cookbook is very valuable. Go Nat 
and Tom!! Ask us for help as you proceed!

1;
--

  - Bruce

__bruce_van_allen__santa_cruz_ca__


Re: OT praise for the cookbook

2002-11-27 Thread Nathan Torkington
Chris Devers writes:
> Cool. It may be silly to ask, but has there been any thought as to how the
> release of a Perl Cookbook second edition will coincide with Perl6?

Yes.  We're not holding up any of the revisions to our Perl books for
Perl 6.  As we've all learned over the past years, it's impossible to
predict the pace of Larry's progress.  It would be rude to leave books
in limbo until some undetermined point in the future.  When Perl 6 is
closer to completion, and being used by people, it'll be more of an
issue.

> I guess the broader question there is how long does it currently
> look like it'll take before Perl6 enters from stage left

Good question.  Personally, I'm hoping 2003 sees the Perl 6 language
get the major syntax (objects, subroutines, methods, modules) nailed
down to the point where we can have a Perl 6 interpreter with
significant syntactic advantages over Perl 5.  It'll still be a while
before it's stable enough for use.  Larry describes his work as
"designing a language for the next twenty years".  Hopefully we'll
be using it before then :-)

> > I'm contemplating a chapter of Mac stuff, but wonder whether that'd
> > also oblige me to do a chapter of Windows stuff, which I *don't* want
> > to do :-)
> 
> Any chance Dave Roth could/would contribute this chapter? His Win32 Perl
> books seem pretty good, maybe he could add some material to the Cookbook.

My stupid sense of ownership of the Cookbook would make that unlikely.
If there was Windows stuff, I'd do it.  Somehow I can't see me forcing
Tom into it :-)

Nat




Re: OT praise for the cookbook

2002-11-27 Thread Nathan Torkington
Puneet Kishor writes:
> (hm, that doesn't sound right. I don't even know you. for all I know 
> you might be a mean beastie yourself, even though you've got the photo 
> of baby shirley maclaine on your blog )

Thanks, I think.  That is, of course, my baby picture.  Partially
there in accordance with Mark-Jason Dominus's theories of audience
manipulation, and partially there because Nat at age 29 is nowhere
near as cute as Nat at age whatever-that-was.

> I find the 1st edition vey valuable. So much in fact that when I lay 
> my hands on the 2nd edition, I want it to be all new stuff so that, 
> combined, 1st and 2nd editions give me even more tips and tricks.

Perhaps a better way to approach it is: what problems do you take to
the Cookbook but it *doesn't* help you with?

Nat




Re: OT praise for the cookbook

2002-11-27 Thread Charles Albrecht
At 1:31 PM -0500 11/27/2002, Dan Sugalski wrote:
>I don't think you want to wait that long. The cookbook for perl 6 would likely lag 
>behind perl 6's first major release by at least 18 months--it's tough to document 
>useful best practices for a language that's not out yet!

I think it'd also be useful to hold a second edition up next to a third edition and 
say "okay, here's how I would accomplish this in 5.8, and here's the Perl-6-ish was of 
accomplishing the same thing."

-Charles
 Euonymic Solutions
 http://euonymic.com



Re: OT praise for the cookbook

2002-11-27 Thread Dan Sugalski
At 12:59 PM -0500 11/27/02, Chris Devers wrote:

On Wed, 27 Nov 2002, Nathan Torkington wrote:
\> I've been working with other editors at O'Reilly to free up my time so

 that I can work on the second edition.  Tom's been doing a lot of the
 5.8 updating (no more with the "new in the 5.004 release is ..."
 claims!) and I'm writing new recipes.  I've done four or five on
 mod_perl so far, and I expect to produce a lot more in the coming weeks.
 We'll also be fixing all the errata we couldn't justify fixing in the
 reprints.


Cool. It may be silly to ask, but has there been any thought as to how the
release of a Perl Cookbook second edition will coincide with Perl6?


I don't think you want to wait that long. The cookbook for perl 6 
would likely lag behind perl 6's first major release by at least 18 
months--it's tough to document useful best practices for a language 
that's not out yet!

new version of the book would be nice -- if by the time Cookbook2 is ready
it looks like Perl6 will be right behind it, I'm not sure that I
personally would get a copy because I'd be worried about its shelf life.


I think we're safe there. Could be wrong, but I think we're safe.
--
Dan

--"it's like this"---
Dan Sugalski  even samurai
[EMAIL PROTECTED] have teddy bears and even
  teddy bears get drunk



Re: OT praise for the cookbook

2002-11-27 Thread Puneet Kishor
Nathan Torkington wrote:

Puneet Kishor writes:


ps. one suggestion -- don't re-put what's already there in version 1 
(errata be damned). I want each and every page of version 2 to be "new" 
and different from version 1.


And here I thought you liked me :-)  Sorry, 2ed will be built on top
of 1ed, but with every recipe revisited in light of the last five
years of Perl style, modules, and core changes.

Nat



no, no, no. I do like you.

(hm, that doesn't sound right. I don't even know you. for all I know 
you might be a mean beastie yourself, even though you've got the photo 
of baby shirley maclaine on your blog )

I find the 1st edition vey valuable. So much in fact that when I lay 
my hands on the 2nd edition, I want it to be all new stuff so that, 
combined, 1st and 2nd editions give me even more tips and tricks.

way cheaper than attending a course.

over and out.



Re: OT praise for the cookbook

2002-11-27 Thread Chris Devers
On Wed, 27 Nov 2002, Nathan Torkington wrote:

> Puneet Kishor writes:
> > Nathan, I know you are out there. I just wanted to say it in public that
> > the cookbook is perhaps _the_ most useful perl book for me... much more
> > so than the other beasts (though the dromedary and the camelid too are
> > very useful). Most everyday I turn to the cookbook and find my answer there.

 !

> Thanks!

You're welcome! :)

> I've been working with other editors at O'Reilly to free up my time so
> that I can work on the second edition.  Tom's been doing a lot of the
> 5.8 updating (no more with the "new in the 5.004 release is ..."
> claims!) and I'm writing new recipes.  I've done four or five on
> mod_perl so far, and I expect to produce a lot more in the coming weeks.
> We'll also be fixing all the errata we couldn't justify fixing in the
> reprints.

Cool. It may be silly to ask, but has there been any thought as to how the
release of a Perl Cookbook second edition will coincide with Perl6? I
guess the broader question there is how long does it currently look like
it'll take before Perl6 enters from stage left, but it seems like it's
going to be different enough from 5.x that, whenever it does come along,
it'll be a big enough change to justify new editions of perhaps all the
main Perl books -- Camel, Ram, etc.

As much as I'd love a version of the Cookbook to cover features in 5.6 &
5.8 -- I'll admit, I don't really use much or any of the new stuff
because, without that tangible sense of "this new trick was in the
Cookbook, we should All Use It Now", so 'blessing' the new changes with a
new version of the book would be nice -- if by the time Cookbook2 is ready
it looks like Perl6 will be right behind it, I'm not sure that I
personally would get a copy because I'd be worried about its shelf life.

That said, all the new stuff you're talking about putting in would make it
worthwhile, whether or not Perl6 supercedes it right away or not. Seeing a
web programming tutorial that starts with mod_perl rather than simple CGI
seems like a very contemporary approach -- and mentioning $templates would
make this even better still.

> I'm contemplating a chapter of Mac stuff, but wonder whether that'd
> also oblige me to do a chapter of Windows stuff, which I *don't* want
> to do :-)

Any chance Dave Roth could/would contribute this chapter? His Win32 Perl
books seem pretty good, maybe he could add some material to the Cookbook.



-- 
Chris Devers[EMAIL PROTECTED]



Re: OT praise for the cookbook

2002-11-27 Thread Nathan Torkington
Puneet Kishor writes:
> ps. one suggestion -- don't re-put what's already there in version 1 
> (errata be damned). I want each and every page of version 2 to be "new" 
> and different from version 1.

And here I thought you liked me :-)  Sorry, 2ed will be built on top
of 1ed, but with every recipe revisited in light of the last five
years of Perl style, modules, and core changes.

Nat




Re: OT praise for the cookbook

2002-11-27 Thread Puneet Kishor
Nathan Torkington wrote:

Puneet Kishor writes:


...



Which brings me to a question. The last edition was 4 years ago. Why not 
a version 2 with more tips and tricks?  I will send advance payment to 
reserve a copy.


...

Anyway, it's all supposed to be out by OSCON next year.


Great! Can't hardly wait!

pk/

ps. one suggestion -- don't re-put what's already there in version 1 
(errata be damned). I want each and every page of version 2 to be "new" 
and different from version 1.

;-)



Re: OT praise for the cookbook

2002-11-27 Thread Nathan Torkington
Puneet Kishor writes:
> Nathan, I know you are out there. I just wanted to say it in public that 
> the cookbook is perhaps _the_ most useful perl book for me... much more 
> so than the other beasts (though the dromedary and the camelid too are 
> very useful). Most everyday I turn to the cookbook and find my answer there.

Thanks!

> Which brings me to a question. The last edition was 4 years ago. Why not 
> a version 2 with more tips and tricks?  I will send advance payment to 
> reserve a copy.

I'm glad you asked that.  There's no need for advance payment.  I've
been working with other editors at O'Reilly to free up my time so that
I can work on the second edition.  Tom's been doing a lot of the 5.8
updating (no more with the "new in the 5.004 release is ..." claims!)
and I'm writing new recipes.  I've done four or five on mod_perl so
far, and I expect to produce a lot more in the coming weeks.  We'll
also be fixing all the errata we couldn't justify fixing in the
reprints.

There'll be new chapters on mod_perl, XML, XS and Inline, threading.
and we'll de doing thing things like adding GTk and CocoaPerl to the
UI chapter.  This all may change if we get in there and can't find 15
things to say about XS and Inline, or suddenly the CocoaPerl stuff
falls out into its own chapter, but we'll see.

I'm contemplating a chapter of Mac stuff, but wonder whether that'd
also oblige me to do a chapter of Windows stuff, which I *don't* want
to do :-)

Anyway, it's all supposed to be out by OSCON next year.  If I go dark
in January and February, it's because Tom and I are busting our nuts
(uh, working hard) to make it happen.

Nat




Re: OT praise for the cookbook

2002-11-27 Thread Lou Moran

On Wednesday, Nov 27, 2002, at 12:28 America/New_York, Puneet Kishor 
wrote:

Which brings me to a question. The last edition was 4 years ago. Why 
not a version 2 with more tips and tricks?  I will send advance 
payment to reserve a copy.


I need 2.  Where do I send the cash?
--
Lou Moran
[EMAIL PROTECTED]
http://ellem.dyn.dhs.org:5281/resume/




OT praise for the cookbook

2002-11-27 Thread Puneet Kishor
In the spirit of OT, but keeping with the perl-ish nature of this list...

Nathan, I know you are out there. I just wanted to say it in public that 
the cookbook is perhaps _the_ most useful perl book for me... much more 
so than the other beasts (though the dromedary and the camelid too are 
very useful). Most everyday I turn to the cookbook and find my answer there.

Which brings me to a question. The last edition was 4 years ago. Why not 
a version 2 with more tips and tricks?  I will send advance payment to 
reserve a copy.

Puneet.