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

Re: [augeas-devel] Towards a stable interface for libfa



On Mon, 2009-03-23 at 16:32 -0400, Nate Foster wrote:
> Hi David,
> 
> > I would love to, but don't have any good ideas how.
> 
> I think the idea would be to have the library work over an alphabet
> ASCII + {\256,\257}.

Yes; it would require that libfa switches internally from 8bit
characters to something like wchar_t and use a Unicode encoding for
characters.

> > I _think_ that the precondition is overly cautious - Anders doesn't have anything similar
> > in his implementation (he uses \u0000 and \u0001 as the markers)
> 
> Hmm. I *think* the opposite -- i.e, that there are unambiguously
> concatenable languages that the fa_ambig_example returns a string for.
> But strings containing the marker \000\001 are rare, so these probably
> don't come up very often in examples (and since this is only used for
> static type checking, the consequences wouldn't be grave--the system
> would just reject a lens program it could safely accept.)

I am still surprised that I haven't gotten bitten by false positives
because of that; regular expressions that allow \000\001 are actually
quite common - for example, when allowing a word to be anything
matchin /[^ \t\n]/

> I was just curious. I would love to jettison my clunky FA library and
> use yours via an OCaml <-> C foreign function interface :-)

Just go for it and let me know what the fallout is ;)

David




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