On Wed, 2004-04-21 at 10:13, Simon Glover wrote: > Absolutely -- I really, _really_ want to be able to use hyper ops with > fixed size, floating point arrays, and to have that be as fast as > possible, as that should make it possible to implement something like > PDL in the core.
Mistake. You don't want to have to convert to-and-from arrays of PMCs in order to do those ops, and regardless of what kind of hyper-nifty-mumbo-jumbo you put into Parrot, that's exactly what you're going to have to do. In fact, Parrot Data Language (if there were such a thing) would likely introduce its own runtime-loadable opcode set to operate on a new PMC type called a piddle. Then, each client language could define (in a module/library) its own means of interacting with a piddle. For example in Perl, you might: multi method new(Class $class, int @ary) {...} multi method new(Class $class, float @ary) {...} multi method new(Class $class, int $value) {...} multi method new(Class $class, Octets $value: %*_) {...} and then you would override BUILD in order to emit your special piddle opcodes. Then, in user-space: my PDL::Piddle $foo = [1,2,3,4,5,6]; Does what you expect, and $foo + $bar is special. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback