If you are a beginner or would like to use a graphical environment to run programs, run the DrRacket executable. In Windows Vista or newer, you can just type DrRacket. It is probably in a Racket folder that you dragged into your Applications folder. On Unix including Linux , the drracket executable can be run directly from the command-line if it is in your path, which is probably the case if you chose a Unix-style distribution when installing. Otherwise, navigate to the directory where the Racket distribution is installed, and the drracket executable will be in the "bin" subdirectory. If you are new to programming or if you have the patience to work through a textbook: Continue: Web Applications in Racket introduces you to modules and building web applications.

Author:Dolkree Yozshubei
Country:Costa Rica
Language:English (Spanish)
Published (Last):5 November 2010
PDF File Size:5.14 Mb
ePub File Size:14.25 Mb
Price:Free* [*Free Regsitration Required]

DrRacket Guide This guide explains the most important things you need to know to get started working with DrRacket on CS problem sets. All the software we use is freely available, open source software, and should work on at least Mac OS X, Microsoft Windows any recent version , and Linux. Even if you are using your own laptop, though, you are highly encouraged to work in the designated CS lab space so you will benefit from the staffed lab hours as well as the presence of your fellow classmates.

The schedule for office and lab hours is posted on the course site. If you do not have access to a laptop, DrRacket is already installed on the public ITC machines there are not many of these left, but a few in Alderman library and other places on grounds and in the Olsson Hall lab machines. Where the logo will be depends on your platform and how you installed DrRacket. I recommend pinning the logo to the taskbar by dragging it there. You can also launch DrRacket by double-clicking on a Scheme code file with a.

It supports several languages. The first time you run DrRacket, you need to choose a programming language. Enter Ctrl-L to bring up the Choose Language dialog box. The top half is the Definitions window, the bottom half is the Interactions window. You can make one of the windows disappear and the other one take over the whole screen by using Show Hide Definitions or Show Hide Interactions under the View menu. You should use the Definitions window to edit all the code you will turn in, and use the Interactions window to try evaluating small expressions and to test your code.

You can evaluate expressions directly in the Interactions window to just try them out. However, whenever you click Run all the definitions you entered in the Interactions window are lost.

The Run button loads the contents of the Definitions window into the Interactions window. Be careful to remember that clicking Run does not also save your definitions to the disk. To save your definitions, you must click the Save button which will appear after you make a change in the Definitions window.

Remember to save your code often. It is also a good idea to save copies under different names so you can compare to earlier versions if something breaks when you make a change. Use esc-p in the Interactions window to cycle through previous commands. This can save lots of typing. To open home directory, click on the house icon on your desktop and enter in your user id and password. To create a cs sub-directory in your home directory, right click in your home directory and select New Folder.

Rename the New Folder cs Then, open the cs folder, and then create another new folder for the current problem set for example ps0. We recommend you create a new folder for each problem set to avoid confusion with multiple files. If you are working on your own machine, it is highly advisable to set up a cs directory that will be backed up and accessible to you over the network for your cs work.

If you are not already using some other service for this, we recommend installing DropBox which is free for up to 2GB, which should be plenty for this class. Editor In both the Definitions and Interactions windows, you can type and edit text. Scheme interprets everyting to the right of a semicolon ; as a comment. You should always start your file with comment lines that include your name and UVa computing id e.

This provides a useful clue to notice if you have forgotten or misplaced a parenthesis. In the Definitions window, when you press return, the editor will go to a new line and automatically indent it according to the structure of your Scheme expression. You can use Ctrl-f in the editor to search for a string.

To quickly find a definition, click on the define … button at the top left to reveal a list of all names that are defined in the Definitions window. Click on the name you want to jump directly to that definition. Bugs When something goes wrong in evaluating an expression, DrRacket will produce an error message like this: The expression that was being evaluated will be highlighted in pink. If you click on the leftmost red circle with white inscribed cross at the left of the message, DrRacket will pop up a window that shows you what was being evaluated when the problem occured.

To print your output in the Interactions window, go to File and select Print Interactions. Please make sure that what you turn in for a problem set clearly marks the questions you are answering. You should not include provided code that you did not change in what you turn in.


Inside PRL

Tutorial: Zero to Sixty in Racket Racket is excellent for incrementally growing scripts into full-fledged programs. This post steps through the evolution of one small program and highlights the Racket tools that enable incremental advances. Why should anyone use Racket? Has lexical scope, parentheses, active users



Related Articles