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

Re: Using functions written in C in a LISP program

>Hello Everyone,
>In my LISP program there are several functions that I would like to write in C
>instead of LISP, in the hope that the overall program will run faster.
>Could anyone tell me how to do this with clisp or tell me where to look for a
>way of doing it?
>Thanks for your help.
>Neven Tomov,
>Strathclyde University, Glasgow, Scotland

There's a version of clisp which can deal with foreign function, inside the
of this version, you'll be able to find some explanations, here a short sample:

File foreign.txt of clisp_with_ffi.tgz
                         The Foreign Function Call Facility

        A foreign function description is written as a Lisp file,
        and when compiled it produces a .c file which is then compiled
        by the C compiler and may be linked together with lisp.a.

        All symbols relating to the foreign function interface are exported from
        the package FFI. To use them, (USE-PACKAGE "FFI").

        Special FFI forms may appear anywhere in the Lisp file.

-- David P. CROSSON <crodav@actcom.co.il>
-- Ingenieur informaticien et cogniticien
-- Actuellement: Cooperant au service national francais
--               Responsable informatique
--               BCLE - Ambassade de France en Israel
-- Les hommes sont comme les animaux :
-- les gros mangent les petits, et les petits les piquent.
--                                     Voltaire, 1694-1778