On 12/9/10 1:18 PM, Leo Butler wrote:
> I have spent a bit of time re-writing build_index.pl in lisp.
> I have a functional version that appears to work independent
> of the encoding.
>
This is interesting. I had thought about reinstating the old cl-info
code that groveled the maxima.info file to get the tags and
everything. And the character offsets there would have worked just
fine if we read in the whole info file (only takes a 10 ms on a slow 750
MHz machine with cmucl) and extracted the data using the character offset.
> I think that there are several advantages to having the help index
> built in lisp:
> -as mentioned, this avoids encoding issues because the index can
> be built at runtime;
> -the present code can accomodate several master info files, which
> would allow a usser to add documentation, including 3rd party
> documentation at runtime;
> -the code runs in about 2sec on a netbook+sbcl, so it is practical
> to build the index on demand (e.g. when the first help query is made).
That is a little slow. Way back when with the old cl-info code, a 300
MHz machine with clisp could get entries in under a second. Fast
enough that no one really cared.
> Here's the cost: it's written with the cl-ppcre regex library that
> provides most Perl regexes for CL. Personally, I think that it
> is worth adding this to the Maxima code base, because nregex is,
> well, pretty primitive.
Maxima uses nregex because cl-ppcre didn't exist at the time, plus it
was more than capable of doing the regex matches needed by cl-info at
that time.
Does cl-ppcre handle unicode? Do we need it to handle unicode? Perhaps
not.
Ray