Book description
Lisp is a uniquely powerful programming language that, despite its academic reputation, is actually very practical. Land of Lisp brings the language into the real world, teaching readers Lisp by showing them how to write several complete Lisp-based games, including a text adventure, an evolution simulation, and a robot battle. While building these games, readers learn the core concepts of Lisp programming, such as recursion, input/output, object-oriented programming, and macros. And thanks to Lisp's powerful syntax, the example code is short and easy to understand. The book is filled with the author's brilliant Lisp cartoons, which are sure to appeal to many Lisp fans and, in the tradition of all No Starch Press titles, make learning more fun.
Publisher resources
Table of contents
-
Land of Lisp
- Acknowledgments
- Introduction
-
I. Lisp is Power
- 1. Getting Started with Lisp
- 2. Creating Your First Lisp Program
- 3. Exploring the Syntax of Lisp Code
-
II. Lisp is Symmetry
- 4. Making Decisions with Conditions
- 5. Building a Text Game Engine
- 6. Interacting with the World: Reading and Printing in Lisp
- 6.5. lambda: A Function So Important It Deserves Its Own Chapter
- 7. Going Beyond Basic Lists
- 8. This Ain't Your Daddy's Wumpus
- 9. Advanced Datatypes and Generic Programming
-
III. Lisp is Hacking
- 10. Looping with the loop Command
-
11. Printing Text with the format Function
- Anatomy of the format Function
- Control Sequences for Printing Lisp Values
- Control Sequences for Formatting Numbers
- Printing Multiple Lines of Output
- Justifying Output
- Iterating Through Lists Using Control Sequences
- A Crazy Formatting Trick for Creating Pretty Tables of Data
- Attack of the Robots!
- What You've Learned
- 12. Working with Streams
- 13. Let's Create a Web Server!
- 13.5. Functional Programming Is Beautiful
-
IV. Lisp is Science
- 14. Ramping Lisp Up a Notch with Functional Programming
-
15. Dice of Doom, a Game Written in the Functional Style
- The Rules of Dice of Doom
- A Sample Game of Dice of Doom
-
Implementing Dice of Doom, Version 1
- Defining Some Global Variables
- Representing the Game Board
- Decoupling Dice of Doom's Rules from the Rest of the Game
- Generating a Game Tree
- Calculating Passing Moves
- Calculating Attacking Moves
- Finding the Neighbors
- Attacking
- Reinforcements
- Trying Out Our New game-tree Function
- Playing Dice of Doom Against Another Human
- Creating an Intelligent Computer Opponent
- Making Dice of Doom Faster
- What You've Learned
- 16. The Magic of Lisp Macros
- 17. Domain-Specific Languages
- 18. Lazy Programming
- 19. Creating a Graphical, Web-Based Version of Dice of Doom
- 20. Making Dice of Doom More Fun
- A. Epilogue
- Index
- About the Author
- Updates
Product information
- Title: Land of Lisp
- Author(s):
- Release date: November 2010
- Publisher(s): No Starch Press
- ISBN: 9781593272814
You might also like
book
Practical Common Lisp
...it has a fresh view on the language and the examples in the later chapters are …
book
Programming Algorithms in Lisp: Writing Efficient Programs with Examples in ANSI Common Lisp
Master algorithms programming using Lisp, including the most important data structures and algorithms. This book also …
book
The Go Programming Language
is the authoritative resource for any programmer who wants to learn Go. It shows how to …
book
The Rust Programming Language, 2nd Edition
The Rust Programming Language, 2nd Edition is the official guide to Rust 2021: an open source …