Re: Truely temporary variables

2005-04-15 Thread Larry Wall
On Fri, Apr 15, 2005 at 06:04:32PM +0200, Juerd wrote: : No, Ucfirst it can't be, I think. And ALLCAPS is ugly. @ is taken (and : ugly). Suggestions? Maybe we could define an "ok" operator that suppresses only the *first* warning produced by its argument(s). Then if you get multiple warnings, you

Re: Truely temporary variables

2005-04-15 Thread Larry Wall
On Fri, Apr 15, 2005 at 11:45:16AM -0400, Aaron Sherman wrote: : Among the various ways of declaring variables, will Perl 6 have a way to : say, "this variable is highly temporary, and may be re-declared within : the same scope, or in a nested scope without concern"? I often find : myself doing: :

Re: Macros [was: Whither "use English"?]

2005-04-15 Thread Larry Wall
On Fri, Apr 15, 2005 at 12:45:14PM +1200, Sam Vilain wrote: : Larry Wall wrote: : > Well, only if you stick to a standard dialect. As soon as you start : > defining your own macros, it gets a little trickier. : : Interesting, I hadn't considered that. : : Having a quick browse thro

Re: $*CWD instead of chdir() and cwd()

2005-04-15 Thread Larry Wall
On Fri, Apr 15, 2005 at 03:11:59AM -0700, Michael G Schwern wrote: : Error handling is simple, a failed chdir returns undef and sets errno. : : $CWD = $dir err die "Can't chdir to $dir: $!"; Offhand, I guess my main semantic problem with it is that if a chdir fails, you aren't in an undefin

Re: subscripts are.... objects?

2005-04-14 Thread Larry Wall
On Thu, Apr 14, 2005 at 07:29:43PM +0200, Juerd wrote: : So, what's the important downside of all this? The fact that smartmatching a list doesn't slice, but is defined to be array equality with smartmatch of each element in order: if @array ~~ (1,2,3,"many") { say "array can count" } Larry

Re: Hyper operator corner case?

2005-04-14 Thread Larry Wall
On Thu, Apr 14, 2005 at 11:08:21AM -0600, John Williams wrote: : Good point. Another one is: how does the meta_operator determine the : "identity value" for user-defined operators? : : (1,2,3,4,5) >>my_infix_op<< (3,2,4) : : Maybe we should say that the excess length is simply copied unchang

Re: subscripts are.... objects?

2005-04-14 Thread Larry Wall
On Tue, Apr 12, 2005 at 06:58:29PM +0300, Yuval Kogman wrote: : : We blitzed a discussion on #perl 3 minutes ago, reaching the : conclusion that negated subscripts are cool. : : So i was thinking: : : subscripts are objects. I'm all in favor of powerful constructs, but we need to be *really* ca

Re: Whither "use English"?

2005-04-14 Thread Larry Wall
On Thu, Apr 14, 2005 at 01:25:15PM +1200, Sam Vilain wrote: (B: Juerd wrote: (B: >>According to Wikipedia there are around 400 million native English (B: >>speakers and 600 million people who have English as a second language. (B: >>Should the remaining ~5.5 billion humans be exluded from wri

Re: trim() and words() functions?

2005-04-12 Thread Larry Wall
On Tue, Apr 12, 2005 at 09:52:38PM -0500, Rod Adams wrote: : gcomnz wrote: : : >Hey all, not sure if I'm just missing some obvious source of : >information, but I used trim() as a function in a cookbook example, : >then realized that it's not even in S29... : > : >There is a brief mention of trim(

Re: Question about list context for String.chars

2005-04-12 Thread Larry Wall
On Mon, Apr 11, 2005 at 01:08:04PM -0700, gcomnz wrote: : I read "followed by 0 or more combining characters" to mean that it is : smart enough to combine the vowels in Arabic and other syllabic : alphabets that use special conjuncts. However I'm also not exactly : sure if that's even reasonably po

Re: Slicing conflict

2005-04-12 Thread Larry Wall
On Tue, Apr 12, 2005 at 12:08:43AM -0700, Brent 'Dax' Royal-Gordon wrote: : I was thinking about this today, actually, because my CS textbook was : talking about multidimensional arrays. If we make an infinite index : mean "slice until you can slice no more", then we can possibly have a : C> which

Re: Blocks, continuations and eval()

2005-04-12 Thread Larry Wall
On Tue, Apr 12, 2005 at 11:36:02AM +0100, Piers Cawley wrote: : wolverian <[EMAIL PROTECTED]> writes: : : > On Fri, Apr 08, 2005 at 12:18:45PM -0400, MrJoltCola wrote: : >> I cannot say how much Perl6 will expose to the high level language. : > : > That is what I'm wondering about. I'm sorry I was

Re: Question about list context for String.chars

2005-04-12 Thread Larry Wall
On Mon, Apr 11, 2005 at 03:53:32PM -0400, Mark Reed wrote: (B: I think that, in general, at the level of Perl code, 1 $B!H(Bcharacter$B!I(B should be (B: one code point, and any higher-level support for combining and splitting (B: should be outside the core, in Unicode::Whatever. (B (BI t

Re: identity tests and comparing two references

2005-04-06 Thread Larry Wall
On Wed, Apr 06, 2005 at 02:43:55PM -0500, Patrick R. Michaud wrote: : On Wed, Apr 06, 2005, Larry Wall wrote: : > I think it's time to break out : > the colon again and use something like: : > : > &infix:<+>:(Complex, Complex); : > : > or : > : >

Re: identity tests and comparing two references

2005-04-06 Thread Larry Wall
On Wed, Apr 06, 2005 at 08:24:23PM +0200, Juerd wrote: : Larry Wall skribis 2005-04-06 11:10 (-0700): : > $$ref follow the ref list to the actual object. : : my $foo; : my $bar = \$foo; : my $quux = \$bar; : my $xyzzy = \$quux; : : How then, with only $xyzzy, do you

Re: identity tests and comparing two references

2005-04-06 Thread Larry Wall
On Wed, Apr 06, 2005 at 07:22:48PM +0200, Thomas Sandlaß wrote: : HaloO Larry, : : you wrote: : >for ordinary functions. If it gets really popular people might : >even start writing: : > : >sub foo :(Str,Int) {...} : : I like it, but that could mean it will not become popular :)) : And this

Re: identity tests and comparing two references

2005-04-06 Thread Larry Wall
On Mon, Apr 04, 2005 at 06:50:11PM +0200, Thomas Sandlaß wrote: : Juerd wrote: : >And will Perl 6 reference values rather than their containers, that is: : >will \$foo differ when $foo gets a new value, just as in Python id(foo) : >changes after foo += 1? : : Depends on the definition of the seman

Re: identity tests and comparing two references

2005-04-06 Thread Larry Wall
On Wed, Apr 06, 2005 at 10:07:33AM -0600, Luke Palmer wrote: : Thomas Sandlaß writes: : > Larry Wall wrote: : > >Yes. It should complain that = is not a valid type signature. : > >Any &foo (or &foo:<...>) followed by <...> should be parsed as a single : >

Re: identity tests and comparing two references

2005-04-06 Thread Larry Wall
On Wed, Apr 06, 2005 at 04:31:08PM +0200, Thomas Sandlaß wrote: : Larry Wall wrote: : >Yes. It should complain that = is not a valid type signature. : >Any &foo (or &foo:<...>) followed by <...> should be parsed as a single : >term selecting the function that MMD

Re: identity tests and comparing two references

2005-04-05 Thread Larry Wall
On Tue, Apr 05, 2005 at 06:38:43PM +0200, Thomas Sandlaß wrote: : Ups, a missing : warps this to a completly different meaning! : Comparing a coderef &infix with the comparison operator <=> : to the word list 'Scalar of Ref of Ref of Int,Int'. : : I tried to ask what &infix:<=> : does. This is the

Re: Pugs Bug

2005-04-05 Thread Larry Wall
On Tue, Apr 05, 2005 at 07:31:40PM +0300, wolverian wrote: : Does [EMAIL PROTECTED] DWIM, by the way? I'm not sure about the precedence. That depends on whether you mean ([EMAIL PROTECTED]).words or ~(@array.words) It happens to mean the latter. A . binds tighter than a symbolic unary

Re: Pugs Bug

2005-04-05 Thread Larry Wall
On Tue, Apr 05, 2005 at 09:36:18AM +0300, wolverian wrote: : (Replying to p6l instead of p6c as requested.) : : On Mon, Apr 04, 2005 at 10:39:16AM -0700, Larry Wall wrote: : > (Now that builtins are just functions out in * space, we can probably : > afford to throw a few more conve

Re: [S29] pick on other things than junctions

2005-04-05 Thread Larry Wall
On Tue, Apr 05, 2005 at 02:38:05PM +0200, Ingo Blechschmidt wrote: : Hi, : : Trey Harris wrote: : > In a message dated Mon, 4 Apr 2005, Ingo Blechschmidt writes: : >> What does pick return on hashes? Does it return a random value or a : >> random pair? (I suppose returning a pair is more useful.)

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

2005-04-05 Thread Larry Wall
On Tue, Apr 05, 2005 at 04:00:09PM +0200, Thomas Sandlaß wrote: : Larry Wall wrote: : >Roles cannot be derived from, so they're always final in that sense. : >We should probably consider them closed by default as well, or at least : >closed after first use. If a role specifies

Re: Second use of flattening

2005-04-04 Thread Larry Wall
On Mon, Apr 04, 2005 at 10:34:13PM -0400, Andrew Rodland wrote: : On Monday 04 April 2005 06:34 pm, Juerd wrote: : > Terrence Brannon skribis 2005-04-04 18:45 (+): : > > So, to avoid confusion with the common understanding of flattening in : > > Perl, perhaps it should be called spreading or di

Re: is "flattening" the word to use when describing lazy lists?

2005-04-04 Thread Larry Wall
On Mon, Apr 04, 2005 at 05:40:10PM +, Terrence Brannon wrote: : : A Perl 5 user thinks of flattening a data structure as taking : something which is nested and "linearizing" it. : : FOR EXAMPLE: : : use Data::Hash::Flatten; : : # NESTED DATA : my $a = { bill => { '5/27/96' => { 'a.dat'

Re: :=: (OT)

2005-04-04 Thread Larry Wall
On Mon, Apr 04, 2005 at 03:55:23PM -0400, Aaron Sherman wrote: : but if you use vim or emacs inside a terminal, you'll want to make sure : it's in iso-latin-1 mode (e.g. in gnome-terminal, you have to use the : menu: "Terminal->Set Character Encoding") If you going to that trouble, at least try yo

Re: New S29 draft up

2005-04-02 Thread Larry Wall
On Sat, Apr 02, 2005 at 11:27:09PM +0300, wolverian wrote: : On Mon, Mar 21, 2005 at 03:31:53PM +0100, Juerd wrote: : > In fact, won't things be much easier if shift and pop workend on strings : > as well as on arrays? Now that we have multis, this should be easy to : > do. : : How about defining

Re: use less in perl6?

2005-04-02 Thread Larry Wall
On Wed, Mar 30, 2005 at 10:20:28AM +0200, Yuval Kogman wrote: : How should this stuff be expressed? 'use less' is cute, but i don't : think it really gets there. It's mostly there as a placeholder for all the "true pragmas" that can be ignored if you don't understand them, an idea I originally sto

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

2005-04-02 Thread Larry Wall
On Thu, Mar 31, 2005 at 03:03:09PM +0200, Thomas Sandlaß wrote: : Larry Wall wrote: : >On Sat, Mar 26, 2005 at 02:37:24PM -0600, Rod Adams wrote: : >: How can you have a level independent position? : > : >By not confusing positions with numbers. They're just pointers into : >

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

2005-04-02 Thread Larry Wall
On Thu, Mar 31, 2005 at 01:11:37PM -0500, Aaron Sherman wrote: : If you declare a variable to be of a type (let's even say a class to be : specific), then you have hinted to the compiler as to the nature of that : variable, but nothing is certain. : : That is to say that the compiler cannot: : :

Re: Documentary annotations: $what doc

2005-04-02 Thread Larry Wall
On Sat, Apr 02, 2005 at 03:19:33PM +0800, Sam Vilain wrote: : Luke Palmer wrote: : >>Supposing I had a "doc" trait, could I say: : >> sub f2c (Num $temp doc) : >> doc : >> {...} : >>Or would I be forced to spell it doc('stuff') ? : >Well, first you need an `is` somewhere in there. And

Re: identity tests and comparing two references

2005-04-02 Thread Larry Wall
On Sat, Apr 02, 2005 at 11:22:43AM +0200, Leopold Toetsch wrote: : Larry Wall <[EMAIL PROTECTED]> wrote: : >: On Thu, 2005-03-31 at 23:46 -0800, Darren Duncan wrote: : >: : >: In P6, an object is a data-type. It's not a reference, and any member : >: payload is attached d

Re: identity tests and comparing two references

2005-04-02 Thread Larry Wall
On Sat, Apr 02, 2005 at 11:06:01AM +0200, Juerd wrote: : Is your view of the world like Python or like Perl 5? Them's fightin' words. :-) : Values have no identity in Perl 5. That's slightly not true, insofar as Perl 5 distinguishes hash keys by value (albeit filtered through stringification).

Re: Definitive and Complete Perl 6 Operator List

2005-04-02 Thread Larry Wall
On Sat, Apr 02, 2005 at 01:49:24AM -0800, Brent 'Dax' Royal-Gordon wrote: : I've included assignment forms of all operators in the exponentiation, : multiplicative, additive, junctive, and tight logical levels; this may : be overkill or underkill. I've not included hyper forms of these : operators,

Re: identity tests and comparing two references

2005-04-01 Thread Larry Wall
On Fri, Apr 01, 2005 at 08:39:52AM -0700, Luke Palmer wrote: : I'm pretty sure that =:= does what you want. If you have two scalar : references, you might have to spell it like this: : : $$x =:= $$y Unnecessary, I think. I want $x =:= @y to tell me whether the reference in $x is to th

Re: identity tests and comparing two references

2005-04-01 Thread Larry Wall
: On Thu, 2005-03-31 at 23:46 -0800, Darren Duncan wrote: On Fri, Apr 01, 2005 at 08:04:22AM -0500, Aaron Sherman wrote: : : > What I want to be able to do is compare two references to see if they : > point to the same thing, in this case an object, but in other cases : > perhaps some other type

Re: identity tests and comparing two references

2005-04-01 Thread Larry Wall
On Thu, Mar 31, 2005 at 11:46:22PM -0800, Darren Duncan wrote: : So, what is the operator for reference comparison? The =:= operator is almost certainly what you want here. Larry

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

2005-03-31 Thread Larry Wall
On Thu, Mar 31, 2005 at 06:35:06PM +0200, Thomas Sandlaß wrote: : Is typing optional in the sense that it is no syntax error but : otherwise ignored? To me this is pain but no gain :( Well, you guys keep ignoring the answer. Let me put it a bit more mathematically. The information in my X $

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

2005-03-30 Thread Larry Wall
On Wed, Mar 30, 2005 at 12:05:12PM +0200, Thomas Sandlaß wrote: : If I understand you correctly the use statement is more like a : linker/loader directive than a compile time interface include? That is up to the module being used. "use" is a linker, but it's only required to link enough informati

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

2005-03-30 Thread Larry Wall
On Wed, Mar 30, 2005 at 09:40:26AM -0700, Luke Palmer wrote: : There _is_ a way to do it, actually, but we need to really screw around : with what kinds of things are inferred. In the case: : : my $a; : $a.m(1); : : We assign the type "objects with an 'm' method that can take a single :

Re: .method == $self.method or $_.method?

2005-03-29 Thread Larry Wall
On Tue, Mar 29, 2005 at 06:38:31PM +0200, Juerd wrote: (B: Luke Palmer skribis 2005-03-29 6:14 (-0700): (B: > method iterate () { (B: > for (@.objs) { (B: > .process($_); # oops (B: > } (B: > } (B: (B: There is an alarming similarity with (B: (B:

Re: Units on numbers [was Re: S28ish]

2005-03-28 Thread Larry Wall
On Mon, Mar 28, 2005 at 01:30:14PM -0700, Craig DeForest wrote: : Yow -- units would be extra cool for perl6: I know of no other language that : has units support built in. It would go a long way toward making perl6 the : language of choice for students in the physical sciences... Well, yes. I

Re: Units on numbers [was Re: S28ish]

2005-03-28 Thread Larry Wall
On Mon, Mar 28, 2005 at 03:40:14PM -0500, Aaron Sherman wrote: : Now you can ask for whatever you like: : : say "We have {â.new $money}â" : : Though you might have some snazzy way of saying that. Just by the by, that's illegal syntax. Methods with arguments require parens. You could, how

Re: String Theory

2005-03-28 Thread Larry Wall
On Mon, Mar 28, 2005 at 11:53:07AM -0500, Chip Salzenberg wrote: : According to Larry Wall: : > On Fri, Mar 25, 2005 at 07:38:10PM -, Chip Salzenberg wrote: : > : And might I also ask why in Perl 6 (if not Parrot) there seems to be : > : no type support for strings with known encodi

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

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. T

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 t

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: 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 ca

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: [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: 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 l

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: 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

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

Re: Moving the p5 standard library to p6

2005-03-25 Thread Larry Wall
On Sat, Mar 26, 2005 at 12:05:06PM +1100, Andrew Savige wrote: : I noticed the Pugs folks have started porting File::Spec and : other modules to Pugs, which leads me to ask this question. : I've also taken a look at Rod Adams S29. : : There a quite a few p5 standard libraries with crusty old user

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

2005-03-25 Thread Larry Wall
On Fri, Mar 25, 2005 at 10:27:53PM +1100, Adam Kennedy wrote: : Also, I saw another mention recently (possibly on TPF request for : donations) about the Perl 5 to Perl 6 converter, and it being 40% : completed? ... Larry? Well, by one reckoning it's 0% done. At the moment I'm just working on a

Re: Precedence of "where" ("of", "is", "will")?

2005-03-24 Thread Larry Wall
On Wed, Mar 23, 2005 at 06:58:51PM +0100, Thomas Sandlaß wrote: : Larry Wall wrote: : >my @array of Int; : > : >is really short for : > : >my @array is Array of Int; : : How does 'is' relate to 'does'? I mean is the above @array : ready for operation?

Re: Slices

2005-03-24 Thread Larry Wall
On Tue, Mar 22, 2005 at 05:18:44PM +0100, Thomas Sandlaß wrote: : Rod Adams wrote: : > multi sub postcircumflex::<[ ]>(MyArray $obj : [EMAIL PROTECTED]) is rw {...} : > : >but I'll wait for S14 before speculating further. : : Will that ever be written? And if yes, will it be like S13 which : is b

Re: Currying positionals

2005-03-24 Thread Larry Wall
On Thu, Mar 24, 2005 at 03:09:37PM -0700, Luke Palmer wrote: : Larry Wall writes: : > Step A: For each positional parameter, if the next supplied argument is: : > : > 1) a non-pair : > 2) a pair, and this parameter is explicitly declared Pair, or : > 3) a hash, and th

Re: Currying positionals

2005-03-24 Thread Larry Wall
On Thu, Mar 24, 2005 at 12:58:32PM -0800, Larry Wall wrote: : Note, the adverbial :{...} is defined as a named binding to the first : *& parameter (or first *$ parameter if there isn't a slurpy *&), so : it's already bound by Step C, even if it occurred later syntactically. Hmm

Re: Currying positionals

2005-03-24 Thread Larry Wall
On Wed, Mar 23, 2005 at 11:08:17PM +0200, Yuval Kogman wrote: : On Wed, Mar 23, 2005 at 11:53:06 -0800, Larry Wall wrote: : > This seems a little backwards--I think all positionals should be bound : > before you start binding named pairs, if currying is to be consistent with : > "ord

Re: Currying positionals

2005-03-23 Thread Larry Wall
On Wed, Mar 23, 2005 at 08:24:48PM +0200, Yuval Kogman wrote: : On Wed, Mar 23, 2005 at 17:43:52 +0200, Yuval Kogman wrote: : > Hola... I've spend some time these last few days slowly getting : > currying to work in pugs. : : It should also be mentioned that I made magical $?SUB et al unbind : the

Re: Currying positionals

2005-03-23 Thread Larry Wall
On Wed, Mar 23, 2005 at 05:43:52PM +0200, Yuval Kogman wrote: : The algorithmic approach to binding some params: : : bind invocants : : bind named parameters, and keep leftover pairs for %_ : : treat nonpairs as positionals, and bind them sequentially. Left : over nonpair

Re: New S29 draft up

2005-03-23 Thread Larry Wall
On Wed, Mar 23, 2005 at 07:33:43PM +0100, Thomas Sandlaß wrote: : Larry Wall wrote: : >So we should probably : >have a generalized radix_to_dec($radix,$input) function out there : >somewhere instead. : : Why not shift it onto the type system: : : my Int $i = $input as Str[$radix] as In

Re: Questions regarding s/// and subst?

2005-03-23 Thread Larry Wall
On Wed, Mar 23, 2005 at 11:14:16AM -0500, Stevan Little wrote: : Is subst an object/type? : Or is it a method of the Str object? I suspect it's just a method, and the ~~ binding of s/// is merely syntactic sugar for the method call. : If it is an object ... : : Does s/// produce a su

Re: New S29 draft up

2005-03-23 Thread Larry Wall
On Wed, Mar 23, 2005 at 03:28:31PM +, Peter Haworth wrote: : On Mon, 21 Mar 2005 08:41:27 -0800, Larry Wall wrote: : > Okay, I've come around to liking it, but I think we have to say that : > 0x, 0d, 0o, 0b, and whatever else we come up with are just setting : > the default radi

Re: nothing

2005-03-21 Thread Larry Wall
On Sun, Mar 20, 2005 at 09:08:08PM -0600, Rod Adams wrote: : Does Perl need a no-op function? : : With the addition of "no bare literals", it makes constructs like : : 1 while some_func(); : : an error. Well, it's not a bareword--it's just potentially a useless use of the value in a void contex

Re: chr and ord

2005-03-21 Thread Larry Wall
On Sun, Mar 20, 2005 at 10:33:04PM -0600, Rod Adams wrote: : I'm thinking C and C should be strictly Code Point level : activities, but I'm not sure. Alternately, since Num implies arbitrary precision, we *could* define a value that can hold as many code points as you like, mod 2**32 or some such

Re: Perl6 and Duff's Device

2005-03-21 Thread Larry Wall
On Sun, Mar 20, 2005 at 05:27:56PM -0700, Luke Palmer wrote: : I believe Perl 6 hasn't changed its policy on labels, so you should be : able to write that in Perl 6. But your behavior might be undefined. : It's weird to jump into the middle of a loop. We may only allow you to : jump outwards from

Re: New S29 draft up

2005-03-21 Thread Larry Wall
On Sun, Mar 20, 2005 at 08:54:54PM -0600, Rod Adams wrote: Okay, I've come around to liking it, but I think we have to say that 0x, 0d, 0o, 0b, and whatever else we come up with are just setting the default radix. If a string comes in with an explicit 0x, 0d, 0o, or 0b, we believe that in preferen

Re: String Theory

2005-03-19 Thread Larry Wall
On Sat, Mar 19, 2005 at 05:07:49PM -0600, Rod Adams wrote: : I propose that we make a few decisions about strings in Perl. I've read : all the synopses, several list threads on the topic, and a few web : guides to Unicode. I've also thought a lot about how to cleanly define : all the string related

Re: Precedence of "where" ("of", "is", "will")?

2005-03-19 Thread Larry Wall
On Fri, Mar 18, 2005 at 09:36:49PM -0500, Chip Salzenberg wrote: : Nobody on #perl6 today could answer this one. Is: : Str | Int where { $_ } : the same as: : (Str | Int) where { $_ } : or: : Str | (Int where { $_ }) : ? "where" binds looser than |, but it's a member of a select group

Re: .method == $self.method or $_.method?

2005-03-18 Thread Larry Wall
On Thu, Mar 17, 2005 at 03:59:43PM -0800, Michael G Schwern wrote: : What it doesn't solve is the $.method vs .method issue. They look similar : but one works on the invocant and one works on $_. Still a trap. Yes, and that's probably the killer of the "oc" idea. So much for Sleep Brain, heh, h

Re: New S29 draft up

2005-03-18 Thread Larry Wall
On Fri, Mar 18, 2005 at 12:00:32PM -0500, John Macdonald wrote: : Generally when I do this I am not only deleting the character : from the string, but also moving it to another scaler to use; : so substr isn't a simple replacement because you'd have to : use it twice. Well, not lately. There's

Re: New S29 draft up

2005-03-18 Thread Larry Wall
On Fri, Mar 18, 2005 at 08:21:07AM -0500, John Siracusa wrote: : On 3/18/05 12:18 AM, Larry Wall wrote: : > Autochomping is one of the motivations for switching from "while" to : > "for" for the normal line input method, since "while" might think a : > blan

Re: Bitops (was Re: New S29 draft up)

2005-03-18 Thread Larry Wall
On Fri, Mar 18, 2005 at 05:01:50AM -0600, Rod Adams wrote: : I'll try to come up with something decent, if no one beats me to it. : Sadly, the C style hex2int, oct2int might be the least confusing, but : heinously ugly. Yes, though there are two difficulties right there in the names: hardwiring

Re: eval (was Re: New S29 draft up)

2005-03-18 Thread Larry Wall
On Fri, Mar 18, 2005 at 10:28:18AM -0500, Aaron Sherman wrote: : Thus: : : eval read :file("foo"); : : There you have it. The problem being that it will now report errors in some random temporary string rather than at some line number in a file. Not good. Orthogonality strikes again. Lar

Re: New S29 draft up

2005-03-17 Thread Larry Wall
On Thu, Mar 17, 2005 at 06:11:09PM -0500, Aaron Sherman wrote: : =head2 Obsolete : : =item chop : : Chop removes the last character from a string. Is that no longer useful, : or has chomp simply replaced its most common usage? I expect chop still has its uses. Also, since $/ is

Re: New S29 draft up

2005-03-17 Thread Larry Wall
On Thu, Mar 17, 2005 at 10:31:07PM -0600, Rod Adams wrote: : Aaron Sherman wrote: : >>Methods on numeric values (should be defined as pseudo-methods on : >>unboxed numbers): : >> : >> chr : >> hex : >>oct : >> : >> : > : >Sigh... well, now I know what Ctrl-Return does in Evolution :-

Re: New S29 draft up

2005-03-17 Thread Larry Wall
On Thu, Mar 17, 2005 at 11:02:47AM +0100, Juerd wrote: : Rod Adams skribis 2005-03-16 23:16 (-0600): : > Doesn't C go until the longest input is exhausted, returning undef : > at the end of the shorter ones? That's what has been specified. : No, as that'd break the most common idiom it introduce

Re: .method == $self.method or $_.method?

2005-03-17 Thread Larry Wall
On Thu, Mar 17, 2005 at 05:52:15PM +0100, Michele Dondi wrote: : On Thu, 17 Mar 2005, Larry Wall wrote: : : >really short alias for $self. Suppose we pick "o" for that, short : >for "object". Then we get self calls of the form: : > : > o.frobme(...) : : How

Re: .method == $self.method or $_.method?

2005-03-17 Thread Larry Wall
On Thu, Mar 17, 2005 at 08:41:26AM -0800, Larry Wall wrote: : Then we get self calls of the form: : : o.frobme(...) Sleep Brain would also like to point out that this lets you use o standalone when you want to pass the current object as an ordinary argument to some other class. Likewise for

Re: .method == $self.method or $_.method?

2005-03-17 Thread Larry Wall
I've been thinking about this in my sleep, and at the moment I think I'd rather keep .foo meaning $_.foo, but break the automatic binding of the invocant to $_. Instead of that, I'd like to see a really, really short alias for $self. Suppose we pick "o" for that, short for "object". Then we get

Re: return of copies vs references

2005-03-17 Thread Larry Wall
On Thu, Mar 17, 2005 at 02:06:46AM -0700, Luke Palmer wrote: : I'll just point out, the rest of this message, with all the autocopy : complexity (according to /some/ people), uses this assumption. It all : happily goes away if $self.:bar returns a list if @:bar is declared. : And I can't, off hand

Re: Symbol table lookup and hash

2005-03-17 Thread Larry Wall
On Thu, Mar 17, 2005 at 10:33:42AM +0200, Gaal Yahas wrote: : I'm looking to understand symbol tables and the symtable hash better. : : What's the motivation for ::() syntax? Is it mainly for binding aliases? It's for explicit symbolic reference. The ${...} syntax is now entirely reserved for ha

Re: .method == $self.method or $_.method?

2005-03-17 Thread Larry Wall
On Thu, Mar 17, 2005 at 07:00:08PM +1100, Adam Kennedy wrote: : Personally, .foo meaning $self.foo seems more consistent to my mind, and : I'd happily standardise on implicit invocants. I'm thinking about it. There are definitely things to be said for both sides, and maybe we can come up with a

Re: Referencing a caller's slurpy array.

2005-03-17 Thread Larry Wall
On Wed, Mar 16, 2005 at 11:49:12PM -0600, Rod Adams wrote: : I haven't gotten a solid answer on when and how Perl will autogenerate : methods from subs. In general I don't think of it as autogeneration at all, but as failover to a different dispatcher. I can't think of a case where an ordinary

Re: return of copies vs references

2005-03-16 Thread Larry Wall
On Wed, Mar 16, 2005 at 11:10:40PM -0800, Darren Duncan wrote: : When I last asked a related question here, I was told that simply : returning an attribute will allow the caller to modify the original : attribute by default. That used to be true for arrays and hashes, but I just changed my mind

Re: return of copies vs references

2005-03-16 Thread Larry Wall
On Wed, Mar 16, 2005 at 09:49:47PM -0800, Darren Duncan wrote: : I need some clarification on the semantics of subroutine or method : return statements, regarding whether copies or references are : returned. It will help me in my p6ification of p5 code. : : Say I had a class with 3 private attr

perl6-language@perl.org

2005-03-16 Thread Larry Wall
On Wed, Mar 16, 2005 at 02:55:21PM -0600, Rod Adams wrote: : Of course, I now have to question the need for C. Other than : linguistics, which is not to be dismissed, what difference is there between : :given $expr { ... } : : and : :for $expr { ... } : : with equivalent ...'s? : : hm

Re: quotemeta

2005-03-16 Thread Larry Wall
On Wed, Mar 16, 2005 at 10:46:29PM +0100, Juerd wrote: : Larry Wall skribis 2005-03-16 9:41 (-0800): : > Except that q:meta would be an upgrade in terms of specialness, : > and besides, it's inside out from what you want, which is to quote : > a particular argument to a string inte

perl6-language@perl.org

2005-03-16 Thread Larry Wall
On Wed, Mar 16, 2005 at 01:48:27PM -0600, Rod Adams wrote: : Larry Wall wrote: : >Yes, and it distributes as any array return type declaration would. : > : > : Does this mean that we can define multiple slurpuy arrays (and : hashes?!?) in a parameter list, of different types, and Perl

Re: s/true/better name/

2005-03-16 Thread Larry Wall
On Wed, Mar 16, 2005 at 01:22:06PM -0600, Rod Adams wrote: : Larry Wall wrote: : : >On Tue, Mar 15, 2005 at 12:28:15PM -0700, Marcus Adair wrote: : >: Isn't saying "false doesn't exist" like saying, "dark doesn't exist"? : >: Why have a word for th

Re: Referencing a caller's slurpy array.

2005-03-16 Thread Larry Wall
On Wed, Mar 16, 2005 at 11:53:43AM -0700, Luke Palmer wrote: : Larry Wall writes: : > Certainly. The zone markers are as orthogonal to sigils as we can : > make 'em. Though I'm not sure we've given a meaning to *&foo yet. : > I suppose that would have to mean that t

perl6-language@perl.org

2005-03-16 Thread Larry Wall
On Thu, Mar 17, 2005 at 02:38:45AM +0800, Autrijus Tang wrote: : On Wed, Mar 16, 2005 at 10:24:16AM -0800, Larry Wall wrote: : > On Wed, Mar 16, 2005 at 08:46:03PM +0800, Autrijus Tang wrote: : > : Is using wrap/call the correct choice here, or is there another way : > : to do it that

Re: s/true/better name/

2005-03-16 Thread Larry Wall
On Wed, Mar 16, 2005 at 01:41:56PM -0500, Mark J. Reed wrote: : Luke Palmer wrote: : : >Marcus Adair writes: : >> Additionally I question whether this is truly a case improving to the : >> point of least surprise? After all, I don't know a programmer who's : >> going to be surprised by what true m

<    9   10   11   12   13   14   15   16   17   18   >