Re: Re-thinking file test operations

2009-07-16 Thread Paul Hodges
--- On Thu, 7/9/09, Moritz Lenz wrote: > . . . > Somehow the current file test syntax, 'filename' ~~ :e, looks like a not > well-though-out translation of Perl 5's syntax, -e 'filename'. > Apart from totally feeling wrong to me, Dunno about totally. I'm still trying to get a P6 mindset, but the

Re: Logo considerations

2009-03-31 Thread Paul Hodges
--- On Tue, 3/24/09, jason switzer wrote: > Basically, the perl community has largely adopted TIMTOWTDI So how about a "Tim the Toady"? :) === Hodges' Rule of Thumb: Don't expect reasonable behavior from anything with a thumb.

Re: Logo considerations

2009-03-24 Thread Paul Hodges
--- On Tue, 3/24/09, John Macdonald wrote: > The graphene logo inspires me to suggest that a carbon > ring be used as the logo for Parrot...   A carbon ring also has the advantages that it's regognizable as a very small logo, even as just a favicon.ico, and can be reasonably if stylistically r

Re: how to write literals of some Perl 6 types?

2008-12-05 Thread Paul Hodges
(full quote below) > As Duncan said, the real question is what’s the point of having > Bit when we also have both Int and Blob. I think none. I can't find anything in the existing synopses about Blobs. Probably looking in the wrong place, sorry. Blobs can handle arbitrary numbers of bits? If so,

Re: Catching exceptions with the // operator

2008-08-06 Thread Paul Seamons
gh that it doesn't warrant syntactic It seems that the following should address the issue while providing enough indication about what is occurring: my $bill = try { ack() } // thpp(); That seems to be closer to what the original post was desiring. Paul

Re: Fatal/autodie exception hierarchies for Perl 5

2008-06-08 Thread Paul Fenwick
die. I've marked myself down a TODO item to make sure there's a big barrage of tests to ensure that $@ still contains what we expect at the end of each exception handling block. Cheerio, Paul -- Paul Fenwick <[EMAIL PROTECTED]> | http://perltraining.com.au/ Director of

Re: Fatal/autodie exception hierarchies for Perl 5

2008-06-03 Thread Paul Fenwick
t would be nice to avoid gratuitous divergence if we can. I'm not sure actually sure if we've avoided divergence yet, but unless there's any barotrauma due to the sudden change in pressure, I'll continue to throw autodie exception-related plans to p6l as they happen. ;)

Re: Fatal/autodie exception hierarchies for Perl 5

2008-06-03 Thread Paul Fenwick
home tonight. ;) Cheerio, Paul -- Paul Fenwick <[EMAIL PROTECTED]> | http://perltraining.com.au/ Director of Training | Ph: +61 3 9354 6001 Perl Training Australia| Fax: +61 3 9354 2681

Fatal/autodie exception hierarchies for Perl 5

2008-06-01 Thread Paul Fenwick
'm seeking answers to are: * Is there a document that describes the current p6l exception hierarchy? My searching skills seem to be impaired today. * Does anyone have any input they'd like to make before I start fleshing out the hierarchy for p5 autodie? * Is this an appropriate

[OT] Re: [svn:perl6-synopsis] r14501 - doc/trunk/design/syn

2008-02-05 Thread Paul Hodges
--- Larry Wall <[EMAIL PROTECTED]> wrote: > Besides $^_ is just uglier than anything else I've seen today... lol -- I thought of it as a rather cute peeking-wink with a cauliflower ear, but that's probably much more cutesiness than we want to encourage in our language design. ===

Re: what should be the default extension?

2008-01-07 Thread Paul Hodges
A small tangent that might be relevant -- what's the current convention for, say, putting several related "packages" in the same file? In p5, I might write a great Foo.pm that loads Foo::Loader.pm and Foo::Parser.pm and Foo::Object.pm; I'd usually drop them into seperate files and have one load t

Re: Sequential bias in S04 (and Perl6 in general)

2008-01-04 Thread Paul Seamons
t will take work. I'd argue the same is true for parallel. Paul

Re: Multiline comments in Perl6

2008-01-03 Thread Paul Hodges
--- Jonathan Lang <[EMAIL PROTECTED]> wrote: > Paul Hodges wrote: > > http://perl6.org/doc/design/syn/S02.html still says: > > "Intra-line comments will not be supported in standard Perl" > > This is wrong, since S02 also defines intra-line comments, u

Re: Multiline comments in Perl6

2008-01-02 Thread Paul Hodges
t +) 1; $x = #[ comment =o] 1; Or will any of these not work? I suppose there's always #{/* foo */} Or when all else fails, just move the comment to a line of it's own, or a block of POD. ;o] Thanks for your patience and your input, Paul --- "Mark J. Reed" <[EMAI

Re: Bite-sized Tasks for the Interested (was Re: Standards bearers)

2007-12-13 Thread Paul Hodges
Sounds like a good plan to me. It's one of those bite-sized tasks that will grow with time, but will make the overall process move along. Feel free to tag me offlist for help, too. --- ispyhumanfly <[EMAIL PROTECTED]> wrote: > chromatic wrote: > > On Tuesday 11 Decembe

Re: Standards bearers (was "Re: xml and perl 6")

2007-12-11 Thread Paul Hodges
It also helps that you consistently make incisive observations and contributions to conversations, even if they are a little tart sometimes. :) But on this general note, is there any current organization or location where small problems are being parcelled out? I'd love to help, but my time is as

Re: Standards bearers (was "Re: xml and perl 6")

2007-12-11 Thread Paul Hodges
duh. I'll learn to finish reading all the posts before adding my own *someday*. --- Darren Duncan <[EMAIL PROTECTED]> wrote: > At 10:23 AM +0300 12/11/07, Richard Hainsworth wrote: > >Darren Duncan wrote: > >>At 9:04 AM +0300 12/10/07, Richard Hainsworth wrote: > >>>Equally, Something to replace

[OT][SPAM] Re: Pair notation for number radix

2007-12-06 Thread Paul Hodges
This is another great example of why I love this list. :o] I live in GA, so far out in the boonies that I can't get cable or broadband at *all* except for by satellite. I've stopped trying to explain what I do, because I start saying things like this, and they glaze and visibly regret it, lol

Re: xml and perl 6

2007-11-29 Thread Paul Hodges
mething > essential without also insisting on all the other technologies > people use in Perl? I've been using Perl for ten years, and I've used tons of CGI and DBI and even a good bit of ACME, but

Re: Micro-articles on Perl 6 Operators

2007-09-19 Thread Paul Hodges
--- Larry Wall <[EMAIL PROTECTED]> wrote: > On Tue, Sep 18, 2007 at 07:41:54PM -0700, Paul Hodges wrote: > : while length($ruler) < $len; # till there's enough > > There is no length function anymore. duh. I knew that. Still thi

Re: Micro-articles on Perl 6 Operators

2007-09-18 Thread Paul Hodges
# starts with 0 $ruler ~= $digit++ % 10 # appends next digit while length($ruler) < $len; # till there's enough return $ruler; # and returns the string } my $r = page_ruler(25); # 0123456789012345678901234 Again, PLEASE double-check my prob

Re: Micro-articles on Perl 6 Operators

2007-09-18 Thread Paul Hodges
--- Adriano Ferreira <[EMAIL PROTECTED]> wrote: [[snips here and at end]] > > . . . I have one suggestion: you might want to mention > > the roundrobin function in the article on the zip function since > > the two are very closely related. > > Thanks, Joe and Alberto. > > Even though the roundro

Re: [svn:perl6-synopsis] r14449 - doc/trunk/design/syn

2007-09-07 Thread Paul Seamons
on-capturing parens (?:). It (<:ws>) also bears little similarity to any other regex construct - although it looks a bit like a Perl 6 pair. Paul

Re: Web Module (Was: Perl6 new features)

2007-06-25 Thread Paul Hodges
How about a Bundle::Common? Streamline both the core and the inclusion of the most commonly used modules? The core does include the CPAN module, right? Personally, I *prefer* grabbing what I need piecemeal, but I understand making it easy if possible --- Luke Palmer <[EMAIL PROTECTED]> wrote

Re: Referring to source code within Perldoc: the new A<> code

2007-06-21 Thread Paul Seamons
extract the POD tags ala poddoc and then add the inlined/introspectable documentation for that particular language. Now the "only" hard part is getting the other language designers to allow ignoring pod markup in their languages. All of the Parrot based variants could easily incorporate this feature. Paul

Re: Referring to source code within Perldoc: the new A<> code

2007-06-21 Thread Paul Seamons
y want a 7000 ft view (aka the executive summary). Paul

Re: Referring to source code within Perldoc: the new A<> code

2007-06-21 Thread Paul Seamons
as well - if the code doesn't compile, then perldoc would not be able to generate the code - but it could always show an error that the code doesn't compile and then show what poddoc would show. The outcome is that poddoc can be Pod6 "pure" and perldoc can be (as its name suggests) documentation for Perl. Just my opinions. Paul Seamons

Re: Is Perl 6 too late? (an aside)

2007-06-14 Thread Paul Hodges
es, if you don't get the aesthetics of the Schwartzian Transform, then you should probably be using python or java anyway, hm? Let's let Perl be Perl. It's a new Perl, but it's still a pearl. =o) *Paul --- Larry Wall <[EMAIL PROTECTED]> wrote: > On Mon, May 14, 2007

Re: for ... else

2007-03-02 Thread Paul Seamons
> foreach my $item (@items) { > #process each item > } else { > #handle the empty list case > } > > What do you think? I'm not sure if I like it, but there have been several times that I would've used it recently. I think it would certainly have utility. Paul

Re: Fwd: Numeric Semantics

2007-01-23 Thread Paul Seamons
nt languages I occasionally have to search for that bug right now. Except it is spelled a little different with if ($alpha = $beta) { ... } When I really meant: if ($alpha == $beta) { ... } It is rare though. I think the == vs === will be rare also. Paul

Re: Smart Matching clarification

2006-11-17 Thread Paul Seamons
hen you use .rawkeys to get > unordered--shades of PHP. Taking a page from Template Toolkit. .keys # same as perl5 .sort # the sorted keys I know that it isn't quite parallel with Array.sort and it doesn't provide for .sortkv or .sort pairs, but it might be an option. Paul

Re: generic ordinal-relevant operators

2006-11-16 Thread Paul Seamons
; as well. In true chicken and egg fashion: Which comes first the operator or the function. Do you define &infix: in terms of &max or vice versa. My guess is the operators should win because there could be some low-level shenanigans that optimize things. But maybe not. Paul

Re: List assignment question

2006-11-15 Thread Paul Seamons
ucinating. Are you remembering this: my $a = 1; ($a, undef, my $b) = 1..3; If you attempted to do my ($a, undef, $b) you'd get a warn error about re-declaring $a. Paul

Re: Runtime role issues

2006-10-11 Thread Paul Seamons
would remain unmodified. Paul

Re: Nested statement modifiers.

2006-10-04 Thread Paul Seamons
est; Which can obviously be written in other ways using other constructs, but not without changing how the statement reads or changing what it emphasizes. And as for Perl6 - well yes I'd love to see it get here more quickly also. But I don't think that discussing little nitpicks like this are delaying the release of Perl6. Maybe they are - but I would guess there are more pressing issues that are occupying development time. Paul

Re: Nested statement modifiers.

2006-10-03 Thread Paul Seamons
r $a; $x; It isn't under Perl5 - but will it be under Perl6. Either way the nested statement modifiers would work even if scopes aren't introduced at each level. .say for 1..$_ for 2..5; I think it reads sort of nicely left to right. Paul

Re: Nested statement modifiers.

2006-10-03 Thread Paul Seamons
ink that is workable. But it also brings the question: If you can do it ugly [1] easily, why not allow for it do be done prettily [2] ? say $_ for =<> if $do_read_input Paul [1] It isn't really that ugly - just not as pretty. [2] Arguably the "pretty" version is also m

Re: Nested statement modifiers.

2006-09-02 Thread Paul Seamons
n a commit bit and add a test to pugs. Anyway. Once again if the alleged crime or the predicted crime is too great then I concede. I can see that it could be abused by some. But that doesn't mean I will abuse it. Paul PS. And not that it matters, but TT3 is planned to support nested statement modifiers and my engine which does much of TT3 already supports them - and I do use them on occasion - but that's a different mailing list.

Re: Nested statement modifiers.

2006-09-02 Thread Paul Seamons
overall readability. I'd concede that the actual useful uses are rare enough to not warrant giving a feature that could turn hopelessly ugly quickly - even if the current generation of tools make it easy to add the feature. Paul

Re: Nested statement modifiers.

2006-09-01 Thread Paul Seamons
better. :) say "I'm ok" if $i_am_ok if $you_are_ok while $the_world_is_ok; Paul

Re: Nested statement modifiers.

2006-09-01 Thread Paul Seamons
so. I'll be quiet if you'd like me to be, unless you don't want me to be. :) Paul

Nested statement modifiers.

2006-09-01 Thread Paul Seamons
that it shouldn't be too hard to change. The question is would a patch to add the functionality be accepted if I went to the trouble of figuring out how to do it? Paul Seamons Section of pge2past.tg that re-writes the expression to be enclosed by an if block: transform past (Perl6::G

Re: clarifying the spec for 'ref'

2006-08-25 Thread Paul Seamons
on that particular class. No methods are removed. This is very similar to read only strings. Paul Seamons

Re: S04 - forbidden coding-style

2006-07-24 Thread Paul Hodges
I know, shoot me -- but just so we've discussed it and put it to bed, maybe :if or _if or fi? --- Aaron Crane <[EMAIL PROTECTED]> wrote: > Larry Wall writes: > > Maybe we should just make statement modifiers uppercase and burn > out > > everyone's eye sockets. :) > > I like statement modifie

Re: Using Rules Today

2006-07-03 Thread Paul Seamons
', '3', [ \[ '**', '4', '2' ], 0 ] ], 0 ], '5' ], 0 ]; I apologize that the expression parsing isn't a little more abstracted for you, but the result should be usable. Also, the parse_expr is designed for also parsing variable names in the TT2 language, so the first portion of the method applies variable names. The entire thing could be cut down considerably if all you want to parse is math (no variables). Paul Seamons

Re: Can foo("123") dispatch to foo(Int) (was: Mutil Method Questions)

2006-06-24 Thread Paul Hodges
so back to foo("bar"). What's the default behavior? String doesn't Num, does it? though is does convert if the value is good Does that mean foo("123") should or should not dispatch to foo(Int)? Or even foo(Num), for that matter Oy, I could see some headaches around setting these rules in

Re: Synchronized / Thread syntax in Perl 6

2006-06-03 Thread Paul Hodges
--- Larry Wall <[EMAIL PROTECTED]> wrote: > On Sat, Jun 03, 2006 at 03:51:45PM -0700, Paul Hodges wrote: > : { no threads; > :print @_.»(); > : } > > It seems a bit odd to use a construct for its syntactic sugar value > but take away its semantics... > >

Re: Synchronized / Thread syntax in Perl 6

2006-06-03 Thread Paul Hodges
--- Ashley Winters <[EMAIL PROTECTED]> wrote: > On 6/2/06, Paul Hodges <[EMAIL PROTECTED]> wrote: > > > > my @answer = map { async { &_() } } @jobs; > > That still seems too explicit. I thought we had hyperoperators to > implictly parallelize for us: >

RE: Synchronized / Thread syntax in Perl 6

2006-06-02 Thread Paul Hodges
--- John Drago <[EMAIL PROTECTED]> wrote: . . . > > class QueueRunner { > >our sub process_queue(Code @jobs_in) { > > my @ans is serial; > > @ans.push map { async { &_() } } @jobs_in; > > @ans; > >} > > } > > my @answer = QueueRunner.process_job_queue( @jobs ); > > Actual

RE: Synchronized / Thread syntax in Perl 6

2006-06-02 Thread Paul Hodges
--- John Drago <[EMAIL PROTECTED]> wrote: > > You mean "is parallel" as a synonym for "is async"? > > I think "is parallel" denotes something as usable by multiple threads > simultaneously, "in parallel". > "is serial" would denote that only one thread can use the $thing at a > time, exclusively

RE: Synchronized / Thread syntax in Perl 6

2006-05-31 Thread Paul Hodges
--- John Drago <[EMAIL PROTECTED]> wrote: > James Mastros wrote: > > I don't like the name synchronized -- it implies that multiple > > things are happening at the same time, as in synchronized swiming, > > which is exactly the opposite of what should be implied. > > "Serialized" would be a nice n

Re: Synchronized / Thread syntax in Perl 6

2006-05-31 Thread Paul Hodges
How about one of these? == class Baz { has $.a is restricted; has $.b is controlled; has $.c is unique; has $.d is shared; has $.e is queued; has $.f is token; ... } --- John Drago <[EMAIL PROTECTED]> wrote: > I asked this via the Google Groups interfa

Re: packages vs. classes

2006-05-26 Thread Paul Hodges
dard model can take the small overhead hit of whatever internal shenanigans they need to implement, and just about anything like that can be stuffed into a module now, can't it? So the upshot is, a standardized metamodel seems like the way to go to me And Congrats again, gramps. May y

Re: (Existing) Perl 6 Wiki: (http://perl.net.au/wiki/Perl_6).

2006-05-23 Thread Paul Fenwick
in any Perl 6 development, discussions, or other activities. PerlNet exists to provide support for the Perl community, and if there's anything I can do to make it more suitable to help the Perl 6 effort, then I'd be very happy to do my best to make it happen. All the very best,

Re: RFC: Community education page

2006-05-04 Thread Paul Johnson
; %foo {'bar'} >> DTRT, but I can't > remember it", which certianly happens to me fairly often. Well, I'd obviously quite like that ;-) -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net

Re: A shorter long dot

2006-05-04 Thread Paul Johnson
On Thu, May 04, 2006 at 01:56:44PM +0300, Markus Laire wrote: > On 5/1/06, Paul Johnson <[EMAIL PROTECTED]> wrote: > > >But then again, as I said, I really don't see the problem that is being > >solved. > > This "long-dot" can be used for many thin

Re: A shorter long dot

2006-05-01 Thread Paul Johnson
_.foo for @things_to_foo; or something. I like lining up my code as much as the next programmer, and probably a lot more, but I just don't see the need for this syntax which seems ugly, confusing and unnecessary. But then again, as I said, I really don't see the problem that i

Re: [svn:perl6-synopsis] r7784 - doc/trunk/design/syn

2006-02-23 Thread Paul Hodges
--- [EMAIL PROTECTED] wrote: > . . . > -Such an "eigenmethod" is delegated to C<.meta> just as method like > . . . > +Such an I is always delegated to C<.meta> just as changing "eigenmethod" to I should also change "an" to "a": +Such a I is always delegated to C<.meta> just as ^ Small

Re: handling undef better

2005-12-19 Thread Paul Johnson
ble to do that, and maybe to declare which hash keys or array elements are valid. Do we have that already? -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net

Re: Demagicalizing pairs

2005-08-24 Thread Paul Seamons
ta => [$up, $right]); OR assuming I has a Position object and a vector object move(from => $pos1, delta => $vec1); The original example just seems difficult to parse. Paul

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-21 Thread Paul Seamons
irtual ($obj.y) has %.y is rw; # implies %_y for storage, is virtual Paul

Re: WTF? - Re: method calls on $self

2005-07-15 Thread Paul Seamons
ult to the invocant ($_ =:= $?SELF) (which should be easy enough with "method a ($_) { ... }"). method concrete { ./wizbang; .foo for @.elems; .foo for ./elems; # possibly odd looking - but not confusing } Please, lets pick something sane. Here I go speaking for the list, but I don't think we will find many that think ".method syntax breaks in methods if $_ is rebound" as a very sound concept. Paul

Re: File.seek() interface

2005-07-07 Thread Paul Hodges
nsion also to say $fh.pos += 10`bytes as shorthand for $fh.pos = $fh.cur + 10`bytes Likewise for -= But then that begs the questions of *= (not too nuts), /= (same), %= (great for fixed length records?) and the predictable other ho

Re: File.seek() interface

2005-07-07 Thread Paul Seamons
; # from the end backwards 10 $fh.seek(10, :relative); # from the current location forward 10 $fh.seek(-10, :relative); # from the current location backward 10 Paul

Optimisations (was Re: How much do we close over?)

2005-06-13 Thread Paul Johnson
d only be for the benefit of people and modules that mess with the op tree. Again, I submit that an optimisation that changes normal behaviour is broken and that, in general, programmers shouldn't need to worry about what optimisations are going on under the covers. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net

Re: date and time formatting

2005-06-02 Thread Paul Seamons
he scalar context is an RFC valid string. Nothing too heavy there. The time() function is "typically" only moderately useful without localtime(). Paul

Re: Nested captures

2005-05-09 Thread Paul Seamons
ect - or will they cause the quantified subrule or subpattern to return as an array of C objects? Paul

Re: Malfunction Junction, what's your function?

2005-04-27 Thread Paul Seamons
Minor note. Would you want this: >sub &infix:(Str $a, Str $b) { return ($a eq $b) ? $a : ''; } to be: sub &infix:(Str $a, Str $b) { return ($a eq $b) ? $a but bool::true: ''; } (Is that the right way to do it ?) Paul

Re: Sun Fortress and Perl 6

2005-04-27 Thread Paul Johnson
t since then it would seem that for some strange reason more people have been exposed to functional programming. http://www.mail-archive.com/perl6-language@perl.org/msg11967.html -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net

Re: -X's auto-(un)quoting?

2005-04-25 Thread Paul Seamons
> dup short and long names is a waste, since people will always chose the > short one (who uses English in Perl 5, really?) That is the goal - to find some nice variable that looks vaguely usable and that people won't rebel against using. Paul

Re: -X's auto-(un)quoting?

2005-04-25 Thread Paul Seamons
Paul Seamons wrote: > Yes, I know there "can be" a "way back." In this thread, none of the > examples give one using existing Perl 6 syntax. They are all proposing new > ways. This is one more. Sorry if this sounded brash. I have a habit of not figuring out that

Re: -X's auto-(un)quoting?

2005-04-25 Thread Paul Seamons
hat code to bind the variable? I'm lazy. The signature wouldv'e been shorter. That looks Perl5ish. > Three, even: Same argument as the last with a different "aliasing." Yes, I know there "can be" a "way back." In this thread, none of the examples give one using existing Perl 6 syntax. They are all proposing new ways. This is one more. Paul

Re: -X's auto-(un)quoting?

2005-04-25 Thread Paul Seamons
nt topic. $_ defaults to the invocant of the method. $^1 refers to the first invocant. $^ is an alias for $^1. $^n refers to the nth invocant. Nice and simple. No conflict with existing naming conventions. Paul

Re: [pugs]weird thing with say ++$

2005-04-21 Thread Paul Johnson
ogram Perl as if it had sequence points and undefined behaviour. This often results in explaining what they are, but maybe that's not such a great problem. See http://www.eskimo.com/~scs/C-faq/faq.html, especially sections 3.8 and 11.33 for details. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net

Re: junctions as indicies

2005-04-18 Thread Paul Hodges
--- David Christensen <[EMAIL PROTECTED]> wrote: > I'm looking in S09, and reading about junctions. It seems to me > that if we have a junction $j which we use to index into an array > or a hash, it should DWIM and return a junction of the corresponding > values. > > @ar=[1..10]; > %hash=(a=>1,b

Re: should we change [^a-z] to <-[a..z]> instead of <-[a-z]>?

2005-04-17 Thread Paul Hodges
--- Larry Wall <[EMAIL PROTECTED]> wrote: . . . > <-[a..z]> > > should be allowed/encouraged/required. It greatly improves the > readability in my estimation. The only problem with requiring .. is > that people *will* write <[a-z]> out of habit, and we would probably > have to outlaw the

Re: should we change [^a-z] to <-[a..z]> instead of <-[a-z]>?

2005-04-17 Thread Paul Hodges
--- Larry Wall <[EMAIL PROTECTED]> wrote: > On Fri, Apr 15, 2005 at 11:28:31AM -0500, Rod Adams wrote: > : David Wheeler wrote: > : > : >But the first person to write <[a...]> gets what's comin' to 'em. > : > : Is that nothing (since '.' lt 'a'), or everything after 'a'? > > Might as well make

Re: Statement modifier scope

2005-04-15 Thread Paul Seamons
hich is hidden but still retains its contents). Paul

Re: Statement modifier scope

2005-04-15 Thread Paul Seamons
in a local. That is great!!! Thank you very much! Wish I'd know about that three years ago. But, it still doesn't answer the original question about scoping in the looping statement modifiers. Paul

Re: Statement modifier scope

2005-04-15 Thread Paul Seamons
work in Perl6 (temp $var = $var doesn't work in Perl6) and again it may be fine for small hashes with only a little data - but for a huge hash (1000+ keys) it is very inefficient. This is good discussion - but it isn't the real focus of the original message in the thread - the question is about the local (temp) scoping of looping statement modifiers in Perl6. Though, I do appreciate your trying to get my example working as is. Paul

Re: Statement modifier scope

2005-04-15 Thread Paul Seamons
On Friday 15 April 2005 11:57 am, Juerd wrote: > Paul Seamons skribis 2005-04-15 11:50 (-0600): > > my %h = ; > > { > > temp %h{$_} ++ for %h.keys; > > Just make that two lines. Is that so bad? > > temp %h; > %h.values »++; > For the given exa

Statement modifier scope

2005-04-15 Thread Paul Seamons
27; # prints 2 - 2 (as it should. It seems that statement modifiers don't currently work with declarations - but that is a compiler issue - not a language issue.) I have wanted to do this in Perl5 but couldn't but would love to be able to do in Perl6: my %h = ; { temp %h{$_} ++ for %h.keys; %h.say; # values are incremented still } %h.say; # values are back to original values Paul

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

2005-03-18 Thread Paul Seamons
> eval read :file("foo") How about: eval slurp "foo"; Paul Seamons

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

2005-03-18 Thread Paul Seamons
hould work on the invocant period - it just happens to be a coincidence that $_ is the same as the invocant for most of the time. Paul Seamons I'll go back to lurking about now.

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread Paul Hodges
--- David Storrs <[EMAIL PROTECTED]> wrote: > . . . . > Obviously, however @Larry decide it should be, is the way it'll be > and nothing I can say will change that. Au contraire -- that's what this list is for. State your opinion, man! :) > That said: this would suck. Badly. > We should not be

Re: Python is not Java...but will Perl 6 be?

2004-12-03 Thread Paul Johnson
tters." > > I'd like to be able to s/Python/Perl 6/ above, but after many discussions on > this topic, I'm still not sure if I can. http://www.nntp.perl.org/group/perl.perl6.language/9576 -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net

Re: Instantiation

2004-08-23 Thread Paul Seamons
guess Foo would be a full fledged class which inherits from Some::Module::That::Defines::A::Class. I doubt that it is optimal - but it does give a little bit of flexibility. Paul Seamons

Re: Synopsis 2 draft 1 -- each and every

2004-08-19 Thread Paul Seamons
On Thursday 19 August 2004 02:14 pm, Paul Seamons wrote: > @array.push(3 => 'value'); # index 3 gets 'value' Hmm. Well that makes it hard to have an array of pairs - so never mind. Paul Seamons

Re: Synopsis 2 draft 1 -- each and every

2004-08-19 Thread Paul Seamons
if you can do @array.push(3 => 'value'); # index 3 gets 'value' # which is harder han @array[3] = 'value' Paul Seamons

Re: Time to change the (perl 6) guard! [OT]

2004-07-07 Thread Paul Hodges
--- Austin Hastings <[EMAIL PROTECTED]> wrote: > . . . . > Of the qualities you listed for Pumpking: > > "Look, I already told you! I deal with the goddamn customers so the > engineers don't have to! I have people skills! I am good at dealing > with people! Can't you understand that? What the hell

Re: definitions of truth

2004-06-26 Thread Paul Hodges
--- Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> wrote: > Paul Hodges wrote: > > --- Spider Boardman <[EMAIL PROTECTED]> wrote: > >>You need ord() for character/grapheme/byte/whatever testing that's > >>equivalent to what C does. Since C d

Re: definitions of truth

2004-06-26 Thread Paul Hodges
--- Jonadab the Unsightly One <[EMAIL PROTECTED]> wrote: > Paul Hodges wrote: > > > Do note that I realize I can check it. It's just that for no reason > > I can quite define, my C background wants a null byte to be FALSE > > without any special chicanery o

Re: definitions of truth

2004-06-26 Thread Paul Hodges
--- Simon Cozens <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Paul Hodges) writes: > > Do note that I realize I can check it. It's just that for no reason > > I can quite define, my C background wants a null byte to be FALSE > > without any special chicanery on m

Re: definitions of truth

2004-06-25 Thread Paul Hodges
--- Spider Boardman <[EMAIL PROTECTED]> wrote: > At some point in history, Paul Hodges wrote (in part): > ph> So a null byte is still Boolean true. Ugh, yarf, ack, etc. > > No. And it never has been (at least in my world view). A valid point, though I reply: my $x =

Re: definitions of truth

2004-06-24 Thread Paul Hodges
--- Luke Palmer <[EMAIL PROTECTED]> wrote: > Paul Hodges writes: > > So, in P6: > > > > if 0 { print "0\n"; } # I assume this won't print. > > if '0' { print "'0'\n"; } # I assume this won't pri

Re: definitions of truth

2004-06-24 Thread Paul Hodges
won't print. if undef { print "undef\n"; } # I assume this won't print. But my question is, will this: if "\0" { print null\n"; } # Is this going to print, or not? And if the answer is because I've somehow botched my syntax, please correct it and answer

definitions of truth

2004-06-24 Thread Hodges, Paul
null byte of binary data still going to register as TRUE, or will it now be what seems to me the more sensible FALSE? Paul * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged materia

Re: FW: Periodic Table of the Operators

2004-06-01 Thread Paul Seamons
Or for the few Perl emacs people out there: C-x 8 Y C-x 8 < C-x 8 > Paul On Tuesday 01 June 2004 10:27 am, Gabriel Ebner wrote: > Hello, > > Aaron Sherman wrote: > > Well, first off my US keyboard doesn't contain it. > > Sorry, mistakenly picked an US-Internati

RE: Some questions about operators.

2004-03-22 Thread Paul Johnson
Austin Hastings said: > Let's look at boolean xor: > > if ($a xor $b xor $c) {...} > > should succeed only when exactly one of ($a, $b, $c) is true. I think it is generally accepted that xor is true iff an odd nnumber of its argumnets are true. -- Paul Johnson - [E

Re: enums and bitenums

2003-12-13 Thread Paul Hodges
--- Larry Wall <[EMAIL PROTECTED]> wrote: > On Sat, Dec 13, 2003 at 07:16:21AM -0800, Paul Hodges wrote: > : $Spot = $visitor.nephew ?? $nicedog :: $meandog; > : > : Which brings up a small side note: that's a successfully applied > : boolean context for $visitor.ne

  1   2   3   >