From: Pierre THIERRY
Subject: UFFI and anything else than C
Date: 
Message-ID: <pan.2006.07.13.19.18.56.438056@levallois.eu.org>
Hi,

reading the UFFI docs, and also one or two other FFI projects
documentations, I almost only see documentation about calling C
functions. Is it possible with any FFI library to call anything else,
like maybe FORTRAN or assembly function or binding Python, Ruby or C++
classes to CLOS ones?

Curiously,
Nowhere man
-- 
···········@levallois.eu.org
OpenPGP 0xD9D50D8A

From: Raymond Toy
Subject: Re: UFFI and anything else than C
Date: 
Message-ID: <sxdwtahb6gu.fsf@rtp.ericsson.se>
>>>>> "Pierre" == Pierre THIERRY <···········@levallois.eu.org> writes:

    Pierre> Hi,
    Pierre> reading the UFFI docs, and also one or two other FFI projects
    Pierre> documentations, I almost only see documentation about calling C
    Pierre> functions. Is it possible with any FFI library to call anything else,
    Pierre> like maybe FORTRAN or assembly function or binding Python, Ruby or C++

It's fairly common for Fortran calling conventions to be compatible,
in some way, to C calling conventions.  This usually means digging up
your Fortran and/or C manual to find out the calling conventions for
Fortran.  Usually, there's some change in the naming of the Fortran
function, and all arguments are pointers (call-by-reference), with
some hidden parameters for Fortran strings and Fortran return values
like complex numbers.

This is for Fortran 77.  Don't know about Fortran 9x.

Ray
From: fireblade
Subject: Re: UFFI and anything else than C
Date: 
Message-ID: <1152903392.468941.202980@35g2000cwc.googlegroups.com>
You could call c++ if you use :
extern "C" in your c++ definitions so your dll will get c mangling
instead
of c++ . That usually means modify source file or write wrapper c code
for c++ functions.
I haven't use it for any other language beside C++.
From: Pierre THIERRY
Subject: Re: UFFI and anything else than C
Date: 
Message-ID: <pan.2006.07.14.23.56.41.780713@levallois.eu.org>
Le Fri, 14 Jul 2006 11:56:32 -0700, fireblade a écrit :
> You could call c++ if you use : extern "C" in your c++ definitions so
> your dll will get c mangling instead of c++ . That usually means
> modify source file or write wrapper c code for c++ functions.  I
> haven't use it for any other language beside C++.

I was more hoping to find a reflection between C++ classes and CLOS,
maybe a bit like Boost.Python does (which I didn't use, in fact, I just
read it's documentation, as I use a lot of other Boost libs...).

Alternatively,
Nowhere man
-- 
···········@levallois.eu.org
OpenPGP 0xD9D50D8A
From: fireblade
Subject: Re: UFFI and anything else than C
Date: 
Message-ID: <1153162021.537812.194490@h48g2000cwc.googlegroups.com>
Pierre THIERRY wrote:
> Le Fri, 14 Jul 2006 11:56:32 -0700, fireblade a écrit :
> > You could call c++ if you use : extern "C" in your c++ definitions so
> > your dll will get c mangling instead of c++ . That usually means
> > modify source file or write wrapper c code for c++ functions.  I
> > haven't use it for any other language beside C++.
>
> I was more hoping to find a reflection between C++ classes and CLOS,
> maybe a bit like Boost.Python does (which I didn't use, in fact, I just
> read it's documentation, as I use a lot of other Boost libs...).
>
> Alternatively,
> Nowhere man
> --
> ···········@levallois.eu.org
> OpenPGP 0xD9D50D8A

Yea boost is nice if I check in it first I wouldn't have to write my
own
version of A* search , but I'm not regretting my decision as I learned
a plenty.
Anyway what kind of library do you need from boost written in lisp ?
From: Pierre THIERRY
Subject: Re: UFFI and anything else than C
Date: 
Message-ID: <pan.2006.07.18.13.56.54.905899@levallois.eu.org>
Le Mon, 17 Jul 2006 11:47:01 -0700, fireblade a écrit :
> Anyway what kind of library do you need from boost written in lisp ?

That's not that I need anyhting in Boost. I'm writing an application in
C++ and I'd like to interface with it in some CL code.

Quickly,
Nowhere man
-- 
···········@levallois.eu.org
OpenPGP 0xD9D50D8A
From: Matthias Benkard
Subject: Re: UFFI and anything else than C
Date: 
Message-ID: <1153244918.404273.133610@h48g2000cwc.googlegroups.com>
Hi,

SWIG 1.3 seems to target ACL, CLISP and UFFI:
http://www.swig.org/Doc1.3/Lisp.html#Lisp

It's a wrapper generator that makes it possible to use C and C++
interfaces (including C++ classes) from your favourite language. I
don't know of any Python/Ruby/... interface wrappers for Common Lisp,
though.

Mata ne,
Matthias