Synopses & Reviews
Racket is a descendant of Lisp, a programming language renowned for its elegance, power, and challenging learning curve. But while Racket retains the functional goodness of Lisp, it was designed with beginning programmers in mind. Realm of Racket is your introduction to the Racket language.
In Realm of Racket, you'll learn to program by creating increasingly complex games. Your journey begins with the Guess My Number game and coverage of some basic Racket etiquette. Next you'll dig into syntax and semantics, lists, structures, and conditionals, and learn to work with recursion and the GUI as you build the Robot Snake game. After that it's on to lambda and mutant structs (and an Orc Battle), and fancy loops and the Dice of Doom. Finally, you'll explore laziness, AI, distributed games, and the Hungry Henry game.
As you progress through the games, chapter checkpoints and challenges help reinforce what you've learned. Offbeat comics keep things fun along the way.
As you travel through the Racket realm, you'll:
- Master the quirks of Racket's syntax and semantics
- Learn to write concise and elegant functional programs
- Create a graphical user interface using the 2htdp/image library
- Create a server to handle true multiplayer games
Realm of Racket is a lighthearted guide to some serious programming. Read it to see why Racketeers have so much fun!
Synopsis
Racket is a descendant of the language family that includes Lisp and Scheme. The language was designed with beginning programming students in mind, and boasts succinct syntax and a gradual learning curve. Inspired by The Land of Lisp, Realm of Racket incorporates cartoons and wacky examples while teaching readers the fundamentals of the Racket language.
Synopsis
Racket is the noble descendant of Lisp, a programming language renowned for its elegance and power. But while Racket retains the functional goodness of Lisp that makes programming purists drool, it was designed with beginning programmers in mind. Realm of Racket promises to make this language even more fun and accessible with its collection of comics and games.
You'll follow Chad, a hapless college freshman, whose cartoon adventures introduce new programming skills in each chapter. As you begin to tackle more complex concepts, like recursion, mutable structs, lazy evaluation, and distributed programming, the games get more sophisticated—and more fun! By the end of the book you'll have programmed and played complete games like Robot Snake, Orc Battle, Dice of Doom, and Hungry Henry.
Along the way, you'll learn to:
- Master the quirks of Racket's syntax and semantics
- Write concise and elegant functional programs
- Create a graphical user interface using the 2htdp/image library
- Create a server to handle true multiplayer games
- Put your Racket skills to the test by taking on challenging end-of-chapter exercises
Realm of Racket is a lighthearted guide that will teach you some serious programming. Programming just got more fun.
About the Author
Professor Matthias Felleisen is one of the original authors of the Racket language and a co-author of
The Little Schemer and
How to Design Programs. In 1995, Felleisen launched the TeachScheme! Project, reaching out to high schools with a radically novel computing curriculum. Felleisen is the 2012 recipient of the ACM Special Interest Group on Programming Languages (SIGPLAN) Lifetime Achievement Award as well as ACM's 2009 Karl V. Karlstrom Outstanding Educator Award. He is currently a Trustee Professor in the College of Computer and Information Science at Northeastern University in Boston, Massachusetts.
Conrad Barski has an M.D. from the University of Miami and nearly 20 years of programming experience. The author of Land of Lisp, Barski is also an avid cartoonist, having created the popular alien Lisp mascot and many graphical tutorials.
David Van Horn is a research professor who has programmed in Racket and Scheme for over a decade.
Eight students of Northeastern University contributed to Realm of Racket: Forrest Bice, Rose DeMaio, Spencer Florence, Feng-Yun Mimi Lin, Scott Lindeman, Nicole Nussbaum, Eric Peterson, and Ryan Plessner.
Table of Contents
; Acknowledgments; Preface (Hello World); Why Would I Want to Learn About Racket?; Who Should Read This Book?; What Teaching Approach Is Used?; Can I Skip Chapters?; Anything Else I Should Know?; Introduction (Open Paren); (.1 What Makes Lisp So Cool and Unusual?; (.2 Where Did Lisp Come From?; (.3 What Does Lisp Look Like?; (.4 Where Does Racket Come From?; (.5 What Is This Book About?; Halt--Chapter Checkpoint; Chapter 1: (Getting Started); 1.1 1.1 Readying Racket; 1.2 1.2 Interacting with Racket; 1.3 Raise--Chapter Checkpoint; Chapter 2: (A First Racket Program); 2.1 2.1 The Guess My Number Game; 2.2 2.2 Defining Variables; 2.3 2.3 Basic Racket Etiquette; 2.4 2.4 Defining Functions in Racket; 2.5 Resume--Chapter Checkpoint; Chapter 3: (Basics of Racket); 3.1 3.1 Syntax and Semantics; 3.2 3.2 The Building Blocks of Racket Syntax; 3.3 3.3 The Building Blocks of Racket Semantics; 3.4 3.4 Lists in Racket; 3.5 3.5 Structures in Racket; 3.6 Interrupt--Chapter Checkpoint; Chapter 4: (Conditions and Decisions); 4.1 4.1 How to Ask; 4.2 4.2 The Conditionals: IF and Beyond; 4.3 4.3 Cool Tricks with Conditionals; 4.4 4.4 Equality Predicates, Once More; 4.5 4.5 Comparing and Testing; 4.6 Call-with-current-continuation--Chapter Checkpoint; Chapter 4½: (define define 'define); 5.1 4½.1 Module-Level Definitions; 5.2 4½.2 Local Definitions; 5.3 Abort--Chapter Checkpoint; Chapter 5: (big-bang); 6.1 5.1 Graphical User Interface; 6.2 5.2 Landing a UFO; 6.3 5.3 Using big-bang: Syntax and Semantics; 6.4 5.4 Guessing Gooey; 6.5 Exit--Chapter Checkpoint; 6.6 Chapter Challenges; Chapter 6: (Recursion Is Easy); 7.1 6.1 Robot Snake; 7.2 6.2 A Data Representation for the Snake Game; 7.3 6.3 The Main Function; 7.4 6.4 Clock Ticks; 7.5 6.5 Key-Events; 7.6 6.6 Rendering; 7.7 6.7 End Game; 7.8 6.8 Auxiliary Functions; 7.9 Return--Chapter Checkpoint; 7.10 Chapter Challenges; Chapter 7: (Land of Lambda); 8.1 7.1 Functions as Values; 8.2 7.2 Lambda; 8.3 7.3 Higher-Order Fun; 8.4 7.4 Two More Higher-Order Functions; 8.5 7.5 Derive This!; 8.6 7.6 apply; 8.7 Break--Chapter Checkpoint; Chapter 8: (Mutant Structs); 9.1 8.1 Chad's First Battle; 9.2 8.2 Orc Battle; 9.3 8.3 Setting Up the World, a First Step; 9.4 8.4 Action: How Structs Really Work; 9.5 8.5 More Actions, Setting Up the World for Good; 9.6 8.6 Ready, Set, big-bang; 9.7 8.7 Initializing the Orc World; 9.8 8.8 Rendering the Orc World; 9.9 8.9 The End of the World; 9.10 8.10 Actions, A Final Look; 9.11 Throw--Chapter Checkpoint; 9.12 Chapter Challenges; Chapter 9: (The Values of Loops); 10.1 9.1 FOR Loops; 10.2 9.2 Multiple Values; 10.3 9.3 Back to FOR/FOLD; 10.4 9.4 More on Loops; 10.5 Waitpid--Chapter Checkpoint; Chapter 10: (Dice of Doom); 11.1 10.1 The Game Tree; 11.2 10.2 Dice of Doom, The Game; 11.3 10.3 Designing Dice of Doom: Take One; 11.4 10.4 How Game Trees Work; 11.5 10.5 Game States and Game Trees for Dice of Doom; 11.6 10.6 Roll the Dice; 11.7 10.7 Rendering the Dice World; 11.8 10.8 Input Handling; 11.9 10.9 Creating a Game Tree; 11.10 10.10 The End Game; 11.11 Kill--Chapter Checkpoint; 11.12 Chapter Challenges; Chapter 11: (Power to the Lazy); 12.1 11.1 Doomsday; 12.2 11.2 Lazy Evaluation; 12.3 11.3 Memoized Computations; 12.4 11.4 Racket Can Be Lazy; 12.5 Delay--Chapter Checkpoint; Chapter 12: (Artificial Intelligence); 13.1 12.1 An Intelligent Life-form; 13.2 12.2 Lazy Games; 13.3 12.3 Adding Artificial Intelligence; 13.4 Stop-when--Chapter Checkpoint; 13.5 Chapter Challenges; Chapter 13: (The World Is Not Enough); 14.1 13.1 What Is a Distributed Game?; 14.2 13.2 The Data; 14.3 13.3 The Network Postal Service; 14.4 13.4 Organizing Your Universe; 14.5 13.5 Distributed Guess; 14.6 Error--Chapter Checkpoint; 14.7 Chapter Challenges; Chapter 14: (Hungry Henry); 15.1 14.1 King Henry the Hungry; 15.2 14.2 Hungry Henry, the Game; 15.3 14.3 Two United States; 15.4 14.4 Henry's Universe; 15.5 14.5 State of the Union; 15.6 14.6 Main, Take Client; 15.7 14.7 Main, Take Server; 15.8 14.8 See Henry Run; 15.9 On-disconnect--Chapter Checkpoint; 15.10 Chapter Challenges; Conclusion. Good-Bye (Close Paren); ).1 Run Racket Run; ).2 Racket Is a Programming Language; ).3 Racket Is a Metaprogramming Language; ).4 Racket Is a Programming-Language Programming Language; So Long;