[svn:parrot-pdd] r13834 - in trunk: . docs/pdds
Author: allison Date: Fri Aug 4 00:44:41 2006 New Revision: 13834 Modified: trunk/docs/pdds/pdd21_namespaces.pod Changes in other areas also in this revision: Modified: trunk/ (props changed) Log: [pdd]: Standardizing terminology in namespaces PDD, "untyped" instead of "generic". Modified: trunk/docs/pdds/pdd21_namespaces.pod == --- trunk/docs/pdds/pdd21_namespaces.pod(original) +++ trunk/docs/pdds/pdd21_namespaces.podFri Aug 4 00:44:41 2006 @@ -25,7 +25,7 @@ =item - exports follow the semantics of the library's language -=item - Two interfaces: typed and generic +=item - Two interfaces: typed and untyped =back
[svn:parrot-pdd] r13835 - in trunk: . docs/pdds/clip
Author: allison Date: Fri Aug 4 00:44:48 2006 New Revision: 13835 Modified: trunk/docs/pdds/clip/pdd17_basic_types.pod Changes in other areas also in this revision: Modified: trunk/ (props changed) Log: [pdd]: A partial pass through PDD 17 "Basic Types". Notes some questions for general discussion. Modified: trunk/docs/pdds/clip/pdd17_basic_types.pod == --- trunk/docs/pdds/clip/pdd17_basic_types.pod (original) +++ trunk/docs/pdds/clip/pdd17_basic_types.pod Fri Aug 4 00:44:48 2006 @@ -1,23 +1,29 @@ -# Copyright (C) 2001-2004, The Perl Foundation. +# Copyright (C) 2001-2006, The Perl Foundation. # $Id$ =head1 NAME -docs/pdds/pdd17_basic_types.pod - Document parrot's basic PMC types +docs/pdds/pdd17_basic_types.pod - Parrot's Core PMC types {{ NOTE: could use a better name to differentiate it from PDD 04 -datatypes. Or perhaps the two should be merged. }} +datatypes. Possibly pdd17_core_pmcs.pod. }} =head1 ABSTRACT -This PDD documents the base Parrot PMC types and their behaviours. +This PDD documents the core Parrot PMC types and their behavior. + +=head1 VERSION + +$Revision$ =head1 DESCRIPTION -Parrot has a number of basic PMC types that all programs can guarantee will be -available to them. (With the possible exception of parrot programs executing on +Parrot has a number of core PMC types that all programs can guarantee will be +available to them. (With the possible exception of Parrot programs executing on an embedded device or other restricted environment) +=head1 IMPLEMENTATION + =head2 Scalar types =over 4 @@ -72,13 +78,28 @@ =item Boolean -The PMC wrapper for Parrot's low-level true/false value. Returns 0 for false, 1 -for true when fetched as an integer or float, empty string for false and '1' -for true when fetched as a string. +A true/false value. Returns 0 for false, 1 for true when fetched as an +integer or float, empty string for false and '1' for true when fetched +as a string. + +{{ IMPLEMENTATION NOTE: move the definitions of the Python constants +"True" and "False" out of src/pmc/boolean.pmc. They belong in +HLL-specific code, not in the core boolean type. }} + +=item BigInt + +An arbitrary precision integer. =item BigNum The PMC wrapper for Parrot's low-level BigNum type. +{{ NOTE: this type doesn't seem to exist. }} + +=item Complex + +A complex number, consisting of a real part and an imaginary part. +{{ NOTE: is this a complete and useful implementation of complex +numbers? }} =item ParrotClass @@ -89,11 +110,16 @@ The PMC for Parrot's base object type. -=item Reference +=item Ref The PMC that represents a reference to another PMC. Delegates all functions to the referred-to PMC. +=item Random + +A singleton PMC that generates a random number. {{ NOTE: Why do we have +this? }} + =back =head2 Array types @@ -102,11 +128,18 @@ the VTABLE_set_integer_native() method. Assigning an integer to the array as a whole sets the array to that size. -Note that size-changing operations, such as push, pop, shift, unshift, and -splice, on fixed arrays will result in an exception. +Size-changing operations (such as push, pop, shift, unshift, and splice) +on statically-sized arrays will throw an exception. =over 4 +=item Array + +The base class for all array types (a statically sized array for any +arbitrary type). New array types can be derived from the base Array. +In user code it is recommended to use one of the specific array types +below, rather than the base type. + =item FixedBooleanArray A statically sized array which holds only Boolean values. @@ -147,6 +180,8 @@ A dynamically sized array which holds only String values. +=item Exception + =back =head2 Hash types @@ -169,61 +204,85 @@ new P1, .Env set S1, P1['TERM'] -Note that an embedding system may override this behaviour. +Note that an embedding system may override this behavior. -=back +=item Namespace -=head2 Binary Math operations +=item OrderedHash -The following is a list of what should happen with the basic types when used in -a binary math operation: +=item AddrRegistry + +Simulates reference counting for dead-object detection and garbage +collection. + +=back + +=head2 Subroutine types =over 4 -=item Integer x Integer +=item Sub -The operation is an integer. +=item Closure -=back +A closure: subroutine object plus captured lexical scope. -=head1 IMPLEMENTATION +=item Coroutine -=head1 FOOTNOTES +=item Continuation -List of footnotes to the text. +=item CSub -=head1 REFERENCES +=item Eval -=head1 VERSION +=item Exception_Handler -=head2 CURRENT +=item MultiSub -Maintainer: Dan Sugalski -Class: Internals -PDD Number: 17 -Version: 1.0 -Status: Developing -Last Modified: 2004/06/11 -PDD Format: 1 -Language: English +=item NCI -=head2 HISTORY +A native call interface wrapper around a C function. -
[perl #40063] [PDD] document subroutine attributes (pdd19_pir.pod)
# New Ticket Created by Allison Randal # Please include the string: [perl #40063] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40063 > Document subroutine attributes :main, :immediate, :init, etc.
[perl #40064] [TODO] shootout example testing
# New Ticket Created by Leopold Toetsch # Please include the string: [perl #40064] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40064 > examples/shootout/*.pir is lacking tests. See the explanation of benchmarks and sample data for reduced N benches at http://shootout.alioth.debian.org/sandbox/ Thanks, leo
[perl #40069] [PGE] "value" can't be used as a rule name.
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #40069] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40069 > --- osname= linux osvers= 2.4.26 arch= i486-linux cc= cc --- Flags: category=core severity=high ack=no --- If we define a rule or token named 'value', things do not work. The PGE compiler works, but then the grammar does not run. Probably this happens with other names as well. This should not happen. --- Summary of my parrot 0.4.5 (r13753) configuration: configdate='Thu Aug 3 19:31:53 2006' Platform: osname=linux, archname=i486-linux jitcapable=1, jitarchname=i386-linux, jitosname=LINUX, jitcpuarch=i386 execcapable=1 perl=/usr/bin/perl5.8.5 Compiler: cc='cc', ccflags=' -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I /usr/local//include', Linker and Libraries: ld='cc', ldflags=' -L/usr/local/lib', cc_ldflags='', libs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp' Dynamic Linking: share_ext='.so', ld_share_flags='-shared -L/usr/local/lib -fPIC', load_ext='.so', ld_load_flags='-shared -L/usr/local/lib -fPIC' Types: iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4, ptrsize=4, ptr_alignment=1 byteorder=1234, nv=double, numvalsize=8, doublesize=8 --- Environment: HOMELANGLANGUAGELC_ALLLC_COLLATELD_LIBRARY_PATH LOGDIRPATHPERL5_CPANPLUS_CONFIGSHELL
[perl #40072] [CAGE] tools/dev/mk_manifest_and_skip.pl requires svn
# New Ticket Created by Will Coleda # Please include the string: [perl #40072] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40072 > svk should also be usable with this tool. The use of the 'svn' binary is hardcoded, and the script pokes into the '.svn' directories. -- Will "Coke" Coleda [EMAIL PROTECTED]
Re: [perl #40069] [PGE] "value" can't be used as a rule name.
On Fri, Aug 04, 2006 at 01:50:19AM -0700, ambs @ cpan. org wrote: > # New Ticket Created by [EMAIL PROTECTED] > # Please include the string: [perl #40069] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org/rt3/Ticket/Display.html?id=40069 > > > If we define a rule or token named 'value', things do not work. The PGE > compiler works, but then the grammar does not run. > > Probably this happens with other names as well. This should not happen. I know what's happening, but I'm not sure how to work around it. Perhaps MMD would resolve the problem. The problem: Match objects have methods defined on them such as .from(), .to(), and .value(). As a result, defining a subrule named 'value' in a grammar is probably overriding the method of the same name defined for Match objects. The quick conclusion is that at the moment it's difficult to have rules named 'value', 'from', 'to', or any of the other predefined methods on Match objects. However, I wonder if MMD can resolve this, because then the compiler would presumably dispatch to the correct method based on the argument types. At any rate, this is definitely something we should address; it's likely to wait for some other refactors to take place. Thanks! Pm
svk is generating almost-empty change sets
FYI, the change sets you're seeing that have only modifications to the meta info for 'trunk' are being generated by 'svk push', and I don't know why. But they seem harmless enough. -- Chip Salzenberg <[EMAIL PROTECTED]>
Re: resizablepmcarray, assign.
I finally found the definition of __set (my tagfile-building recipe was deficient), and, on a hunch, made the tweak shown below, with the following result: [EMAIL PROTECTED]> ../../parrot tcl.pbc -e 'set a [list a b]; set x $a; set a b; puts $a; puts $x' b a b [EMAIL PROTECTED]> This tweak may break other stuff (I didn't check), so take it with a grain of salt. However, this may be a hint that you are better off using PMCs as values rather than as containers. HTH, -- Bob Rogers http://rgrjr.dyndns.org/ Index: runtime/variables.pir === --- runtime/variables.pir (revision 13852) +++ runtime/variables.pir (working copy) @@ -227,6 +227,7 @@ .local pmc scalar null scalar scalar = __find_var(name) + goto create_scalar if_null scalar, create_scalar assign scalar, value goto return_scalar
Re: Re: resizablepmcarray, assign.
Bob Rogers <[EMAIL PROTECTED]> wrote: I finally found the definition of __set (my tagfile-building recipe was deficient), and, on a hunch, made the tweak shown below, with the following result: [EMAIL PROTECTED]> ../../parrot tcl.pbc -e 'set a [list a b]; set x $a; set a b; puts $a; puts $x' b a b [EMAIL PROTECTED]> This tweak may break other stuff (I didn't check), so take it with a grain of salt. However, this may be a hint that you are better off using PMCs as values rather than as containers. HTH, Right. So what you did was change Tcl so that we no longer use the assign opcode. This fixes this error, but causes a handful of other ones. AFAICT, we have to use assign so that we don't break aliasing (which is rather important). If you have the same variable in two different scopes -- or under two different names -- merely replacing one of those variables with a new PMC (using PMCs as values) won't change the other variable. You have to use assign to morph the PMC into the new type. Among other things, this will break Tcl's [global] and [variable] commands and it isn't really a viable solution. PMCs *are* containers; they're designed that way. This leaves two options: 1) Fixing the set_pmc vtable method for TclList and/or ResizablePMCArray and FixedPMCArray 2) Using a hybrid list/string PMC that behaves in a similar way to Perl 5's scalars Option 1 is preferable, IMO, if it's doable. But it's a little out of my reach as far as C goes, unfortunately. Otherwise I'd have fixed it already. :-) Thanks for taking a look at this. -- Matt Diephouse http://matt.diephouse.com