--- 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
--- 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.
--- 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
(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,
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
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
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. ;)
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
'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
--- 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.
===
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
t will take work. I'd argue the same is true for parallel.
Paul
--- 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
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
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
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
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
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
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
--- 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
# 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
--- 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
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
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
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
y want a 7000 ft view (aka the executive summary).
Paul
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
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
> 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
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
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
; 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
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
would remain unmodified.
Paul
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
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
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
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.
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
better. :)
say "I'm ok"
if $i_am_ok
if $you_are_ok
while $the_world_is_ok;
Paul
so.
I'll be quiet if you'd like me to be, unless you don't want me to be. :)
Paul
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
on that particular class.
No methods are removed.
This is very similar to read only strings.
Paul Seamons
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
', '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
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
--- 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...
>
>
--- 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:
>
--- 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
--- 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
--- 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
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
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
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,
; %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
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
_.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
--- [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
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
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
irtual ($obj.y)
has %.y is rw; # implies %_y for storage, is virtual
Paul
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
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
; # 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
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
he scalar context is an RFC valid string. Nothing too heavy
there. The time() function is "typically" only moderately useful without
localtime().
Paul
ect - or will they cause the
quantified subrule or subpattern to return as an array of C objects?
Paul
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
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
> 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
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
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
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
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
--- 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
--- 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
--- 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
hich is hidden but still retains its
contents).
Paul
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
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
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
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
> eval read :file("foo")
How about:
eval slurp "foo";
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.
--- 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
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
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
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
if you can do
@array.push(3 => 'value'); # index 3 gets 'value'
# which is harder han @array[3] = 'value'
Paul Seamons
--- 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
--- 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
--- 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
--- 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
--- 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 =
--- 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
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
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
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
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
--- 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 - 100 of 229 matches
Mail list logo