Add link to STD.pm where official documentation listed

2009-05-23 Thread Richard Hainsworth
On #perl6 Larry said that STD is a part of the specification for perl6. Would it be possible to include a link to STD.pm in the list of official documentation? There are things in STD that are not in the specifications, eg., default values for optional parameters should come after traits

Re: spelunking in the meta-ops in STD.pm

2009-01-27 Thread Larry Wall
On Sun, Jan 18, 2009 at 10:57:26PM -0800, Mark Lentczner wrote: > I was looking through STD.pm at the parsing of metaops. I was exploring > to see if the legal metaops for a given operator could be notated on the > operator chart. What I found was some oddness... Caveat: T

small patch to STD.pm

2009-01-23 Thread Mark Lentczner
This fixes a typo and enables X>>+< X | X -| X +| X ] = $; }>

spelunking in the meta-ops in STD.pm

2009-01-18 Thread Mark Lentczner
I was looking through STD.pm at the parsing of metaops. I was exploring to see if the legal metaops for a given operator could be notated on the operator chart. What I found was some oddness... op= (infix_postfix_meta_operator:sym<=>) The in

Re: Project idea: Perl 6 syntax hilighting with STD.pm

2008-07-29 Thread Moritz Lenz
John M. Dlugosz wrote: > Does that mean there is a tool I can use to apply STD.pm to syntax-check > my examples or ask questions of it? Can you point to that? in the pugs repository: $ cd src/perl6 $ make $ ./tryfile $filename That assumes a perl 5.10 in /usr/local/bin/perl HTH,

Re: Project idea: Perl 6 syntax hilighting with STD.pm

2008-07-29 Thread John M. Dlugosz
Does that mean there is a tool I can use to apply STD.pm to syntax-check my examples or ask questions of it? Can you point to that? --John Moritz Lenz wrote: Since now STD.pm parses most Perl 6 code now, and spits out a parse tree in YAML, a brave soul might want to write a syntax hilighter

Re: Does STD.pm handle this?

2008-04-18 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: sub foo ($x) {...} $x = &foo.new(3); I don't understand your point. Are you thinking of .callwith or postcircumfix<( )> methods on the Code object? No, I think of foo not as a Code object but as a class that does Code. Invoking foo mea

Re: Does STD.pm handle this?

2008-04-18 Thread TSa
HaloO, John M. Dlugosz wrote: But Newname is not declared yet! No, but that is the same as with other sigiled terms. You can also do funny things like ::*Num ::= Complex; The spec doesn't define namespaces to be protected in any way. The above is naturally limited to the compile run, thoug

Re: Does STD.pm handle this?

2008-04-17 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: I guess not. But ::Newname ::= OldTypeName; should work. The type system is a runtime overlay to the value system. This is reflected in the source by putting types and values into different syntactic slots. You cannot mix these! But Newname

Re: Does STD.pm handle this?

2008-04-17 Thread TSa
HaloO, John M. Dlugosz wrote: sub GetType (-->Type) { ... } my ::RunTimeType := GetType; I think my declares value variables which means you need a sigil: my ::RunTimeType $ := GetType; and of course you capture the runtime type of the return value of GetType. If you write that as m

Does STD.pm handle this?

2008-04-17 Thread John M. Dlugosz
sub GetType (-->Type) { ... } my ::RunTimeType := GetType; This is clearly permitted by the prose, that " ::x may be bound to any object that does the Abstraction role, such as a typename, package, module, class, role, grammar, or any other protoobject with .HOW hooks." But the syntax might t

Re: STD.pm

2008-04-05 Thread Larry Wall
On Sat, Apr 05, 2008 at 07:59:36PM -, John M. Dlugosz wrote: : I'm trying to fathom STD.pm. : : Maybe someone can help me trace through this one? : : How is : $obj!privA = 1; : parsed? : : Reading expect_term, it trys , then sees the "$" and commits to the decision, r

Re: STD.pm

2008-04-05 Thread Patrick R. Michaud
On Sat, Apr 05, 2008 at 05:32:27PM -0500, Patrick R. Michaud wrote: > On Sat, Apr 05, 2008 at 07:59:36PM -, John M. Dlugosz wrote: > > I'm trying to fathom STD.pm. > > > > Maybe someone can help me trace through this one? > > > > How is > >

Re: STD.pm

2008-04-05 Thread Patrick R. Michaud
On Sat, Apr 05, 2008 at 07:59:36PM -, John M. Dlugosz wrote: > I'm trying to fathom STD.pm. > > Maybe someone can help me trace through this one? > > How is > $obj!privA = 1; > parsed? > > Reading expect_term, it trys , then sees the > "$"

STD.pm

2008-04-05 Thread John M. Dlugosz
I'm trying to fathom STD.pm. Maybe someone can help me trace through this one? How is $obj!privA = 1; parsed? Reading expect_term, it trys , then sees the "$" and commits to the decision, reads "obj" as a , then checks for a ".", but doesn'

Re: understanding STD.pm

2008-04-05 Thread Ryan Richter
On Sat, Apr 05, 2008 at 09:16:13AM -0400, Ryan Richter wrote: > On Sat, Apr 05, 2008 at 08:22:42AM -, John M. Dlugosz wrote: > > > > OK, you got me. What is the "?" used for? For example, > === $!ws_to }>. > > > > I only see that character as used in this manner (a variable name?), > > nev

Re: understanding STD.pm

2008-04-05 Thread Ryan Richter
On Sat, Apr 05, 2008 at 08:22:42AM -, John M. Dlugosz wrote: > > OK, you got me. What is the "�" used for? For example, === $!ws_to }>. > > I only see that character as used in this manner (a variable name?), > never defined (e.g. as a variable or parameter) anywhere. Something is choking

understanding STD.pm

2008-04-05 Thread John M. Dlugosz
OK, you got me. What is the "¢" used for? For example, . I only see that character as used in this manner (a variable name?), never defined (e.g. as a variable or parameter) anywhere. --John