[cffi-devel] Re: Use of Babel and Alexandria in CFFI
![](https://secure.gravatar.com/avatar/326b108ffcc42f27628703b0c11ed239.jpg?s=120&d=mm&r=g)
On Sun, Aug 17, 2008 at 9:04 PM, Roland Averkamp <roland.averkamp@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/
![](https://secure.gravatar.com/avatar/e30bc676ee7d74ff2b67b431353a8ab8.jpg?s=120&d=mm&r=g)
"Luís Oliveira" <luismbo@gmail.com> writes:
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.
This statement should be stressed. A lot of utility functions that you usually write on the way are written very ad-hoc for the task at hand. And even if you do the extra effort, and try to make them more general, they're often broken in edge-cases. Having contributed to Alexandria, I can say that caring about all the minutiae that are involved is very burdensome and strenuous. It made me understand how the ANSI standard took a decade to be produced. -T.
participants (2)
-
Luís Oliveira
-
Tobias C. Rittweiler