[racket] absolute path bug

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Sun Oct 10 08:05:21 EDT 2010

It sounds like what you really want is an .exe file that contains the image directly, so you don't have to worry about what directory the .exe file or the .bmp file are in.  Fortunately, DrRacket recognizes images as literals: you can just copy and paste an image into the source code.  So if I were doing this, I would probably write

(define cauliflower [paste in an image of a cauliflower])
(define (dr n)
  (overlay (scale (/ (+ (modulo n 90) 1) 10)
                          (rotate (modulo (* n n) 360)
                (square 500 "outline" "blue")))

(animate dr)

Much simpler than using "bitmap" at run-time.

Stephen Bloch
sbloch at adelphi.edu

Posted on the users mailing list.