[Larceny-users] boxed vs. void* in the Larceny FFI on Windows

David Rush kumoyuki at gmail.com
Sun Jul 22 18:08:48 EDT 2007


Hi y'all,

I was really glad to hear that the socket work is in the dev tree. I
did pull it from SVN and I hope to get around to building it. In the
meantime, I feel like I learned enough to take a stab at what I really
wanted: a faster interface to MySQL and I've been working out the
bindings using the Larceny FFI.

Congratulations! It does work fairly well.

But the documentation is ... weak ... as I think is widely
acknowledged. SO can someone tell me what the difference is between
boxed and void* in the (require 'std-ffi) layer? *And* how to pass a
null pointer to a call-out in a reliable fashion? And if you;re going
to point me back at the docs can you clue me in as to which specific
ones? There are clearly pieces of documentation from several different
FFI eras in the source tree and it is difficult for me to tell which
applies where.

I can also give more details of what I am trying to do, but I think
they would be likely to be inaccurate as I have tried *way* too many
combinations of params in getting to where I actually executed a query
in order to remember all the different failure cases.

Oh yeah - one last thing: the DEFINE-C-INFO construct looks really
nice, but it appears to call out to cl.exe underneath - which has
problems finding its own DLLs on my current configuration (I have the
free-beer Visual Studio C++ 8.0). If there's anything I should do to
my config to make this work better, do please tell. I realize that
nobody want to write yet another C parser, but it would be really nice
to have this construct be truly platform-independent.

I am *so* pleased with how well the FFI works so far. I can't begin to
tell you how much of a fan-boy I am becoming (as if I wasn't already
enough of one before :) I mean, you guys have built a cross-platform
native-code Scheme with a portable set of FFI conventions! How cool is
that? I'm having lovely visions of never having to touch u$oft code
and still deliver fast & robust applications on Windows, too :)

Maybe that's not why they gave Will the grant, but hey, it works for me :)

david
-- 
Once you label me, you negate me
    - Soren Kierkegaard



More information about the Larceny-users mailing list