[racket] ffi/unsafe examples

From: Ben Dean (benjamin.dean at aya.yale.edu)
Date: Mon Feb 7 15:00:01 EST 2011

Thanks- That looks like it was just the ticket, and the answer to a lot of
the other questions I had piling up.

On Mon, Feb 7, 2011 at 2:03 PM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:

> The ffi has a directory of examples:
>
> https://github.com/plt/racket/tree/master/collects/ffi/examples
>
> and there are many on PLaneT
>
> Jay
>
> 2011/2/7 Ben Dean <benjamin.dean at aya.yale.edu>:
> > I'm looking to put some Racket wrappers around bits of the OpenCV C api,
> but
> > I'm having a hard getting started. I've looked through the ffi/unsafe
> > documentation several times, but something isn't clicking-- I think I
> need
> > to peer at some examples. If anyone has a good example or two of calling
> C
> > code from Racket, I'd be much obliged.
> > In detail, what I imagine is going to happen is that I will be accessing
> > some (shared?) object files, created as part of the OpenCV build, by
> calling
> > (define function-name (get-ffi-obj function-name (ffi-lib lib-name)
> > format)...)
> > I'm not clear, however, on what the particular object files I'm looking
> up
> > with ffi-lib. I also am unclear about the convention for the
> function-name
> > parameter to get-ffi-obj. Is it as simple as a string of the the name
> that
> > the C api is exposing?
> > I hope I've revealed my ignorance appropriately-- if you noticed any
> other
> > misconceptions or egregious gaps, please do let me know!
> > ben
> > _________________________________________________
> >  For list-related administrative tasks:
> >  http://lists.racket-lang.org/listinfo/users
> >
>
>
>
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://faculty.cs.byu.edu/~jay
>
> "The glory of God is Intelligence" - D&C 93
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110207/b6f043a4/attachment.html>

Posted on the users mailing list.