From: Sam S. <sd...@gn...> - 2008-09-26 18:02:01
|
Hoehle, Joerg-Cyril wrote: > Hi, > >>> I once wrote the ~50-100 lines required for providing an >> FFI-based-array >>> <-> Lisp sequence integration via DEFSEQ. >> sweet! >> why is it not in the CVS? > Precisely because of the one open issue below. > Didn't I post it to the list, moons ago? "I have no recollections of that." > Somehow I hate releasing half-baked stuff, so it tends to pile up on my HD. "release early, release often". >>> The one open issue I remember was the unclear semantics of >>> copying such >>> an array: What is SUBSEQ on a mmap'ed array (or any FFI >>> array, for that matter)? >> a displaced array? > That would be legitimate with the foreign array, but it's not compliant with CLHS. oh yeah... an alternative would be malloc+finialize/free. I think this is actually preferable because it would be compatible with the invariant subseq = make-seq + copy-seq > Alas, a shared=displaced array is the only sensible > thing to do in the presence of the FFI, so it seems to me. > That's why I considered the issue open, and probably never published the code. you can make the alternatives controllable by a global switch. > The thing I seem to remember is that CLISP's (via DEFSEQ) > expects the array-copying to work for some of the sequence > functions, so the FFI<->DEFSEQ was incomplete. |