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

2000-08-10 Thread Dan Sugalski
On Thu, 10 Aug 2000, Jeremy Howard wrote: 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

Re: Program lifecycle

2000-08-10 Thread Dan Sugalski
At 09:57 PM 8/9/00 -0700, Matthew Cline wrote: 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

Re: Program lifecycle

2000-08-10 Thread Dan Sugalski
At 10:01 PM 8/9/00 -0600, Nathan Torkington wrote: Would it make sense for the parsing of a Perl program to be done as: - tokenize without rewriting (e.g., use stays as it is) - structure without rewriting (e.g., constant subs are unfolded) - rewrite for optimizations and actual ops The

Re: Program lifecycle

2000-08-10 Thread Chaim Frenkel
You may also want to be able to short circuit some of the steps. Especially where the startup time may outweigh the win of optimization. And if there could be different execution engines. Machine level, bytecode, (and perhaps straight out of the syntax tree.) Hmm, might that make some debugging

Re: Program lifecycle

2000-08-10 Thread Chaim Frenkel
"NT" == Nathan Torkington [EMAIL PROTECTED] writes: NT - source filters munge the pure source code NT - cpp-like macros would work with token streams NT - pretty printers need unmunged tokens in an unoptimized tree, which NTmay well be unfeasible I was thinking of macros as being passed

Re: Program lifecycle

2000-08-10 Thread Dan Sugalski
At 03:36 PM 8/10/00 -0400, Chaim Frenkel wrote: You may also want to be able to short circuit some of the steps. Especially where the startup time may outweigh the win of optimization. The only one that's skippable is the optimizer, really. I'd planned on having to pass it some indicator of

Re: Method call optimization.

2000-08-10 Thread Nick Ing-Simmons
Dan Sugalski [EMAIL PROTECTED] writes: 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 is assigned an index. This index is unique for the package the sub is in, and all ancestor packages. Add all sibling packages of all the

Re: Method call optimization.

2000-08-10 Thread Dan Sugalski
At 08:16 PM 8/10/00 +, Nick Ing-Simmons wrote: The first runtime reassignment of @ISA shoots this one down hard. Sorry. (MI also makes it more difficult, since dependency trees will have to be built...) Yes - this is why Malcolm dodged MI with 'fields' module. I'm not sure we can, or

Re: Method call optimization.

2000-08-10 Thread Chaim Frenkel
"GB" == Graham Barr [EMAIL PROTECTED] writes: GB On Thu, Aug 10, 2000 at 04:54:25PM -0400, Dan Sugalski wrote: At 08:31 PM 8/10/00 +, Nick Ing-Simmons wrote: You just re-invented "look up the name in a hash table" ;-) You now have one big hash table rather than several small ones.

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

2000-08-10 Thread Jeremy Howard
Dan Sugalski wrote: Strong typing and sparse arrays are orthogonal--no reason we shouldn't use them if someone does: $foo[time] or something of the sort. (People like huge arrays with few scalars in them too... :) Good point. It also occurs to me that we would want some syntax to say

Re: re rfc 15 typing

2000-08-10 Thread David L. Nicol
Michael Fowler wrote: Which then raises a few more problems (whew): how do you coax user input (which is an SV) into a value $foo can accept with very-strict on? You run it through an explicit conversion process, like using Catoi() in a C program Unfortunately, this involves more