<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>1. Dr. Scheme is still freezing regularly
when I use Fr. Time. It seems to happen more often when I have multiple
instances of Dr. Scheme running concurrently.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>2. Is there a way to have the dynamic
updating pause and resume? Or perhaps ensure that several operations are
atomic vs one update of the clock? I've written some code to simulate
gravity with a planet orbitting in a circle around a sun.
Essentially, each body is modelled with a struct which holds its mass,
posn, velocity, acceleration, and a list of forces from other bodies.
</FONT></DIV>
<DIV><FONT face=Arial size=2>acc = mass * (sum forces) </FONT></DIV>
<DIV><FONT face=Arial size=2>vel = (+ init-vel (integral acc)) </FONT></DIV>
<DIV><FONT face=Arial size=2>posn = (+ init-posn (integral vel))</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Now, I want to set up the planet with an initial
velocity and position so that it will be in a circular orbit around the sun, and
then afterwards, I need to add a force between the sun and the planet.
However, it appears that the force is not added until several seconds after the
body has been initialized, and by that time, it has floated off into
space.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I can post some more code if necessary, but its a
bit on the messy side at the moment (lazy programmer syndrome).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>3. snapshot and value seem to freeze
everything recursively. For example, the following code:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Courier size=2>(define x (new-cell 1))</FONT></DIV>
<DIV><FONT face=Courier size=2>(define y (new-cell 2))</FONT></DIV>
<DIV><FONT face=Courier size=2>(define z (new-cell (list x)))</FONT></DIV>
<DIV><FONT face=Courier size=2>(define add-element</FONT></DIV>
<DIV><FONT face=Courier size=2> (lambda (e)</FONT></DIV>
<DIV><FONT face=Courier size=2>
(set-cell! z (cons e (value-now z)))</FONT></DIV>
<DIV><FONT face=Courier size=2></FONT> </DIV>
<DIV><FONT face=Courier size=2>(add-element y)</FONT></DIV>
<DIV><FONT face=Courier size=2>(set-cell! x 3)</FONT></DIV>
<DIV><FONT face=Courier size=2>(set-cell! y 4)</FONT></DIV>
<DIV><FONT face=Courier size=2></FONT> </DIV>
<DIV><FONT face=Courier size=2>z ==> (4 1)</FONT></DIV>
<DIV><FONT face=Courier size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>freezes the value of x within z to be 1 instead of
allowing it to change freely, whereas the value of y has changed
successfully.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I've coded around this as follows:</FONT></DIV>
<DIV><FONT face=Arial size=2>(define x (new-cell 1))</FONT></DIV>
<DIV><FONT face=Arial size=2>(define y (new-cell 2))</FONT></DIV>
<DIV><FONT face=Arial size=2>(define z-static (list x))</FONT></DIV>
<DIV><FONT face=Arial size=2>(define z (new-cell z-static))</FONT></DIV>
<DIV><FONT face=Arial size=2>(define add-element</FONT></DIV>
<DIV><FONT face=Arial size=2> (lambda (e)</FONT></DIV>
<DIV><FONT face=Arial
size=2> (set!
z-static (cons e z-static))</FONT></DIV>
<DIV><FONT face=Arial
size=2> (set-cell! z
z-static)))</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>(add-element y)</FONT></DIV>
<DIV><FONT face=Arial size=2>(set-cell! x 3)</FONT></DIV>
<DIV><FONT face=Arial size=2>(set-cell! y 4)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>z ==> (4 3)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is there a cleaner way to do this? Perhaps a
version of value-now/snapshot which only goes one level
down?</FONT></DIV></BODY></HTML>