[plt-scheme] creating a standalone

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Mar 15 12:51:46 EST 2004

On Mar 15, 2004, at 12:04 PM, Joshua Zucker wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> Hi,
> I'm a high school math teacher whose previous programming experience is
> fortran and C on VMS and Unix, and now here I am having read HtDP and
> trying to teach my students how to use Scheme on Mac OSX (and many of 
> my
> students, on Windows at home).  It's working surprisingly well given 
> how
> ignorant I am about programming!
>
> Right now they're working on projects using the draw.ss teachpack:
> tic-tac-toe, "snake", "space invaders" (based on the UFO / AUP extended
> exercise), and tetris.  I made a connect four game (though it's 
> strategy
> engine is currently "move at random", at least the GUI works and it can
> tell when you win or lose or tie!).
>
> My problem: I want to create a standalone app for each of these 
> projects,
> to make it easier to share with the rest of the world.
>
> I've tried fiddling with mzc at the Mac OSX terminal command line, but 
> no
> luck.
>
> I also tried setting language level to "module" , putting at the top 
> of my
> connectfour.scm file
> (module connectfour mzscheme
>
> and at the end of the file, a close ).
>
> But now
> 1) how do I tell it to use the draw.ss teachpack?

(require (lib "draw.ss" "htdp"))

(module connectfour mzscheme
   (require (lib "draw.ss" "htdp") (lib "posn.ss" "lang"))
   ...
   (start 200 200)
   (draw-solid-string (make-posn 70 100) "hello world")
   )

> 2) why do I get the error message
> load-handler: expected a 'module' declaration for
> 'connectfour' in
> "...big long path name/connectfour.scm", but found something else
>

You must have nothing else but one module in there. (Comments in #| ... 
|# are okay.)

> Thanks so much for your help
> (and thanks for writing HtDP, I've learned a lot about programming!)

You're welcome. Glad you enjoyed it, and spread the word!

-- Matthias


>
> --Joshua Zucker
> Castilleja School
> Palo Alto, CA
> http://www.castilleja.org
>



Posted on the users mailing list.