Re: More Array Behaviors

2003-01-28 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > Dave Whipp wrote: > >> OK, I've assimilated all that (though it still feels wrong). I think you are >> saying that of the following, the 4th is an error. >> my @d = @x but Foo; # error: no values involved in this assignment > > Correct. Although presum

Re: Spare brackets :-)

2003-01-28 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: >> This may sound like a silly idea > > It's been suggested previously. > > >> Has anyone considered removing with the syntactic distinction between >> numeric and string indexing -- that is, between array and hash lookup? > > Yes. We rejected the idea. >

[CVS ci] packfile #3 - double/long double PBC support

2003-01-28 Thread Leopold Toetsch
This patch enables reading 12 byte long doubles on parrot with 8 byte doubles and vv. Writing long doubles via imcc/packout works too. The questions still remains: how portable are these formats? Still borken: assemble.pl leo

Re: occasioanl CVS hickups?

2003-01-28 Thread Leopold Toetsch
Robert Spier wrote: Odd. There's not enough information in the logs to figure out what's going on. (And the code shouldn't have this kind of failure mode.) If it keeps happening, please keep me in the loop. Did it again. This time w/o error message - it looked totally sane. From yesterday

Re: Compiling to Parrot

2003-01-28 Thread K Stol
Hi there, didn't have time to reply earlier, had to do some research on Lua and had to get approval for the project, so couldn't let you know earlier. sorry about that. But now, I have it (the approval, that is) so I'll be implementing a compiler for Lua->parrot (most probably IMCC in between). t

Re: Bytecode metadata

2003-01-28 Thread martin
On Sun, 26 Jan 2003, James Mastros wrote: > just define a new packfile section, SIGNATURE, that is defined to be a > cryptographic signature of all sections previous to it in the file. I'm battling with this in another file format at the moment; if possible can we please *not* have it sensitive to

Securing Parrot ASM

2003-01-28 Thread Thomas Whateley
Hi, I've been thinking about how to run un-trusted code, without having to audit every line, or use some sort of sandbox, and was wondering if Parrot could provide a Mandator Access Control mechanism (ala SE Linux/Flask). When assembling Parrot, the assembler could either look in a file or a pe

Re: Securing Parrot ASM

2003-01-28 Thread Christopher Armstrong
On Tue, Jan 28, 2003 at 11:41:14AM +, Thomas Whateley wrote: > Hi, > > I've been thinking about how to run un-trusted code, > without having to audit every line, or use some sort of sandbox, > and was wondering if Parrot could provide a Mandator Access > Control mechanism (ala SE Linux/Flask)

[perl #20584] [PATCH] packfile #5

2003-01-28 Thread via RT
# New Ticket Created by Leopold Toetsch # Please include the string: [perl #20584] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=20584 > This is a first try to solve the packfile wordsize issues. Could people with 64 bit m

Re: Spare brackets :-(

2003-01-28 Thread John Williams
ECMAscript already tried this. Bad idea. If your hash keys happen to look like large numbers (e.g. you have 7-digit product codes) as soon as you store one of them, it says: "Oh, this looks like a number, so we'll store it like an array" and happily creates a million empty array entries for you.

Re: Securing Parrot ASM

2003-01-28 Thread Matthew Byng-Maddick
On Tue, Jan 28, 2003 at 11:41:14AM +, Thomas Whateley wrote: > I've been thinking about how to run un-trusted code, > without having to audit every line, or use some sort of sandbox, [snip] > block to audit and be certain of what a module/program could > do to my system. As author of http://de

Re: Securing Parrot ASM

2003-01-28 Thread Christopher Armstrong
On Tue, Jan 28, 2003 at 02:11:39PM +, Matthew Byng-Maddick wrote: > On Tue, Jan 28, 2003 at 11:41:14AM +, Thomas Whateley wrote: > > I've been thinking about how to run un-trusted code, > > without having to audit every line, or use some sort of sandbox, > [snip] > > block to audit and be c

Re: Securing Parrot ASM

2003-01-28 Thread Matthew Byng-Maddick
On Tue, Jan 28, 2003 at 11:04:43AM -0500, Christopher Armstrong wrote: > On Tue, Jan 28, 2003 at 02:11:39PM +, Matthew Byng-Maddick wrote: > > What happens when you link in some module that's written natively? > > Basically, my conclusion was that this was, unfortunately, still > Hrm, maybe I j

Re: Securing Parrot ASM

2003-01-28 Thread Fred K Ollinger
> I've been thinking about how to run un-trusted code, > without having to audit every line, or use some sort of sandbox, > and was wondering if Parrot could provide a Mandator Access > Control mechanism (ala SE Linux/Flask). I think that this is a great idea. > When assembling Parrot, the assemb

Re: Securing Parrot ASM

2003-01-28 Thread Joseph Guhlin
Pardon my ignorance on the whole issue but I'm just a lurker trying to understand enough to help out. =) I know security on parrot like this would be difficult, and this thread is specifically about securing PASM, but what about something like FreeBSD's 'jail' command built in? That way, even un

Re: Spare brackets :-)

2003-01-28 Thread Damian Conway
Sure. But then is this: $ref[$key] an array or hash look-up??? Decided at runtime? Doesn't help if $ref refers to a type that has both hash-like and array-like accessability. And that will be very common, since all Perl 6 regexes return such objects. Damian

Re: More Array Behaviors

2003-01-28 Thread Dan Sugalski
At 8:46 AM + 1/28/03, Piers Cawley wrote: Bugger. I was hoping that Perl 6 was going to make a Pixie like Object database easier to write; looks like I'm wrong. One of the things Pixie does is to attach its control data by magic to the object itself (rather than any particular variable pointin

Re: Spare brackets :-)

2003-01-28 Thread Dan Sugalski
At 8:47 AM + 1/28/03, Piers Cawley wrote: Damian Conway <[EMAIL PROTECTED]> writes: > Sure. But then is this: $ref[$key] an array or hash look-up??? Decided at runtime? How? People use strings as array indices and ints/floats as hash indices, and count on autoconversion to Make It W

Re: More Array Behaviors

2003-01-28 Thread Damian Conway
Piers Cawley wrote: Bugger. I was hoping that Perl 6 was going to make a Pixie like Object database easier to write; looks like I'm wrong. One of the things Pixie does is to attach its control data by magic to the object itself (rather than any particular variable pointing to it). This lets us do

Re: Spare brackets :-)

2003-01-28 Thread Austin Hastings
--- Dan Sugalski <[EMAIL PROTECTED]> wrote: > At 8:47 AM + 1/28/03, Piers Cawley wrote: > >Damian Conway <[EMAIL PROTECTED]> writes: > > > Sure. But then is this: > >> > >>$ref[$key] > >> > >> an array or hash look-up??? > > > >Decided at runtime? > > How? People use strings as array in

Re: More Array Behaviors

2003-01-28 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 8:46 AM + 1/28/03, Piers Cawley wrote: >>Bugger. I was hoping that Perl 6 was going to make a Pixie like Object >>database easier to write; looks like I'm wrong. One of the things >>Pixie does is to attach its control data by magic to the object it

Re: Spare brackets :-)

2003-01-28 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 8:47 AM + 1/28/03, Piers Cawley wrote: >>Damian Conway <[EMAIL PROTECTED]> writes: >> > Sure. But then is this: >>> >>> $ref[$key] >>> >>> an array or hash look-up??? >> >>Decided at runtime? > > How? People use strings as array indices and i

Re: More Array Behaviors

2003-01-28 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > Piers Cawley wrote: > >> Bugger. I was hoping that Perl 6 was going to make a Pixie like Object >> database easier to write; looks like I'm wrong. One of the things >> Pixie does is to attach its control data by magic to the object itself >> (rather than

More Array Behaviors (Take 2)

2003-01-28 Thread Michael Lazzaro
OK, here are the answers so far -- or more accurately, strawman interpretations of those answers that should be objected to if they're wrong. 1) Edge cases in array indexing: my int @a = (1,2,3); @a[0] # 1 @a[1] # 2 @a[2] # 3 @a[3] # undef

Re: More Array Behaviors (Take 2)

2003-01-28 Thread Dan Sugalski
At 10:13 AM -0800 1/28/03, Michael Lazzaro wrote: OK, here are the answers so far -- or more accurately, strawman interpretations of those answers that should be objected to if they're wrong. I think some of this is incorrect which, because Damian thinks otherwise, will need some hashing out f

Re: More Array Behaviors (Take 2)

2003-01-28 Thread Michael Lazzaro
On Tuesday, January 28, 2003, at 10:20 AM, Dan Sugalski wrote: At 10:13 AM -0800 1/28/03, Michael Lazzaro wrote: 1) Edge cases in array indexing: my int @a = (1,2,3); @a[3] # undef (warning: index out-of-bounds) Or a real 0, since you said @a can only return integers.

Re: More Array Behaviors (Take 2)

2003-01-28 Thread John Williams
On Tue, 28 Jan 2003, Dan Sugalski wrote: > At 10:13 AM -0800 1/28/03, Michael Lazzaro wrote: > > > @a[ Inf ] # undef (warning: can't use Inf as array index) > > I'd throw an exception here. > > > @a[-4]# undef (warning: index out-of-bounds) > > @a[-Inf] # undef

Arrays: Default Values

2003-01-28 Thread Michael Lazzaro
There has been discussion of allowing a "default" value for array cells -- that is, one aside from C or whatever the type-specific default is. Questions, in order of increased evilness: 1) What's the final decided syntax? Two possibilities: my @a is Array( default => 'foo' ); # attri

Re: Securing Parrot ASM

2003-01-28 Thread Matthew Byng-Maddick
On Tue, Jan 28, 2003 at 10:39:33AM -0600, Joseph Guhlin wrote: > Pardon my ignorance on the whole issue but I'm just a lurker trying to > understand enough to help out. =) > I know security on parrot like this would be difficult, and this thread > is specifically about securing PASM, but what abo

RE: Securing Parrot ASM

2003-01-28 Thread Brent Dax
Christopher Armstrong: # One other thing to think about is resource limits. It'd be nice to not # require `ulimit' or whatever system-specific resource limitation # mechanism, but rather rely on the parrot interpreter to # baby-sit. Also, it'd make catching these resource-limit violations # much mo

RE: Securing Parrot ASM

2003-01-28 Thread Brent Dax
Matthew Byng-Maddick: # It seems to me that the linking with native code is going to # end up being one that most people switch on, because it will # be necessary and/or useful in getting anything done. Then make sure that "link in native code" isn't a permission--"link in native code library X"

Re: Securing Parrot ASM

2003-01-28 Thread Christopher Armstrong
On Tue, Jan 28, 2003 at 09:24:20AM -0800, Brent Dax wrote: > Christopher Armstrong: > # One other thing to think about is resource limits. It'd be nice to not > # require `ulimit' or whatever system-specific resource limitation > # mechanism, but rather rely on the parrot interpreter to > # baby-si

Re: [Introspector-developers] Re: Bytecode metadata

2003-01-28 Thread Gopal V
If memory serves me right, James Michael DuPont wrote: > > > Bah. That's "parrot -o foo.o foo.pmc" isn't it? > > > > And if we make C a parrot supported language we can even build parrot > > with parrot? Hmmm... bootstrapping > 1. The gcc : I have %99 of the information about the function b

Re: Securing Parrot ASM

2003-01-28 Thread Christopher Armstrong
On Tue, Jan 28, 2003 at 04:15:41PM +, Matthew Byng-Maddick wrote: > On Tue, Jan 28, 2003 at 11:04:43AM -0500, Christopher Armstrong wrote: > > Hrm, maybe I just don't know what's going on, but I'm not sure why > > this is a problem. Couldn't "call out to native functions" or perhaps > > "call o

Re: Securing Parrot ASM

2003-01-28 Thread Fred K Ollinger
> On Tue, Jan 28, 2003 at 10:39:33AM -0600, Joseph Guhlin wrote: > > Pardon my ignorance on the whole issue but I'm just a lurker trying to > > understand enough to help out. =) > > I know security on parrot like this would be difficult, and this thread > > is specifically about securing PASM, but

Re: Securing Parrot ASM

2003-01-28 Thread Allen Short
> "Matthew" == Matthew Byng-Maddick <[EMAIL PROTECTED]> writes: >> I guess what I'm saying is, sure, you can't stop a native >> function (which was called from parrot code) from doing >> whatever it wants, but you can still prevent the parrot code >> from using that function in

Re: Securing Parrot ASM

2003-01-28 Thread Allen Short
> "Brent" == Brent Dax <[EMAIL PROTECTED]> writes: > I don't see why Parrot couldn't do much of this. It can > certainly audit allocations made through its own > memory-allocation system, and with only a little help from the > system it should be able to audit its processor u

Re: Securing Parrot ASM

2003-01-28 Thread Dan Sugalski
At 11:41 AM + 1/28/03, Thomas Whateley wrote: Hi, I've been thinking about how to run un-trusted code, without having to audit every line, or use some sort of sandbox, and was wondering if Parrot could provide a Mandator Access Control mechanism (ala SE Linux/Flask). Ah, I've been hoping to

PyCon

2003-01-28 Thread Christopher Armstrong
Hey, any Parrot hackers going to the Python convention at the end of March? http://python.org/pycon/. Price will be $150-$200. I'm very interested in meeting and discussing there :-) -- Twisted | Christopher Armstrong: International Man of Twistery Radix | Release Manager, Twisted P

RE: [CVS ci] packfile #2

2003-01-28 Thread Garrett Goebel
Leopold Toetsch wrote: > > - 8/12 byte float issues are still the same - are these >formats really portable, or should we try to store >ASCII equivalents? No? ? Because my knowledge here approaches zero, so I'm just aping information back at you from google searches and scanning documen

Re: [perl #20584] [PATCH] packfile #5

2003-01-28 Thread blair christensen
On Tue, Jan 28, 2003 at 01:33:53PM +, Leopold Toetsch wrote: > # New Ticket Created by Leopold Toetsch > # Please include the string: [perl #20584] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org/rt2/Ticket/Display.html?id=20584 > > > > This i

Parrot developer world map

2003-01-28 Thread Leon Brocard
Last week I collected your data. This week I bring you pretty pictures: http://www.astray.com/parrot/worldmap/ So London would seem a good place for a Parrot developer day, as would California. I guess most people will be meeting up at Perl conferences anyway. What do people have in mind for s

Re: Securing Parrot ASM

2003-01-28 Thread Matthew Byng-Maddick
On Tue, Jan 28, 2003 at 02:26:14PM -0500, Dan Sugalski wrote: > *) There'll be a set of 'privileges' of some sort (call 'em > capabilities or whatever) and to do various tasks will require that > you have an appropriate privilege Please don't use "capabilities" for this. The term "capability" is

[perl #20592] [PATCH] save and restore more of a coroutine's context (and more)

2003-01-28 Thread via RT
# New Ticket Created by Jonathan Sillito # Please include the string: [perl #20592] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=20592 > A description of each attachment: 1) coroutine.t (which should be put in t/pmc/) ex

Re: Arrays: Default Values

2003-01-28 Thread Nicholas Clark
On Tue, Jan 28, 2003 at 02:13:22PM -0800, Michael Lazzaro wrote: > Hmm. I don't have a strong preference either way, but I'm not sure why > (given C): > >@a[ undef ] > > C should be autoconverted to 0 with warning, but in: > >@a[0] = undef; > > C should _not_ be autoconverted to 0, b

Re: Arrays: Default Values

2003-01-28 Thread Damian Conway
Austin Hastings wrote: --- Damian Conway <[EMAIL PROTECTED]> wrote: my @a is default(666); print @a[2]; # prints 666 @a[4] = 1; print @a[2]; # now prints undef :-( [typo in third line corrected] I don't understand your example. Can you explain it again, using words of less than one

Re: Arrays: Default Values

2003-01-28 Thread Jonathan Scott Duff
On Tue, Jan 28, 2003 at 11:15:26AM -0800, Michael Lazzaro wrote: > 2) Assume the default value is a simple value, e.g. 'foo'. > > my @a is Array( default => 'foo' ); > @a[5] = 'bar'; > > @a[4]; # 'foo' > @a[5]; # 'bar' > @a[6]; # 'foo' > > @a[-1];# '

Re: More Array Behaviors

2003-01-28 Thread Austin Hastings
--- Damian Conway <[EMAIL PROTECTED]> wrote: > > [*] People, we just *have* to find better names for these things! > I'd suggest we henceforth call them "value" properties (for > C) and "referent" properties (for C). Hmm. According to this, C would therefore be a malvalapropism, no? =Austi

Re: Arrays: Default Values

2003-01-28 Thread Jonathan Scott Duff
On Tue, Jan 28, 2003 at 01:30:54PM -0600, Jonathan Scott Duff wrote: > On Tue, Jan 28, 2003 at 11:15:26AM -0800, Michael Lazzaro wrote: > > 2) Assume the default value is a simple value, e.g. 'foo'. > > > > my @a is Array( default => 'foo' ); > > @a[5] = 'bar'; > > > > @a[4]; #

Re: Arrays: Default Values

2003-01-28 Thread Paul Johnson
Michael Lazzaro said: > > There has been discussion of allowing a "default" value for array cells > -- that is, one aside from C or whatever the type-specific > default is. Questions, in order of increased evilness: 1 and 2 seem fine to me. > 2a) When a cell is explicitly re-undefined, does th

Re: Arrays: Default Values

2003-01-28 Thread Austin Hastings
--- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > 1) What's the final decided syntax? Two possibilities: > > my @a is Array( default => 'foo' ); # attrib? > my @a is default('foo');# property? Since we want arrays (lowercase) to support them, too, it should be a pro

Re: More Array Behaviors (Take 2)

2003-01-28 Thread Damian Conway
Michael Lazzaro wrote: OK, here are the answers so far -- or more accurately, strawman interpretations of those answers that should be objected to if they're wrong. 1) Edge cases in array indexing: my int @a = (1,2,3); @a[0] # 1 @a[1] # 2 @a[2] # 3

Re: Arrays: Default Values

2003-01-28 Thread Austin Hastings
--- Austin Hastings <[EMAIL PROTECTED]> wrote: > No, undef. OTOH, deleting @a[1] would reset it to default. Ere someone flames my for using a hash keyword in an array context: s/deleting/absquatulating (e.g., via pop, shift, or splice)/ =Austin

More Array Behaviors (Take 3)

2003-01-28 Thread Michael Lazzaro
Corrected in accordance with design team member feedback. These should be solid, now. Thanks much for the responses. 1) Edge cases in array indexing: my @a = (1,2,3); @a[0] # 1 @a[1] # 2 @a[2] # 3 @a[3] # (warning: index out-of-bounds

Re: Arrays: Default Values

2003-01-28 Thread Aaron Sherman
I think this debate is easier if you think of defaults as overriding and auto-vivification method on a container. On Tue, 2003-01-28 at 14:47, Paul Johnson wrote: > Michael Lazzaro said: > > 2a) When a cell is explicitly re-undefined, does the default value take > > effect? > > > > my @a is

Re: Arrays: Default Values

2003-01-28 Thread Damian Conway
Austin Hastings wrote: --- Austin Hastings <[EMAIL PROTECTED]> wrote: No, undef. OTOH, deleting @a[1] would reset it to default. Ere someone flames my for using a hash keyword in an array context: s/deleting/absquatulating (e.g., via pop, shift, or splice)/ Unfortunately, I don't think we

Re: More Array Behaviors

2003-01-28 Thread Nicholas Clark
On Tue, Jan 28, 2003 at 09:17:36AM -0800, Damian Conway wrote: > Errno. That's rather the whole point of C properties [*]. > [*] People, we just *have* to find better names for these things! > I'd suggest we henceforth call them "value" properties (for C) > and "referent" properties (f

Re: More Array Behaviors

2003-01-28 Thread Nicholas Clark
On Mon, Jan 27, 2003 at 01:02:28PM -0800, Austin Hastings wrote: > > --- Nicholas Clark <[EMAIL PROTECTED]> wrote: > > On Mon, Jan 27, 2003 at 11:00:17AM -0800, Michael Lazzaro wrote: > > > locked => 1, # read-only, can't store new values > > > > There was a discussion on p5p a

Re: Arrays: Default Values

2003-01-28 Thread Nicholas Clark
On Tue, Jan 28, 2003 at 12:30:41PM -0800, Austin Hastings wrote: > > --- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > my int @a is Array( default => 5 ); > > @a[0] = undef; > > This should cause a blip of some kind. If storing an explicit undef (as > opposed to "undef but 0" or C<$v

Re: Spare brackets :-)

2003-01-28 Thread Aaron Sherman
On Tue, 2003-01-28 at 11:49, Dan Sugalski wrote: > At 8:47 AM + 1/28/03, Piers Cawley wrote: > >Damian Conway <[EMAIL PROTECTED]> writes: > > > Sure. But then is this: > >> > >>$ref[$key] > >> > >> an array or hash look-up??? > > > >Decided at runtime? > > How? People use strings as arra

Re: More Array Behaviors (Take 3)

2003-01-28 Thread Damian Conway
Michael Lazzaro wrote: Where is whatever the type-specific ...or user specified... default is, typically C, C<0>, or C<''>. Damian

Re: Arrays: Default Values

2003-01-28 Thread Leopold Toetsch
Austin Hastings wrote: Another question: If you ask for a value and get it, does the array grow? Or does that happen only on assignment? ( Arrays (or hashes) don't grow on reading - never. And another anser from current low level (list.c & classes/Array.pmc) *Return value *---

Re: Arrays: Default Values

2003-01-28 Thread Aaron Sherman
On Tue, 2003-01-28 at 16:23, Leopold Toetsch wrote: > Austin Hastings wrote: > > > > Another question: If you ask for a value and get it, does the array > > grow? Or does that happen only on assignment? ( > > > Arrays (or hashes) don't grow on reading - never. Never say never. You're correct f

Re: Spare brackets :-)

2003-01-28 Thread Dan Sugalski
At 4:17 PM -0500 1/28/03, Aaron Sherman wrote: Now the question becomes, do you WANT them for readability? Given that Larry's answer has been a resounding "yes" all along, the technical reasons (Which are, themselves, sufficient) are pretty irrelevant. --

Re: Arrays: Default Values

2003-01-28 Thread Michael Lazzaro
On Tuesday, January 28, 2003, at 01:14 PM, Damian Conway wrote: I'm not compelled by the counter-argument that this makes it impossible to store an C in an array with a default. Because the whole point of an array having a default is to prevent those nasty out-of-range Cs from popping up in t

Re: Spare brackets :-)

2003-01-28 Thread Aaron Sherman
On Tue, 2003-01-28 at 16:34, Dan Sugalski wrote: > At 4:17 PM -0500 1/28/03, Aaron Sherman wrote: > > Now the question becomes, do you WANT them > >for readability? > > Given that Larry's answer has been a resounding "yes" all along, I'm not sure that this specific case was brought up. I rememb

Re: Arrays: Default Values

2003-01-28 Thread Michael Lazzaro
On Tuesday, January 28, 2003, at 01:01 PM, Nicholas Clark wrote: On Tue, Jan 28, 2003 at 12:30:41PM -0800, Austin Hastings wrote: --- Michael Lazzaro <[EMAIL PROTECTED]> wrote: my int @a is Array( default => 5 ); @a[0] = undef; This should cause a blip of some kind. If storing an e

Re: Spare brackets :-)

2003-01-28 Thread Dan Sugalski
At 5:07 PM -0500 1/28/03, Aaron Sherman wrote: On Tue, 2003-01-28 at 16:34, Dan Sugalski wrote: At 4:17 PM -0500 1/28/03, Aaron Sherman wrote: > Now the question becomes, do you WANT them >for readability? Given that Larry's answer has been a resounding "yes" all along, I'm not sure that

Re: Arrays: Default Values

2003-01-28 Thread Austin Hastings
--- Damian Conway <[EMAIL PROTECTED]> wrote: > Austin Hastings wrote: > > --- Austin Hastings <[EMAIL PROTECTED]> wrote: > > > > > >>No, undef. OTOH, deleting @a[1] would reset it to default. > > > > > > Ere someone flames my for using a hash keyword in an array context: > > > > s/deleting/ab

Re: More Array Behaviors (Take 3)

2003-01-28 Thread Leopold Toetsch
Michael Lazzaro wrote: 2) There is NO platform-dependent maximum array size. If it's not a sparse array, you'll run out of memory long before you run out of indexes, but using bigints as indexes for sparse arrays is OK. Current: array size is limited to $arch's +INTVAL (2^31-1 / 2^63-1). Arr

Re: Arrays: Default Values

2003-01-28 Thread Smylers
Austin Hastings wrote: > --- Austin Hastings <[EMAIL PROTECTED]> wrote: > > > No, undef. OTOH, deleting @a[1] would reset it to default. > > Ere someone flames my for using a hash keyword in an array context: > > s/deleting/absquatulating (e.g., via pop, shift, or splice)/ What's wrong with C

Re: Arrays: Default Values

2003-01-28 Thread Austin Hastings
--- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > On Tuesday, January 28, 2003, at 01:01 PM, Nicholas Clark wrote: > > On Tue, Jan 28, 2003 at 12:30:41PM -0800, Austin Hastings wrote: > >> --- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > >>> my int @a is Array( default => 5 ); > >>> @

Re: Arrays: Default Values

2003-01-28 Thread Smylers
Nicholas Clark wrote: > I'm not sure. I think I like the idea of > > @a[0] = undef; > > being a blip, but > > undef @a[0]; > > resetting the value to the default. That thought crossed my mind as well before I got to your message ... > Conceptually perl5 already has a distinction between

Re: Arrays: Default Values

2003-01-28 Thread Paul Johnson
On Tue, Jan 28, 2003 at 04:07:17PM -0500, Aaron Sherman wrote: > I think this debate is easier if you think of defaults as overriding and > auto-vivification method on a container. Hmm. I don't :-) I think it is easier if you think of defaults as overriding undef. > On Tue, 2003-01-28 at 14:47

Re: Spare brackets :-)

2003-01-28 Thread Adam Turoff
On Tue, Jan 28, 2003 at 09:24:50AM -0800, Austin Hastings wrote: > --- Dan Sugalski <[EMAIL PROTECTED]> wrote: > > At 8:47 AM + 1/28/03, Piers Cawley wrote: > > >> $ref[$key] > > >> > > >> an array or hash look-up??? > > > > > >Decided at runtime? > > > > How? People use strings as array ind

Re: Arrays: Default Values

2003-01-28 Thread Paul Johnson
On Tue, Jan 28, 2003 at 03:06:19PM -0800, Damian Conway wrote: > Austin Hastings wrote: > > >--- Damian Conway <[EMAIL PROTECTED]> wrote: > > > >>my @a is default(666); > >> > >>print @a[2];# prints 666 > >> > >>@a[4] = 1; > >> > >>print @a[2];# now prints undef :-( > > [t

Re: Arrays: Default Values

2003-01-28 Thread Damian Conway
Michael Lazzaro wrote: The next (oft-asked) question is whether or not C denotes read-only, or if you can store to an C array. my @a is computed { $^index**2 }; @a[4] = 'something completely different'; I'd expect that C and C would be orthogonal. And things like this would be downri

Re: Arrays: Default Values

2003-01-28 Thread Dave Whipp
Michael Lazzaro wrote: 2a) When a cell is explicitly re-undefined, does the default value take effect? my @a is Array( default => 'foo' ) = (1,2,3); @a[1] = undef; @a[1]; # undef, or 'foo'? STRAWMAN ANSWER: 'foo'. If C is a valid value for a cell, then I should be able

Re: Arrays: Default Values

2003-01-28 Thread Dave Whipp
Aaron Sherman wrote: auto-vivification will have to happen in some cases. e.g. if foo requires a lvalue parameter. You can't know if an actual write will happen, so you have to auto-vivify in order to pass a reference. Or did I miss something there? I think the idea is to use a special object

Re: Arrays: Default Values

2003-01-28 Thread attriel
So ... with the discussion of "what if i really wanted to put an undef in there b/c it's not just that i haven't defined it but rather that it really isn't defined. I KNOW it's not defined, and i'm now explicitly saying it's undefined as opposed to before when i was implicitly suggesting that i di

Re: This week's Perl 6 Summary

2003-01-28 Thread banjo
On Tue, 2003-01-28 at 06:34, Piers Cawley wrote: > Compiling to Parrot > K Stol is looking for a final project for his Bachelor's degree and > would like to implement some language targeting Parrot and asked for > suggestions. Simon Wistow suggested PHP or Lua, Leon Brocard suggested

Re: [CVS ci] packfile #2

2003-01-28 Thread Leopold Toetsch
Garrett Goebel wrote: Leopold Toetsch wrote: > > - 8/12 byte float issues are still the same - are these >formats really portable, or should we try to store >ASCII equivalents? No? ? Because my knowledge here approaches zero, so I'm just aping information back at you from google se

Re: Arrays: Default Values

2003-01-28 Thread Joseph F. Ryan
attriel wrote: So ... with the discussion of "what if i really wanted to put an undef in there b/c it's not just that i haven't defined it but rather that it really isn't defined. I KNOW it's not defined, and i'm now explicitly saying it's undefined as opposed to before when i was implicitly sug