[cffi-devel] Re: The results of your email commands

Attila Lendvai attila.lendvai at gmail.com
Mon Oct 29 09:54:22 UTC 2007


> I had a horrible discussion yesterday on #lisp (irc.freenode.org) -- I wonder
> why people always get so insulting in discussions about these topics -- about


most lispers have passionate opinion about stuff like that. try to
criticise the overuse of cons, or the verbose syntax of defclass and
you'll see what i'm talking about... :)


> accessing C++ libraries from Lisp by Swing or Verrazano and the conclusion
> seems to be that binary interface of C++ is just not standardized enough, yet,
> (and will probably never be) to target it directly or try to access (or write
> to) virtual tables from Lisp. So creating C wrappers for the C++ classes seems
> to be the way to go.


well, that's also an option, and maybe a better one. i didn't put
enough thinking to really formulate an opinion, but there's
cffi-grovel (which is iirc merged into the new
soon-to-be-released-cffi-version). also, if you clean up the internals
of verrazano then it would be trivial to add a generation target
(hint: using a contextl layer) that automatically generates the c
wrapper functions for c++ libs.

then look into iolib, it has some asdf additions to automatically
compile c files at load-op.


> The only C++ document that at least tries to define some standard is incomplete
> and targets only the Itanium architecture:
> http://www.codesourcery.com/cxx-abi/abi.html
>
> Most of the people even think that C++ libraries that don't provide C wrappers
> themselves should be ignored altogether.
>
> What do you think?


i don't think that it would be completely pointless to add an ABI
abstraction layer, but it would be very hard/limited to use, so after
some thoughts i'd also try the automatic generation of the C layer
first.

look into (the new) cffi-grovel, think through how it relates to
verrazano (i suspect they are duplicate efforts in some way, so
consider some kind of merging, too). maybe the cffi devs have some
words on how cffi-govel is generating the c files.

hth,

-- 
 attila



More information about the cffi-devel mailing list