Apress NBA

Practical Common Lisp

By Peter Seibel

  • eBook Price: $48.99
Buy eBook Buy Print Book
Lisp is thought of as an academic language, but it need not be. This is the first book that introduces Lisp as a language for the real world. Practical Common Lisp presents a thorough introduction to Common Lisp, providing you with an overall understanding of the language features and how they work.

Full Description

  • Add to Wishlist
  • ISBN13: 978-1-59059-239-7
  • 528 Pages
  • User Level: Beginner to Advanced
  • Publication Date: April 6, 2005
  • Available eBook Formats: EPUB, MOBI, PDF

Related Titles

  • Practical C
  • Programming Excel with VBA
  • Practical Laravel 5
  • Practical Swift
  • Develop Microsoft HoloLens Apps Now
  • DevOps for Digital Leaders
  • MVVM in Delphi
  • Beginning FPGA: Programming Metal
  • Requirements Writing for System Engineering
  • Windows 10 for the Internet of Things
Full Description

Lisp is often thought of as an academic language, but it need not be. This is the first book that introduces Lisp as a language for the real world.

Practical Common Lisp presents a thorough introduction to Common Lisp, providing you with an overall understanding of the language features and how they work. Over a third of the book is devoted to practical examples, such as the core of a spam filter and a web application for browsing MP3s and streaming them via the Shoutcast protocol to any standard MP3 client software (e.g., iTunes, XMMS, or WinAmp). In other "practical" chapters, author Peter Seibel demonstrates how to build a simple but flexible in-memory database, how to parse binary files, and how to build a unit test framework in 26 lines of code.

Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.

Errata

If you think that you've found an error in this book, please let us know by emailing to editorial@apress.com . You will find any confirmed erratum below, so you can check if your concern has already been addressed.

On page 107:
Entered the following code:

;; Unit test framework

(defun report-result (result form)
(format t "~:[FAIL~;pass~] ... ~a~%" result form)
result)

(defmacro check (&body forms)
`(combine-results
,@(loop for f in forms collect `(report-result ,f ',f))))

(defmacro combine-results (&body forms)
(with-gensyms (result)
`(let ((,result t))
,@(loop for f in forms collect `(unless ,f (setf ,result nil)))
,result)))

(defun test-+ ()
(check
(= (+ 1 2) 2)
(= (+ 1 2 3) 6)
(= (+ -1 -3) -4)))

GNU CLISP 2.49 gives the following error:


[1]> (load "test.lisp")
;; Loading file test.lisp ...
*** - LET: variable RESULT has no value
The following restarts are available:
USE-VALUE :R1 Input a value to be used instead of RESULT.
STORE-VALUE :R2 Input a new value for RESULT.
SKIP :R3 skip (DEFUN TEST-+ NIL ...)
RETRY :R4 retry (DEFUN TEST-+ NIL ...)
STOP :R5 stop loading file /Users/chuck/lisp/cpl/9/test.lisp
ABORT :R6 Abort main loop

Been away from Lisp for a while, so I haven't been able to track down why it is failing yet.

Best-Sellers

    1. PHP Objects, Patterns, and Practice

      $38.99

      View Book

    2. Beginning Android 3D Game Development

      $34.99

      View Book

    3. Troubleshooting Oracle Performance

      $41.99

      View Book

    4. Beginning Amazon Web Services with Node.js

      $38.99

      View Book