← Back to team overview

opencog-dev team mailing list archive

Re: OpenCog Shell

 

I believe C-only interfaces are easy to support, and my limited experience with SWIG (accessing C code from Ruby through SWIG) was pretty good. One medium-sized effort project Gama and I have discussed is to wrap libAtomSpace within a C API, for these purposes. Note that trying to wrap CogServer within some such API is much harder and not likely to be as useful. There's a reason it's a server, after all.

Cassio

On May 25, 2008, at 11:30 AM, Moshe Looks wrote:

---------- Forwarded message ----------
From: Moshe Looks <madscience@xxxxxxxxxx>
Date: Sun, May 25, 2008 at 9:20 AM
Subject: Re: [Opencog-dev] OpenCog Shell
To: linasvepstas@xxxxxxxxx
Cc: opencog@xxxxxxxxxxxxxxxx, opencog-dev@xxxxxxxxxxxxxxxxxxx


Linas,

I've used swig in the past, but have been generally
unsatisfied with results. It sounds good in theory, and
works great for hello-world tests, but fails to  bind
correctly to language features -- its not transparent,
its very much in-your-face.  I remember spending
many, many days writing swig binding code trying to
get a C-language linked list converted to an ordinary
perl array, and back. I eventually gave up when it became
clear that swig simply didn't have enough of its guts
implemented to make stuff like this transparent.

Sorry to hear that swig didn't live up to expectations. How long ago
was this? Its possible that things have improved since, as development
seems fairly active...

Myself, I'm partial to scheme+guile.  Quite unlike swig,
the interface is very, very transparent.  ...although you do
have to write glue code for every function you want to
export, it beats the pants off of trying to diddle swig-internal
crap to accomplish the same thing --  swig is not transparent.

Well, my understanding is that Guile is C-only whereas swig at least
attempts to support some C++ constructs (obviously much more
difficult) is it possible that a C-to-swig interface would be easier
to manage than C++-to-swig?

- Moshe

_______________________________________________
Mailing list: https://launchpad.net/~opencog-dev
Post to     : opencog-dev@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/people/+me/+editemails
More help   : https://help.launchpad.net/ListHelp

--
Cassio Pennachin
CEO, Vetta Labs
www.vettalabs.com -- +55(31)3421-6933






References