[racket] Difference between drscheme and racket

From: John Clements (clements at brinckerhoff.org)
Date: Thu Oct 24 14:45:07 EDT 2013

On Oct 24, 2013, at 1:12 AM, Aomar Maddi wrote:

> Hello,
>   Thank you very much for your response.
> The error does not apply to require that I can remove using teachpads.
> My mistake for rather (define mycanvas that  written  for drscheme version:
> 
>              (define mycanvas% (class canvas% (frame)
>                                         (inherit get-dc)
>                                         (override [on-paint (lambda () (affiche (get-dc)))])
>                                          (override [on-event (lambda (mo) (mouse-handler mo))])
>                                           (sequence (super-init frame))))
>   
>              (define canvas (make-object mycanvas% frame))
>             (define dc (send canvas get-dc))

Please forgive me; I suspect that I'm not understanding you correctly.

You appear to be saying that you can remove ... teachpack-like requires? I'm not sure about this.

Can you supply a small program that reproduces the errors you're seeing, that doesn't depend on external files?

Best,

John Clements

> 
> Le 23/10/2013 23:56, John Clements a écrit :
>> On Oct 23, 2013, at 6:57 AM, Aomar Maddi wrote:
>> 
>> 
>>> I wrote a program using drscheme scheme. I'm having trouble getting it to work with racketeering.
>>> He tells me the mistakes that I do not understand. Thank you for your help.
>>>   Here is the source of this program:
>>> 
>>> 
>>> ;(require (lib "compile.ss"))
>>> ;(compile-file "gplateau.scm" "../gplateau.zo")
>>> 
>>> (module gplateau racket
>>>   (provide (all-defined-out))
>>>   
>>>   (require racket/math)
>>>   (require racket/list)
>>>   (require racket/class)
>>>   (require racket/draw)
>>>   (require racket/gui)
>>>   (require framework)
>>>   (require (file "sol-awale.zo"))
>>>   (require (file "meo-plateau.zo"))
>>> 
>> You've got a couple of problems up front, here.  First, you probably want to "require" the *source* files, rather than the compiled files.  So, these last two lines should probably read
>> 
>> (require (file "sol-awale.scm"))
>> (require (file "meo-plateau.scm"))
>> 
>> Also, I'm not sure why you have these two files ... wherever you have them.  If you put them in the same directory with this file, you can require them simply by writing
>> 
>> (require "sol-awale.scm")
>> (require "meo-plateau.scm")
>> 
>> I'm sure there will be more issues following this....
>> 
>> John Clements
>> 
>> 
>> 
> 



Posted on the users mailing list.