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
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 :-)
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.
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
Mirko,
On Mon, Feb 14, 2011 at 3:35 PM, Mirko Vukovic mirko.vukovic@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:
- 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.
- 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).
- 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@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel
On Wed, Feb 16, 2011 at 10:23 PM, Liam Healy lhealy@common-lisp.net wrote:
Mirko,
On Mon, Feb 14, 2011 at 3:35 PM, Mirko Vukovic mirko.vukovic@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:
- 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.
Feature request:
Could than foreign vectors push a :foreign-vectors into *features*, much like fsbv does?
Mirko