[GSLL-devel] questions/requests on foreign-array

Liam Healy lhealy at common-lisp.net
Thu Feb 17 03:23:48 UTC 2011


Mirko,

On Mon, Feb 14, 2011 at 3:35 PM, Mirko Vukovic <mirko.vukovic at gmail.com> wrote:
> I am trying to make my gsd-based code to work on both sbcl (which supports
> foreign-arrays) and clisp which does not.  Hence the questions/requests:
>
> 1) Foreign-array creates the `static-vectors' feature.  I want to
> double-check that I can use it to test if foreign-arrays is loaded or not
> (#+static-vectors or #-static-vectors).  Or should I use #+sbcl, #+clisp

The static-vectors feature should only be used to determine if static
vectors underlie the foreign arrays, and that really only determines
whether cl-array could return something non-nil.  I'm not sure how you
would tell using #+static-vectors if foreign-array is loaded if you're
on clisp.

>
> 2) I use the mvector class from as a method specializer for some of my
> routines on sbcl.  On clisp I use vector)  Liam, please don't make mvector
> go away :-)

I won't, but it's possible it might get renamed (not soon though).

>
> 3) Could the #m reader macro be adapted to return CL vectors and arrays if
> foreign-arrays are not loaded?.  That would simplify some of my testing
> routines, as the
> reader macro #+clisp has to expand #m before deciding not to use it.

Yeah, I've thought about making #m expand to whatever *default-grid-type* is.

Liam

>
> Right now,  for clisp I plan to define a dummy #m macro that doesn't do
> anything meaningful, but allows the reader to expand into something, and
> then throw it away.
>
> Thanks,
>
> Mirko
>
> _______________________________________________
> GSLL-devel mailing list
> GSLL-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel
>
>




More information about the gsll-devel mailing list