chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Noob question: (re)compile FFI-accessing code within REP


From: Martin Percossi
Subject: [Chicken-users] Noob question: (re)compile FFI-accessing code within REPL
Date: Thu, 28 Jun 2007 14:11:00 +0000
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929)

Hello, I apologize in advance if this question is silly. I'm playing around with chicken because a) it is scheme and b) it offers tight integration with existing libraries. In particular, I want to do play around with Window's sound and GUI APIs.

But right now I'm doing some testing on Linux, because I haven't quite figured out how to install MinGW and MSYS properly yet. In any case, here's a little test that uses the `dollar' FFI egg:

(use dollar)

(define (c-test)
 ($ printf "Hello Chicken, from C!"))

If I compile this using `csc -s test.scm', I get a shared library, which I can then load from `csi' using the command `(use test)'. I can then evaluate (c-test), as expected.

Now, supposing I wanted to change the c-test to:

(define (c-test)
 ($ printf "BOO!")

The question is: am I obliged to recompile outside of the REPL loop? In other words, is there a `compile' command which lets me recompile test.scm from within the REPL? This would allow me to do more incremental development -- and would make me less likely to separate FFI calling code from other code (whether or not that's a good idea is another question ;)

Couple of other questions, while I'm at it:
- Is quack generally preferred over hen in emacs? Quack looks pretty good; haven't tried hen yet. Keep in mind that I will be using windows eventually. - When I download the readline egg, I get nice command completion on the csi REPL -- sweet! Unfortunately, it doesn't seem to work within emacs (quack), either in the REPL or when editing a scheme file. Is there any way to make this work?

Many thanks in advance,
Martin




reply via email to

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