Using Concrete Abstractions with EdScheme for the Macintosh
This web page provides information regarding the use of the EdScheme
for the Macintosh implementation of Scheme with Concrete Abstractions:
An Introduction to Computer Science Using Scheme, by Max Hailperin, Barbara
Kaiser, and Karl Knight.
here currently corresponds with the version 4.0 of EdScheme for
the Macintosh; we will try to track new versions of EdScheme for the Macintosh as
they come out. Note also that EdScheme for Windows is different
enough that we have a separate web page for it.
Obtaining EdScheme for the Macintosh
EdScheme for the Macintosh is a Scheme development environment sold by Schemers Inc. Ordering
information is available on their web site.
Settings for EdScheme for the Macintosh
For full use with the textbook, you need to increase
the overall amount of memory allocated to EdScheme by the Macintosh
system and the more particular amounts of memory that EdScheme itself
allocates to different categories of information. The EdScheme for
the Macintosh documentation explains how to make these adjustments.
How much you will need to increase the amounts by depends on
factors beyond our control, such as the approach you take to solving
the exercises. Most of our testing was conducted with an overall
memory amount of 8000, recursion depth of 2048, graphics of 500,
oblist of 32, compiler of 32, and other settings left unchanged.
Libraries for use with EdScheme for the Macintosh
There are two aspects of the textbook for which a special library needs
to be loaded into EdScheme for the Macintosh.
One is the graphical images, introduced
in the application section of chapter 1 and also used in subsequent chapters.
The other is the object-oriented programming system, used in chapter
Each of these libraries can be downloaded from the web below. Once
you have them on your computer, you can load them into EdScheme for
the Macintosh by using Load option in the Evaluate menu, or by using
load procedure. For example, you could evaluate
(load "fungraph.scm") to load in the functional graphics
library. You can also put these load commands into the file
EdScheme Init.s, which is automatically loaded every time
you start EdScheme for the Macintosh.
- This is the library for graphical images. Images are not
automatically displayed, unlike in the textbook (and with other Scheme
implementations). Also, in addition to the features described in the
textbook (most succinctly in the appendix), there are a few extensions.
Descriptions of how to display images and the extensions are in a separate web page.
- This is the object-oriented programming system for use with
Names defined in both Concrete Abstractions and EdScheme for the Macintosh
There are a number of names that we define in Concrete Abstractions
that are already pre-defined in EdScheme for the Macintosh. The only real
problem this causes is that if you perform the definition from the
book, you can't expect the name to simultaneously have both the new
value and the one described in the EdScheme for the Macintosh documentation.
We list below the affected names, organized into categories and listed
within each category in their order of their appearance within the book:
- R4RS names noted as such in the text
- R4RS names not noted as such in the text
- Non-R4RS names
Breaking out of interactive programs
Although EdScheme for the Macintosh allows you to interrupt
evaluations by holding down the command (cloverleaf) key and pressing
the period key, this won't work if the program is waiting for input
from the user. This makes it rather inconvenient to get out of
interactive programs, which we write from chapter 6 onward. For the
game of nim in chapter 6, you will simply have to play the game to the
end. The movie query system and the adventure game have explicit
commands for quitting. For the micro-Scheme and mini-Scheme
evaluators, you will have to enter an invalid expression (such as an
undefined name) so as to provoke an error, which will get you out.
Starting in chapter 6, we use the
newline procedure to
break output into separate lines. Unfortunately, there are two
different conventions in use by different Scheme systems. One is to
newline at the start of each line of output,
while the other is to always use it at the end of each line. As a
result of this lack of standardization, wherever we positioned the
(newline) in our programs would result in output
that looked odd on some systems. We've tried in the textbook to make
choices that don't look too horrible on any system, with the result
that the output tends to look sub-optimal on every system. In
particular, there tends to be extra blank lines. If you are working
consistently within EdScheme for the Macintosh (or any other one system),
feel free to remove or reposition
(newline) as necessary
to make the output look best.
Chapter by chapter notes
- Chapter 1
The procedures for manipulating graphical images need to be loaded
from a library, as described above. Additionally, it is worth noting
that the various basic blocks, such as
neither pre-defined nor defined within the library. Instead, their
definitions are in a separate file.
- Chapter 9
For the application section, we have a
EdScheme-specific version of the
- Chapter 11
Although you could use the SLIM simulator from the application section
to work through the earlier sections of this chapter under EdScheme
for the Macintosh, you'd be better off using SLIME.
- Chapter 14
You will need to load a library file in to
get the object-oriented programming system, as described above.
- Chapter 15
EdScheme cannot be used for this chapter, since this chapter doesn't
use the Scheme programming language. You will need to use a Java 1.1 system instead.
For more information, see the parent web page, or contact Max Hailperin:
Mathematics and Computer Science Department
Gustavus Adolphus College
800 W. College Avenue
St. Peter, MN 56082