incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Karman <pe...@peknet.com>
Subject Re: [lucy-dev] Lucy the Library
Date Sat, 04 Jun 2011 13:27:26 GMT
Scott Gonyea wrote on 6/4/11 12:05 AM:
> Is there any work happening, on making Lucy into a distributable library? I'd
> love to write some Ruby FFI bindings... But that can't happen unless lucy can
> be compiled/installed and linked against.
> 
> I'd love to help out and spread lucy.  It looks like a terrific project. :)
> 

Hi Scott,

Glad to hear you are interested in helping out with Lucy. The project has its
origins in a collaboration between a Perl and a Ruby project, so getting a Ruby
implementation underway (again) is a priority for us.

Lucy isn't designed as a linkable library, though that's a common
misunderstanding (I had that misunderstanding at first too). The traditional
model is a standalone C library, compiled independently, and then a dynamic
language like Ruby, using something like SWIG or FFI, gets linked to the C
library and accesses the C library functions through the dynamic host language
bindings.

Instead of that traditional model, Lucy provides a nearly-complete C
implementation, like a kit. Each dynamic host language then needs to write some
required functions in a binding module using Clownfish, and then the whole thing
is compiled once into a language-specific binary. There is no independent,
linkable C library. That's actually a feature.

The Lucy model arose out of a desire on the part of the KinoSearch (Perl) and
Ferret (Ruby) projects to share C code between them, while retaining the highly
idiomatic and language-specific optimizations of the respective projects. They
could have done the traditional linkable C library approach. IMO the Clownfish
approach offers some nice advantages, not least the ability to override C
classes in the native host language.

We want to make it easy to get started on a new language implementation, like
Ruby. To that end we're discussing right now[0] an example implementation so
that folks like yourself could have some grok-able working code to start from.

Please stick around. I'm sure Marvin Humphrey will have some ideas about places
to look to start familiarizing yourself with how Lucy and Clownfish work.

[0] http://s.apache.org/x9

-- 
Peter Karman  .  http://peknet.com/  .  peter@peknet.com

Mime
View raw message