On Nov 2, 3:12=A0am, Slobodan Blazeski <slobodan.blaze...@gmail.com>
> I've written an article about lisp and array languages athttp://www.vecto=
> where I lifted some code written in this newsgroup. Hope you won't sue
> me :)
Very interesting topic: I came to lisp from a vector/matrix language
A couple of comments and thoughts
First, the j+ operator is similar to the .+ operator in nlisp
Second, on the role of vectorized operators. Two comments:
One problem with IDL was that a routine that was developed for a
scalar operation could not be applied directly for vectorized inputs
if it had any kind of conditionals or loops in it:
if x>0 ... does not make sense when x is a vector.
This would necessitate rewriting the routine to use array test
operator, save the indices, and then loop over the indices that
satisfied the test.
The other problem is that when you have very nested operations with
vectors, during each step, IDL might create (possibly large) temporary
storage for intermediate results. For really big data-sets one would
have to play tricks to make it allocate a large enough contigious
block of memory, or do special declarations, to tell the compiler/
evaluator that what it was calculating was just temporary, and will be
My take on these problems is that we really don't want/need vector
operators. What we really want is an easy way to
1) develop, debug, and optimize a numerical routine for scalar
2) Have an easy wrapper to call the routine with vector parameters
(reader macros come to mind).
This way we do not have to define a slew of new operators to mimic the
effect of existing ones.
In essence, I don't see a reason to exactly emulate J,Q, Matlab, IDL
in CL, but have a way to easily achieve the same effect result the CL-
I have some rough code that helps me with 2), but I am not happy with
it. I will post it when I am happier with it.