Re: Test::META

2005-03-26 Thread Randy W. Sims
Christopher H. Laco wrote: Is anyone aware of any existing code (aside from YAML) for grocking META.yml? I've got an itch. Aside from user side software tests, I'm also somewhat addicted to developer tests (Test::Strict, Test::Pod, etc) to make sure I'm not making stupid typo mistakes every tim

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-26 Thread Uri Guttman
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes: LW> : then how would you assign undef to the only element of the LW> array? would this : be needed: LW> : LW> : @a = ( undef ) ;# same as p5? LW> : LW> : vs. LW> : @a = undef ;# like undef @a

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-26 Thread Larry Wall
On Sat, Mar 26, 2005 at 11:57:48PM -0500, Uri Guttman wrote: : > "LW" == Larry Wall <[EMAIL PROTECTED]> writes: : : LW> That being said, in Perl 5, if you say : : LW> @a = undef; : : LW> you don't get an undefined array. I'd like to make undef smart enough : LW> about list conte

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-26 Thread Larry Wall
On Sun, Mar 27, 2005 at 12:04:39AM -0500, Uri Guttman wrote: : > "LW" == Larry Wall <[EMAIL PROTECTED]> writes: : : LW> As I mentioned in my other message, I think we should not assume that : LW> Perl 6 works the same in this regard as Perl 5 does. There needs to be : LW> something we c

Re: return of copies vs references

2005-03-26 Thread Larry Wall
On Thu, Mar 17, 2005 at 07:21:18PM +0100, Thomas Sandlaß wrote: : Larry Wall wrote: : >That's actually weirdly symmetrical with the notion that only subs can : >impose compile-time context on their arguments, while methods always : >have to assume list context because you have to generate the argum

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-26 Thread Uri Guttman
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes: LW> As I mentioned in my other message, I think we should not assume that LW> Perl 6 works the same in this regard as Perl 5 does. There needs to be LW> something we can return that not only means (), but means also means LW> "You're ho

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-26 Thread Uri Guttman
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes: LW> That being said, in Perl 5, if you say LW> @a = undef; LW> you don't get an undefined array. I'd like to make undef smart enough LW> about list contexts that @a actually does end up undefined in Perl 6. LW> That is, in scala

Re: How could import constants from other modules?

2005-03-26 Thread Larry Wall
On Fri, Mar 18, 2005 at 03:38:38PM +0800, song10 wrote: : hi, all : : is there any way to import constants from other modules without : specifying scope everytime? : such like this: : : module A; : use constant { PI => 3.14, VER => 1.1 } : ... : : : : module B; : my $var = A::PI; # this wa

Re: Test::META

2005-03-26 Thread Michael G Schwern
On Sat, Mar 26, 2005 at 10:14:59PM -0500, Christopher H. Laco wrote: > Reading...reading...reading...reading..done. > Still doesn't help with the no_index problem, but it looks interesting. I saw something about no_index on the module-build-general list just recently so maybe next

Re: String Theory

2005-03-26 Thread Larry Wall
On Fri, Mar 25, 2005 at 07:38:10PM -, Chip Salzenberg wrote: : Would this be a good time to ask for explanation for C being : never Unicode, while C is always Unicode, thus leading to an : inability to box a non-Unicode string? As Rod said, "str" is just a way of declaring a byte buffer, for w

Re: S28ish [was: [Pugs] A couple of string interpolation edge cases]

2005-03-26 Thread Larry Wall
On Sat, Mar 26, 2005 at 02:37:24PM -0600, Rod Adams wrote: : Larry Wall wrote: : : >%+ and %- are gone. $0, $1, $2, etc. are all objects that know : >where they .start and .end. (Mind you, those methods return magical : >positions that are Unicode level independent.) : > : How can you have a le

Re: Test::META

2005-03-26 Thread Christopher H. Laco
Christopher H. Laco wrote: Michael G Schwern wrote: On Sat, Mar 26, 2005 at 07:52:45PM -0500, Christopher H. Laco wrote: Well, unless I missed something [likely], to add things after the module is created or updated. Changing requirements, recommends, and build_requires for starters. Sometimes no

Re: Test::META

2005-03-26 Thread Christopher H. Laco
Michael G Schwern wrote: On Sat, Mar 26, 2005 at 07:52:45PM -0500, Christopher H. Laco wrote: Well, unless I missed something [likely], to add things after the module is created or updated. Changing requirements, recommends, and build_requires for starters. Sometimes no_index when new modules are

Re: Test::META

2005-03-26 Thread Michael G Schwern
On Sat, Mar 26, 2005 at 07:52:45PM -0500, Christopher H. Laco wrote: > Well, unless I missed something [likely], to add things after the module > is created or updated. Changing requirements, recommends, and > build_requires for starters. Sometimes no_index when new modules are > added to dists.

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-26 Thread Larry Wall
On Sat, Mar 26, 2005 at 03:13:07AM -0700, Luke Palmer wrote: : Chip Salzenberg writes: : > I'm working on enhancing Perl6::Subs[*] to support more parameter : > traits than just C. I have some questions about : > parameters and traits. (These questions all apply to pure Perl 6, : > which I know I

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-26 Thread Larry Wall
On Sat, Mar 26, 2005 at 03:45:30PM -0500, Chip Salzenberg wrote: : According to Rod Adams: : > Chip Salzenberg wrote: : > >* As far as I can tell, the choice of spelling an array parameter : > > C or C is entirely cosmetic: both @a and : > > $a are capable of holding an Array reference. Is there

Re: Test::META

2005-03-26 Thread Christopher H. Laco
Andy Lester wrote: On Mar 26, 2005, at 6:29 PM, Christopher H. Laco wrote: Is anyone aware of any existing code (aside from YAML) for grocking META.yml? Why are you changing it manually? Well, unless I missed something [likely], to add things after the module is created or updated. Changing requ

Re: [Fwd: Re: Moving the p5 standard library to p6]

2005-03-26 Thread Larry Wall
On Sat, Mar 26, 2005 at 11:31:07AM +0100, Juerd wrote: : Perhaps good administration would be to introduce a generic Deprecated:: : namespace. Module authors can move their own old modules there if they : want, and there can be Deprecated::P5 for stuff like dbmopen, : Deprecated::Perl5::File::Find.

Re: Test::META

2005-03-26 Thread Andy Lester
On Mar 26, 2005, at 6:29 PM, Christopher H. Laco wrote: Is anyone aware of any existing code (aside from YAML) for grocking META.yml? Why are you changing it manually? -- Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance

Test::META

2005-03-26 Thread Christopher H. Laco
Is anyone aware of any existing code (aside from YAML) for grocking META.yml? I've got an itch. Aside from user side software tests, I'm also somewhat addicted to developer tests (Test::Strict, Test::Pod, etc) to make sure I'm not making stupid typo mistakes every time I upload a new version of

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-26 Thread Chip Salzenberg
According to Rod Adams: > Chip Salzenberg wrote: > >* As far as I can tell, the choice of spelling an array parameter > > C or C is entirely cosmetic: both @a and > > $a are capable of holding an Array reference. Is there actually > > a difference, e.g. in how they handle an undefined value? >

Perl5->P6 convertor as refactoring tool

2005-03-26 Thread David Storrs
On Sat, Mar 26, 2005 at 10:13:54AM -0800, Larry Wall wrote: > The thing is that these MAD props are hung on whatever node is handy > at the time, [...]. That's the main reason for the first pass of > translator, to reattach the madprops at a more appropriate place in > the tree. > [...] > But wit

Re: S28ish [was: [Pugs] A couple of string interpolation edge cases]

2005-03-26 Thread Aaron Sherman
On Sat, 2005-03-26 at 12:48 -0800, Larry Wall wrote: > On Sat, Mar 26, 2005 at 09:59:10AM -0500, Aaron Sherman wrote: > Well, there is a process object, but it actually exists inside the > operating system. It's a little silly to force people to name their > own process all the time. I think we

Re: S28ish [was: [Pugs] A couple of string interpolation edge cases]

2005-03-26 Thread Larry Wall
On Sat, Mar 26, 2005 at 09:59:10AM -0500, Aaron Sherman wrote: : On Sat, 2005-03-26 at 00:27 -0800, Larry Wall wrote: : : > $$ is now $*PID. ($$foo is now unambuous.) : > : > $0 is gone in favor of $*PROGRAM_NAME or some such. : : You know, Java did one thing in this respect that I liked, and m

Re: S28ish [was: [Pugs] A couple of string interpolation edge cases]

2005-03-26 Thread Rod Adams
Larry Wall wrote: %+ and %- are gone. $0, $1, $2, etc. are all objects that know where they .start and .end. (Mind you, those methods return magical positions that are Unicode level independent.) How can you have a level independent position? The matching itself happens at a specified level. (No

Re: S28ish [was: [Pugs] A couple of string interpolation edge cases]

2005-03-26 Thread Larry Wall
On Sat, Mar 26, 2005 at 03:37:41AM -0700, Luke Palmer wrote: : > $! will be a legal variable name. $/ is going away, : : By which you mean that $/ is turning into a special $0. I'd say that $0 is a specialization of $/, but yes, basically, they both represent the current match result, albeit di

Re: String Theory

2005-03-26 Thread Rod Adams
Chip Salzenberg wrote: Would this be a good time to ask for explanation for C being never Unicode, while C is always Unicode, thus leading to an inability to box a non-Unicode string? That's not quite it. C is a forced Unicode level of "Bytes", with encoding "raw", which happens to not have any

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-26 Thread Rod Adams
Chip Salzenberg wrote: * As far as I can tell, the choice of spelling an array parameter C or C is entirely cosmetic: both @a and $a are capable of holding an Array reference. Is there actually a difference, e.g. in how they handle an undefined value? Uhm... It was my impression that one

Re: PPI and the Perl 5 to Perl 6 converter?

2005-03-26 Thread Larry Wall
On Sat, Mar 26, 2005 at 06:49:58PM +1100, Adam Kennedy wrote: : >Er, I'm not sure you will want to--I'm using PPI's evil twin brother, : >"PPD" (the actual Perl parser). I've just modified it so it doesn't : >forget anything I want it to remember. (As you know, the standard : >parser throws away

Re: pugscc --runparrot -e "'Hello, Parrot'.say"

2005-03-26 Thread Autrijus Tang
On Sat, Mar 26, 2005 at 04:44:52PM +0100, Leopold Toetsch wrote: > I had a look at the generated mandel.imc. Remarkable, how compact > Parrot.hs is and what it already does. Thanks. One of my remaining large TODOs before Pugs 6.2.0 is to recode the evaluators in Template Haskell as Compile/Haskel

tcl parser.

2005-03-26 Thread William Coleda
The tcl parser (lib/parse.imc) has been removed and migrated to a method in a PMC. (Anyone looking for a C task could go through and cleanup the parse method in tclparser.pmc - it's basically copied directly from the assembler style with many gotos, no loops, etc. If you make changes, just make

Re: pugscc --runparrot -e "'Hello, Parrot'.say"

2005-03-26 Thread Leopold Toetsch
Autrijus Tang <[EMAIL PROTECTED]> wrote: > As of Pugs revision 1024, this works: > % pugscc --runparrot -e "'Hello, Parrot'.say" I had a look at the generated mandel.imc. Remarkable, how compact Parrot.hs is and what it already does. Some remarks: 1) s__z = s__t # mandel.imc:149 This

Re: S28ish [was: [Pugs] A couple of string interpolation edge cases]

2005-03-26 Thread Aaron Sherman
On Sat, 2005-03-26 at 00:27 -0800, Larry Wall wrote: > $$ is now $*PID. ($$foo is now unambuous.) > > $0 is gone in favor of $*PROGRAM_NAME or some such. You know, Java did one thing in this respect that I liked, and managed to do it in a way that I couldn't stand. The idea of program as object

Re: [perl #34576] [PATCH] more pmc2c2.pl work

2005-03-26 Thread Matt Diephouse
chromatic <[EMAIL PROTECTED]> wrote: > Is there a specific reason these are comments and not POD? Because there's a large amount of POD at the beginning of the file that targets a different audience. In this instance, I've taken POD to be documentation for PMC writers and comments to be for anyon

Re: PPI and the Perl 5 to Perl 6 converter?

2005-03-26 Thread Adam Kennedy
Er, I'm not sure you will want to--I'm using PPI's evil twin brother, "PPD" (the actual Perl parser). I've just modified it so it doesn't forget anything I want it to remember. (As you know, the standard parser throws away gobs of useful information, everything from whitespace and comments to pru

Re: S28ish [was: [Pugs] A couple of string interpolation edge cases]

2005-03-26 Thread Luke Palmer
Larry Wall creates Sish28: > On Sat, Mar 26, 2005 at 02:11:29PM +0800, Autrijus Tang wrote: > : On Fri, Mar 25, 2005 at 10:03:45PM -0800, Larry Wall wrote: > : > Hmm, well, if it got that far. Given strict being on by default, > : > this particular example should probably just die on the fact that

Re: [Fwd: Re: Moving the p5 standard library to p6]

2005-03-26 Thread Juerd
chromatic skribis 2005-03-26 2:13 (-0800): > No. Please, no. :) > As I see it, Perl 6 has a chance to start over with a very small set of > core libraries -- perhaps embarrassingly small -- so as not to entomb > our current, potentially-blepharitic guesses at good Perl 6 design > principles for

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-26 Thread Luke Palmer
Chip Salzenberg writes: > I'm working on enhancing Perl6::Subs[*] to support more parameter > traits than just C. I have some questions about > parameters and traits. (These questions all apply to pure Perl 6, > which I know I won't be able to translate completely, but I want to > know which targ

[Fwd: Re: Moving the p5 standard library to p6]

2005-03-26 Thread chromatic
Forwarded... On Sat, 2005-03-26 at 12:05 +1100, Andrew Savige wrote: > Please note that I am not an expert on any of this, I was just > wondering whether we are going to clean up the old p5 library > interfaces as part of the move to p6. Or must we support the > old p5 library interfaces for back

Re: [perl #34576] [PATCH] more pmc2c2.pl work

2005-03-26 Thread chromatic
On Fri, 2005-03-25 at 20:49 -0800, Matt Diephouse wrote: > This patch (a) adds comments before each subroutine describing its > parameters, its return values, and what it does, Is there a specific reason these are comments and not POD? -- c

Re: String Theory

2005-03-26 Thread Chip Salzenberg
Would this be a good time to ask for explanation for C being never Unicode, while C is always Unicode, thus leading to an inability to box a non-Unicode string? And might I also ask why in Perl 6 (if not Parrot) there seems to be no type support for strings with known encodings which are not subse

Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-26 Thread Chip Salzenberg
I'm working on enhancing Perl6::Subs[*] to support more parameter traits than just C. I have some questions about parameters and traits. (These questions all apply to pure Perl 6, which I know I won't be able to translate completely, but I want to know which target I'm missing.) * Given a param

Re: [Pugs] A couple of string interpolation edge cases

2005-03-26 Thread Andrew Savige
--- Luke Palmer wrote: > Andrew Savige writes: > > I stumbled across a couple of interesting quote interpolation > > edge cases: Just toppled over the edge of another two sand traps. Case 3 -- # cat q7.p6 my $x = '\\x'; print "x='$x'\n"; # perl -w q7.p6 x='\x' # pugs q7.p6 x='\\x' Case 4

S28ish [was: [Pugs] A couple of string interpolation edge cases]

2005-03-26 Thread Larry Wall
On Sat, Mar 26, 2005 at 02:11:29PM +0800, Autrijus Tang wrote: : On Fri, Mar 25, 2005 at 10:03:45PM -0800, Larry Wall wrote: : > Hmm, well, if it got that far. Given strict being on by default, : > this particular example should probably just die on the fact that $" : > isn't declared, since there