[racket] My PLT->Racket porting experience

From: Drew Hess (drew.hess at gmail.com)
Date: Thu Mar 3 11:02:51 EST 2011

[Apologies to those of you who are seeing my messages twice. I only
use Gmail to collect mailing list archives, and I'm not used to
using it, so I keep hitting "Reply" when I should be hitting
"Reply all"]

On Thu, Mar 3, 2011 at 5:04 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
>> * Scrolling through a source code window in DrRacket 5.1 on Mac OS X
>>   is very sluggish, quite a bit slower than it was in DrScheme
>>   4.2.x.
>
> Do you see this mainly with key combinations, by dragging the
> scrollbar, or both?

I have a Magic Mouse, and scrolled by swiping down on the Mouse. Using
roughly the same velocity on the mouse (a quick downward swipe),
scrolling in DrRacket is quite a bit slower than in DrScheme. (Sorry,
I know it's not particularly scientific.) If you don't have a Magic
Mouse, swiping downward on a recent MacBook Pro trackpad should have
a similar effect.

>>   In PLT 4.2.x, this works great: the file names are looked up
>>   relative to the directory in which the *game source code* lives, and
>>   they play back as intended. In Racket 5.1 (didn't try with earlier
>>   versions), the file names are looked up relative to the *teachpack's
>>   directory*, and therefore aren't found.
>
> This doesn't sound like something that we intended to change, and I'm
> not clear on the setup. Can you provide a little example teachpack that
> would illustrate the difference?

Something like this should reproduce the problem:

* Write a simple module that exports a function something like:

(define (play fn) (play-sound fn #t))

* Install it as a teachpack.

* In a separate directory, write a simple program that uses the
 teachpack you just compiled, and call the play function:

(play "somesound.wav")

 Make sure somesound.wav is in the same directory as your test
 program.

 On DrScheme 4.2.x, your program should play the sound. On
 DrRacket 5.1, assuming you can reproduce the behavior I'm
 seeing, your program will not play the sound. On Windows, I
 *think* you'll see an error message in the Interactive window
 from the teachpack (can't recall exactly). On Mac OS X, you will
 not see an error message.

> This is possibly related to error-printing bugs that Robby has fixed
> since v5.1, although I'm not sure.

See above for a way to reproduce it.

thanks
d


Posted on the users mailing list.