![]() |
![]() |
![]() |
![]() |
However, as excellent hackers favor Scheme, it is worth learning the language. In fact, Structure and Interpretation of Computer Programs (SICP) — one of the best textbook on computer science — uses Scheme to describe programs. GNU also uses Scheme (named guile) for a common script language for its applications. The guile corresponds to a macro for MS-Word or Excell. It is used to manupulate applications with a simple script.
Even Common Lisp is better for building practical applications, I recommend to learn Scheme first because of its
Scheme tutorials in the web (so many as Scheme is popular language) are somehow difficult for beginners. This tutorial, on the other hand, is written for beginner programmers and little knowledge on programming is required.
Scheme codes consist of only words, parentheses and spaces, which may embarrass you at the beginning. If you use proper editor, however, it shows the pairing bracket automatically and indents code for you. As a result, you do not have to worry about pairing of parentheses and you can read codes by indent. If the indent looks strange, you can find the wrong pairing using the editor.
There are several specification on Scheme programming language and the latest version is Revised5 Report on the Algorithmic Language Scheme (R5RS).
Most of the implementations are (fully or partially) based on R5RS. If you use one that partially satisfies R5RS, you should be careful about it. There are several free Scheme implementations working on Windows such as: ChezScheme, MzScheme, DrScheme, SCM. In this tutorial, I use MIT/GNU Scheme because it is easy to install and it has high performance. The interpreter is quite fast and in addition MIT-Scheme can compile your program to a native code. The problem of MIT-Scheme is that it does not fully satisfy the R5RS. I will mention about it later in detail.
Actually, only MIT-Scheme and DrScheme are equipped with installer. Some recommend DrScheme, but it is slow. If you have enough knowledge to install programs by hand, I also recommend Petite Chez Scheme. It is a nice interpreter working on command line (DOS window).
Scheme Implementations compares several Scheme implementations. When you get used to Scheme, it will be a nice idea to try several implementations. You need a Linux machine because most of Scheme implementations work only on Unix and Linux.
>set HOMEPATHfrom a console (DOS window). In the case of WinXP, HOMEPATH is predefined as
Following code shows an example of scheme.ini
(cd "C:\\doc\\scheme") (define call/cc call-with-current-continuation)The first line means changing directory to C:\doc\scheme. By this code, the MIT-Scheme move to this directory and you don't have to give full path name to load Scheme programs. The second line defines abbreviation of call-with-current-continuation.
The next chapter is about how to talk with the front end of the MIT-Scheme.
![]() |
![]() |
![]() |
![]() |