
Realm of Racket
Learn to Program, One Game at a Time!
No Starch Press
Published on 13. June 2013
320 pages
978-1-59327-492-4 (ISBN)
System requirements
for ePUB without DRM
E-Book Single Licence
You are acquiring a single user licence for this eBook, which you might not transfer. [L]
Available for download
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
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!
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!
More details
Language
English
Place of publication
New York
United States
Product notice
Reflowable
File size
9,18 MB
ISBN-13
978-1-59327-492-4 (9781593274924)
Schweitzer Classification
Other editions
Additional editions

Matthias Felleisen | Conrad Barski | David Van Horn
Realm of Racket
Book
06/2013
1st Edition
No Starch Press
€32.00
Article in reprint
Persons
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 at Northeastern University 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.
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 at Northeastern University 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.
Content
- Intro
- Realm of Racket: Learn to Program, One Game at a Time!
- Dedication
- 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
- 1. (Getting Started)
- 1.1 Readying Racket
- 1.2 Interacting with Racket
- Raise-Chapter Checkpoint
- 2. (A First Racket Program)
- 2.1 The Guess My Number Game
- 2.2 Defining Variables
- 2.3 Basic Racket Etiquette
- 2.4 Defining Functions in Racket
- A Function for Guessing
- Functions for Closing In
- The Main Function
- Resume-Chapter Checkpoint
- 3. (Basics of Racket)
- 3.1 Syntax and Semantics
- 3.2 The Building Blocks of Racket Syntax
- 3.3 The Building Blocks of Racket Semantics
- Booleans
- Symbols
- Numbers
- Strings
- 3.4 Lists in Racket
- CONS Cells
- Functions for CONS Cells
- Lists and List Functions
- The CONS Function
- The LIST Function
- The FIRST and REST Functions
- Nested Lists
- 3.5 Structures in Racket
- Structure Basics
- Nesting Structures
- Structure Transparency
- Interrupt-Chapter Checkpoint
- 4. (Conditions and Decisions)
- 4.1 How to Ask
- 4.2 The Conditionals: IF and Beyond
- One Thing at a Time with IF
- The Special Form that Does It All: COND
- A First Taste of Recursion
- 4.3 Cool Tricks with Conditionals
- Using the Stealth Conditionals AND and OR
- Using Functions that Return More than Just the Truth
- 4.4 Equality Predicates, Once More
- 4.5 Comparing and Testing
- Writing a Test
- What Is Not a Test
- Testing in the Real World
- More Testing Facilities
- Call-with-current-continuation-Chapter Checkpoint
- 4½. (define define 'define)
- 4½.1 Module-Level Definitions
- Variable Definitions
- Function Definitions
- 4½.2 Local Definitions
- Abort-Chapter Checkpoint
- 5. (big-bang)
- 5.1 Graphical User Interface
- 5.2 Landing a UFO
- 5.3 Using big-bang: Syntax and Semantics
- 5.4 Guessing Gooey
- The Data
- The Main Function
- Key-Events
- Rendering
- Time to Stop
- Exit-Chapter Checkpoint
- Chapter Challenges
- 6. (Recursion Is Easy)
- 6.1 Robot Snake
- 6.2 A Data Representation for the Snake Game
- 6.3 The Main Function
- 6.4 Clock Ticks
- Eating and Growing
- Slithering
- Rotting Goo
- 6.5 Key-Events
- 6.6 Rendering
- 6.7 End Game
- 6.8 Auxiliary Functions
- Return-Chapter Checkpoint
- Chapter Challenges
- 7. (Land of Lambda)
- 7.1 Functions as Values
- 7.2 Lambda
- 7.3 Higher-Order Fun
- 7.4 Two More Higher-Order Functions
- 7.5 Derive This!
- 7.6 apply
- Break-Chapter Checkpoint
- 8. (Mutant Structs)
- 8.1 Chad's First Battle
- 8.2 Orc Battle
- 8.3 Setting Up the World, a First Step
- 8.4 Action: How Structs Really Work
- 8.5 More Actions, Setting Up the World for Good
- 8.6 Ready, Set, big-bang
- 8.7 Initializing the Orc World
- 8.8 Rendering the Orc World
- 8.9 The End of the World
- 8.10 Actions, A Final Look
- Throw-Chapter Checkpoint
- Chapter Challenges
- 9. (The Values of Loops)
- 9.1 FOR Loops
- 9.2 Multiple Values
- 9.3 Back to FOR/FOLD
- 9.4 More on Loops
- Waitpid-Chapter Checkpoint
- 10. (Dice of Doom)
- 10.1 The Game Tree
- 10.2 Dice of Doom, The Game
- 10.3 Designing Dice of Doom: Take One
- Filling in the Blanks
- Simplifying the Rules
- End of Game
- Controlling the Game
- 10.4 How Game Trees Work
- 10.5 Game States and Game Trees for Dice of Doom
- 10.6 Roll the Dice
- 10.7 Rendering the Dice World
- 10.8 Input Handling
- 10.9 Creating a Game Tree
- The Game Tree
- Neighbors
- Attacks
- 10.10 The End Game
- Kill-Chapter Checkpoint
- Chapter Challenges
- 11. (Power to the Lazy)
- 11.1 Doomsday
- 11.2 Lazy Evaluation
- 11.3 Memoized Computations
- 11.4 Racket Can Be Lazy
- Delay-Chapter Checkpoint
- 12. (Artificial Intelligence)
- 12.1 An Intelligent Life-form
- 12.2 Lazy Games
- 12.3 Adding Artificial Intelligence
- Stop-when-Chapter Checkpoint
- Chapter Challenges
- 13. (The World Is Not Enough)
- 13.1 What Is a Distributed Game?
- 13.2 The Data
- Messages
- Previously Fabricated Structures
- Packages
- Bundles
- iworld Structures
- 13.3 The Network Postal Service
- 13.4 Organizing Your Universe
- 13.5 Distributed Guess
- The State of the Client and the State of the Server
- The Server
- The Client
- Running the Game
- Error-Chapter Checkpoint
- Chapter Challenges
- 14. (Hungry Henry)
- 14.1 King Henry the Hungry
- 14.2 Hungry Henry, the Game
- 14.3 Two United States
- 14.4 Henry's Universe
- Message Data and Structures
- Complex Numbers Are Good Positions
- A Day in the Life of a Server
- A Day in the Life of a Client
- 14.5 State of the Union
- State of Henry
- State of the House
- 14.6 Main, Take Client
- The Appetizer State
- The Entree State
- 14.7 Main, Take Server
- The Join State and Network Events
- The Join State and Tick Events
- The Play State and Network Events
- The Play State and Tick Events
- 14.8 See Henry Run
- On-disconnect-Chapter Checkpoint
- 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
- Index
- About the Authors
- Copyright
System requirements
File format: ePUB
Copy protection: without DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Use a reader that can handle the file format ePUB, such as Adobe Digital Editions or FBReader – both free (see eBook Help).
- Tablet/Smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePUB works well for novels and non-fiction books – i.e., 'flowing' text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook does not use copy protection or Digital Rights Management
For more information, see our eBook Help page.