[perl #20597] [PATCH] packfile #6

2003-01-29 Thread via RT
# New Ticket Created by Leopold Toetsch # Please include the string: [perl #20597] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=20597 Next try. This patch obsoletes #20584. - more wordsize fixes - routine for

compiler writing [was: save and restore more of a coroutine's con text]

2003-01-29 Thread Cal Henderson
: -Original Message- : From: Jonathan Sillito [mailto:[EMAIL PROTECTED]] [snip] : 1) I was thinking of writing a couple of short how to documents aimed at : compiler writers. Is there interest in something like this? yes please --cal henderson --- ** For great Emap magazine

Re: [CVS ci] packfile #2

2003-01-29 Thread Nicholas Clark
On Wed, Jan 29, 2003 at 06:53:25AM +0100, Leopold Toetsch wrote: Garrett Goebel wrote: Many thanks for the links (searching for this stuff is a pain, there are too many results ;-) Anyway: - are there platforms with quad precision floats out there? sparc Solaris and Irix both have 16

Re: [perl #20597] [PATCH] packfile #6

2003-01-29 Thread Leopold Toetsch
Leopold Toetsch (via RT) wrote: # New Ticket Created by Leopold Toetsch # Please include the string: [perl #20597] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=20597 Here is a corrected version, which handles

Re: Spare brackets :-)

2003-01-29 Thread John Williams
On 28 Jan 2003, Aaron Sherman wrote: I'm not sure I recall the sufficient, yet irrelevant technical reasons. I certainly can't think of anything. It also helps in the case of objects that are non truly arrayish or hashish: my SuperTree $foo; $foo[Munge]; # Returns the node whose

Re: Spare brackets :-)

2003-01-29 Thread Michael G Schwern
On Tue, Jan 28, 2003 at 12:11:18PM +1300, [EMAIL PROTECTED] wrote: This may sound like a silly idea but ... Has anyone considered removing with the syntactic distinction between numeric and string indexing -- that is, between array and hash lookup? PHP works this way.

Re: Spare brackets :-)

2003-01-29 Thread martin
In particular, it would seem that %foo[$key] would be just as easy for the compiler to grok as %foo{$key} On Mon, 27 Jan 2003 15:39:19 -0800, Damian Conway [EMAIL PROTECTED] wrote: Sure. But then is this: $ref[$key] an array or hash look-up??? Yes, well I suppose that could be

Re: Spare brackets :-)

2003-01-29 Thread Leopold Toetsch
John Williams wrote: I think you are still overlooking the autovivification behavior. i.e. What is the difference between these: 1) $a{1234567} = 1; 2) $a[1234567] = 1; Answer: #1 creates 1 element. #2 creates 1,234,567 elements! Not currently: 2) does - generate a sparse hole

Re: Securing Parrot ASM

2003-01-29 Thread Matthew Byng-Maddick
On Wed, Jan 29, 2003 at 09:20:33AM +, Thomas Whateley wrote: one more quick question.. would it be possible to play linker games to redirect syscalls (from compiled c) to wrapper functions that check permissions? Would that allow us to secure dynamicly linked libs?? When I said as soon

[RFC] multiple code segments and the interpreter

2003-01-29 Thread Leopold Toetsch
The variable layout of interpreter-code (actually the packfile) doesn't fit very good for multiple code segments. There is only one -byte_code pointer, the byte_code_size is in bytes and converted zig times into opcode_t's and so on. so: 1) rename interpreter-code to interpreter-pf (the

RE: [CVS ci] packfile #2

2003-01-29 Thread Bryan C. Warnock
On Tue, 2003-01-28 at 17:12, 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

Re: [CVS ci] packfile #2

2003-01-29 Thread Bryan C. Warnock
On Wed, 2003-01-29 at 04:56, Nicholas Clark wrote: On Wed, Jan 29, 2003 at 06:53:25AM +0100, Leopold Toetsch wrote: Garrett Goebel wrote: Many thanks for the links (searching for this stuff is a pain, there are too many results ;-) Anyway: - are there platforms with quad precision

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
On Tue, 2003-01-28 at 19:24, Paul Johnson wrote: If that's not the case, I need to get my head around why, since Perl *does* distinguish between defined and exists. But I wish it wouldn't for arrays. That only came about to support pseudo-hashes which are going / have gone away. Are

Re: Arrays: Default Values

2003-01-29 Thread Mark J. Reed
On 2003-01-29 at 09:44:27, Aaron Sherman wrote: Yes, I would expect that. In my opinion there is no difference between an array and a hash other than the underlying storage and the type-management of the key. Perhaps it is your opinion that those should be the only differences, but the actual

Re: Arrays: Default Values

2003-01-29 Thread Mark J. Reed
On 2003-01-29 at 10:32:58, Mark J. Reed wrote: (What their value should be is the subject of the parallel thread on array defaults). Whups, that would be THIS thread, actually. The sidebar on removing the syntactic distinction between arrays and hashes made me think I was over in the Spare

Re: Spare brackets :-)

2003-01-29 Thread Austin Hastings
--- Sam Vilain [EMAIL PROTECTED] wrote: =head2 includes( [ Ikeys, ] [ Ivalues ]) Where the keys and/or values are obviously junctions. if ($container.includes(any(ant, beaver, cow, duck))( ... This is *SO* cool. =Austin

Re: Arrays: Default Values

2003-01-29 Thread Austin Hastings
--- Jonathan Scott Duff [EMAIL PROTECTED] wrote: Can I flame you for being too preemptive? :-) In all honesty, I just wanted to be able to use absquatulate in a real post. ;-) =Austin

Re: More Array Behaviors

2003-01-29 Thread Austin Hastings
--- Nicholas Clark [EMAIL PROTECTED] wrote: 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

Re: More Array Behaviors

2003-01-29 Thread Nicholas Clark
On Wed, Jan 29, 2003 at 07:46:43AM -0800, Austin Hastings wrote: Obviously, values are pure and therefrom spring virtues, while objects are but vile clay -- fallible constructs of a sinful man, pathetically trying to recreate an envisioned ideal. Ergo, they have naught but vices. Can I get

Re: More Array Behaviors

2003-01-29 Thread Austin Hastings
--- Nicholas Clark [EMAIL PROTECTED] wrote: On Wed, Jan 29, 2003 at 07:46:43AM -0800, Austin Hastings wrote: Obviously, values are pure and therefrom spring virtues, while objects are but vile clay -- fallible constructs of a sinful man, pathetically trying to recreate an envisioned ideal.

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

2003-01-29 Thread Steve Fink
On Jan-29, Jonathan Sillito wrote: 1) coroutine.t (which should be put in t/pmc/) exposes some errors in our coroutine code. 2) coroutine.patch fixes those errors by saving and restoring more of the coroutine's context. More specifically the user_stack, control_stack and pad_stack. 3)

Re: [perl #20597] [PATCH] packfile #6

2003-01-29 Thread Robert Spier
Also I can't work out how to search the list archive at develooper.com. Patches welcome. (Really. I have several archive management tasks that need to get done, and if anyone wants to volunteer) -R

Re: [perl #20597] [PATCH] packfile #6

2003-01-29 Thread Nicholas Clark
On Wed, Jan 29, 2003 at 07:36:07AM -0800, Robert Spier wrote: Also I can't work out how to search the list archive at develooper.com. Patches welcome. (Really. I have several archive management tasks that need to get done, and if anyone wants to volunteer) I'm quite happy to search

Re: Compiling to Parrot

2003-01-29 Thread Dan Sugalski
At 1:15 PM +0100 1/28/03, K Stol wrote: 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

RE: [CVS ci] packfile #2

2003-01-29 Thread Garrett Goebel
Leopold Toetsch wrote: Anyway: - are there platforms with quad precision floats out there? Several documents refer to quad precision hardware, but I can't find direct references to any. - or should 12 byte long doubles get converted to 8 byte IEEE doubles. Perhaps the following quote from

Re: Arrays: Default Values

2003-01-29 Thread attriel
Solution 1: If you attempt to SET a cell to it's 'empty value', it will be set to it's default: my int @a is default(5); # @a[5] = 0;# actually sets it to it's 'empty value', 5 @a[5] = undef;# autocnv to 0, + warning, still sets to 5 my

Re: Arrays: Default Values

2003-01-29 Thread Austin Hastings
--- Michael Lazzaro [EMAIL PROTECTED] wrote: OK, I think we agree that 'default' refers to what to put in the 'holes' of an array (or hash, but that's a separate discussion.) When you overlay a real hash on top of your default values, the default values show through the holes. So now

Re: Arrays: Default Values

2003-01-29 Thread Michael Lazzaro
On Wednesday, January 29, 2003, at 11:02 AM, Jonathan Scott Duff wrote: So you can't set something to its type's own empty value, because it will, by definition, thereafter return it's overloaded empty value, def. Looks like a maintenance nightmare to me. Agreed, it's not pretty. The

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
Ok, stepping back... there are three questions: * Can a type be undefined * What does an array say when asked for an element that doesn't exist * What happens when you try to undefine something I really think you need an attribute to clarify these. For example, you would not say: my

Re: Spare brackets :-)

2003-01-29 Thread Aaron Sherman
On Wed, 2003-01-29 at 05:29, Leopold Toetsch wrote: John Williams wrote: I think you are still overlooking the autovivification behavior. i.e. What is the difference between these: 1) $a{1234567} = 1; 2) $a[1234567] = 1; Answer: #1 creates 1 element. #2 creates

Re: Arrays: Default Values

2003-01-29 Thread Juergen Boemmels
Michael Lazzaro [EMAIL PROTECTED] writes: Solution 1: If you attempt to SET a cell to it's 'empty value', it will be set to it's default: my int @a is default(5); # @a[5] = 0;# actually sets it to it's 'empty value', 5 @a[5] = undef;#

Re: Arrays: Default Values

2003-01-29 Thread Austin Hastings
--- Michael Lazzaro [EMAIL PROTECTED] wrote: On Wednesday, January 29, 2003, at 11:02 AM, Jonathan Scott Duff wrote: So you can't set something to its type's own empty value, because it will, by definition, thereafter return it's overloaded empty value, def. Looks like a

Re: Arrays: Default Values

2003-01-29 Thread Jonathan Scott Duff
On Wed, Jan 29, 2003 at 08:49:42PM +0100, Juergen Boemmels wrote: Solution 3: The autoset sets the value to the default value. my Int @a is default(5); @a[3] = 3; # there are now 4 items in the array @a[2]; # was autoset 5 so returns 5 @a[4]; #

Re: Arrays: Default Values

2003-01-29 Thread Jonathan Scott Duff
On Wed, Jan 29, 2003 at 11:32:53AM -0800, Michael Lazzaro wrote: On Wednesday, January 29, 2003, at 11:02 AM, Jonathan Scott Duff wrote: So you can't set something to its type's own empty value, because it will, by definition, thereafter return it's overloaded empty value, def. Looks

Re: Arrays: Default Values

2003-01-29 Thread Juergen Boemmels
Jonathan Scott Duff [EMAIL PROTECTED] writes: On Wed, Jan 29, 2003 at 08:49:42PM +0100, Juergen Boemmels wrote: Solution 3: The autoset sets the value to the default value. my Int @a is default(5); @a[3] = 3; # there are now 4 items in the array @a[2];

Re: Arrays: Default Values

2003-01-29 Thread Mark Biggar
In my opinion, default values for arrays should only come into play for array elements that have NEVER been assigned to or that have been explicity undef'ed. If an assigment is made to an array element then the array element should end up the assigned value (modulo necessary type conversions) and

Re: Arrays: Default Values

2003-01-29 Thread Jonathan Scott Duff
On Wed, Jan 29, 2003 at 12:00:33PM -0800, Mark Biggar wrote: In my opinion, default values for arrays should only come into play for array elements that have NEVER been assigned to or that have been explicity undef'ed. If an assigment is made to an array element then the array element should

Re: Spare brackets :-)

2003-01-29 Thread Smylers
Michael G Schwern wrote: On Tue, Jan 28, 2003 at 12:11:18PM +1300, [EMAIL PROTECTED] wrote: Has anyone considered removing with the syntactic distinction between numeric and string indexing -- that is, between array and hash lookup? PHP works this way. Well, for some definition of

Re: Arrays: Default Values

2003-01-29 Thread Austin Hastings
--- Jonathan Scott Duff [EMAIL PROTECTED] wrote: On Wed, Jan 29, 2003 at 08:49:42PM +0100, Juergen Boemmels wrote: Solution 3: The autoset sets the value to the default value. my Int @a is default(5); @a[3] = 3; # there are now 4 items in the array @a[2];

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
On Wed, 2003-01-29 at 14:54, Jonathan Scott Duff wrote: Can someone give me a realish world example of when you would want an array that can store both undefined values and default values and those values are different? my @send_partner_email is default(1); while $websignups.getline {

Ordering is not what distinguish array from associative tables

2003-01-29 Thread Stéphane Payrard
On Wed, Jan 29, 2003 at 09:44:27AM -0500, Aaron Sherman wrote: Yes, I would expect that. In my opinion there is no difference between an array and a hash other than the underlying storage and the type-management of the key. I'm increasingly of the opinion that a) there should be no @ vs %,

Re: Ordering is not what distinguish array from associative tables

2003-01-29 Thread Joseph F. Ryan
Stéphane Payrard wrote: On Wed, Jan 29, 2003 at 09:44:27AM -0500, Aaron Sherman wrote: Yes, I would expect that. In my opinion there is no difference between an array and a hash other than the underlying storage and the type-management of the key. I'm increasingly of the opinion that a) there

Re: occasioanl CVS hickups?

2003-01-29 Thread Steve Fink
On Jan-29, Steve Fink wrote: More weirdness. It gave me error messages, but claims to have committed. Look near the end for a timestamp (which is probably ~30 seconds after the commit). It looks like everything really did make it in, but the cvs commit message did not include the parts that

Re: Arrays: Default Values

2003-01-29 Thread Juergen Boemmels
Michael Lazzaro [EMAIL PROTECTED] writes: Solution 1: If you attempt to SET a cell to it's 'empty value', it will be set to it's default: my int @a is default(5); # @a[5] = 0;# actually sets it to it's 'empty value', 5 @a[5] = undef;#

Re: Arrays: Default Values

2003-01-29 Thread Rick Delaney
On Wed, Jan 29, 2003 at 02:37:04PM -0600, Jonathan Scott Duff wrote: On Wed, Jan 29, 2003 at 03:29:57PM -0500, Aaron Sherman wrote: On Wed, 2003-01-29 at 14:54, Jonathan Scott Duff wrote: Can someone give me a realish world example of when you would want an array that can store both

Re: Arrays: Default Values

2003-01-29 Thread Rick Delaney
On Wed, Jan 29, 2003 at 01:54:10PM -0800, Michael Lazzaro wrote: On Wednesday, January 29, 2003, at 12:38 PM, Smylers wrote: That would make the rule very simple indeed: Assigning Cundef to an array element causes that element to take the array's default value. The effects