[racket] 'C' module extension, expected `xxx'

From: Tim Brown (tim.brown at cityc.co.uk)
Date: Thu Jan 12 07:31:12 EST 2012

Norman,

Norman Gray wrote:
> I've only just noticed this thread, or I would have jumped in earlier.

NP. My original message wasn't identified as anything to do with SWIG.

> (a) This happened to me,
> too<http://groups.google.com/group/plt-scheme/browse_thread/thread/e4c09bcc41784f33/b77afd703eb6700
> 8?show_docid=b77afd703eb67008>

Once I knew what to look for, this article popped up onto my radar!

> The SWIG folk seemed happy enough to take a documentation patch, but if
> the racket part of the docs is still as ... terse as it was, it might
> be worth offering them an update.

I well know what you mean! Contrast with the reams of documentation for
the Java interface. However, aside from the -declaremodule bit, it's just
about sufficient for an experienced (wearied) user.

> (b) I gave up on SWIG after a short while, and just did the management
> myself -- it seemed simpler, in the end. With suitable macro magic, I
> was able to do all of the C nastiness without pain. The results are
> at<http://nxg.me.uk/dist/racket-librdf/> if you're interested.

I've got 160 symbols (constants and functions) to wrap -- so I'll be using
the tool for that!

However, SWIG doesn't play nice with 3m (I think it's a bit more the case
that the C grammar accepted by ``raco ctool -xform'' is a bit too limited
to cope with SWIG wrapper code).

More frustrating is that SWIG offer a *LISP* CFFI wrapper.
I would love to see it produce a racket FFI module -- I'd hope the code to
be far cleaner than these C middle-layer wrappers.

Is there a CFFI -> racket FFI conversion floating about in the world of
men?

> All the best,
>
> Norman

To you too.

Tim


-- 
Tim Brown <tim.brown at cityc.co.uk>  | City Computing Limited            |
T: +44 20 8770 2110                | City House, Sutton Park Road      |
F: +44 20 8770 2130                | Sutton, Surrey, SM1 2AE, GB       |
-----------------------------------------------------------------------|
BEAUTY:  What's in your eye when you have a bee in your hand           |
-----------------------------------------------------------------------'
City Computing Limited registered in London No. 1767817.
Registered Office: City House, Sutton Park Road, Sutton, Surrey, SM1 2AE
VAT number 372 8290 34.


Posted on the users mailing list.