request new Mapping|Hash operators

2007-02-27 Thread Darren Duncan
All, I believe that there is some room for adding several new convenience operators or functions to Perl 6 that are used with Mapping and Hash values. Or getting more to the point, I believe that the need for the relational data model concept of a tuple (a tuple where elements are

Re: [S09] Whatever indices and shaped arrays

2007-02-27 Thread David Green
On 2/24/07, Jonathan Lang wrote: In effect, using * as an array of indices gives us the ordinals notation that has been requested on occasion: '*[0]' means 'first element', '*[1]' means 'second element', '*[-1]' means 'last element', '*[0..2]' means 'first three elements', and so on - and this

[svn:parrot-pdd] r17200 - trunk/docs/pdds/draft

2007-02-27 Thread allison
Author: allison Date: Tue Feb 27 04:00:21 2007 New Revision: 17200 Modified: trunk/docs/pdds/draft/pdd01_overview.pod Log: [pdd]: Update overview PDD to reflect current (and planned) architecture. Modified: trunk/docs/pdds/draft/pdd01_overview.pod

Re: request new Mapping|Hash operators

2007-02-27 Thread Aaron Crane
Darren Duncan writes: I believe that there is some room for adding several new convenience operators or functions to Perl 6 that are used with Mapping and Hash values. snip I also want to emphasize that I see this functionality being generally useful, and that it shouldn't just be shunted off

request: num16

2007-02-27 Thread Geoffrey Broadwell
I'd like to request that num16 and therefore complex16 be added to S09, and made optional just as num128 and complex128 are. The half-sized floating point type is commonly used in computer graphics and widely supported by GPUs and High Dynamic Range image formats such as OpenEXR. -'f

reviewing PDD01 - Overview

2007-02-27 Thread Allison Randal
I've just checked in an updated version of docs/pdds/draft/pdd01_overview.pod for review. A few questions/comments: - The standard parser, bytecode compiler, optimizer, interpreter breakdown has appeared in every overview of Parrot since the dawn of time, but it's awfully vague. I'm redoing

Bit shifts on low-level types

2007-02-27 Thread Geoffrey Broadwell
How are the bitwise shifts defined on low level types? In particular, for right shift, does high bit extension or zero fill occur? Does the answer depend on whether the low level type is signed or not? On the flip side, it seems more useful if we have both operators available for either signed

Rotation ops?

2007-02-27 Thread Geoffrey Broadwell
Does Perl 6 have (bit/string) rotation ops? Especially bit rotation on low-level integer types would be Nifty for making some numeric algorithms cleaner, more self documenting, and potentially faster than forcing the use of a combination of other bitwise ops to do the same thing. -'f

Low-level types and over/underflow

2007-02-27 Thread Geoffrey Broadwell
What happens when a low-level type overflows or underflows? For example, if you decrement an int1 twice, what happens? If you increment a uint8 past 255, do you get: 1. A uint8 with value 0? 2. A uint16 with value 256? 3. A failure? What about incrementing an int8 past 127? Do you get: 1.

Casting and low-level types

2007-02-27 Thread Geoffrey Broadwell
What happens when you cast between low-level types? If the source value is out of range of the destination type, do you get: 1. An exception? 2. Clip to finite range always? 3. Clip to finite range for ints, clip to infinities for nums? 4. Exception when dest is int, clip to infinities when dest

Compact structs and byte-stringification

2007-02-27 Thread Geoffrey Broadwell
How do you specify that you want to byte-stringify a compact struct, rather than normal stringify it? Does the byte-stringified version include internal and/or trailing alignment padding? How do you specify the other choices? Whether or not trailing padding is included when byte-stringifying a

Re: request new Mapping|Hash operators

2007-02-27 Thread Nicholas Clark
On Tue, Feb 27, 2007 at 12:18:20AM -0800, Darren Duncan wrote: 4. rename(): function rename of Mapping (Mapping $m, Str $old_k, Str $new_k) { ... } This operator takes one Mapping argument and derives another rename is a Perl 5 builtin. I didn't think that it had

Re: Expressions with mixed types including low-level types

2007-02-27 Thread Geoffrey Broadwell
On Tue, 2007-02-27 at 09:20 -0800, Geoffrey Broadwell wrote: How is casting and coersion handled with expressions involving mixed low and high level types? For example, what is the output of this? my Int $ten = 10; my int4 $a = 0; my int4 $b; $b = ($a + 2.4 * $ten)

Expressions with mixed types including low-level types

2007-02-27 Thread Geoffrey Broadwell
How is casting and coersion handled with expressions involving mixed low and high level types? For example, what is the output of this? my Int $ten = 10; my int4 $a = 0; my int4 $b; $b = ($a + 2.4 * $ten) / 4; say $b; The answers to the above questions may alter my view

Re: request new Mapping|Hash operators

2007-02-27 Thread Smylers
Darren Duncan writes: I believe that ... some common relational operations would be a lot easier to express if Perl 6 had a few more operators that make them concise. I am prepared to believe that. But what I'm unclear on is when I'd want to perform a common relational operation. Please

Re: Bit shifts on low-level types

2007-02-27 Thread Smylers
Geoffrey Broadwell writes: How are the bitwise shifts defined on low level types? In particular, for right shift, does high bit extension or zero fill occur? Does the answer depend on whether the low level type is signed or not? On the flip side, it seems more useful if we have both

Re: Bit shifts on low-level types

2007-02-27 Thread Nicholas Clark
On Tue, Feb 27, 2007 at 06:31:31PM +, Smylers wrote: Geoffrey Broadwell writes: How are the bitwise shifts defined on low level types? In particular, for right shift, does high bit extension or zero fill occur? Does the answer depend on whether the low level type is signed or not?

Re: Bit shifts on low-level types

2007-02-27 Thread John Macdonald
On Tue, Feb 27, 2007 at 06:31:31PM +, Smylers wrote: Geoffrey Broadwell writes: Perhaps having both + and ? operators? Since coerce to boolean and then right shift is meaningless, ... It's useless, rather than meaningless; you've neatly defined what the meaning of that (useless)

Re: [PATCH] welcome message and prompt for HLLCompiler

2007-02-27 Thread François PERRAD
At 16:39 25/02/2007 +0100, Klaas-Jan Stol wrote: hi, most languages that can run in interactive mode have some kind of welcome message and prompt that is printed before the user can give any input. For example, Python prints: Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit

[svn:parrot-pdd] r17205 - trunk/docs/pdds/draft

2007-02-27 Thread allison
Author: allison Date: Tue Feb 27 12:03:56 2007 New Revision: 17205 Modified: trunk/docs/pdds/draft/pdd01_overview.pod Log: [pdd]: Clarify small platform and bytecode translation goals (not for 1.0 release), and remove some dead end space alien platforms from target list. jesse++ Modified:

Re: [PATCH] Update DEPRECATED.pod

2007-02-27 Thread Allison Randal
Klaas-Jan Stol wrote: hi, attached a patch updating DEPRECATED.pod. it adds the deprecated ops from http://www.parrotcode.org/docs/ops/var.html Thanks, applied in r17206. Allison

Re: [perl #41619] [PATCH] add add_attr, rem_attr, and rem_attr_str vtable methods

2007-02-27 Thread James E Keenan
Alek Storm wrote: # New Ticket Created by Alek Storm # Please include the string: [perl #41619] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41619 This patch adds the add_attr, rem_attr, and rem_attr_str vtable

[perl #41633] [CAGE] convert handrolled .IMPORT macros with library function

2007-02-27 Thread via RT
# New Ticket Created by Jerry Gay # Please include the string: [perl #41633] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41633 it seems over time there have been a few handrolled implementations of namespace

Re: [perl #41620] [PATCH] change opcode syntax for label arguments

2007-02-27 Thread James E Keenan
Alek Storm wrote: # New Ticket Created by Alek Storm # Please include the string: [perl #41620] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41620 This patch changes the label INT, labelvar INT, and labelconst

[perl #41634] [TODO] warn and abort make if pbc compatibility has changed

2007-02-27 Thread via RT
# New Ticket Created by Jerry Gay # Please include the string: [perl #41634] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41634 if pbcs need to be regenerated due to incompatibilities that have been introduced,

[svn:parrot-pdd] r17208 - trunk/docs/pdds/draft

2007-02-27 Thread allison
Author: allison Date: Tue Feb 27 13:45:44 2007 New Revision: 17208 Modified: trunk/docs/pdds/draft/pdd06_pasm.pod Log: [pdd]: Minor text changes to PASM PDD. Modified: trunk/docs/pdds/draft/pdd06_pasm.pod == ---

[svn:parrot-pdd] r17209 - trunk/docs/pdds/draft

2007-02-27 Thread allison
Author: allison Date: Tue Feb 27 13:48:38 2007 New Revision: 17209 Modified: trunk/docs/pdds/draft/pdd16_native_call.pod Log: [pdd]: Some cleanups and a callback example for NCI PDD. Klaas-Jan Stol++ Modified: trunk/docs/pdds/draft/pdd16_native_call.pod

Re: [PATCH] PDD6 updates

2007-02-27 Thread Allison Randal
Klaas-Jan Stol wrote: Looks good. I'd like to change the $P0 and $P1 to use actual variable names (it's clearer for examples), but I can do that before I apply it tomorrow. yes, good point. I was trying to save lines, but clarity is better. Anyone can, really. I'm happy to apply it

[perl #41577] docs/ROADMAP.pod refers to python bytecode translator, pie-thon test suite

2007-02-27 Thread Allison Randal via RT
Fixed in r17210.

Re: Cross-compiling Parrot

2007-02-27 Thread Allison Randal
Aldo Calpini wrote: Allison Randal ha scritto: We do. Unfortunately we can't rely on Perl 5 for the configure system. It may seem like an easy way to gain cross-compilation in the short term, but in the long term it will hurt us. Miniparrot is the right way to go. It certainly needs work,

Re: [S09] Whatever indices and shaped arrays

2007-02-27 Thread Jonathan Lang
David Green wrote: On 2/24/07, Jonathan Lang wrote: In effect, using * as an array of indices gives us the ordinals notation that has been requested on occasion: '*[0]' means 'first element', '*[1]' means 'second element', '*[-1]' means 'last element', '*[0..2]' means 'first three elements', and

[svn:perl6-synopsis] r13706 - doc/trunk/design/syn

2007-02-27 Thread larry
Author: larry Date: Tue Feb 27 15:41:10 2007 New Revision: 13706 Modified: doc/trunk/design/syn/S09.pod Log: Some clarifications requested by Geoffrey Broadwell++. Modified: doc/trunk/design/syn/S09.pod == ---

Re: request new Mapping|Hash operators

2007-02-27 Thread Darren Duncan
At 4:45 PM + 2/27/07, Nicholas Clark wrote: 4. rename(): rename is a Perl 5 builtin. I didn't think that it had been dropped for Perl 6. At 6:22 PM + 2/27/07, Smylers wrote: 1. join() aka natural_join(): Remember that Perl already has a Cjoin function, for joining strings.

Re: Low-level types and over/underflow

2007-02-27 Thread Darren Duncan
At 6:15 AM -0800 2/27/07, Geoffrey Broadwell wrote: What happens when a low-level type overflows or underflows? For example, if you decrement an int1 twice, what happens? If you increment a uint8 past 255, do you get: 1. A uint8 with value 0? 2. A uint16 with value 256? 3. A failure? What

[svn:perl6-synopsis] r13707 - doc/trunk/design/syn

2007-02-27 Thread larry
Author: larry Date: Tue Feb 27 15:56:44 2007 New Revision: 13707 Modified: doc/trunk/design/syn/S03.pod Log: Modifiers on bit shifts. Modified: doc/trunk/design/syn/S03.pod == --- doc/trunk/design/syn/S03.pod

Re: Expressions with mixed types including low-level types

2007-02-27 Thread Larry Wall
On Tue, Feb 27, 2007 at 09:35:49AM -0800, Geoffrey Broadwell wrote: : On Tue, 2007-02-27 at 09:20 -0800, Geoffrey Broadwell wrote: : How is casting and coersion handled with expressions involving mixed low : and high level types? : : For example, what is the output of this? : : my Int

Re: Compact structs and byte-stringification

2007-02-27 Thread Larry Wall
On Tue, Feb 27, 2007 at 06:54:50AM -0800, Geoffrey Broadwell wrote: : How do you specify that you want to byte-stringify a compact struct, : rather than normal stringify it? Coerce to a buffer type rather than using ~. : Does the byte-stringified version include internal and/or trailing :

Re: Casting and low-level types

2007-02-27 Thread Larry Wall
On Tue, Feb 27, 2007 at 06:26:18AM -0800, Geoffrey Broadwell wrote: : What happens when you cast between low-level types? If the source value : is out of range of the destination type, do you get: : : 1. An exception? : 2. Clip to finite range always? : 3. Clip to finite range for ints, clip to

[svn:perl6-synopsis] r13708 - doc/trunk/design/syn

2007-02-27 Thread larry
Author: larry Date: Tue Feb 27 17:00:09 2007 New Revision: 13708 Modified: doc/trunk/design/syn/S03.pod Log: Better writing requested by John Macdonald++ Modified: doc/trunk/design/syn/S03.pod == ---

[svn:perl6-synopsis] r13709 - doc/trunk/design/syn

2007-02-27 Thread larry
Author: larry Date: Tue Feb 27 17:01:23 2007 New Revision: 13709 Modified: doc/trunk/design/syn/S03.pod Log: gah Modified: doc/trunk/design/syn/S03.pod == --- doc/trunk/design/syn/S03.pod(original) +++

Re: What criteria mark the closure of perl6 specification

2007-02-27 Thread Gabor Szabo
On 2/26/07, Geoffrey Broadwell [EMAIL PROTECTED] wrote: Hmmm. Let's see if there is a way I can help to get what I want Assuming that the answer to my question in the other thread is packed arrays aren't implemented anywhere yet, are any implementations close enough that I can trade tests