0%

At last, a lively guided tour through all the features, functions, and applications of the Racket programming language. You’ll learn a variety of coding paradigms, including iterative, object oriented, and logic programming; create interactive graphics, draw diagrams, and solve puzzles as you explore Racket through fun computer science topics—from statistical analysis to search algorithms, the Turing machine, and more.

Early chapters cover basic Racket concepts like data types, syntax, variables, strings, and formatted output. You’ll learn how to perform math in Racket’s rich numerical environment, and use programming constructs in different problem domains (like coding solutions to the Tower of Hanoi puzzle). Later, you’ll play with plotting, grapple with graphics, and visualize data. Then, you’ll escape the confines of the command line to produce animations, interactive games, and a card trick program that’ll dazzle your friends.

You'll learn how to:

•Use DrRacket, an interactive development environment (IDE) for writing programs
•Compute classical math problems, like the Fibonacci sequence
•Generate two-dimensional function plots and create drawings using graphics primitives
•Import and export data to and from Racket using ports, then visually analyze it
•Build simple computing devices (pushdown automaton, Turing machine, and so on) that perform tasks
•Leverage Racket’s built-in libraries to develop a command line algebraic calculator

Racket Programming the Fun Way is just like the language itself—an embodiment of everything that makes programming interesting and worthwhile, and that makes you a better programmer.

Table of Contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Dedication
  5. About the Author
  6. About the Technical Reviewer
  7. BRIEF CONTENTS
  8. CONTENTS IN DETAIL
  9. ACKNOWLEDGMENTS
  10. INTRODUCTION
  11. 1 RACKET BASICS
    1. Atomic Data
    2. Lists
    3. Defines, Assigns, and Variables
    4. Symbols, Identifiers, and Keywords
    5. Equality
    6. Strings and Things
    7. Vectors
    8. Using structs
    9. Controlling Output
    10. Summary
  12. 2 ARITHMETIC AND OTHER NUMERICAL PARAPHERNALIA
    1. Booleans
    2. The Numerical Tower
    3. Numeric Comparison
    4. Combining Data Types
    5. Built-in Functions
    6. Infix Notation
    7. Summary
  13. 3 FUNCTION FUNDAMENTALS
    1. What Is a Function?
    2. Conditional Expressions: It’s All About Choices
    3. I’m Feeling a Bit Loopy!
    4. Time for Some Closure
    5. Applications
    6. Summary
  14. 4 PLOTTING, DRAWING, AND A BIT OF SET THEORY
    1. Plotting
    2. Drawing
    3. Set Theory
    4. Applications
    5. Summary
  15. 5 GUI: GETTING USERS INTERESTED
    1. Introduction to GUIs
    2. Animating a Cycloid
    3. Pick a Card
    4. Control Tower
    5. Summary
  16. 6 DATA
    1. I/O, I/O, It’s Off to Work We Go
    2. Introduction to Security
    3. Getting Data into Racket
    4. A Database Detour
    5. Data Visualization
    6. A Bit of Statistics
    7. Summary
  17. 7 SEARCHING FOR ANSWERS
    1. Graph Theory
    2. The N-Queens Problem
    3. Dijkstra’s Shortest Path Algorithm
    4. The 15 Puzzle
    5. Sudoku
    6. Summary
  18. 8 LOGIC PROGRAMMING
    1. Introduction
    2. The Basics
    3. Applications
    4. Summary
  19. 9 COMPUTING MACHINES
    1. Finite-State Automata
    2. The Turing Machine
    3. Pushdown Automata
    4. A Few Words About Languages
    5. Summary
  20. 10 TRAC: THE RACKET ALGEBRAIC CALCULATOR
    1. The TRAC Pipeline
    2. The Lexical Analyzer
    3. The Parser
    4. TRAC
    5. Adding a Dictionary
    6. Summary
  21. A NUMBER BASES
  22. B SPECIAL SYMBOLS
  23. BIBLIOGRAPHY
  24. INDEX
3.136.154.103