lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <>
Subject Re: [lucy-dev] language bindings
Date Wed, 30 Nov 2011 01:16:24 GMT
On Mon, Nov 28, 2011 at 07:08:47PM -0700, Norman Barker wrote:
> I am interested in writing an erlang language binding for lucy,

Hello and welcome, Norman. :)

> I have looked at the example-lang folder and then the tcl folder, does the
> tcl folder follow the guidelines in example-lang (it doesn't seem to),

The tcl folder should not be used as a template.

> I don't mind if not, what is the recommendation, to write a simple
> custom interface or to follow example-lang? Should I try and fill in
> all the required stubs within the example-lang or can I just do a
> subset and be ok?

To write a full binding for Erlang, you would need to flesh out all the stubs
in example-lang, then do a lot more besides.  However, it doesn't seem that
you need a full binding.

> The build system was straight forward, using perl was no issue for me,
> is there a runtime dependencies on perl, or is it enough to have
> - /lucy/trunk/perl/blib/arch/auto/Lucy/, I did check
> dependencies and it only seems to depend on but if it needs
> more that would be a show stopper for me.

That shared object is definitely Perl-specific. 

Historically, the code base that is now Apache Lucy began life as a pure-Perl
search engine library and has been slowly evolving towards C.  The
metamorphosis is not yet complete, and at present, Lucy can still only be used
from Perl.

> Ideally I would like to code in c/c++ in the core and then add a very
> simple interface for adding documents to index and a search interface
> to query but this seems to be against example-lang.
> Any guidelines appreciated.

I think the best way to achieve your goals is to team up with Peter Karman in
his drive to make Lucy available as a standalone C library.

It sounds like making the full Lucy public API available from Erlang, so that
Erlang users enjoy as much flexibility and power as Perl users do today, is
not your ambition.  Instead, you want to enable Lucy for a very limited use
case within an Erlang environment.  (I speculate that your interest is
CouchDB-related.)  If Lucy had a C API, you could write the Lucy-specific
portion of the app in C and then provide only bridge code custom tailored to
the needs of the app.

Marvin Humphrey

View raw message