• Complain

Matthias Felleisen - Realm of Racket: Learn to Program, One Game at a Time!

Here you can read online Matthias Felleisen - Realm of Racket: Learn to Program, One Game at a Time! full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2013, publisher: No Starch Press, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Matthias Felleisen Realm of Racket: Learn to Program, One Game at a Time!

Realm of Racket: Learn to Program, One Game at a Time!: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Realm of Racket: Learn to Program, One Game at a Time!" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

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, youll 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 youll 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 its on to lambda and mutant structs (and an Orc Battle), and fancy loops and the Dice of Doom. Finally, youll explore laziness, AI, distributed games, and the Hungry Henry game.

As you progress through the games, chapter checkpoints and challenges help reinforce what youve learned. Offbeat comics keep things fun along the way.

As you travel through the Racket realm, youll:

  • Master the quirks of Rackets 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!

Matthias Felleisen: author's other books


Who wrote Realm of Racket: Learn to Program, One Game at a Time!? Find out the surname, the name of the author of the book and a list of all author's works by series.

Realm of Racket: Learn to Program, One Game at a Time! — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Realm of Racket: Learn to Program, One Game at a Time!" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
About the Authors

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.

Chapter 1. (Getting Started)

#|

You need a Racket before you can launch a rocket, so the first thing you need to learn is how to download and install DrRacket. Once you have it on your computer, you will learn how to experiment. Racket is all about experimenting with expressions and creating your programs from these experiments. After some quick demonstrations, youll be ready to write a game!

|#

1.1 Readying Racket

Racket is a programming language. In principle, the Racket compiler is all you need to write Racket programs. You couldand die-hard Lispers wouldlaunch the Racket compiler in an interactive mode, type in the program, and voil, youd have a running program. Or youd get an error message saying that something isnt quite right, and youd have to retype a part of your program. After a while, this gets bothersome. Just as you need a comfortable seat to work, you need a convenient software seat to develop your programs, to experiment with pieces, to run your test suites, and to explore the partially finished game. We call this place a program development environment (PDE) ; others refer to it as an interactive development environment (IDE) .

DrRacketpronounced Doctor Racketis the PDE for Racket, and it is bundled with the Racket programming language. The original Racketeersthe people who created and use DrRacketwanted to have a PDE where everyoneyoung children, old Lispers, and regular programmerscould quickly feel comfortable. Therefore, DrRacket is designed in such a way that you can immediately experiment with expressions and program fragments. You can edit programs and run them. You can write tests for your program and check them. And using DrRacket is quite easy.

So lets get DrRacket. Point your browser to racket-lang.org, and near the top-right area of the page, you will see a download icon. Click the icon, choose your platform, and download Racket from any of the sites that show up.

Racket can run on Windows, Mac, and *nix systems. For Windows and Macs, a software installer takes care of everything that needs to happen. If youre on a *nix box, you are already a hero and dont need instructions. In the end, you will have a folder with several applications. Launch DrRacket as appropriate for your platform: by clicking, from a shell, or whatever.

Note

#|

In this folder, you can see another folder called collects and within that folder, you can find realm . There, you can access all the source code for all the games in this book. We encourage you to open these files in DrRacket and to experiment with the code.

|#

Among other things Racket is a programming language for making programming - photo 1

Among other things, Racket is a programming language for making programming languages. Because of that, Racket comes in many flavors. Some flavors are for beginners; they are called teaching languages . Others are for writing small shell scripts or large applications. A third kind is for old people who wish to program in long-gone languages. And there are many more flavors beyond this short list. As far as this book is concerned, however, we will show you just one flavor: plain Racket.

You choose which Racket flavor you want to use with these four steps:

  • Select the Language menu of DrRacket.

  • Select the Choose Language... menu.

  • Enable the option The Racket Language.

  • Click OK and then click Run, the little green go icon.

Now take a closer look at DrRacket. You should see these primary pieces:

  • Some buttons, including Run and Stop

  • A definitions panel where you see the text #lang racket, which means you are using the Racket programming language

  • An interactions panel labeled Welcome to DrRacket with another line of text that says your chosen language is racket and a third line with just one symbol: >

1.2 Interacting with Racket

DrRacket displays the > prompt in the interactions panel. The prompt signals that DrRacket expects you to enter an expression, say (+ 1 1). DrRacket reads this expression, evaluates it, prints the result, and then displays its prompt again. Old Lispers call this mechanism a read-eval-print loop , but we are sticking with the Racketeer term interactions panel .

Go ahead. Enter an expression. Use (+ 1 1) if you cant think of anything better. Here is what happens:

> (+ 1 1)2

As soon as you hit the Enter key, DrRacket becomes active and prints the result. Lets try another expression:

> (+ 3 (* 2 4))11

The interactions panel works! Hooray! You type expressions and Racket evaluates them. Experiment some morethats what the interactions panel is for. You could, for example, play with expressions like these:

> (sqrt 9)3> (sqrt -9)0+3i

Yes, Racket knows about complex numbers. How about this:

> (+ 1 2 3 4 5 6 7 8 9 0)45

Calling + on many numbers actually works. And so do nested expressions:

> (sqrt (+ (sqr 3) (sqr 4)))5

Lists are a pleasure, too:

> '((1 3 5 7 9) (2 4 6 8 0))'((1 3 5 7 9) (2 4 6 8 0))

They come back out just as you put them in, because there is nothing to evaluate with lists.

How about expressions as nested lists?

> '(sqrt (+ (sqr 3) (sqr 4)))'(sqrt (+ (sqr 3) (sqr 4)))

Okay, enough of that. We need to move on to the definitions panel.

Take a look at the sketch below. We entered (+ 3 (* 2 4)) into the definitions panel, hit Enter, and nothing happened. While the interactions panel is for experimenting with expressions, the definitions panel is where you record your code.

To make something happen click the Run button DrRacket will evaluate the - photo 2

To make something happen, click the Run button. DrRacket will evaluate the expression and then print the result 11 in the interactions panel. You could also enter this in the definitions panel:

'(hello world)

Click Run, and youll see '(hello world) in the interactions panel. DrRacket does all the printing for you; theres no need for you to specify such mundane things. Also, note that your cursor is back in the interactions panel. You can now enter expressions there again and experiment some more.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Realm of Racket: Learn to Program, One Game at a Time!»

Look at similar books to Realm of Racket: Learn to Program, One Game at a Time!. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Realm of Racket: Learn to Program, One Game at a Time!»

Discussion, reviews of the book Realm of Racket: Learn to Program, One Game at a Time! and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.