Hi, On 3/24/07, Ivan Raikov <[EMAIL PROTECTED]> wrote:
Thanks for adding these extensions to loopy-loop. I still haven't looked at it, as I am still fighting with SRFI-42, but you have certainly made the case for at least considering loopy-loop.
Technically, I cheated, I didn't add what you wanted in that specific example (generating a uniform vector), just the ability to iterate over uniform vectors. I've so far mostly ignored accumulators other than the basic list. If you want to build a vector by accumulating a list and then calling list->vector, that's fine, (and that's what SRFI-42 does) but if you want something efficient you need a means to presize the vector, mutate the vector in place, and the user needs to be aware that mutation ruins re-entrancy and multiple returns. Taylor Campbell made a variation of the macro at http://mumble.net/~campbell/scheme/foof-loop.txt which adds efficient vector accumulators and other features. For vectors you need to compute and pass the length ahead of time. I've been thinking of easier to use vector and matrix operations, but haven't come up with anything I like. Everything I've seen is either easy or efficient, but not both. In particular, I'd like to be able to write a natural looking matrix multiply algorithm that is fast. Are your vectors actually rows/columns of a matrix? If you could give a more concrete example of how you want to use this I may be able to come up with something. Oh, I finally added documentation for writing your own extensions at http://chicken.wiki.br/loopy-loop. -- Alex _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
