dyoo / WeScheme

29 stars 16 forks source link

bug with beside #57

Closed dyoo closed 12 years ago

dyoo commented 12 years ago

Reported by Philip Schielke:

Just tried running this code in WeScheme:

(define (make-stars number)
 (cond [(eq? number 1) (star 12 "solid" "purple")]
       [true (beside (star 12 "solid" "purple") (make-stars (- number 1)))] ))
(define (bar-graph l1)
 (cond [(empty? l1) (circle 0 "outline" "blue")]
       [true (above/align "left" (make-stars (car l1)) (bar-graph (cdr l1)))]))
(bar-graph '(1 3 5 3 9 5 3 4 4 3 5 2))

The stars do not all wind up left-alligned. Tried in three different browsers in OSX with same results. (See picture.) It works fine in Dr. Racket.

schanzer commented 12 years ago

This is all related to the same bug, in overlayImage. That code is grotesque, and I haven't touched it in ages -- I suspect we'll have to rewrite the function :-/

schanzer commented 12 years ago

(That said, can we combine Issues #40, #57 and #25? They're all the same bug.)

dyoo commented 12 years ago

Corrected in: https://github.com/bootstrapworld/wescheme-compiler2012/commit/62fcd96693e13a829765435d961211547c75dc8c