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

2008-08-27 Thread Graham Fawcett
On Wed, Aug 27, 2008 at 1:33 PM, Peter Bex <[EMAIL PROTECTED]> wrote:
> 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)
> OR:
> #;1> (require-extension base64)

D'oh, of course, that was silly of me. Thanks for the correction.

> 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.

Yes, I can confirm that (use base64) does the right thing.

Cheers,
Graham


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


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

2008-08-27 Thread Peter Bex
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


pgpxlHZfpBFQL.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


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

2008-08-27 Thread Graham Fawcett
Hi folks, it looks like base64 under chicken-hygienic doesn't import
properly -- I get the import.so but not the real one.

I used the new chicken-install to fetch base64, though I don't think
that's relevant.

Best,
Graham

CHICKEN
(c)2008 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.0.0x - linux-unix-gnu-x86 [ manyargs dload ptables applyhook ]
SVN rev. 11777  compiled 2008-08-27 on fawcett-lap (Linux)

; loading /home/graham/.csirc ...
#;1> ,s chicken-status4 | grep base
base64 .. version: 2.0
0
#;2> (import base64)
; loading /home/graham/tmp/chicken4/lib/chicken/4/base64.import.so ...
; loading /home/graham/tmp/chicken4/lib/chicken/4/chicken.import.so ...
; loading /home/graham/tmp/chicken4/lib/chicken/4/scheme.import.so ...
#;3> encode
Error: unbound variable: base64#encode
#;3> (load "/home/graham/tmp/chicken4/lib/chicken/4/base64.so")
; loading /home/graham/tmp/chicken4/lib/chicken/4/base64.so ...
#;4> encode
#


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users