[plt-scheme] modules 4 newbies

From: Raoul Duke (raould at gmail.com)
Date: Thu Oct 16 16:02:04 EDT 2008

hi,

i'm a plt-clueless newbie trying to do some basic module stuff. i
sorta figured out why things weren't working, but i still haven't
managed to figure it all out yet and get it all working, so i'd like
to ask for help!

(A) comment on a newbie user experience: figuring out how to be able
to write modules is way harder than it should be. i think it is due
to:

1) how you write a module in a file depends on context. as i recently
finally figured out, if you use "#lang scheme" then you do not use
"(module..." [otherwise you get error messages which are not very
helpful to the newbie :-].

2) the documentation which a newbie finds by googling around for
things like "plt scheme module" do not explain that; it was only out
of sheer luck and desperation that i finally checked
http://docs.plt-scheme.org/quick/#(part._.Modules).

3) the complexity of the subject is probably the kind of thing that is
hard to explain well in a static html/ascii form, rather than in
person, and maybe plt scheme is 99% used in situations where there's a
TA available? nevertheless if i ever figure out the nuances then
hopefully future folks will google and stumble across this thread :-)

(B) unfortunately, even though i now know why my use of "(module..."
which is what the overwhelming majority of all docs i found told me to
use was not right given that i had #lang scheme in there, which i was
also doing because seemingly most all the intro docs told me to, i'm
*still* lost as to how to make a module that works. if i remove the
"#lang scheme" and try to (require scheme) i still get errors (like
"expand: unbound variable in module in: new" because i'm trying to use
scheme/gui/base's new frame%, new canvas%, etc.), and if i try to use
"#lang scheme" instead then i don't see how i can actually create a
new namespace for my stuff.

any edification would be appreciated.
thank you!


Posted on the users mailing list.