Practical Common Lisp [Seibel 2005-04-11].pdf

(17434 KB) Pobierz
674249554 UNPDF
Praise for Practical
Common Lisp
“Finally, a Lisp book for the rest of us. If you want to learn how to write a factorial
function, this is not your book. Seibel writes for the practical programmer,
emphasizing the engineer/artist over the scientist and subtly and gracefully
implying the power of the language while solving understandable real-world
problems.
“In most chapters, the reading of the chapter feels just like the experience of
writing a program, starting with a little understanding and then having that
understanding grow, like building the shoulders upon which you can then
stand. When Seibel introduced macros as an aside while building a test frame-
work, I was shocked at how such a simple example made me really ‘get’ them.
Narrative context is extremely powerful, and the technical books that use it are
a cut above. Congrats!” —Keith Irwin, Lisp programmer
“While learning Lisp, one is often referred to the CL HyperSpec if they do not
know what a particular function does; however, I found that I often did not ‘get it’
just by reading the HyperSpec. When I had a problem of this manner, I turned
to Practical Common Lisp every single time—it is by far the most readable
source on the subject that shows you how to program, not just tells you.”
—Philip Haddad, Lisp programmer
“With the IT world evolving at an ever-increasing pace, professionals need the
most powerful tools available. This is why Common Lisp—the most powerful,
flexible, and stable programming language ever—is seeing such a rise in popu-
larity. Practical Common Lisp is the long-awaited book that will help you
harness the power of Common Lisp to tackle today’s complex real-world prob-
lems.” —Marc Battyani, author of CL-PDF, CL-TYPESETTING, and mod_lisp
“Please don’t assume Common Lisp is useful only for databases, unit test
frameworks, spam filters, ID3 parsers, Web programming, Shoutcast servers,
HTML generation interpreters, and HTML generation compilers just because
these are the only things that happen to be implemented in the book Practical
Common Lisp .” —Tobias C. Rittweiler, Lisp programmer
674249554.063.png 674249554.074.png 674249554.085.png 674249554.096.png 674249554.001.png 674249554.012.png 674249554.015.png 674249554.016.png 674249554.017.png 674249554.018.png 674249554.019.png 674249554.020.png 674249554.021.png 674249554.022.png 674249554.023.png 674249554.024.png 674249554.025.png 674249554.026.png 674249554.027.png 674249554.028.png 674249554.029.png
“When I met Peter, who just started writing this book, I asked myself (not him,
of course), ‘Why yet another book on Common Lisp, when there are many nice
introductory books?’ One year later, I found a draft of the new book and recog-
nized I was wrong. This book is not ‘yet another’ one. The author focuses on
practical aspects rather than on technical details of the language. When I first
studied Lisp by reading an introductory book, I felt I understood the language,
but I also had the impression, ‘so what?’—meaning I had no idea about how to
use it. In contrast, this book leaps into a ‘practical’ chapter after the first few
chapters that explains the very basic notions of the language. Then the readers
are expected to learn more about the language while they are following the
‘practical’ projects, which are combined to form a product of significant size.
After reading this book, the readers will feel they are expert programmers on
Common Lisp since they have ‘finished’ a big project already. I think Lisp is the
only language that allows this type of practical introduction. Peter makes use
of this feature of the language in building up a fancy introduction to Common
Lisp.” —Taiichi Yuasa, Professor, Department of Communications and
Computer Engineering, Kyoto University
674249554.030.png 674249554.031.png 674249554.032.png 674249554.033.png 674249554.034.png 674249554.035.png 674249554.036.png 674249554.037.png 674249554.038.png 674249554.039.png 674249554.040.png 674249554.041.png 674249554.042.png 674249554.043.png 674249554.044.png 674249554.045.png 674249554.046.png 674249554.047.png 674249554.048.png 674249554.049.png 674249554.050.png
Practical Common Lisp
PETER SEIBEL
674249554.051.png 674249554.052.png 674249554.053.png 674249554.054.png 674249554.055.png 674249554.056.png 674249554.057.png 674249554.058.png 674249554.059.png 674249554.060.png 674249554.061.png 674249554.062.png 674249554.064.png 674249554.065.png 674249554.066.png 674249554.067.png 674249554.068.png 674249554.069.png 674249554.070.png 674249554.071.png 674249554.072.png 674249554.073.png
Practical Common Lisp
Copyright © 2005 by Peter Seibel
Lead Editor: Gary Cornell
Technical Reviewers: Mikel Evins, Steven Haflich, Barry Margolin
Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis, Jason Gilmore,
Jonathan Hassell, Chris Mills, Dominic Shakeshaft, Jim Sumser
Assistant Publisher: Grace Wong
Project Manager: Beth Christmas
Copy Edit Manager: Nicole LeClerc
Copy Editor: Kim Wimpsett
Production Manager: Kari Brooks-Copony
Production Editor: Ellie Fountain
Compositor: Susan Glinert
Proofreaders: Katie Stence, Liz Welch
Indexer: Kevin Broccoli
Cover Designer: Kurt Krames
Manufacturing Manager: Tom Debolski
Library of Congress Cataloging-in-Publication Data
Seibel, Peter.
Practical COMMON LISP / Peter Seibel.
p. cm.
Includes index.
ISBN 1-59059-239-5 (hc. : alk. paper)
1. COMMON LISP (Computer program language) I. Title.
QA76.73.L23S45 2005
005.13'3--dc22
2005005859
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Distributed to the book trade in the United States by Springer-Verlag New York, Inc., 233 Spring Street,
6th Floor, New York, NY 10013, and outside the United States by Springer-Verlag GmbH & Co. KG,
Tiergartenstr. 17, 69112 Heidelberg, Germany.
In the United States: phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders@springer-ny.com , or visit
http://www.springer-ny.com . Outside the United States: fax +49 6221 345229, e-mail orders@springer.de ,
or visit http://www.springer.de .
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA
94710. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com , or visit http://www.apress.com .
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution
has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to
any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly
by the information contained in this work.
The source code for this book is available to readers at http://www.apress.com in the Downloads section
and also at http://www.gigamonkeys.com/book/ .
674249554.075.png 674249554.076.png 674249554.077.png 674249554.078.png 674249554.079.png 674249554.080.png 674249554.081.png 674249554.082.png 674249554.083.png 674249554.084.png 674249554.086.png 674249554.087.png 674249554.088.png 674249554.089.png 674249554.090.png 674249554.091.png 674249554.092.png 674249554.093.png 674249554.094.png 674249554.095.png 674249554.097.png
For Lily, Mom, and Dad
674249554.098.png 674249554.099.png 674249554.100.png 674249554.101.png 674249554.102.png 674249554.103.png 674249554.104.png 674249554.105.png 674249554.106.png 674249554.002.png 674249554.003.png 674249554.004.png 674249554.005.png 674249554.006.png 674249554.007.png 674249554.008.png 674249554.009.png 674249554.010.png 674249554.011.png 674249554.013.png 674249554.014.png
Zgłoś jeśli naruszono regulamin