[racket] image equality and evaluators

From: Jordan Johnson (jmj at fellowhuman.com)
Date: Thu Feb 9 21:40:00 EST 2012

Hi all,

Definitions:

#lang racket



(require racket/sandbox lang/imageeq)

(define ev

  (make-evaluator '(special beginner)

                  #:requires '(2htdp/image)))


Interactions:

> (image? (ev '(rectangle 2 2 'solid 'blue)))

#f

> (image=? (ev '(rectangle 2 2 'solid 'blue))
>            (ev '(rectangle 2 2 'solid 'blue)))
> image=?: expects type <image> as 1st argument, given: (object:image% ... )
> ... [etc., redacted]


But the REPL renders (ev '(rectangle 2 2 'solid 'blue))) as a picture of a
tiny rectangle, as I would expect.

How is the above exposing the difference between image=?'s perception of an
image, and the object implementing the image?

And, more importantly, is there a way to make (meaningful) image
comparisons across the boundary imposed by the sandbox?

Thanks,
jmj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120209/e394ac57/attachment.html>

Posted on the users mailing list.