Drscheme setup




















DrScheme's features include: Source text highlighting of syntax errors Source text highlighting of run-time errors Support for multiple levels of Scheme from "beginner'' to "advanced'' Interactive and graphical static analysis An object system A toolbox of simple drawing commands suitable for simple drawing An advanced graphical user interface GUI library.

How can I obtain DrScheme for my personal computer? To start DrScheme use the command: drscheme Invoking DrScheme on other platforms may require a different command or may be done via an icon. When DrScheme finishes loading, the opening screen will be replaced by the DrScheme interactive window, which looks like this: This "snapshot" was created on a Linux platform.

Your screen may not look exactly like this, but it should be close. Enter function definitions "programs" in the upper window and issue DrScheme commands in the lower window. You can also load a saved listing of function definitions by selecting Open on the File menu.

Check for syntax errors by clicking the Check Syntax button. If you do not see a Check Syntax button on your screen, click the Language menu and select one of the options that does not say without debugging. Load your function definitions into the interpreter by clicking the Execute button. Invoke functions in the interactions window. Exit your DrScheme sesssion by selecting Quit in the File menu.

Using command line verison - MzScheme PLT scheme programs can be entered on the command line in what is called listener mode. To enter listener mode, type the command mzscheme In listener mode mzsheme is waiting for a scheme command. All scheme commands are enclosed in parenthesis, even the exit command to terminate your session.

DrScheme is not available on any other departmentally-managed Windows machine. The first time you run DrScheme, it will ask you to select a language.

You will need to do this if you are running DrScheme at home, and you may need to do it if you are running DrScheme on a Windows computer in the department. When working in DrScheme, be sure that you always use one of the PLAI languages so that all the useful constructs shown in class will be available.

To verify the language is set correctly, click the Run toolbar button. We strongly recommend that you use PLAI - Advanced Student for your assignments because it will give you better error messages. If, while working in DrScheme, you begin to get random syntax errors on the predefined constructs, make sure to double check the language since this is a common cause of errors before spending a lot of time searching for a bug or contacting the staff. The Help Desk is available from the Help menu.

Racket comes with support for major editors. The main bundle includes an innovative and extensible interactive development environment that has inspired other IDE projects. Racket, the Language-Oriented Programming Language. Racket allows programmers to add new syntactic constructs in the same way that other languages permit the formulation of procedures, methods, or classes.

All you need to do is formulate a simple rule that rewrites a custom syntax to a Racket expression or definition. The example on the left above shows how to define a new syntax for measuring the time a task takes. The syntax avoids the repeated use of lambda. Note also how the macro is exported from this module as if it were an ordinary function.

Racket comes with a comprehensive suite of libraries: a cross-platform GUI toolbox , a web server , and more. Thousands of additional packages are a single command away: 3D graphics, a bluetooth socket connector, color maps, data structures, educational software, games, a quantum-random number generator, scientific simulations, web script testing, and many more.

Macros work with these tools. The example on the left above shows the implementation of a small number-guessing game. It is implemented in the GUI dialect of Racket, and demonstrates a number of language features. Getting to know the full Racket macro system will feel liberating, empowering, dazzling—like a whole new level of enlightenment.

Developers can easily create a collection of co-operating macros to implement algebraic pattern matching , simple event-handling , or a logic-constraint solver. While Racket is a functional language, it has offered a sub-language of classes and objects, mixins and traits , from the beginning.

The macro-based implementation of a Java-like class system lives in a library and does not need any support from the core language. A Racket programmer can thus combine functional with object-oriented components as needed. Some languages convey ideas more easily than others. And some programming languages convey solutions better than others. Therefore Racket is a language for making languages , so that a programmer can write every module in a well-suited languages.

Often an application domain comes with several languages. When you need a new language, you make it—on the fly.



0コメント

  • 1000 / 1000