[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcaca] Re: Term::Caca - a perl wrapper around libcaca



On Tue, Oct 26, 2004, John Beppu wrote:

> I've written a perl wrapper around libcaca that is about 90% complete. 
> When I put the finishing touches on it, I'm going to put it on CPAN 
> (http://search.cpan.org/).  However, before I do that, I wanted to let 
> the people on this list have a sneak preview of my work in progress.

   This seems very nice.

> So far, I've wrapped every documented function in libcaca except 
> caca_set_bitmap_palette and caca_draw_bitmap.  I haven't done these, 
> because I would like to implement a way for C arrays to be shared 
> between the Perl side and the C side in a way that feels natural for 
> both languages.

   Yeah, caca_draw_bitmap is probably the most useful function in the
library, but also the most difficult to wrap for another language. As
for caca_set_bitmap_palette, do you really need to share C arrays? It
looks to me as if a simple conversion to C is enough.

> Let me know what you think.

   I like it. Would you like access to the SVN repository so that you
can put your code together with libcaca, or do you prefer maintaining it
on your side? Either is fine for me.

> PS: Sam, I noticed this in the README of libcaca:
> 
> "As the API is not stable yet, everyone should statically link libcaca 
> with their programs or libraries. DO NOT DISTRIBUTE SHARED VERSIONS
> OF LIBCACA."
> 
> The C portions of Term::Caca statically link to libcaca, but the end 
> result is something that is dynamically loaded.  This allows perl 
> scripts to say "use Term::Caca" and get the appropriate functionality 
> imported into their script.

   This is all right. What I don't want is people distributing
libcaca.so objects and then have users complain to me when binaries
start to misteriously fail because of an API change.

-- 
Sam.
-- 
This is the libcaca mailing-list, see http://sam.zoy.org/projects/libcaca/
Trouble unsubscribing? Please contact <sam@zoy.org>
List archives are at http://sam.zoy.org/projects/libcaca/threads.html