[plt-scheme] Request for Info

From: Chris Stephenson (cs at cs.bilgi.edu.tr)
Date: Sun Dec 17 12:02:25 EST 2006

1. Congratulations on your ambition. I wish you success.

2. I join everyone (I guess) on this list in recommending the HtDP book
as an introduction to programming and the DrScheme environment as a good
tool for learning about programming. (It IS only a tool, as is any
language/development environment)

3. If you want to do simulation of physical and chemical processes, then
the world.ss teachpack offers a good and very simple framework. I can
send you an example program that shows balls bouncing around the screen
under the effect of gravity and losing energy every time they bounce.
(Matthias subjected this program to withering criticism, so I'll clean
it up, first!) Once you understand how to design this kind of program,
it is very easy to write. You just plug in the physical laws as
functions that transform the world and everything happens.

world.ss will give you as much  simultaneity as you will actually need
to do the kind of graphical simulations of physical and chemical process
that I can think of.

4. If you want to display thing as applets in browsers there is an
easy(ish) way I have used. Writing the program in Scheme will be much
easier in general than writing it in Java. I am an experienced Java
programmer and we have many assistants in our department who are even
now working on big projects written in Java. Everyone agrees that if you
want to get something out of the door quickly and accurately, a language
like Scheme is a better tool. We even write Scheme programs that write
Java programs (or the XML used to bind Java programs together). We use
these programs to get our Java projects done more quickly. You sometimes
need to write so MUCH routine code to get a Java project done in a
framework like J2EE, that it makes sense to write a program to write the
code for you.

The way to display things in a browser is to write your program in
Scheme, then use a Scheme interpreter written in Java. I have used the
SISC interpreter, to run applets written in Scheme.  It worked just
fine. It even allowed us to have the user of the applet write in Scheme
code to a window in the applet and have that code executed in the
applet. So you could have a user of your applet change the behaviour of
objects in a simulation by writing a Scheme function.

This kind of flexibility would be impossible in a  pure Java applet. To
produce Scheme applets for physical simulations, all that you would need
is to interface the drawing and  callback functions of world.ss to the
Java applet environment. My strong recommendation is this: write some
great physics and chemistry  simulations in Scheme using world.ss. I
tell you that turning them into applets later is do-able. That is all
you need to know right now.

Chris Stephenson

Sarvottam Salvi wrote:

Posted on the users mailing list.