[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Documentation problem (eggs tutorial and Extensions
Re: [Chicken-users] Documentation problem (eggs tutorial and Extensions section from the manual)
Mon, 5 Apr 2010 14:16:24 +0200
On Mon, Apr 05, 2010 at 09:06:37AM -0300, Jeronimo Pellegrini wrote:
> I've tried to follow the instructions on the egg tutorial here:
> and the "Extensions" part of the manual:
> But that didn't work. I compared the instructions and example there
> to what's on some eggs in the svn repository, and found some differences.
> It looks like the egg now *must* be a module or the "-j" option to the
> compiler won't work (right?).
This doesn't really have anything to do with eggs. There was no -j in
Chicken 3, and in Chicken 4 you use -j <modulename> to create an import
file for the module named <modulename>.
Since it's good practice (but not required!) to package eggs that
provide modules, you'll have to add a -j <modulename> in order to make
Of course, the semantics of (USE foo) changed so it will try to load foo
and also import the module foo, you'll run into trouble unless you either
provide a module or switch to (REQUIRE-LIBRARY foo) which will only load
the .so file without importing anything.
> The eggs tutorial doesn't mention that (neither does chapter "Using the
> Compiler" from the manual).
The chapter "Modules and macros" will be more helpful in that area.
> It seems that the documentation is for Chicken 3; I am not sure if I
> understand everything that changed in the compiler since the docs were
> written, otherwise I'd be happy to help updating the manual and eggs
It might have not been updated properly. It's a good idea to add some
instructions on providing a module to the tutorial. Feel free to add it.
> Are these the only changes?
AFAIK nothing really changed, except the difference in how USE works.
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth