[cffi-devel] Re: Use of Babel and Alexandria in CFFI

Luís Oliveira luismbo at gmail.com
Mon Aug 18 01:05:08 UTC 2008


On Sun, Aug 17, 2008 at 9:04 PM, Roland Averkamp <roland.averkamp at gmx.de> wrote:

>> Out of curiosity, plain-odbc seems to use strings a lot, I would
>> assume that foreign string encoding support would be useful for your
>> library. Am I wrong?
>>
> You are right, currently this handled in rather simple way.
> It is assumed that every string is encoded in the native character set.
> So maybe I should have a look.

It's not possible in CL to tell how strings are encoded. Your library
is just using CFFI's default foreign encoding (iso-8859-1 in past
versions of CFFI, utf-8 as of 0.10.0).


> How about wrapping iconv with CFFI? :-) Ok, just another library ....

That might be a useful addition to Babel.


> I do not think Alexandria is useful.
> Are rotate, shuffle, or random-elt needed?

I've implemented and used random-elt a couple of times in the past, FWIW.


> Do you really need make-gensym-list, symbolicate (=(intern (format nil "...." ..) ?

IMHO, those (and others) make the code clearer. YMMV, of course.

Assuming that you find at least some of Alexandria's utilities useful
-- say PARSE-BODY -- consider that while these are typically short
pieces of code, many deal with subtle details that can go wrong.
Getting these from a library that includes a test suite and is
shared/used/reviewed by many other programmers sounds like a good idea
to me.

To be honest, I'm surprised you haven't complained about
trivial-features yet. :-)

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/



More information about the cffi-devel mailing list