Message-ID: <20010609044859.5844.qmail@plover.com> From: mjd@plover.com To: mjd-book@plover.com Subject: Mark Dominus exciting book news Date: 9 Jun 2001 04:48:59 -0000 If you forgot what this list is about, or you don't know why you're getting this message, please see http://perl.plover.com/book/ To unsubscribe, send a blank message to mjd-book-unsubscribe@plover.com. I finally have some good news: The draft of chapter 3 is done. Probably more important news is that I've actually been getting some regular work done this week. I'll be at YAPC next week, but with any luck this trend of regular progress will continue after I return and I will finish the book this year. Chapter 3 is about caching and memoization techniques. I'm quite happy with the way the chapter came out. In fact, I think it's the best discussion I've ever seen of the practicalities of caching and memoization. It is a lot longer than I expected it to be, more than 15,000 words. I kept thinking of more and more to say about caching! It is a really interesting topic, awash in fascinating practicalities and fussy details. I show a useful use of the 'eval string' feature, and I found a new twist on the Orcish Maneuver that I've never seen before. Chapter 3 also turned out to be more important than I expected: It's the chapter in which I first explain the internals of how closures work. Since the book is about closures, I had to work very hard to get this just right. I kept trying to write an abbreviated explanation, leaving out the details, and it kept coming out incomprehensibly. I finally threw in the towel and explained about pads and CVs and all the internal pointers Perl uses to keep track of anonymous functions. One interesting thing that came out of this: Some of the aborted explanations failed because there was a certain concept that I never made clear. I was dancing around the idea, implying it but never making it explicit. This is the idea of a 'binding', which is an association between a variable's name and its value. I think the reason it didn't occur to me at first to explain bindings is that I have never heard anyone else mention them in the context of Perl before. But that is exactly what a Perl pad is: A table of bindings. Lisp has exactly the structure for the exact same purpose, except they call it a 'frame' instead of a 'pad'. Lisp folks, of course, would not think of explaining closures without first discussing bindings. So once again it turns out that the Lisp community has an important concept that the Perl community needs. Understanding aboput bindings makes it a lot easier to talk about the way lexical variables work. When I get back from YAPC, I expect that I will start on chapter 5.5, which I talked about in an earlier message to this list: http://perl.plover.com/book/announce/03 Chapter 5.5 will be very exciting. Unfortunately, I have lost my notes. I will find them! I found the notebook that they were in, and discovered that the pages with those notes had been torn out, so I can only assume that I carefully put them in a safe place. Now I just have to remember where the safe place is... ---------------------------------------------------------------- As a bonus for your patience, I have placed the draft of chapter 3 online at [ Sorry, draft chapters are available only to mailing list subscribers. Send mail to mjd-book-subscribe@plover.com to subscribe. ] You absolutely must not distribute this draft to anyone else; I'd prefer if you didn't even copy them off the web site. Someday the book will be published, and then the complete final version will be available on my web site for free for everyone in the world. When that happens, I will be very unhappy if a lot of old crappy drafts are floating around the Internet, making me look bad. Also, please do not advertise the draft URL to other people. I want the drafts to be a special present for the people on my mailing list. But please do advertise the mailing list to other people. To subscribe, send email to mjd-book-subscribe@plover.com. Thank you all for your interest. I will send another message next time something happens. I hope the wait will not be as long as last time.