bug-zile
[Top][All Lists]
Advanced

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

Re: [Bug-zile] Update on buffer reimplementation: waiting for alien cont


From: Gary V. Vaughan
Subject: Re: [Bug-zile] Update on buffer reimplementation: waiting for alien contact
Date: Wed, 13 Jun 2012 11:41:13 +0700

Hi Reuben,

On 12 Jun 2012, at 23:31, Reuben Thomas wrote:
> In order to implement buffers efficiently in alien, I need resizable
> buffers, which alien doesn't currently support. I have implemented
> such support, and am waiting for the maintainer to accept my patch;
> I'm optimistic, as in the process of adding the support I rewrote much
> of the code, resulting in several dozen patches which he's already
> merged in. This is the first feature change, however, so it may take a
> bit longer.

Interesting!  I must investigate...

I haven't quite nailed correct coloring of multi-line tokens (e.g. comments
and strings) with my my adhoc recursive descent oniguruma-expression
based syntax parser, so I'm thinking of redoing it with a more formal
incremental lexer (that can be restarted from an earlier state whenever
the edited buffer needs a display refresh), and while I'm there I'd really
like to try to hook the lexical tokens directly into the buffer data-
structures for speed and hygiene.  It feels clunky to maintain a separate
sparse array of curses attributes on the Lua side when they are so
intimately tied into the buffer stream.  It would also make tracking the
insertion point to determine the barrier between correct (and reusable for
the next screen refresh) attributes on the left of point, and invalid
attributes that need to be recalculated between the right of point and the
last displayed character in the window.

I think redoing things that way opens the door to building a list of
function names, local variable names and other interesting symbols
during syntax parsing to make the coloring more informative, and then
later implement a nice completion engine for partially typed symbols.
But I'm getting ahead of myself - I'll have a proper look at alien itself,
while I eagerly await your alien-based buffers ;)

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]