Re: pramgas as compile-time-only

2000-08-09 Thread Bart Lateur
On Tue, 8 Aug 2000 20:58:46 -0400 (EDT), Dan Sugalski wrote: >On Tue, 8 Aug 2000, Bart Lateur wrote: > >> Time for subroutine threading, isntead of op threading? > >Probably, depending on your definition of subroutine threading. > >> That would definitely make the "compiled" code at least twice a

Re: pramgas as compile-time-only

2000-08-09 Thread Nick Ing-Simmons
Bart Lateur <[EMAIL PROTECTED]> writes: >On Tue, 08 Aug 2000 11:33:06 -0400, Dan Sugalski wrote: > >>The problem perl will always run into is that our executable code counts as >>data to CPUs, and lives in the D cache, along with all the data we work on. >>Ripping through a few 100K strings'll k

Method call optimization.

2000-08-09 Thread Nick Ing-Simmons
Chaim Frenkel <[EMAIL PROTECTED]> writes: >> "NI" == Nick Ing-Simmons <[EMAIL PROTECTED]> writes: > >NI> Chaim Frenkel <[EMAIL PROTECTED]> writes: >>> Have every Package generate a vtbl for each subroutine in the package. >>> Then when something is blessed into the package (if this is retained

Re: RFC 61 (v2) Interfaces for linking C objects into pe

2000-08-09 Thread Nick Ing-Simmons
Dan Sugalski <[EMAIL PROTECTED]> writes: >On Tue, 8 Aug 2000, Nick Ing-Simmons wrote: > >> Perl6 Rfc Librarian <[EMAIL PROTECTED]> writes: >> >This document is not precisely concerned with the details of the >> >implementation >> >of the interfaces it specifies, beyond a general attempt to restric

Re: Ramblings on "base class" for SV etc.

2000-08-09 Thread Nick Ing-Simmons
Dan Sugalski <[EMAIL PROTECTED]> writes: > >I've been considering adding all the 'basic' operations (simple math, >repetition, maybe comparisons) into the base vtable. That'd mean that, >while the core perl might have *no* idea what to do with: > > @foo = @bar * 12; > >the slots would be there in

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 notat

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; >

Re: RFC 38 (v1) Standardise Handling Of Abnormal Numbers

2000-08-09 Thread Graham Barr
On Mon, Aug 07, 2000 at 02:16:37PM -0400, Chaim Frenkel wrote: > If one does 'use tristate' I would hope they know what they are doing > or asking for. > > And in fact, I would want the warning turned off. One of the pains > in doing sybperl, is I have to liberally sprinkle $^W=0 or > do a lot of

Re: Ramblings on "base class" for SV etc.

2000-08-09 Thread Dan Sugalski
At 01:55 PM 8/9/00 +0200, 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); > > } > >

Re: Ramblings on "base class" for SV etc.

2000-08-09 Thread Dan Sugalski
At 09:11 AM 8/9/00 +0100, Nick Ing-Simmons wrote: >Dan Sugalski <[EMAIL PROTECTED]> writes: > > > >I've been considering adding all the 'basic' operations (simple math, > >repetition, maybe comparisons) into the base vtable. That'd mean that, > >while the core perl might have *no* idea what to do

Re: RFC 38 (v1) Standardise Handling Of Abnormal Numbers

2000-08-09 Thread Dan Sugalski
At 10:04 PM 8/8/00 -0400, Ken Fox wrote: >Chaim Frenkel wrote: > > > "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes: > > DS> To do it generally opens a huge can of worms. Doing it in a limited > number > > DS> of cases (int->BigInt, float->BigRat, char->UTF8) is more > reasonable, and > > D

Re: Method call optimization.

2000-08-09 Thread Chaim Frenkel
> "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 possible classes and assiging each a slot in the table NI>

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

2000-08-09 Thread Dan Sugalski
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. :) Dan --"it's like t

Re: pramgas as compile-time-only

2000-08-09 Thread Dan Sugalski
At 08:16 PM 8/8/00 +, Nick Ing-Simmons wrote: >Caches work well with small-ish linear-ish hotspots that keep being re-used. >When access pattern does not follow that pattern things get (gradually) worse. > >How gradual and how -ish depends on cache architecture which is >fun, often proprietary

Re: RFC: Foreign objects in perl

2000-08-09 Thread Dan Sugalski
At 10:36 PM 8/8/00 -0400, Ken Fox wrote: >Dan Sugalski wrote: > > At 09:25 AM 8/6/00 -0400, Ken Fox wrote: > > > We're definitely going to have some sort of traversing collector. It > > > might only augment the ref count collector. > > > > I'd rather not have multiple GC schemes going at once. (Th

Re: Method call optimization.

2000-08-09 Thread Dan Sugalski
At 10:01 AM 8/9/00 -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 possib

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

Re: Method call optimization.

2000-08-09 Thread Joshua N Pritikin
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 offset in the object vtbl. > > That's going to be a v

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 opti

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

Re: Method call optimization.

2000-08-09 Thread Chaim Frenkel
> "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 Scotty which inherits from Dog not GB> be valid to assign to

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

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 a

are API definitions implementation details?

2000-08-09 Thread David L. Nicol
Dan Sugalski wrote: > > On Tue, 8 Aug 2000, Nick Ing-Simmons wrote: > > > > this list is _only_ concerned with implementation details. > > Well, assuming you consider API definitions implementation details. :) > > Dan I thought from the example RFC that

Re: are API definitions implementation details?

2000-08-09 Thread Dan Sugalski
At 04:41 PM 8/9/00 +, David L. Nicol wrote: >Dan Sugalski wrote: > > > > On Tue, 8 Aug 2000, Nick Ing-Simmons wrote: > > > > > > this list is _only_ concerned with implementation details. > > > > Well, assuming you consider API definitions implementation details. :) > > > >

Re: RFC 61 (v2) Interfaces for linking C objects into pe

2000-08-09 Thread David L. Nicol
Dan Sugalski wrote: > >ways to link C functions other than C (or any other external > >binary with a specifiable linkage) directly into Perl, so that > >not only do I not have to fire up a sub process, I don't even have to > >select the blade of my fancy pocket knife with a command line option:

Re: Method call optimization.

2000-08-09 Thread Chaim Frenkel
> "GB" == Graham Barr <[EMAIL PROTECTED]> writes: >> Yup. But the vtbl approach allows us to merge op calls and user sub calls >> into one method. GB> Ah, you are suggesting something like, GB> every known sub name is assigned a number and each package has an array GB> and the op just conta

Re: Ramblings on "base class" for SV etc.

2000-08-09 Thread Bryan C . Warnock
On Wed, 09 Aug 2000, 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); > > } > >

Re: Language RFC Summary 4th August 2000

2000-08-09 Thread Bryan C . Warnock
On Wed, 09 Aug 2000, Nick Ing-Simmons wrote: > >It can't access data the lexer's already tossed out. > > A source filter can, but not elegantly. I thought the source filter got it before it goes to the lexer? -- Bryan C. Warnock ([EMAIL PROTECTED])

Re: Language RFC Summary 4th August 2000

2000-08-09 Thread Dan Sugalski
At 03:52 PM 8/9/00 -0400, Bryan C. Warnock wrote: >On Wed, 09 Aug 2000, Nick Ing-Simmons wrote: > > >It can't access data the lexer's already tossed out. > > > > A source filter can, but not elegantly. > >I thought the source filter got it before it goes to the lexer? It does, but that hardly cou

Re: Method call optimization.

2000-08-09 Thread Nick Ing-Simmons
Graham Barr <[EMAIL PROTECTED]> writes: >> For the "my Dog $spot" case, that's not an issue, compile time resolution. > >And why would an object of type Scotty which inherits from Dog not >be valid to assign to $spot. And if Scotty overrides some methods >you have a problem. We _could_ do the C++

Re: RFC 61 (v2) Interfaces for linking C objects into pe

2000-08-09 Thread Nick Ing-Simmons
David L . Nicol <[EMAIL PROTECTED]> writes: > > >The difference, whether a .o becomes a stand-alone executable or >part of a .so, is at link time. On modern OSes (Linux, Solaris, Win32) there is very little difference between an executable and a shared object. > >I imagined when I wrote 61 th

Re: Method call optimization.

2000-08-09 Thread Damien Neil
On Wed, Aug 09, 2000 at 03:32:41PM -0400, Chaim Frenkel wrote: > Each sub has a unique number. > > Package A - Has nothing blessed, doesn't need the lookup table > > Package B - Has blessed items, lookup table for all subs that are part > of the package, or in the inheritance tree. Ar

Re: Method call optimization.

2000-08-09 Thread Dan Sugalski
At 03:35 PM 8/9/00 -0700, Damien Neil wrote: >On Wed, Aug 09, 2000 at 03:32:41PM -0400, Chaim Frenkel wrote: > > Each sub has a unique number. > > > > Package A - Has nothing blessed, doesn't need the lookup table > > > > Package B - Has blessed items, lookup table for all subs that are part > >

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 subclass

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

2000-08-09 Thread Karl Glazebrook
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?

Re: Method call optimization.

2000-08-09 Thread Chaim Frenkel
It also fails, with @ISA mutation. That's why _all_ subroutines would need a unique hash value. To paraphrase, All problems can be solved with a suitable amount of indirection. > "DN" == Damien Neil <[EMAIL PROTECTED]> writes: DN> In this fashion, the object vtable never needs to contai

Re: Method call optimization.

2000-08-09 Thread Chaim Frenkel
I just realized, that this isn't an original idea. Objective-C does this. >From what I recall (hmm, must be close to 10 years now) it had the same problem in finding the correct c routine to call for any selector. Where the selector could be implemented in a seperate objecte file. Anyone on thi

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. :) > >

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

2000-08-09 Thread Jeremy Howard
> 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 nothi

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 >>inte

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 thr

Re: Program lifecycle

2000-08-09 Thread Matthew Cline
On Wed, 09 Aug 2000, Nathan Torkington wrote: > 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->im

re rfc 15 typing

2000-08-09 Thread David L. Nicol
The other advantage of typed languages is that the run-time can be faster, and the storage streamlined. > There is a drawback: exceptions raised ("That's not an integer!" *croak*) > are made at run-time, rather than compile-time (as would be more useful). > As a result you have to test all c

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

2000-08-09 Thread Dan Sugalski
At 05:39 PM 8/9/00 +0200, Bart Lateur wrote: >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 (i

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 =

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 -internal

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 _anyt

Re: are API definitions implementation details?

2000-08-09 Thread Nick Ing-Simmons
David L . Nicol <[EMAIL PROTECTED]> writes: >Dan Sugalski wrote: >> >> On Tue, 8 Aug 2000, Nick Ing-Simmons wrote: >> > >> > this list is _only_ concerned with implementation details. >> >> Well, assuming you consider API definitions implementation details. :) >> >>