| 18 Aug 03:05

Re: Use of Babel and Alexandria in CFFI

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.
(Continue reading)

Tobias C. Rittweiler | 18 Aug 11:02

Re: Use of Babel and Alexandria in CFFI

"Luís Oliveira" <luismbo <at> 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.
JTK | 19 Aug 00:17

Re: Use of Babel and Alexandria in CFFI



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

> Is it really necesary to use the Babel and Alexandria libraries in CFFI?
> Now CFFI depends on two libraries and every other system which uses
> CFFI needs these two libraries too.

That's an issue that was taken into consideration.


As a mere user, I was also a bit frustrated trying to compile the newest CFFI with all
its dependencies, especially because these extra packages had RCS's that
were not on my machine.  The new CFFI was a long chain of upgrades and installs.
For a newbie, this could be a real roadblock, and each additional step will cause
attrition of the userbase.

Might it be a good idea to repackage these libraries as TRIVIAL-FEATURES-CFFI, BABEL-CFFI, etc,
and distribute these along with cffi?   They would still be there, would be easy to upgrade, but
would be invisible to the casual cffi user.

Jan



_______________________________________________
cffi-devel mailing list
cffi-devel <at> common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel
Luke Crook | 19 Aug 00:29

Re: Re: Use of Babel and Alexandria in CFFI

On Mon, 18 Aug 2008 15:20:54 -0700, JTK <jetmonk <at> gmail.com> wrote:

>>
>> >On Sun, Aug 17, 2008 at 4:46 PM, Roland Averkamp  
>> <roland.averkamp <at> gmx.de>
>> wrote:
>>
>> > Is it really necesary to use the Babel and Alexandria libraries in  
>> CFFI?
>> > Now CFFI depends on two libraries and every other system which uses
>> > CFFI needs these two libraries too.
>>
>> That's an issue that was taken into consideration.
>>
>>
> As a mere user, I was also a bit frustrated trying to compile the newest
> CFFI with all
> its dependencies, especially because these extra packages had RCS's that
> were not on my machine.  The new CFFI was a long chain of upgrades and
> installs.
> For a newbie, this could be a real roadblock, and each additional step  
> will
> cause
> attrition of the userbase.

I don't mind how many dependencies CFFI has. It could have zero, or it  
could have 1000. All I care about is that a single action,  
(asdf-install:install :lispbuilder-sdl), will retrieve and install all  
dependencies.

My install notes for Win32 state to use Edi Weitz's STARTER-PACK and my  
config.lisp file, which takes care of everything.

As far as I am concerned, if a user does not want to use asdf-install or  
the starter-pack, then they are on their own.

- Luke
Attila Lendvai | 19 Aug 01:01
Gravatar

Re: Re: Use of Babel and Alexandria in CFFI

> I don't mind how many dependencies CFFI has. It could have zero, or it could
> have 1000. All I care about is that a single action, (asdf-install:install
> :lispbuilder-sdl), will retrieve and install all dependencies.

while we discuss this, we should be aware of the fact that you can't
do much on the cffi front to solve this problem, unless you expect the
cffi developers to put a lot much more effort into packaging cffi and
all its dependencies.

installing/upgrading a random lisp library can be a pain because there
are no good tools that support it. putting a lot of effort into
feeding the current tools instead of using those resources to develop
better tools is not the best strategy in the long term.

just the 0.02 of a cffi user,

--

-- 
 attila

ps: yeah, i know that i should post code instead of trying to be wise
here, but i don't want people to think that the current situation is
the result of mere ignorance...
Luke Crook | 19 Aug 01:06

Re: Re: Use of Babel and Alexandria in CFFI

On Mon, 18 Aug 2008 16:01:28 -0700, Attila Lendvai  
<attila.lendvai <at> gmail.com> wrote:

>> I don't mind how many dependencies CFFI has. It could have zero, or it  
>> could
>> have 1000. All I care about is that a single action,  
>> (asdf-install:install
>> :lispbuilder-sdl), will retrieve and install all dependencies.
>
> while we discuss this, we should be aware of the fact that you can't
> do much on the cffi front to solve this problem, unless you expect the
> cffi developers to put a lot much more effort into packaging cffi and
> all its dependencies.

I just meant that if CFFI is asdf-install'able and its dependencies are  
asdf-install'able, then no additional work is needed.

- Luke
| 19 Aug 05:46

Re: Re: Use of Babel and Alexandria in CFFI

On Mon, Aug 18, 2008 at 11:20 PM, JTK <jetmonk <at> gmail.com> wrote:

> Might it be a good idea to repackage these libraries as
> TRIVIAL-FEATURES-CFFI, BABEL-CFFI, etc,
> and distribute these along with cffi?   They would still be there, would be
> easy to upgrade, but
> would be invisible to the casual cffi user.

Is this still an issue now that asdf-installability is (hopefully)
restored or are you suggesting that we publish an extra tarball that
includes CFFI's dependencies? If so, maybe you could write a script
that pulls the 4 tarballs and merges them into one.

--

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

Gmane