Re: Ramblings on base class for SV etc.

2000-08-09 Thread Bart Lateur
On Wed, 9 Aug 2000 09:11:55 +0100 (BST), Nick Ing-Simmons wrote: @foo = @bar * 12; I like it. It is pretty obvious what above should do: @foo = (); foreach my $elem (@bar) { push(@foo,$elem * 12); } @foo = map { $_ * 12 } @bar; I don't see the need for a new notation. --

Hooks for array notation (was Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Jeremy Howard
Bart Lateur wrote: On Wed, 9 Aug 2000 09:11:55 +0100 (BST), Nick Ing-Simmons wrote: @foo = @bar * 12; I like it. It is pretty obvious what above should do: @foo = (); foreach my $elem (@bar) { push(@foo,$elem * 12); } @foo = map { $_ * 12 } @bar; I don't see the need for

Re: Method call optimization.

2000-08-09 Thread Graham Barr
On Wed, Aug 09, 2000 at 10:01:46AM -0400, Chaim Frenkel wrote: "NI" == Nick Ing-Simmons [EMAIL PROTECTED] writes: NI So having the object carry around a (pointer to a) table to methods NI has merit. But how to index that table? Computing the union of all possible NI method names for all

Re: Hooks for array notation (was Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Bart Lateur
On Wed, 09 Aug 2000 10:04:15 -0400, Dan Sugalski wrote: 5- Compact array storage: RFC still coming I hope this RFC will be "Arrays should be sparse when possible, and compact" and just about nothing else. :) You mean, something like hashes? Faster hashes, maybe, with a hash function

Re: Method call optimization.

2000-08-09 Thread Dan Sugalski
At 11:24 AM 8/9/00 -0400, Joshua N Pritikin wrote: On Wed, Aug 09, 2000 at 10:16:03AM -0400, [EMAIL PROTECTED] wrote: At 10:01 AM 8/9/00 -0400, Chaim Frenkel wrote: But for the generic object. The package itself can contain an indirection table. This would be that sparse table with the

Re: Hooks for array notation (was Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Dan Sugalski
At 05:41 PM 8/9/00 +0200, Bart Lateur wrote: On Wed, 09 Aug 2000 10:04:15 -0400, Dan Sugalski wrote: 5- Compact array storage: RFC still coming I hope this RFC will be "Arrays should be sparse when possible, and compact" and just about nothing else. :) You mean, something like hashes?

Re: Method call optimization.

2000-08-09 Thread Graham Barr
On Wed, Aug 09, 2000 at 11:53:56AM -0400, Chaim Frenkel wrote: "GB" == Graham Barr [EMAIL PROTECTED] writes: GB On Wed, Aug 09, 2000 at 10:01:46AM -0400, Chaim Frenkel wrote: For the "my Dog $spot" case, that's not an issue, compile time resolution. GB And why would an object of type

Re: Method call optimization.

2000-08-09 Thread Uri Guttman
"DN" == Damien Neil [EMAIL PROTECTED] writes: DN For example: DN package Dog; DN sub bark { }# Index = 0. DN sub bite { }# Index = 1. DN The Dog vtable now looks like this: DN 0 Dog::bark DN 1 Dog::bite DN Define a couple of subclasses of Dog:

Re: PDL-P: Re: Hooks for array notation (was Re: Ramblings on baseclass for SV etc.)

2000-08-09 Thread Dan Sugalski
At 07:07 PM 8/9/00 -0400, Karl Glazebrook wrote: Dan Sugalski wrote: At 11:27 PM 8/9/00 +1000, Jeremy Howard wrote: 5- Compact array storage: RFC still coming I hope this RFC will be "Arrays should be sparse when possible, and compact" and just about nothing else. :) Why? Because

Re: Hooks for array notation (was Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Bart Lateur
On Wed, 09 Aug 2000 12:03:40 -0400, Dan Sugalski wrote: I hope this RFC will be "Arrays should be sparse when possible, and compact" and just about nothing else. :) You mean, something like hashes? Nope. Faster hashes, maybe, with a hash function optimized for numerical integer keys. I was

Program lifecycle

2000-08-09 Thread Nathan Torkington
It seems to me that a perl5 program exists as several things: - pure source code (ASCII or Unicode) - a stream of tokens from the parser - a munged stream of tokens from the parser (e.g., use Foo has become BEGIN { require Foo; Foo-import }) - an unthreaded and unoptimized optree - a

vector and matrix calculations in core? (was: Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Bart Lateur
On Wed, 09 Aug 2000 09:41:22 -0400, Dan Sugalski wrote: @foo = @bar * 12; @foo = map { $_ * 12 } @bar; I don't see the need for a new notation. Well, compactness for one. With a scalar on one side it's less odd (it was a bad example). When funkier, though: @foo = @bar * @baz;

Re: vector and matrix calculations in core? (was: Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Bart Lateur
On Wed, 09 Aug 2000 12:46:32 -0400, Dan Sugalski wrote: @foo = @bar * @baz; Given that the default action of the multiply routine for an array in non-scalar context would be to die, allowing user-overrides of the functions would probably be a good idea... :) [Is this still -internals? Or

Re: Language RFC Summary 4th August 2000

2000-08-09 Thread Nick Ing-Simmons
Dan Sugalski [EMAIL PROTECTED] writes: At 11:40 AM 8/5/00 +, Nick Ing-Simmons wrote: Damian Conway [EMAIL PROTECTED] writes: It definitely is, since formats do things that can't be done in modules. Such as??? Quite. Even in perl5 an XS module can do _anything at all_. It can't