Re: Arrays vs. Lists

2003-02-07 Thread Uri Guttman
> "AT" == Adam Turoff <[EMAIL PROTECTED]> writes: AT> On Fri, Feb 07, 2003 at 06:38:36PM -0500, Uri Guttman wrote: >> > "ML" == Michael Lazzaro <[EMAIL PROTECTED]> writes: ML> Along those lines, the closest I've been able to come so far to a ML> usable two-sentence definition is:

Re: Arrays vs. Lists

2003-02-07 Thread Michael Lazzaro
On Friday, February 7, 2003, at 04:24 PM, Uri Guttman wrote: ML> \(1,2,3) ML> returns an array reference... in perl5 it returns a list of refs ( \1, \2, \3 ). i dunno the perl6 semantics. it could be the same as [ 1, 2, 3 ] which means it is not a Sorry, I was misremembering a threa

Re: Arrays vs. Lists

2003-02-07 Thread Luke Palmer
> Date: Fri, 7 Feb 2003 14:46:37 -0800 > From: Michael Lazzaro <[EMAIL PROTECTED]> > > > On Friday, February 7, 2003, at 02:07 PM, Uri Guttman wrote: > > the whole notion is that lists are always temporary and arrays can be > > as > > permanent as you want (an array ref going quickly out of sco

Re: Random questions...

2003-02-07 Thread Dan Sugalski
At 5:09 PM -0500 2/7/03, [EMAIL PROTECTED] wrote: Dan -- Who's for, C's or perl's? C's for doesn't need an opcode. Perl's arguably might, but I think we'll be better off putting the count of things into an I register and iterating through the list as an array. Four words: Lazy Lists. Well

Re: Arrays vs. Lists

2003-02-07 Thread Adam Turoff
On Fri, Feb 07, 2003 at 06:38:36PM -0500, Uri Guttman wrote: > > "ML" == Michael Lazzaro <[EMAIL PROTECTED]> writes: > ML> Along those lines, the closest I've been able to come so far to a > ML> usable two-sentence definition is: > > ML> -- A list is an ordered set of scalar values. >

Re: Arrays vs. Lists

2003-02-07 Thread Uri Guttman
> "ML" == Michael Lazzaro <[EMAIL PROTECTED]> writes: ML> On Friday, February 7, 2003, at 03:38 PM, Uri Guttman wrote: >> but you can't derive the rules about allowing push/pop/splice/slice >> from >> that pair of defintions. ML> Is there any syntactic reason why both of the follow

Re: Arrays vs. Lists

2003-02-07 Thread Stéphane Payrard
On Fri, Feb 07, 2003 at 02:30:47PM -0500, Mark J. Reed wrote: > On 2003-02-07 at 14:26:42, Mark J. Reed wrote: > > Not really, though. A list can be an lvalue, provided it is a list > > of lvalues: Note that to avoid the burden of writing an explicit slice, 'undef' is considered as a lvalue in su

Re: Arrays vs. Lists

2003-02-07 Thread Michael Lazzaro
On Friday, February 7, 2003, at 03:38 PM, Uri Guttman wrote: but you can't derive the rules about allowing push/pop/splice/slice from that pair of defintions. Is there any syntactic reason why both of the following cannot be allowed? (1,2,3).pop [1,2,3].pop I don't know that one is

Re: Arrays vs. Lists

2003-02-07 Thread Dave Whipp
"Michael Lazzaro" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Along those lines, the closest I've been able to come so far to a > usable two-sentence definition is: > > -- A list is an ordered set of scalar values. quibble: that's an "ordered bag", isn't it?

Re: Arrays vs. Lists

2003-02-07 Thread Uri Guttman
> "ML" == Michael Lazzaro <[EMAIL PROTECTED]> writes: ML> On Friday, February 7, 2003, at 02:07 PM, Uri Guttman wrote: >> the whole notion is that lists are always temporary and arrays can >> be as >> permanent as you want (an array ref going quickly out of scope is very >> temporar

Re: Arrays vs. Lists

2003-02-07 Thread Michael Lazzaro
On Friday, February 7, 2003, at 02:07 PM, Uri Guttman wrote: the whole notion is that lists are always temporary and arrays can be as permanent as you want (an array ref going quickly out of scope is very temporary). lists can't live beyond the current expression but arrays can. Along those l

Re: Random questions...

2003-02-07 Thread gregor
Dan -- > Who's for, C's or perl's? C's for doesn't need an opcode. Perl's > arguably might, but I think we'll be better off putting the count of > things into an I register and iterating through the list as an array. Four words: Lazy Lists. Regards, -- Gregor

Re: Arrays vs. Lists

2003-02-07 Thread Uri Guttman
> "MJR" == Mark J Reed <[EMAIL PROTECTED]> writes: MJR> A reference is fundamentally a pointer, but that doesn't help. My point MJR> was that if you're talking about lists vs. arrays, you have at least MJR> three different syntaxes to distinguish: MJR> (1,2,3) MJR>

Re: Random questions...

2003-02-07 Thread Dan Sugalski
At 1:52 AM -0800 2/5/03, David wrote: Wow, Parrot has certainly made a lot of progress since I've last looked at it. I see Leo's answered a bunch of this already, but since I'm digging through my mail, I'll do it as well. 1. How do you handle variant (either string or numeric) data? Do you set

Re: Arrays vs. Lists

2003-02-07 Thread Mark J. Reed
On 2003-02-07 at 12:18:21, Austin Hastings wrote: > > Although this may reasonably be regarded as a special case; you > > certainly can't pop a list: > > > > (1,2,3).pop => error > > But could you do it the other way (function instead of method)? > pop (1,2,3) => ? Nope. At least, n

Re: multi-programming-language questions

2003-02-07 Thread Dan Sugalski
At 10:37 AM -0500 2/4/03, Phil Hassey wrote: List, I've been lurking here for about two months, after having read the summaries for several months previous. I'm interested in parrot because 1. I want it very badly for php / python / perl combinationability(?) 2. Just reading about the project i

Re: Arrays vs. Lists

2003-02-07 Thread Austin Hastings
--- "Mark J. Reed" <[EMAIL PROTECTED]> wrote: > On 2003-02-07 at 11:13:07, Austin Hastings wrote: > > --- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > > I'm trying, and failing, to accurately and definitively answer > the > > > question "what's the difference between an array and a list in > >

Re: Arrays vs. Lists

2003-02-07 Thread Mark J. Reed
On 2003-02-07 at 14:26:42, Mark J. Reed wrote: > Not really, though. A list can be an lvalue, provided it is a list > of lvalues: > > ($a, $b, $c) = 1,2,3; Forgot the parens on the right side, there: ($a, $b, $c) = (1,2,3); > But they certainly aren't lvalues: > > [$a,$

Re: Arrays vs. Lists

2003-02-07 Thread Mark J. Reed
On 2003-02-07 at 11:13:07, Austin Hastings wrote: > --- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > I'm trying, and failing, to accurately and definitively answer the > > question "what's the difference between an array and a list in > > Perl6?" > > How's this? > > > A list is a

Re: Arrays vs. Lists

2003-02-07 Thread Austin Hastings
--- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > I'm trying, and failing, to accurately and definitively answer the > question "what's the difference between an array and a list in > Perl6?" > > If someone can come up with a simple but accurate definition, it > would be helpful. How's this? =

Arrays vs. Lists

2003-02-07 Thread Michael Lazzaro
I'm trying, and failing, to accurately and definitively answer the question "what's the difference between an array and a list in Perl6?" If someone can come up with a simple but accurate definition, it would be helpful. MikeL

Re: Objects, methods, attributes, properties, and other related frobnitzes

2003-02-07 Thread Dan Sugalski
At 6:13 PM + 2/7/03, Graham Barr wrote: On Fri, Feb 07, 2003 at 09:39:14AM -0800, Dan Sugalski wrote: It's a little more confusing that that. When I said only one foo method, it was in contrast to attributes, where an attribute of a particular name may appear in an object multiple times--s

Re: Objects, methods, attributes, properties, and other related frobnitzes

2003-02-07 Thread Graham Barr
On Fri, Feb 07, 2003 at 09:39:14AM -0800, Dan Sugalski wrote: > It's a little more confusing that that. When I said only one foo > method, it was in contrast to attributes, where an attribute of a > particular name may appear in an object multiple times--since > attributes are class-private, eac

Re: Objects, methods, attributes, properties, and other related frobnitzes

2003-02-07 Thread Dan Sugalski
At 9:37 PM + 2/3/03, Nicholas Clark wrote: On Mon, Feb 03, 2003 at 12:15:32PM -0500, Dan Sugalski wrote: *) Method: Some sort of action that an object can do. Methods are global and public--only one foo method for an object. Methods may be inherited from parent classes, or redefined in a

Re: IMCC's bsr handling

2003-02-07 Thread Leopold Toetsch
Steve Fink wrote: In tracking this down, I also noticed that imcc seems to assume that you will do a saveall/restoreall pair around bsr calls. I have now a partial fix for this committed. When imcc sees a bsr *and* knows the label (all is in one compilation unit) *and* when there is no save

Re: YARL - yet another run loop: CSwitch

2003-02-07 Thread Leopold Toetsch
Jason Gloudon wrote: On Fri, Feb 07, 2003 at 09:49:29AM +0100, Leopold Toetsch wrote: Yesterday night I hacked together a switched prederefed run loop. It's running ~50% faster then fast_core but a lot slower then the CGoto based loops. The speedups are great. I thougt that the switched

Re: Random questions...

2003-02-07 Thread Leopold Toetsch
David wrote: Leo wrote: imcc (the assembler) generates spill code, using a PerlArray. Ah, so that's what "spill code" means. Perhaps a definition of the term in the document might be helpful. $ grep spill docs/*.pod :) leo

Re: YARL - yet another run loop: CSwitch

2003-02-07 Thread Jason Gloudon
On Fri, Feb 07, 2003 at 09:49:29AM +0100, Leopold Toetsch wrote: > Yesterday night I hacked together a switched prederefed run loop. It's > running ~50% faster then fast_core but a lot slower then the CGoto based > loops. The speedups are great. The next question is how do you do use this in a

YARL - yet another run loop: CSwitch

2003-02-07 Thread Leopold Toetsch
Yesterday night I hacked together a switched prederefed run loop. It's running ~50% faster then fast_core but a lot slower then the CGoto based loops. The question is: Should I put it in? I thought, for compilers lacking computed goto (ar there any?) it could be an alternative. The disadvantage

Re: IMCC's bsr handling

2003-02-07 Thread Leopold Toetsch
Steve Fink wrote: IMCC doesn't handle bsr with non-constant args. A test program would be something like L: $I0 = addr L bsr $I0 It will complain that it can't fixup the label '$I0'. Yep. That's missing. I'll hvae a look at it. (But you could invoke a Sub, which is ok IIRC). In tr

Re: [CVS ci] CGP - CGoto Prederefed runloop

2003-02-07 Thread Leopold Toetsch
Melvin Smith wrote: At 10:12 PM 2/6/2003 +0100, Leopold Toetsch wrote: Improvements welcome - and I'm a really bad C programmer, I won't do it. *cough* If you are a "bad" C programmer, what is your "good" language? :) I don't have one. But IMHO I have a fair survey over the whole (except