 |
| Recent blog posts: | |
 |
| They have birthday today: | |
 |
| Forums: | | |
 |
| Discuss: | |
 |
| Recent forum topics: | |
 |
| Recent forum comments: | |
 |
| Модератор: | |
 |
Monday, 9 March 2009
|
| r25768 - docs/Perl6/Spec/S32-setting-library Guest 22:25:40 |
| | Author: wayland Date: 2009-03-09 22:43:40 +0100 (Mon, 09 Mar 2009) New Revision: 25768
Modified: docs/Perl6/Spec/S32-setting-library/Basics.pod docs/Perl6/Spec/S32-setting-library/Numeric.pod Log: Added real/imaginary to Complex, and true/not to Object
Modified: docs/Perl6/Spec/S32-setting-library/Basics.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/Basics.pod 2009-03-09 19:50:03 UTC (rev 25767) +++ docs/Perl6/Spec/S32-setting-library/Basics.pod 2009-03-09 21:43:40 UTC (rev 25768) @@ -31,10 +31,13 @@ The following are defined in the C<Object> role: role Object { - our Bool multi method defined ($self {...} - our Bool multi method defined ($self: ::role ) {...} + our Bool multi method defined ($self is export {...} + our Bool multi method defined ($self: ::role ) is export {...} - our multi method undefine( $self: ) {...} + our multi method undefine( $self: ) is export {...} + + method not() is export {...} + method true() is export {...} } =item defined @@ -70,6 +73,25 @@ should place the object in the same state as if it was just declared. +=item not + + method not() is export {...} + +=item true + + method true() is export {...} + +XXX Copied from S02 -- should it be deleted from there? + +The definition of C<.true> for the most ancestral type (that is, the +C<Object> type) is equivalent to C<.defined>. Since protoobjects are +considered undefined, all protoobjects (including C<Object> itself) +are false unless the type overrides the definition of C<.true> +to include undefined values. Instantiated objects default to true +unless the class overrides the definition. Note that if you could +instantiate an C<Object> it would be considered defined, and thus true. +(It is not clear that this is allowed, however.) + =head2 Any The following are defined in the C<Any> role:
Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/Numeric.pod 2009-03-09 19:50:03 UTC (rev 25767) +++ docs/Perl6/Spec/S32-setting-library/Numeric.pod 2009-03-09 21:43:40 UTC (rev 25768) @@ -210,6 +210,18 @@ Returns (magnitude, angle) corresponding to the complex number. The magnitude is non-negative, and the angle in the range C<- ..^ >. +=item real + + method real() {...} + +Returns the real part of the complex number. + +=item imaginary + + method imaginary() {...} + +Returns the imaginary part of a complex number. + =back =head2 The :Trig tag
|
| | Add comment |
|
| r25767 - docs/Perl6/Spec Guest 22:25:40 |
| | Author: pmichaud Date: 2009-03-09 20:50:03 +0100 (Mon, 09 Mar 2009) New Revision: 25767
Modified: docs/Perl6/Spec/S05-regex.pod Log: [spec]: Update S05: remove <word>, add <ww>, revise <wb>, <ws>, <space>, and <blank>.
Modified: docs/Perl6/Spec/S05-regex.pod =================================================================== --- docs/Perl6/Spec/S05-regex.pod 2009-03-09 17:33:17 UTC (rev 25766) +++ docs/Perl6/Spec/S05-regex.pod 2009-03-09 19:50:03 UTC (rev 25767) @@ -1619,9 +1619,9 @@ =back -=head2 Predefined Metasyntax +=head2 Predefined Subrules -The following symbols are predefined entries in the metasyntax. +These are the predefined subrules for any grammar or regex: =over @@ -1669,25 +1669,31 @@ Match a single alphanumeric character. This is equivalent to <+alpha +digit> . -= item * word +=item * wb -Match a single word character, viz., alphanumeric plus '_'. +Returns a zero-width match that is true at word boundaries. A word +boundary is a spot with a "\w" on one side and a "\W" on the other +side (in either order), counting the beginning and end of the string +as matching "\W". -=item * wb +=item * ww -Returns true if we're at a word boundary. A word boundary is a spot between two characters, one which matches <word>, the other matches <-word>, counting the imaginary characters off the beginning and end of the string as matching a <-word>. +Matches between two word characters (zero-width match). =item * ws -Match whitespace between tokens. +Matches required whitespace between two word characters, optional +whitespace otherwise. This is roughly equivalent to C<< <!ww> \s* >> +(C<ws> isn't required to use the C<ww> subrule). =item * space -Match a single whitespace character. Hence C< <ws> > is equivalent to C< <space>+ >. +Match a single whitespace character (same as C< \s > ). =item * blank -Match a single "blank" character. Differs from C< <space> > which include C<tab>'s etc. +Match a single "blank" character -- in most locales, this corresponds +to space and tab. =item * before C<pattern>
|
| | Add comment |
|
| Masak List, take 3 Timothy S. Nelson 22:25:40 |
| | I've done some more fiddling based on Carl Masak's updated list.
* I see the sub version of defined declared in S29. Is the method version (used in S02:519) also in S29? I can't see it, but I might be missing something about how method signatures work. I've moved it to S32/Any.pod, and declared the method version.
* Should the methods .new and .clone be covered by S29? They're slightly different beasts than abs or push, but they're still in a sense "builtin functions in Perl 6". I guess the way I decide things like this is: - If it's a method on a role/object, then it lives in S32 - If it's not a method, then it lives in S29 - If it's a method, but can also be used as a function, then it lives with its object in S32, but has a cross-reference from S29
* Same question for BUILD and CREATE. * What about metaclass methods, like .HOW.methods? Should they be covered in S29? S32, according to above theory.
* Should there be a way to extract information about a Rat's numerator/denominator? What methods does a Rat have? Rat.avoid_trap(), Rat.eatcheese(), Rat.race(), etc. Oh, wait, *that* kind of Rat .
# The filetest operators. These are covered in S16, so maybe just mention them. I should mention that these are now in IO.pod.
# true(), not(), also methods On?
--------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: wayland@wayland.id.au | I am | ---------------------------------------------------------------------
----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK-----
|
| | 2 answer | Add comment |
|
| listing all files in all sub directories Steve 20:29:50 |
| | I am trying to list all files in all sub-directories and have the code below but this is listing the . directories as well as the directories themselves. I just want the full path filenames and not the individual directories out. Here is what I have
#!c:/Perl/bin/Perl.exe
@ARGV = qw(.) unless @ARGV;
use File::Find;
find sub { print $File::Find::name, -d && "/", "\n"}, @ARGV
for example if structure is c:\file.txt c:\file2.txt c:\one\teo.txt c:\two\text.bmp
the output of the script when run from c:\ would be ./ ./script.pl ./file.txt ./file2.txt ./one/ ./one/teo.txt ./two/ ./two/text.bmp
all I want is ./script.pl ./file.txt ./file2.txt ./one/teo.txt ./two/text.bmp
Thanks!
|
| | Add comment |
Sunday, 8 March 2009
|
| r25751 - docs/Perl6/Spec/S32-setting-library Guest 22:00:08 |
| | Author: moritz Date: 2009-03-08 20:00:07 +0100 (Sun, 08 Mar 2009) New Revision: 25751
Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod Log: [S32/Containers] forgot to bump version number; fixed date from the future
Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/Containers.pod 2009-03-08 18:52:09 UTC (rev 25750) +++ docs/Perl6/Spec/S32-setting-library/Containers.pod 2009-03-08 19:00:07 UTC (rev 25751) @@ -14,9 +14,9 @@ Carl M sak <cmasak@gmail.com> Moritz Lenz <moritz@faui2k3.org> Tim Nelson <wayland@wayland.id.au> - Date: 19 Mar 2009 extracted from S29-functions.pod - Last Modified: 19 Feb 2009 - Version: 1 + Date: 19 Feb 2009 extracted from S29-functions.pod + Last Modified: 8 Mar 2009 + Version: 2 The document is a draft.
|
| | Add comment |
|
| r25750 - docs/Perl6/Spec/S32-setting-library Guest 21:52:09 |
| | Author: moritz Date: 2009-03-08 19:52:09 +0100 (Sun, 08 Mar 2009) New Revision: 25750
Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod Log: [S32/Containers] remove nonsensical return value from min/max
Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/Containers.pod 2009-03-08 18:44:47 UTC (rev 25749) +++ docs/Perl6/Spec/S32-setting-library/Containers.pod 2009-03-08 18:52:09 UTC (rev 25750) @@ -324,12 +324,12 @@ =item min - our Array multi method min( @values: *&by ) - our Array multi method min( @values: Ordering @by ) - our Array multi method min( @values: Ordering $by = &infix:<cmp> ) + our multi method min( @values: *&by ) + our multi method min( @values: Ordering @by ) + our multi method min( @values: Ordering $by = &infix:<cmp> ) - our List multi min( Ordering @by, *@values ) - our List multi min( Ordering $by, *@values ) + our multi min( Ordering @by, *@values ) + our multi min( Ordering $by, *@values ) Returns the earliest (i.e., lowest index) minimum element of C<@values> , using criteria C<$by> or C<@by> for @@ -348,12 +348,12 @@ =item max - our Array multi method max( @values: *&by ) - our Array multi method max( @values: Ordering @by ) - our Array multi method max( @values: Ordering $by = &infix:<cmp> ) + our multi method max( @values: *&by ) + our multi method max( @values: Ordering @by ) + our multi method max( @values: Ordering $by = &infix:<cmp> ) - our List multi max( Ordering @by, *@values ) - our List multi max( Ordering $by, *@values ) + our multi max( Ordering @by, *@values ) + our multi max( Ordering $by, *@values ) Returns the earliest (i.e., lowest index) maximum element of C<@values> , using criteria C<$by> or C<@by> for
|
| | Add comment |
|
| Predefined rules - clean up Richard Hainsworth 11:45:32 |
| | Various Appocalypses, Exegeses, and Synopses use rules in example codes. These were gathered together by PM and implemented in PGE. Larry asked for them to be listed in S05 & for a short description to be added. Timothy Nelson added them and I have just described them.
This yielded some extra changes I am documenting here.
a) Some reordering grouping similar functionality.
b) Removal of deprecated items from the S05.pod (it seems odd that a language Specification should declared something to be deprecated). They are evolutionary artifacts taken from Exegeses.
Specifically, the removed items <lt> <gt> <dot> <sp> are mentioned in E05. (Are simply '<' '>' '.' ' ', respectively)
c) Addition of <word> as alphanumeric plus '_' - the definition from perl5.
The definition for <wb> needed some attention.
In the PGE code <wb> is described as having the same definition as perl5. But perl5 documentation states " A word boundary is a spot between two characters that has a \w on one side of it and a \W on the other side of it (in either order), counting the imaginary characters off the beginning and end of the string as matching a \W ."
Perl6 does not mention the equivalent of \w, obviously <word>, which yields the compliment <-word> automatically.
d) <null> and <fail> were first mentioned in the Appocalpses but changed to <?> and <!>. Replaced <null> and <fail>
|
| | Add comment |
Saturday, 7 March 2009
|
| r25735 - docs/Perl6/Spec Guest 21:19:30 |
| | Author: lwall Date: 2009-03-07 19:19:29 +0100 (Sat, 07 Mar 2009) New Revision: 25735
Modified: docs/Perl6/Spec/S02-bits.pod Log: disallow bare <> as probable p5ism
Modified: docs/Perl6/Spec/S02-bits.pod =================================================================== --- docs/Perl6/Spec/S02-bits.pod 2009-03-07 17:40:43 UTC (rev 25734) +++ docs/Perl6/Spec/S02-bits.pod 2009-03-07 18:19:29 UTC (rev 25735) @@ -12,9 +12,9 @@ Maintainer: Larry Wall <larry@wall.org> Date: 10 Aug 2004 - Last Modified: 4 Mar 2009 + Last Modified: 7 Mar 2009 Number: 2 - Version: 157 + Version: 158 This document summarizes Apocalypse 2, which covers small-scale lexical items and typological issues. (These Synopses also contain @@ -2418,7 +2418,7 @@ $a = \('a', 'b'); Likewise, if bound to a scalar parameter, C<< <a b> >> will be -treated as a single list object, but if bound to a slurpy parameter, +treated as a single C<Capture> object, but if bound to a slurpy parameter, it will auto-flatten. But note that under the parenthesis-rewrite rule, a single value will @@ -2432,6 +2432,15 @@ To force a single value to become a list object in item context, you should use C<< ['a'] >> for clarity as well as correctness. +The degenerate case C<< <> >> is disallowed as a probable attempt to +do IO in the style of Perl5; that is now written C<< =<> >>. (C<< +<STDIN> >> is also disallowed.) Empty lists are better written with +C<()> or C<Nil> in any case because C<< <> >> will often be misread +as meaning C<('')>. (Likewise the subscript form C<< %foo<> >> +should be written C<%foo{}> to avoid misreading as C<@foo{''}.) +If you really want the angle form for stylistic reasons, you can +suppress the error by putting a space inside: C<< < > >>. + Much like the relationship between single quotes and double quotes, single angles do not interpolate while double angles do. The double angles may be written either with French quotes, C<«$foo @bar[]»>, or
|
| | Add comment |
|
| DBD::ODBC and 64-bit Windows Brian H. Oak 01:44:36 |
| | I use ActiveState's PerlApp to create a Windows executable application that connects to an MS SQL Server database via ODBC. Different versions of this application have worked on all sorts of different Windows Server platforms since 2005. The current iteration is built using DBI 1.607 and DBD::ODBC 1.18, on ActivePerl 5.8.9 build 825 [288577].
This morning I installed this program on a 64-bit server running MSSQL 2005, and got this message on STDERR for the first time ever:
DBI connect('DSN','sa',...) failed: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002) at app.pl line 156
Here is the snippet of code that attempts to open the DB handle:
my $dbh = DBI->connect( "DBI:ODBC DSN", $username, $password, { 'RaiseError' => 1, 'odbc_cursortype' => 2, } ) or croak "ERROR: Unable to connect with DSN $DSN using provided information and credentials!";
The DSN exists and can be reached and tested using the ODBC Connection Manager. The username and password check out (and the application throws a different error when a bad username or password is used). The only differential I can see is the 64-bit OS. Am I missing something, or could the OS be the culprit? Whatever is causing the problem, does anyone have an idea how I might fix it?
Thank you,
-Brian
|
| | 1 answer | Add comment |
Friday, 6 March 2009
|
| r25698 - docs/Perl6/Spec/S32-setting-library Guest 22:24:27 |
| | Author: wayland Date: 2009-03-05 06:58:38 +0100 (Thu, 05 Mar 2009) New Revision: 25698
Modified: docs/Perl6/Spec/S32-setting-library/Any.pod docs/Perl6/Spec/S32-setting-library/Scalar.pod Log: - Moved "defined" and "undefined" from Scalar.pod to Any.pod, as per signature - Defined the Pattern role for Any
Modified: docs/Perl6/Spec/S32-setting-library/Any.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/Any.pod 2009-03-05 03:54:17 UTC (rev 25697) +++ docs/Perl6/Spec/S32-setting-library/Any.pod 2009-03-05 05:58:38 UTC (rev 25698) @@ -28,8 +28,65 @@ The following are defined in the C<Any> role: + role Any does Object does Pattern { + our Bool multi sub eqv (Ordering @by, $a, $b) {...} + our Bool multi sub eqv (Ordering $by = &infix:<eqv>, $a, $b) {...} + + our Bool multi method defined ( Any $self) {...} + our Bool multi method defined ( Any $self, ::role ) {...} + + our multi method undefine( Any $self ) {...} + + our multi method clone (::T $self --> T) {...} + our multi method clone (::T $self, *%attributes --> T) {...} + + our Order multi sub cmp (Ordering @by, $a, $b) {...} + our Order multi sub cmp (Ordering $by = &infix:<cmp>, $a, $b) {...} + + our Callable multi method can ($self:, Str $method) {...} + our Bool multi method does ($self:, $type) {...} + our Bool multi method isa ($self:, $type) {...} + our Str multi method perl ( Object $o: ) is export {...} + our multi method warn ( Object $o: ) is export {...} + } + =over +=item defined + + our Bool multi defined ( Any $thing ) + our Bool multi defined ( Any $thing, ::role ) + our Bool multi method defined ( Any $self) + our Bool multi method defined ( Any $self, ::role ) + +C<defined> returns true if the parameter has a value and that value is +not the undefined value (per C<undef>), otherwise false is returned. + +Same as Perl 5, only takes extra optional argument to ask if value is defined +with respect to a particular role: + + defined($x, SomeRole); + +A value may be defined according to one role and undefined according to another. +Without the extra argument, defaults to the definition of defined supplied by +the type of the object. + +=item undefine + + our multi undefine( Any $thing ) + our multi method undefine( Any $self ) + +Takes any variable as a parameter and attempts to "remove" its +definition. For simple scalar variables this means assigning +the undefined value to the variable. For objects, this is equivalent +to invoking their undefine method. For arrays, hashes and other +complex data, this might require emptying the structures associated +with the object. + +In all cases, calling C<undefine> on a variable +should place the object in the same state as if it was just +declared. + =item eqv our Bool multi sub eqv (Ordering @by, $a, $b) @@ -103,6 +160,21 @@ =back +=head1 Pattern + + role Pattern { + method ACCEPTS($self:, $other) {...} + method REJECTS($self:, $other) {...} + } + +=item ACCEPTS + +Used in smartmatching; see S03. + +=item REJECTS + +Used in smartmatching; see S03. + =head1 Additions Please post errors and feedback to perl6-language. If you are making
Modified: docs/Perl6/Spec/S32-setting-library/Scalar.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/Scalar.pod 2009-03-05 03:54:17 UTC (rev 25697) +++ docs/Perl6/Spec/S32-setting-library/Scalar.pod 2009-03-05 05:58:38 UTC (rev 25698) @@ -33,38 +33,6 @@ =over -=item defined - - our Bool multi defined ( Any $thing ) - our Bool multi defined ( Any $thing, ::role ) - -C<defined> returns true if the parameter has a value and that value is -not the undefined value (per C<undef>), otherwise false is returned. - -Same as Perl 5, only takes extra optional argument to ask if value is defined -with respect to a particular role: - - defined($x, SomeRole); - -A value may be defined according to one role and undefined according to another. -Without the extra argument, defaults to the definition of defined supplied by -the type of the object. - -=item undefine - - our multi undefine( Any $thing ) - -Takes any variable as a parameter and attempts to "remove" its -definition. For simple scalar variables this means assigning -the undefined value to the variable. For objects, this is equivalent -to invoking their undefine method. For arrays, hashes and other -complex data, this might require emptying the structures associated -with the object. - -In all cases, calling C<undefine> on a variable -should place the object in the same state as if it was just -declared. - =item undef constant Scalar Scalar::undef
|
| | 4 answer | Add comment |
|
| which package is best used with MS ACCESS Mmccaws2 21:24:20 |
| | Hi
I'm looking at creating some web apps from old excell and ms access files. I'd like to find out which packages are best used with these to extract and update information. I noticed roth's win32::odbc. I'm just curious if there are other packages too.
Thanks Mike
|
| | Add comment |
|
| new Capture behavior (Was: Re: r25685 - docs/Perl6/Spec) Daniel Ruoso 20:24:11 |
| | Em Qua, 2009-03-04 s 20:21 +0100, pugs-commits@feather.perl6.nl escreveu:
Simplify meaning of Capture and Match in item context to preserve sanity (an object in item context is always just itself, never a subpart) sub foo { return 1 } my $a = foo();
That is currently expressed as taking the capture (in this case \(1)) and coerce it to the appropriate context, in order for that to work, Capture need to do some DWIMmery when used in item context.
What I have in mind is:
A capture in item context returns the first positional argument if there is only one (named or positional), otherwise it returns itself (so it can be used as both an array and a hash).
The invocant (if any) of a Capture is now always considered 1st positional. Unless you're a method, then it's really an invocant...
That seems to mean that you actually have two different APIs to talk to a capture, which are:
* I don't care about invocant, gimme the positional args * I do care about invocant, gimme the positional args
So, if you don't care about invocant, it is just a regular positional argument, but if you do care, it is not a positional argument. It looks like the old "my $self = shift"...
What really got me confused is that I don't see what problem this change solves, since it doesn't seem that a signature that expects an invocant (i.e.: cares about invocant) will accept a call without an invocant, so "method foo($b,$c) is export" still need to have a transformed signature in the sub version of foo.
daniel
|
| | 9 answers | Add comment |
|
| Errors at the time of running make command Keerti Siyal 15:41:32 |
| | Hi ,
Could you help us in following error:
[root@e06k401:/usr/local/CONFIG/Date-Calc-5.4] #> make cp lib/Date/Calc/Object.pod blib/lib/Date/Calc/Object.pod cp lib/Date/Calendar/Year.pm blib/lib/Date/Calendar/Year.pm cp Calc.pod blib/lib/Date/Calc.pod cp lib/Date/Calendar/Profiles.pm blib/lib/Date/Calendar/Profiles.pm cp lib/Date/Calc/Object.pm blib/lib/Date/Calc/Object.pm cp Calendar.pod blib/lib/Date/Calendar.pod cp lib/Date/Calendar/Year.pod blib/lib/Date/Calendar/Year.pod cp lib/Date/Calendar/Profiles.pod blib/lib/Date/Calendar/Profiles.pod cp Calendar.pm blib/lib/Date/Calendar.pm cp Calc.pm blib/lib/Date/Calc.pm /opt/soe/local/bin/perl /opt/soe/local/perl-5.8.7/lib/5.8.7/ExtUtils/xsubpp -typemap /opt/soe/local/perl-5.8.7/lib/5.8.7/ExtUtils/typemap -typemap typemap Calc.xs > Calc.xsc && mv Calc.xsc Calc.c gcc -c -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"5.4\" -DXS_VERSION=\"5.4\" -fPIC "-I/opt/soe/local/perl-5.8.7/lib/5.8.7/sun4-solaris/CORE" Calc.c In file included from /usr/include/sys/signal.h:34, from /usr/include/signal.h:26, from /opt/soe/local/perl-5.8.7/lib/5.8.7/sun4-solaris/CORE/unixish.h:106, from /opt/soe/local/perl-5.8.7/lib/5.8.7/sun4-solaris/CORE/perl.h:2220, from Calc.xs:15: /usr/include/sys/siginfo.h:259: error: parse error before "ctid_t" /usr/include/sys/siginfo.h:292: error: parse error before '}' token /usr/include/sys/siginfo.h:294: error: parse error before '}' token /usr/include/sys/siginfo.h:390: error: parse error before "ctid_t" /usr/include/sys/siginfo.h:398: error: conflicting types for `__fault' /usr/include/sys/siginfo.h:267: error: previous declaration of `__fault' /usr/include/sys/siginfo.h:404: error: conflicting types for `__file' /usr/include/sys/siginfo.h:273: error: previous declaration of `__file' /usr/include/sys/siginfo.h:420: error: conflicting types for `__prof' /usr/include/sys/siginfo.h:287: error: previous declaration of `__prof' /usr/include/sys/siginfo.h:424: error: conflicting types for `__rctl' /usr/include/sys/siginfo.h:291: error: previous declaration of `__rctl' /usr/include/sys/siginfo.h:426: error: parse error before '}' token /usr/include/sys/siginfo.h:428: error: parse error before '}' token /usr/include/sys/siginfo.h:432: error: parse error before "k_siginfo_t" /usr/include/sys/siginfo.h:437: error: parse error before '}' token In file included from /usr/include/signal.h:26, from /opt/soe/local/perl-5.8.7/lib/5.8.7/sun4-solaris/CORE/unixish.h:106, from /opt/soe/local/perl-5.8.7/lib/5.8.7/sun4-solaris/CORE/perl.h:2220, from Calc.xs:15: /usr/include/sys/signal.h:85: error: parse error before "siginfo_t" In file included from /opt/soe/local/perl-5.8.7/lib/5.8.7/sun4-solaris/CORE/unixish.h:106, from /opt/soe/local/perl-5.8.7/lib/5.8.7/sun4-solaris/CORE/perl.h:2220, from Calc.xs:15: /usr/include/signal.h:111: error: parse error before "siginfo_t" /usr/include/signal.h:113: error: parse error before "siginfo_t" *** Error code 1 make: Fatal error: Command failed for target `Calc.o' [root@e06k401:/usr/local/CONFIG/Date-Calc-5.4] #>
Thanks and regards,
KEERTI SIYAL System Support Engineer CSC C-24, Sector-58, Noida ,UP ,INDIA IndiaTel:+ 91-120-3913023, Extn. 8326 UK: +44-870 850 3512 Extn.8326 USA: +1-302-781-1010 Extn.8326 Sametime or E-mail- ksiyal@csc.com
CSC Б This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose Б Computer Sciences Corporation India Pvt Ltd Б 7th,Floor, Block 1B, DLF IT Park, Sivaji Garden, Moonlight Stop, Nandambakkam Post, Ramapuram, Chennai-600 089.
|
| | 1 answer | Add comment |
|
| Rat information extraction (was Re: Masak List, take 3) Darren Duncan 12:43:09 |
| | Timothy S. Nelson wrote:
* Should there be a way to extract information about a Rat's numerator/denominator? What methods does a Rat have? Rat.avoid_trap(), Rat.eatcheese(), Rat.race(), etc. Oh, wait, *that* kind of Rat  . Don't forget that a Rat can have at least one other good representation in terms of integers.
While the numerator/denominator pair is good, I say that the mantissa*radix^exponent triple is better, especially so when representing very large or very small numbers like in the generalization of an IEEE-754 floating point number (but, with the most common actual IEEE-754 values, the radix is always 2).
With the triple, then typically the size of integers we are dealing with are not larger than the size of the mantissa portion, which corresponds directly to the amount of precision we have, and the radix/exponent would tend to be just 1-5 digits or so.
In contrast, with numerator/denominator, if you wanted to represent, say, 10^30 or 10^-30, you would use at least 30 decimal digits even if your precision is say 5 digits, and most of your digits are effectively or actually zeros. So math with the triple may be slightly more complicated than with the pair, but not by much, and it scales a lot better.
In the interest of TIMTOADY, I suggest that Rat be a role and at least 2 implementations exist, one using the pair internally, and one using the triple internally (both can exactly represent every rational), since each would perform better for different scenarios, and you could get silent conversions between them by operators when that makes sense; in any event they would both support exactly the same accessors, so users could extract either the pair or the triple from either. I think you do not want the pair being the only representation. I think it also goes without saying that using === on 2 values of different said representations will mutually normalize and compare on the actual rational numeric values.
Or maybe this isn't really the domain of role exposure and the internals of pair vs triple are really just banished to the implementation details that aren't exposed in the language. Same as with silently using machine ints vs big ints behind Int as the situation warrants. And then there's no worrying about === or whatever not just working. So then the main thing for the language to care about is just that information about a Rat in terms of Ints can be extracted in either format.
-- Darren Duncan
|
| | Add comment |
|
| r25722 - docs/Perl6/Spec/S32-setting-library Guest 08:25:50 |
| | Author: wayland Date: 2009-03-06 06:25:49 +0100 (Fri, 06 Mar 2009) New Revision: 25722
Modified: docs/Perl6/Spec/S32-setting-library/Callable.pod Log: Assuming .^methods returns an array of Method objects, I'mve documented things appropriately. Now we just have to decide what the attribute descriptors are.
Modified: docs/Perl6/Spec/S32-setting-library/Callable.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/Callable.pod 2009-03-06 03:46:09 UTC (rev 25721) +++ docs/Perl6/Spec/S32-setting-library/Callable.pod 2009-03-06 05:25:49 UTC (rev 25722) @@ -38,6 +38,7 @@ method Signature signature() {...} method Code assuming(...) {...} method do() {...} # See L<S12/Introspection> + # XXX What does do() return? I mean, it's a "method body", but what's that? } =head2 Block @@ -49,6 +50,7 @@ method redo() {...} method leave() {...} method labels() {...} + method as() {...} # See L<S12/Introspection> and L<S02/Value types> } =head2 Signature @@ -69,11 +71,12 @@ =head2 Routine -class Routine does Block { - method WrapHandle wrap(Code $code) {...} - method Routine unwrap(Wraphandle $original) {...} - method Str name() {...} -} + class Routine does Block { + method WrapHandle wrap(Code $code) {...} + method Routine unwrap(Wraphandle $original) {...} + method Str name() {...} + method Bool multi() {...} + } =item unwrap
|
| | Add comment |
|
| r25719 - docs/Perl6/Spec/S32-setting-library Guest 04:49:52 |
| | Author: wayland Date: 2009-03-06 02:49:52 +0100 (Fri, 06 Mar 2009) New Revision: 25719
Added: docs/Perl6/Spec/S32-setting-library/Basics.pod Removed: docs/Perl6/Spec/S32-setting-library/Any.pod docs/Perl6/Spec/S32-setting-library/Scalar.pod Log: Made Basics contain Object, Any, Pattern, and Scalar
Deleted: docs/Perl6/Spec/S32-setting-library/Any.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/Any.pod 2009-03-05 21:27:55 UTC (rev 25718) +++ docs/Perl6/Spec/S32-setting-library/Any.pod 2009-03-06 01:49:52 UTC (rev 25719) @@ -1,184 +0,0 @@ - -=encoding utf8 - -=head1 Title - -DRAFT: Synopsis 32: Setting Library - Any - -=head1 Version - - Author: Rod Adams <rod@rodadams.net> - Maintainer: Larry Wall <larry@wall.org> - Contributions: Aaron Sherman <ajs@ajs.com> - Mark Stosberg <mark@summersault.com> - Carl M sak <cmasak@gmail.com> - Moritz Lenz <moritz@faui2k3.org> - Tim Nelson <wayland@wayland.id.au> - Date: 19 Mar 2009 extracted from S29-functions.pod - Last Modified: 19 Feb 2009 - Version: 1 - -The document is a draft. - -If you read the HTML version, it is generated from the pod in the pugs -repository under /docs/Perl6/Spec/S32-setting-library/Any.pod so edit it there in -the SVN repository if you would like to make changes. - -=head1 Any - -The following are defined in the C<Any> role: - - role Any does Object does Pattern { - our Bool multi sub eqv (Ordering @by, $a, $b) {...} - our Bool multi sub eqv (Ordering $by = &infix:<eqv>, $a, $b) {...} - - our Bool multi method defined ( Any $self) {...} - our Bool multi method defined ( Any $self, ::role ) {...} - - our multi method undefine( Any $self ) {...} - - our multi method clone (::T $self --> T) {...} - our multi method clone (::T $self, *%attributes --> T) {...} - - our Order multi sub cmp (Ordering @by, $a, $b) {...} - our Order multi sub cmp (Ordering $by = &infix:<cmp>, $a, $b) {...} - - our Callable multi method can ($self:, Str $method) {...} - our Bool multi method does ($self:, $type) {...} - our Bool multi method isa ($self:, $type) {...} - our Str multi method perl ( Object $o: ) is export {...} - our multi method warn ( Object $o: ) is export {...} - } - -=over - -=item defined - - our Bool multi defined ( Any $thing ) - our Bool multi defined ( Any $thing, ::role ) - our Bool multi method defined ( Any $self) - our Bool multi method defined ( Any $self, ::role ) - -C<defined> returns true if the parameter has a value and that value is -not the undefined value (per C<undef>), otherwise false is returned. - -Same as Perl 5, only takes extra optional argument to ask if value is defined -with respect to a particular role: - - defined($x, SomeRole); - -A value may be defined according to one role and undefined according to another. -Without the extra argument, defaults to the definition of defined supplied by -the type of the object. - -=item undefine - - our multi undefine( Any $thing ) - our multi method undefine( Any $self ) - -Takes any variable as a parameter and attempts to "remove" its -definition. For simple scalar variables this means assigning -the undefined value to the variable. For objects, this is equivalent -to invoking their undefine method. For arrays, hashes and other -complex data, this might require emptying the structures associated -with the object. - -In all cases, calling C<undefine> on a variable -should place the object in the same state as if it was just -declared. - -=item eqv - - our Bool multi sub eqv (Ordering @by, $a, $b) - our Bool multi sub eqv (Ordering $by = &infix:<eqv>, $a, $b) - -Returns a Bool indicating if the parameters are equivalent, -using criteria C<$by> or C<@by> for comparisons. C<@by> differs -from C<$by> in that each criterion is applied, in order, -until a non-zero (equivalent) result is achieved. - -=item can - - our Callable multi method can ($self:, Str $method) - -If there is a multi method of name C<$method> that can be called on -C<$self>, then a closure is return which has C<$self> bound to the position -of the invocant. - -Otherwise an undefined value is returned. - -=item clone - - our multi method clone (::T $self --> T) - our multi method clone (::T $self, *%attributes --> T) - -The first variant returns an independent copy of C<$o> that is equivalent -to C<$o>. - -The second variant does the same, but any named arguments override an -attribute during the cloning process. - -=item cmp - - our Order multi sub cmp (Ordering @by, $a, $b) - our Order multi sub cmp (Ordering $by = &infix:<cmp>, $a, $b) - -Returns C<Order::Increase>, or C<Order::Same>, or C<Order::Decrease> -(which numify to -1, 0, +1 respectively) indicating if paramater C<$a> should -be ordered before/tied with/after parameter C<$b>, using criteria -C<$by> or C<@by> for comparisons. C<@by> differs from C<$by> -in that each criterion is applied, in order, until a non-zero -(tie) result is achieved. If the values are not comparable, -returns a proto C<Order> object that is undefined. - -=item does - - our Bool multi method does ($self:, $type) - -Returns C<True> if and only if C<$self> conforms to type C<$type>. - -=item isa - - our Bool multi method isa ($self:, $type) - -Returns C<True> if a the invocant an instance of class C<$type>, or -of a subset type or a derived class (through inheritance) of C<$type>. - -=item perl - - our Str multi method perl ( Object $o: ) is export - -Returns a perlish representation of the object, so that calling C<eval> -on the returned string reproduces the object as accurately as possible. - -=item warn - - our multi method warn ( Object $o: ) is export - -Prints a warning to C<$*ERR>, which is usually finds C<$PROCESS::ERR>. See -C<Synopsis 16: IPC / IO / Signals> for details. - -=back - -=head1 Pattern - - role Pattern { - method ACCEPTS($self:, $other) {...} - method REJECTS($self:, $other) {...} - } - -=item ACCEPTS - -Used in smartmatching; see S03. - -=item REJECTS - -Used in smartmatching; see S03. - -=head1 Additions - -Please post errors and feedback to perl6-language. If you are making -a general laundry list, please separate messages by topic. - - -
Copied: docs/Perl6/Spec/S32-setting-library/Basics.pod (from rev 25698, docs/Perl6/Spec/S32-setting-library/Any.pod) =================================================================== --- docs/Perl6/Spec/S32-setting-library/Basics.pod (rev 0) +++ docs/Perl6/Spec/S32-setting-library/Basics.pod 2009-03-06 01:49:52 UTC (rev 25719) @@ -0,0 +1,219 @@ + +=encoding utf8 + +=head1 Title + +DRAFT: Synopsis 32: Setting Library - Basics + +=head1 Version + + Author: Rod Adams <rod@rodadams.net> + Maintainer: Larry Wall <larry@wall.org> + Contributions: Aaron Sherman <ajs@ajs.com> + Mark Stosberg <mark@summersault.com> + Carl M sak <cmasak@gmail.com> + Moritz Lenz <moritz@faui2k3.org> + Tim Nelson <wayland@wayland.id.au> + Date: 19 Mar 2009 extracted from S29-functions.pod + Last Modified: 19 Feb 2009 + Version: 1 + +The document is a draft. + +If you read the HTML version, it is generated from the pod in the pugs +repository under /docs/Perl6/Spec/S32-setting-library/Basics.pod so edit it there in +the SVN repository if you would like to make changes. + +=head1 Roles + +=head2 Object + +The following are defined in the C<Object> role: + + role Object { + our Bool multi method defined ($self {...} + our Bool multi method defined ($self: ::role ) {...} + + our multi method undefine( $self: ) {...} + } + +=item defined + + our Bool multi method defined ( $self: ) is export + our Bool multi method defined ( $self: ::role ) is export + +C<defined> returns true if the parameter has a value and that value is +not the undefined value (per C<undef>), otherwise false is returned. + +Same as Perl 5, only takes extra optional argument to ask if value is defined +with respect to a particular role: + + defined($x, SomeRole); + +A value may be defined according to one role and undefined according to another. +Without the extra argument, defaults to the definition of defined supplied by +the type of the object. + +=item undefine + + our multi undefine( Any $thing ) + our multi method undefine( Any $self ) + +Takes any variable as a parameter and attempts to "remove" its +definition. For simple scalar variables this means assigning +the undefined value to the variable. For objects, this is equivalent +to invoking their undefine method. For arrays, hashes and other +complex data, this might require emptying the structures associated +with the object. + +In all cases, calling C<undefine> on a variable +should place the object in the same state as if it was just +declared. + +=head2 Any + +The following are defined in the C<Any> role: + + role Any does Object does Pattern { + our Bool multi sub eqv (Ordering @by, $a, $b) {...} + our Bool multi sub eqv (Ordering $by = &infix:<eqv>, $a, $b) {...} + + our multi method clone (::T $self --> T) {...} + our multi method clone (::T $self, *%attributes --> T) {...} + + our Order multi sub cmp (Ordering @by, $a, $b) {...} + our Order multi sub cmp (Ordering $by = &infix:<cmp>, $a, $b) {...} + + our Callable multi method can ($self:, Str $method) {...} + our Bool multi method does ($self:, $type) {...} + our Bool multi method isa ($self:, $type) {...} + our Str multi method perl ( Object $o: ) is export {...} + our multi method warn ( Object $o: ) is export {...} + } + +=over + +=item eqv + + our Bool multi sub eqv (Ordering @by, $a, $b) + our Bool multi sub eqv (Ordering $by = &infix:<eqv>, $a, $b) + +Returns a Bool indicating if the parameters are equivalent, +using criteria C<$by> or C<@by> for comparisons. C<@by> differs +from C<$by> in that each criterion is applied, in order, +until a non-zero (equivalent) result is achieved. + +=item can + + our Callable multi method can ($self:, Str $method) + +If there is a multi method of name C<$method> that can be called on +C<$self>, then a closure is return which has C<$self> bound to the position +of the invocant. + +Otherwise an undefined value is returned. + +=item clone + + our multi method clone (::T $self --> T) + our multi method clone (::T $self, *%attributes --> T) + +The first variant returns an independent copy of C<$o> that is equivalent +to C<$o>. + +The second variant does the same, but any named arguments override an +attribute during the cloning process. + +=item cmp + + our Order multi sub cmp (Ordering @by, $a, $b) + our Order multi sub cmp (Ordering $by = &infix:<cmp>, $a, $b) + +Returns C<Order::Increase>, or C<Order::Same>, or C<Order::Decrease> +(which numify to -1, 0, +1 respectively) indicating if paramater C<$a> should +be ordered before/tied with/after parameter C<$b>, using criteria +C<$by> or C<@by> for comparisons. C<@by> differs from C<$by> +in that each criterion is applied, in order, until a non-zero +(tie) result is achieved. If the values are not comparable, +returns a proto C<Order> object that is undefined. + +=item does + + our Bool multi method does ($self:, $type) + +Returns C<True> if and only if C<$self> conforms to type C<$type>. + +=item isa + + our Bool multi method isa ($self:, $type) + +Returns C<True> if a the invocant an instance of class C<$type>, or +of a subset type or a derived class (through inheritance) of C<$type>. + +=item perl + + our Str multi method perl ( Object $o: ) is export + +Returns a perlish representation of the object, so that calling C<eval> +on the returned string reproduces the object as accurately as possible. + +=item warn + + our multi method warn ( Object $o: ) is export + +Prints a warning to C<$*ERR>, which is usually finds C<$PROCESS::ERR>. See +C<Synopsis 16: IPC / IO / Signals> for details. + +=back + +=head2 Pattern + + role Pattern { + method ACCEPTS($self:, $other) {...} + method REJECTS($self:, $other) {...} + } + +=item ACCEPTS + +Used in smartmatching; see S03. + +=item REJECTS + +Used in smartmatching; see S03. + +=head2 Scalar + +B<API document>: L<Scalar> + +C<Scalar> provides the basic tools for operating on undifferentiated +scalar variables. All of the following are exported by default. + +=over + +=item undef + + constant Scalar Scalar::undef + +Returns the undefined scalar object. C<undef> has no value at +all, but for historical compatibility, it will numify to C<0> +and stringify to the empty string, potentially generating a +warning in doing so. There are two ways to determine if a +value equal to undef: the C<defined> function (or method) can +be called or the C<//> (or C<orelse>) operator can be used. + +C<undef> is also considered to be false in a boolean context. +Such a conversion does not generate a warning. + +Perl 5's unary C<undef> function is renamed C<undefine> to avoid +confusion with the value C<undef> (which is always 0-ary now). + +=item VAR + +This is not really a method, but some kind of macro. See L<S12> for details. + +=back + +=head1 Additions + +Please post errors and feedback to perl6-language. If you are making +a general laundry list, please separate messages by topic.
Property changes on: docs/Perl6/Spec/S32-setting-library/Basics.pod ___________________________________________________________________ Added: svn:mime-type + text/plain; charset=UTF-8 Added: svn:mergeinfo + Added: svn:eol-style + native
Deleted: docs/Perl6/Spec/S32-setting-library/Scalar.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/Scalar.pod 2009-03-05 21:27:55 UTC (rev 25718) +++ docs/Perl6/Spec/S32-setting-library/Scalar.pod 2009-03-06 01:49:52 UTC (rev 25719) @@ -1,65 +0,0 @@ - -=encoding utf8 - -=head1 Title - -DRAFT: Synopsis 32: Setting Library - Scalar - -=head1 Version - - Author: Rod Adams <rod@rodadams.net> - Maintainer: Larry Wall <larry@wall.org> - Contributions: Aaron Sherman <ajs@ajs.com> - Mark Stosberg <mark@summersault.com> - Carl M sak <cmasak@gmail.com> - Moritz Lenz <moritz@faui2k3.org> - Tim Nelson <wayland@wayland.id.au> - Date: 19 Mar 2009 extracted from S29-functions.pod - Last Modified: 19 Feb 2009 - Version: 1 - -The document is a draft. - -If you read the HTML version, it is generated from the pod in the pugs -repository under /docs/Perl6/Spec/S32-setting-library/Miscellaneous-scalars.pod -so edit it there in the SVN repository if you would like to make changes. - -=head1 Scalar - -B<API document>: L<Scalar> - -C<Scalar> provides the basic tools for operating on undifferentiated -scalar variables. All of the following are exported by default. - -=over - -=item undef - - constant Scalar Scalar::undef - -Returns the undefined scalar object. C<undef> has no value at -all, but for historical compatibility, it will numify to C<0> -and stringify to the empty string, potentially generating a -warning in doing so. There are two ways to determine if a -value equal to undef: the C<defined> function (or method) can -be called or the C<//> (or C<orelse>) operator can be used. - -C<undef> is also considered to be false in a boolean context. -Such a conversion does not generate a warning. - -Perl 5's unary C<undef> function is renamed C<undefine> to avoid -confusion with the value C<undef> (which is always 0-ary now). - -=item VAR - -This is not really a method, but some kind of macro. See L<S12> for details. - -=back - -=head1 Additions - -Please post errors and feedback to perl6-language. If you are making -a general laundry list, please separate messages by topic. - - -
|
| | Add comment |
Thursday, 5 March 2009
|
| r25715 - docs/Perl6/Spec Guest 22:26:19 |
| | Author: lwall Date: 2009-03-05 20:39:22 +0100 (Thu, 05 Mar 2009) New Revision: 25715
Modified: docs/Perl6/Spec/S02-bits.pod docs/Perl6/Spec/S03-operators.pod Log: By principle of least damage, minimalize autopromotion of lists in item context to Capture rather than to Array. (Let binding handle any subsequent promotions lazily.)
Modified: docs/Perl6/Spec/S02-bits.pod =================================================================== --- docs/Perl6/Spec/S02-bits.pod 2009-03-05 19:19:26 UTC (rev 25714) +++ docs/Perl6/Spec/S02-bits.pod 2009-03-05 19:39:22 UTC (rev 25715) @@ -2413,9 +2413,9 @@ $a = ('a', 'b'); which, because the list is assigned to a scalar, is autopromoted into -an Array object: +a C<Capture> object: - $a = ['a', 'b']; + $a = \('a', 'b'); Likewise, if bound to a scalar parameter, C<< <a b> >> will be treated as a single list object, but if bound to a slurpy parameter,
Modified: docs/Perl6/Spec/S03-operators.pod =================================================================== --- docs/Perl6/Spec/S03-operators.pod 2009-03-05 19:19:26 UTC (rev 25714) +++ docs/Perl6/Spec/S03-operators.pod 2009-03-05 19:39:22 UTC (rev 25715) @@ -1977,8 +1977,8 @@ We still call the values scalars, and talk about "scalar operators", but scalar operators are those that put their arguments into item context. -If given a list, this function makes an C<Array> from it. The function -is agnostic about any C<Captures> in such a list. (Use C<@> or C<@@> +If given a list, this function makes a C<Capture> object from it. The function +is agnostic about any C<Captures> embedded in such a capture. (Use C<@> or C<@@> below to force that one way or the other). Note that this is a list operator, not a unary prefix operator,
|
| | Add comment |
|
| r25712 - docs/Perl6/Spec Guest 22:11:49 |
| | Author: lwall Date: 2009-03-05 20:11:49 +0100 (Thu, 05 Mar 2009) New Revision: 25712
Modified: docs/Perl6/Spec/S12-objects.pod Log: more method declaration clarification, ruoso++
Modified: docs/Perl6/Spec/S12-objects.pod =================================================================== --- docs/Perl6/Spec/S12-objects.pod 2009-03-05 19:00:13 UTC (rev 25711) +++ docs/Perl6/Spec/S12-objects.pod 2009-03-05 19:11:49 UTC (rev 25712) @@ -214,6 +214,20 @@ in fact called with a different syntax that uses C<!> in place of the C<.> character. See below.) +Unlike with most other declarations, C<method> declarations do not +default to C<our> semantics, or even C<my> semantics, but rather +C<has> semantics. So instead of installing a symbol into a lexical +or package symbol table, they merely install a public or private +method in the current class or role via calls to its metaobject. +(Likewise for C<submethod> declarations--see L<Submethods> below.) + +Use of an explicit C<has> declarator has no effect on the declaration. +You may install additional aliases to the method in the lexical scope +using C<my> or in the current package using C<our>. These aliases +are named with C<&foo> notation and return a C<Routine> object that +may be called as a subroutine, in which case you must supply the +expected invocant as the first argument. + To call an ordinary method with ordinary method-dispatch semantics, use either the dot notation or indirect object notation:
|
| | Add comment |
|
| r25711 - docs/Perl6/Spec Guest 22:00:13 |
| | Author: lwall Date: 2009-03-05 20:00:13 +0100 (Thu, 05 Mar 2009) New Revision: 25711
Modified: docs/Perl6/Spec/S12-objects.pod Log: fix declaration syntax of private methods
Modified: docs/Perl6/Spec/S12-objects.pod =================================================================== --- docs/Perl6/Spec/S12-objects.pod 2009-03-05 18:03:31 UTC (rev 25710) +++ docs/Perl6/Spec/S12-objects.pod 2009-03-05 19:00:13 UTC (rev 25711) @@ -12,9 +12,9 @@ Maintainer: Larry Wall <larry@wall.org> Date: 27 Oct 2004 - Last Modified: 4 Mar 2009 + Last Modified: 5 Mar 2009 Number: 12 - Version: 73 + Version: 74 =head1 Overview @@ -206,9 +206,9 @@ any(@(self)) # okay any(@self) # WRONG unless you declared @self yourself -Private methods are declared using C<my>: +Private methods are declared using C<!>: - my method think (Brain $self: $thought) + method !think (Brain $self: $thought) (Such methods are completely invisible to ordinary method calls, and are in fact called with a different syntax that uses C<!> in place of the C<.>
|
| | Add comment |
|
| Issue in installation of perl module Singh Rampal-MNGK64 18:36:16 |
| | perl Makefile.PL -v Using DBI 1.602 (for perl 5.008007 on sun4-solaris) installed in /opt/soe/local/perl-5.8.7/lib/site_perl/5.8.7/sun4-solaris/auto/DBI/
Configuring DBD::Oracle for perl 5.008007 on solaris (sun4-solaris)
Remember to actually *READ* the README file! Especially if you have any problems.
Using Oracle in /u01/app/proa061o/product/920proa061 PATH=/u01/app/proa061o/product/920proa061/bin:/u01/app/proa061o/product/920proa061:/opt/soe/local/bin:/usr/sbin:/usr/bin:/usr/local/bin:/etc:/opt/emc/EMCpower/bin/64:/etc/emc/bin:/usr/openwin/bin:/usr/openwin/lib:/usr/openwin/include:/usr/ucb:/usr/local/bin:/opt/VRTSvcs/bin:/sbin:/usr/sfw/lib/gcc:/usr/sfw/bin/gcc:/usr/sfw/libexec/gcc DEFINE _SQLPLUS_RELEASE = "902000800" (CHAR) Oracle version 9.2.0.8 (9.2) Found /u01/app/proa061o/product/920proa061/rdbms/demo/demo_rdbms.mk Found /u01/app/proa061o/product/920proa061/precomp/demo/proc/demo_proc.mk Using /u01/app/proa061o/product/920proa061/rdbms/demo/demo_rdbms.mk Your LD_LIBRARY_PATH env var is set to '' WARNING: Your LD_LIBRARY_PATH env var doesn't include '/u01/app/proa061o/product/920proa061/lib' but probably needs to. Reading /u01/app/proa061o/product/920proa061/rdbms/demo/demo_rdbms.mk Reading /u01/app/proa061o/product/920proa061/rdbms/lib/env_rdbms.mk Read a total of 2212 lines from /u01/app/proa061o/product/920proa061/rdbms/lib/env_rdbms.mk (including inclusions) Read a total of 2507 lines from /u01/app/proa061o/product/920proa061/rdbms/demo/demo_rdbms.mk (including inclusions) Deleted SHELL definition: SHELL=/bin/sh Deleted LIB_EXT definition: LIB_EXT=a Deleted OBJ_EXT definition: OBJ_EXT=o Deleted AR definition: AR=ar Deleted AS definition: AS=as Deleted CC definition: CC=cc Deleted CHMOD definition: CHMOD=chmod Deleted CPP definition: CPP=cpp Deleted ECHO definition: ECHO=echo Deleted LD definition: LD=ld Deleted PERL definition: PERL=perl Deleted CFLAGS definition: CFLAGS=$(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)\ $(SHARED_CFLAG) $(USRFLAGS) Deleted LDFLAGS definition: LDFLAGS=-o $@ $(LDPATHFLAG)$(PRODLIBHOME) $(LDPATHFLAG)$(LIBHOME) Deleted OPTIMIZE definition: OPTIMIZE=$(OPTIMIZE3) Deleted AR definition: AR=/usr/ccs/bin/ar Deleted AS definition: AS=/usr/ccs/bin/as Deleted LD definition: LD=/usr/ccs/bin/ld Deleted CPP definition: CPP=$(CC) -E $(ANSI) Deleted CHMOD definition: CHMOD=/bin/chmod Deleted ASFLAGS definition: ASFLAGS=$(NOKPIC_ASFLAGS) $(KPIC_OPTION) Deleted CCFLAGS definition: CCFLAGS= $(NOKPIC_CCFLAGS) $(KPIC_OPTION) Appending '/u01/app/proa061o/product/920proa061/rdbms/lib/libskgxpd.a /u01/app/proa061o/product/920proa061/rdbms/lib/libskgxpu.a /u01/app/proa061o/product/920proa061/rdbms/lib/libskgxpt.a' to EXTRALIBS Appending '$(LIBHOME)libskgxp9.so' to SHLIBS Appending '/u01/app/proa061o/product/920proa061/rdbms/lib/libskgxp9.a' to LIBS Appending '/u01/app/proa061o/product/920proa061/rdbms/lib/libskgxns.a /u01/app/proa061o/product/920proa061/rdbms/lib/libskgxnd.a /u01/app/proa061o/product/920proa061/rdbms/lib/libskgxnr.a' to EXTRALIBS Appending '$(LIBHOME)libskgxn9.so' to SHLIBS Appending '/u01/app/proa061o/product/920proa061/rdbms/lib/libskgxn9.a' to LIBS Evaluating `cat $(LIBHOME)sysliblist` expanded `cat /u01/app/proa061o/product/920proa061/lib/sysliblist` returned '-lnsl -lsocket -lgen -ldl -lsched '
Attempting to discover Oracle OCI build rules sh: make: not found by executing: [make -f /u01/app/proa061o/product/920proa061/rdbms/demo/demo_rdbms.mk build ECHODO=echo ECHO=echo GENCLNTSH='echo genclntsh' CC=true OPTIMIZE= CCFLAGS= EXE=DBD_ORA_EXE OBJS=DBD_ORA_OBJ.o] sh: make: not found returned: [] WARNING: Oracle build rule discovery failed (256) Oracle oci build command: [] WARNING: Unable to interpret Oracle build commands from /u01/app/proa061o/product/920proa061/rdbms/demo/demo_rdbms.mk. (Will continue by using fallback approach.) Please report this to dbi-users@perl.org. See README for what to include.
Found header files in /u01/app/proa061o/product/920proa061/rdbms/public /u01/app/proa061o/product/920proa061/rdbms/demo.
Checking for functioning wait.ph
System: perl5.008007 sunos zlggs002 5.8 generic_108528-07 sun4u sparc sunw,ultra-250 Compiler: gcc -O -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 Linker: /usr/ucb/ld Sysliblist: -lnsl -lsocket -lgen -ldl -lsched Oracle makefiles would have used these definitions but we override them: CC: cc CFLAGS: $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)\ $(SHARED_CFLAG) $(USRFLAGS) [$(GFLAG) -xO3 $(CDEBUG) $(NOKPIC_CCFLAGS) -K PIC -I/u01/app/proa061o/product/920proa061/rdbms/demo -I/u01/app/proa061o/product/920proa061/rdbms/public -I/u01/app/proa061o/product/920proa061/plsql/public -I/u01/app/proa061o/product/920proa061/network/public -DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD -D_REENTRANT $(LPFLAGS) $(USRFLAGS)] build: $(CC) $(ORALIBPATH) -o $(EXE) $(OBJS) $(OCISHAREDLIBS) expanded `cat /u01/app/proa061o/product/920proa061/lib/sysliblist` [ cc -L$(LIBHOME) -L/u01/app/proa061o/product/920proa061/rdbms/lib/ -o $(EXE) $(OBJS) -lclntsh $(EXPDLIBS) $(EXOSLIBS) -lnsl -lsocket -lgen -ldl -lsched -R/u01/app/proa061o/product/920proa061/lib -laio $(THREADLIBS) -lposix4 -lkstat -lm $(USRLIBS) -lthread] LDFLAGS: -o $@ $(LDPATHFLAG)$(PRODLIBHOME) $(LDPATHFLAG)$(LIBHOME) [-o $@ -L/u01/app/proa061o/product/920proa061/rdbms/lib/ -L$(LIBHOME)] Linking with /u01/app/proa061o/product/920proa061/rdbms/lib/defopt.o -lclntsh -lnsl -lsocket -lgen -ldl -lsched -R/u01/app/proa061o/product/920proa061/lib -laio -lposix4 -lkstat -lm -lthread [from $(DEF_OPT) $(OCISHAREDLIBS)]
WARNING: If you have problems you may need to rebuild perl with threading enabled. MakeMaker (v6.17) ABSTRACT_FROM => q[Oracle.pm] AUTHOR => q[Tim Bunce (dbi-users@perl.org)] DEFINE => q[ -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"9.2.0.8\"] DIR => [] EXE_FILES => [q[ora_explain]] INC => q[-I/u01/app/proa061o/product/920proa061/rdbms/public -I/u01/app/proa061o/product/920proa061/rdbms/demo -I/u01/app/proa061o/product/920proa061/rdbms/demo -I/u01/app/proa061o/product/920proa061/rdbms/public -I/u01/app/proa061o/product/920proa061/plsql/public -I/u01/app/proa061o/product/920proa061/network/public -I/opt/soe/local/perl-5.8.7/lib/site_perl/5.8.7/sun4-solaris/auto/DBI] LIBS => [q[-L/u01/app/proa061o/product/920proa061/lib/ -lclntsh -lnsl -lsocket -lgen -ldl -lsched -R/u01/app/proa061o/product/920proa061/lib -laio -lposix4 -lkstat -lm -lthread]] NAME => q[DBD::Oracle] OBJECT => q[$(O_FILES)] PREREQ_PM => { DBI=>q[0] } VERSION_FROM => q[Oracle.pm] clean => { FILES=>q[xstmp.c Oracle.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*] } dist => { DIST_DEFAULT=>q[clean distcheck disttest tardist], COMPRESS=>q[gzip -v9], PREOP=>q[$(MAKE) -f Makefile.old distdir], SUFFIX=>q[gz] } dynamic_lib => { OTHERLDFLAGS=>q[ /u01/app/proa061o/product/920proa061/rdbms/lib/defopt.o $(COMPOBJS)] } Using PERL=/opt/soe/local/bin/perl Potential libraries are '-L/u01/app/proa061o/product/920proa061/lib/ -lclntsh -lnsl -lsocket -lgen -ldl -lsched -R/u01/app/proa061o/product/920proa061/lib -laio -lposix4 -lkstat -lm -lthread': '-lclntsh' found at /u01/app/proa061o/product/920proa061/lib//libclntsh.so.9.0 nsl not found in /u01/app/proa061o/product/920proa061/lib/ nsl not found in /usr/local/lib '-lnsl' found at /usr/lib/libnsl.so.1 socket not found in /u01/app/proa061o/product/920proa061/lib/ socket not found in /usr/local/lib '-lsocket' found at /usr/lib/libsocket.so.1 gen not found in /u01/app/proa061o/product/920proa061/lib/ gen not found in /usr/local/lib '-lgen' found at /usr/lib/libgen.so.1 dl not found in /u01/app/proa061o/product/920proa061/lib/ dl not found in /usr/local/lib '-ldl' found at /usr/lib/libdl.so.1 sched not found in /u01/app/proa061o/product/920proa061/lib/ sched not found in /usr/local/lib '-lsched' found at /usr/lib/libsched.so.1 aio not found in /u01/app/proa061o/product/920proa061/lib/ aio not found in /u01/app/proa061o/product/920proa061/lib aio not found in /usr/local/lib '-laio' found at /usr/lib/libaio.so.1 posix4 not found in /u01/app/proa061o/product/920proa061/lib/ posix4 not found in /u01/app/proa061o/product/920proa061/lib posix4 not found in /usr/local/lib '-lposix4' found at /usr/lib/libposix4.so.1 kstat not found in /u01/app/proa061o/product/920proa061/lib/ kstat not found in /u01/app/proa061o/product/920proa061/lib kstat not found in /usr/local/lib '-lkstat' found at /usr/lib/libkstat.so.1 m not found in /u01/app/proa061o/product/920proa061/lib/ m not found in /u01/app/proa061o/product/920proa061/lib m not found in /usr/local/lib '-lm' found at /usr/lib/libm.so.2 thread not found in /u01/app/proa061o/product/920proa061/lib/ thread not found in /u01/app/proa061o/product/920proa061/lib thread not found in /usr/local/lib '-lthread' found at /usr/lib/libthread.so.1 LD_RUN_PATH=/u01/app/proa061o/product/920proa061/lib Using DBD::Oracle 1.17. Using DBD::Oracle 1.17. Using DBI 1.602 (for perl 5.008007 on sun4-solaris) installed in /opt/soe/local/perl-5.8.7/lib/site_perl/5.8.7/sun4-solaris/auto/DBI/ Writing Makefile for DBD::Oracle
*** If you have problems... read all the log printed above, and the README and README.help.txt files. (Of course, you have read README by now anyway, haven't you?)
|
| | 3 answer | Add comment |
|
| r25699 - docs/Perl6/Spec Guest 09:16:45 |
| | Author: wayland Date: 2009-03-05 07:16:44 +0100 (Thu, 05 Mar 2009) New Revision: 25699
Modified: docs/Perl6/Spec/S02-bits.pod docs/Perl6/Spec/S28-special-names.pod Log: Changes to special variables as per "$?OS changes" discussion on mailing list. Haven't worried about compatibility for now, though.
Modified: docs/Perl6/Spec/S02-bits.pod =================================================================== --- docs/Perl6/Spec/S02-bits.pod 2009-03-05 05:58:38 UTC (rev 25698) +++ docs/Perl6/Spec/S02-bits.pod 2009-03-05 06:16:44 UTC (rev 25699) @@ -2127,7 +2127,7 @@ The following return objects that contain all pertinent info: - $?OS Which operating system am I compiled for? + $?KERNEL Which kernel am I compiled for? $?DISTRO Which OS distribution am I compiling under $?VM Which virtual machine am I compiling under $?XVM Which virtual machine am I cross-compiling for @@ -2155,7 +2155,7 @@ Note that some of these things have parallels in the C<*> space at run time: - $*OS Which OS I'm running under + $*KERNEL Which kernel I'm running under $*DISTRO Which OS distribution I'm running under $*VM Which VM I'm running under $*PERL Which Perl I'm running under
Modified: docs/Perl6/Spec/S28-special-names.pod =================================================================== --- docs/Perl6/Spec/S28-special-names.pod 2009-03-05 05:58:38 UTC (rev 25698) +++ docs/Perl6/Spec/S28-special-names.pod 2009-03-05 06:16:44 UTC (rev 25699) @@ -67,6 +67,8 @@ $! S04 # Current Exception object $/ S05 Match # Last match $0, $1, $2 S05 Str # First captured value from match: $/[0] + $?ARCH SoftwarePackage # Host architecture + $?XARCH SoftwarePackage # Target architecture @*ARGS S06 Array of Str # command-line arguments $*ARGFILES S02 IO # The magic command-line input handle &?BLOCK S06 Block # current block (itself) @@ -96,8 +98,8 @@ $?MODULE S02 Module # current module %*OPTS S19 Hash of XXX # Options from command line %*OPT... S19 Hash of XXX # Options from command line to be passed down - $?OS SoftwarePackage # operating system compiled for - $*OS SoftwarePackage # operating system running under + $?KERNEL SoftwarePackage # operating system compiled for + $*KERNEL SoftwarePackage # operating system running under $*OUT S16 IO # Standard output handle $?PARSER S02 Grammar # Which Perl grammar was used to parse this statement? $?PACKAGE S02 Package # current package @@ -113,8 +115,8 @@ $?SCOPE S02 # Current "my" scope (XXX unnecessary?) $*UID Int # system user id $?USAGE S06 Str # Default usage message generated at compile time - $?VM S02 Str # Which virtual machine am I compiling under - $?XVM S02 Str # Which virtual machine am I cross-compiling for + $?VM S02 SoftwarePackage # Which virtual machine am I compiling under + $?XVM S02 SoftwarePackage # Which virtual machine am I cross-compiling for Note that contextual variables such as C<$*OUT> may have more than one current definition in the outer dynamic context, in which case
|
| | Add comment |
|
| More S29/S32 Masak ideas Timothy S. Nelson 08:58:16 |
| | Apologies to Carl Masak for writing his name in ASCII.
# context().
Added to S29, but I still don't know where these should go. Maybe on Block?
# .wrap, .unwrap and .assuming.
Added to S32/Callable.
# callsame, callwith, nextsame, nextwith, lastcall.
Didn't know where these should go, but probably the same place as context()/caller().
# VAR(), though a macro, could possibly get honourable mention.
Added to S32/Scalar.pod
# Method descriptor objects: .name, .signature, .as, .multi, .do.
In Callable.pod
.name is on Routine .signature is on Code .do is on Code (I'm guessing here)
I'm not sure where the others go: .multi must be on something that gets it into Routine .as must be on something that gets it into Method (higher?)
I'm guessing that .^methods should really return a bunch of Method objects.
# Attribute descriptor objects: .name, .type, .scope, .rw, .private, .accessor, .build, .readonly.
I wonder what type would be appropriate for an attribute descriptor object. I haven't done anything with these either.
--------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: wayland@wayland.id.au | I am | ---------------------------------------------------------------------
----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK-----
|
| | 2 answer | Add comment |
|
| Re: Fwd: More S29/S32 Masak ideas (fwd) Timothy S. Nelson 03:01:18 |
| | Sorry, forgot to send this to the list.
---------- Forwarded message ---------- Date: Wed, 4 Mar 2009 17:16:22 +1100 (EST) From: Timothy S. Nelson <wayland@wayland.id.au> To: Carl Mц sak <cmasak@gmail.com> Subject: Re: Fwd: More S29/S32 Masak ideas
On Tue, 3 Mar 2009, Carl Mц sak wrote:
б б б б Added to S29, but I still don't know where these should go.. б Maybe S06:1940 seems to treat it as a pure function, not as methods. That kind of makes sense, given its argument list. Yeah, I agree. I guess I just like for everything to be a method on something, and some of them just have forms that work as functions as well . And S06:2072 seems to imply that it goes on the Context; but maybe...
context() === $?CONTEXT $?CONTEXT.context() === context().context()
?
# callsame, callwith, nextsame, nextwith, lastcall. б б б б Didn't know where these should go, but probably the same place as S06:2072 seems to say Block. Ok, thanks. I have a question about that section. Immediately above that list just above the section you talked about, it refers to the "returned context object". I want to know what this can be. Is it synonymous with Block? With Code? With something else? Is it its own role?
# Method descriptor objects: .name, .signature, .as, .multi, .do. б б б б .name is on Routine б б б б .signature is on Code б б б б .do is on Code (I'm guessing here) б б б б I'm not sure where the others go: .multi must be on something that gets it into Routine .as must be on something that gets it into Method (higher?) See S12:1987 for this. Are these line numbers you're using? POD line numbers? I don't see a line 1987 in this (the file isn't big enough).
I still believe that must be interpreted as there being a specific MethodDescriptor object on which all of .name, ..signature, .as, .multi, .do are attached. б б б б I'm guessing that .^methods should really return a bunch of Method No, MethodDescriptor objects. See S12:1987. Hmm. I don't like it . You may be right, but I was assuming that we were returning *Method* objects.
# Attribute descriptor objects: .name, .type, .scope, .rw, .private, .accessor, .build, .readonly. б б б б I wonder what type would be appropriate for an attribute descriptor object. б I haven't done anything with these either. See S12:1999. Only has 1764 lines in my editor. And wc says 1763.
I presume you're implying there should be an AttributeDescriptor role, yes?
--------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: wayland@wayland.id.au | I am | ---------------------------------------------------------------------
----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK-----
--------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: wayland@wayland.id.au | I am | ---------------------------------------------------------------------
----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK-----
|
| | Add comment |
|
| Rakudo newbies Timothy S. Nelson 02:59:42 |
| | Hi all. I've been hanging around on #perl6, and have heard a fairly regular complaint in the last few days. 3 or 4 people have turned up wanting to work on Rakudo, and not always been able to get the information that they wanted.
I promised to write a message to the list complaining about this, but before I did, the main developers recognised the problem and discussed on IRC the steps they're planning to take to fix it. As such, this is both a complaint message and an answer to it .
The basic plan is to turn rakudo.org into a centralised rakudo info point. The plan is that all the information needed to be a developer will appear on it. If you want to help in the process, ask for some rakudo.org editing power on #perl6, and go to work on the docs. This new site is new enough that it's still very incomplete, but hopefully with a bit of teamwork, in a month or so we should have it to the point where it can help beginning developers.
--------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: wayland@wayland.id.au | I am | ---------------------------------------------------------------------
----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK-----
|
| | 1 answer | Add comment |
|
|