chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] base64 import problem with chicken-hygienic


From: Peter Bex
Subject: Re: [Chicken-users] base64 import problem with chicken-hygienic
Date: Wed, 27 Aug 2008 19:33:05 +0200
User-agent: Mutt/1.4.2.3i

On Wed, Aug 27, 2008 at 12:11:02PM -0400, Graham Fawcett wrote:
> Hi folks, it looks like base64 under chicken-hygienic doesn't import
> properly -- I get the import.so but not the real one.

(import) is a statement that imports the module into the current module.
For that to work, you must have loaded the extension first.

The correct incantations are:
#;1> (require-library base64)
; loading /home/sjamaan/hygienic/lib/chicken/4/base64.so ...
#;2> (import base64)
; loading /home/sjamaan/hygienic/lib/chicken/4/base64.import.so ...
; loading /home/sjamaan/hygienic/lib/chicken/4/chicken.import.so ...
; loading /home/sjamaan/hygienic/lib/chicken/4/scheme.import.so ...

OR:

#;1> (require-extension base64)
; loading /home/sjamaan/hygienic/lib/chicken/4/base64.import.so ...
; loading /home/sjamaan/hygienic/lib/chicken/4/chicken.import.so ...
; loading /home/sjamaan/hygienic/lib/chicken/4/scheme.import.so ...
; loading /home/sjamaan/hygienic/lib/chicken/4/base64.so ...

The latter example is the same as you'd do it in Chicken 3. It loads
and imports the extension in one go, without allowing you to do any
operations on the imported symbols anymore. It's more convenient, but
less powerful.

I think Felix reinstated the (use ) command also, so you could also just
do (use base64), just like you'd do with chicken 3.

HTH,
Peter
-- 
http://sjamaan.ath.cx
--
"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

Attachment: pgpNpQxbQUQnC.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]