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 presumably this:

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. In

[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

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

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

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. # URL: 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

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

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 certain

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 just

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 assembler

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

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

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

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

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 indices and ints/floats as

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 itself

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 any

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

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 (warning:

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 Cundef 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' ); #

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 about

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

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-sit.

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 bodies of

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 out to

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 what

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 the first place

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 usage as well

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

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

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 documents.

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

[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. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=20592 A description of each attachment: 1) coroutine.t (which should be put in

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];# 'bar'

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 Cundef 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 the

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 property.

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] # def (warning: index

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 Cbut properties [*]. [*] People, we just *have* to find better names for these things! I'd suggest we henceforth call them value properties (for Cbut) and referent properties

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

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 for pure

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 Cundef in an array with a default. Because the whole point of an array having a default is to prevent those nasty out-of-range Cundefs from

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 Cdelete in

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 ); @a[0] = undef;

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 assigning

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 indices and ints/floats as

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 :-( [typo in third line corrected]

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

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

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