lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [lucy-dev] Tcl bindings
Date Mon, 22 Aug 2011 04:50:47 GMT

Per discussion in lucy_dev w/ Martin...:

% load ./
% lucy::termquery fu
% fu sdf
bad subcommand "sdf": must be setfield or getfield
% fu getfield
field unset
% fu setfield bar
% fu getfield
% fu setfield baz
% fu getfield
% rename fu {}
% fu getfield
invalid command name "fu"

Find attached .c, .h, and Makefile; this does -not- actually link against
anything lucy atm, and in fact guesses at lucy-specific structs, etc. but
demonstrates a Tcl-ish approach to interfacing.

Martin, the Perl XS* files looked to be working lower-level than I think
necessary to get Tcl bindings working; Perl code looked to be working
hard to marshal data back/forth; I'd like to get a specific API-call for
my Tcl/C code to work with and get that hammered out. IIUC, it shouldn't
be as "fiddly" as what the Perl interface appears to me as.

Despite the guessiness of my work, in the spirit of "release early,
release often", find a mock Tcl interface that should compile w/ minimal
Makefile adjustments, and work w/ Tcl 8.4, 8.5, and 8.6.

Brad Harder
Method Logic Digital Consulting

View raw message