[racket] The orange turtle triangle is not moving

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Sun Feb 26 14:15:05 EST 2012

Hi All,

I have some 8th graders visiting my school. I have one hour in which I
intend to let them play with the turtles in Racket.

But - there seems to be a bug in the implementation.
A bug that puzzles me. It seems the commands are
interpreted different when entered in the definition
window versus the interaction window.

In short:  The turtle commands only move the orange triangle
if the commands are in the program - not if the same commands
are entered in the repl.

Consider this program:

#lang racket
(require graphics/turtles)
(turtles #t)
(draw 100)
(turn 90)

It correctly moved the turtle forward 100 pixels
drawing a line in the process, and then rotates the
turtle 90 degrees. Then an orange  triangle is drawn
showing the position of the turtle.

However if I now enter (forward 100) in the repl,
then the line is drawn but the orange triangle
stays in place.

Any ideas how I can fix this?


Jens Axel Søgaard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120226/d6fa4c18/attachment.html>

Posted on the users mailing list.