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
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
At 11:26 PM -0700 3/16/05, Luke Palmer wrote:
> For each of the above cases, is a copy of or a reference to the
attribute returned? For each, will the calling code be able to
modify $obj's attributes by modifying the return values, or not?
Well if you're making accessors, why the heck are you m
Darren Duncan writes:
> 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 attributes, named [$:foo, @:bar,
> %:baz], a
Larry Wall wrote:
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 that?
: >:
: >: I'm really afrai
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 attributes, named [$:foo, @:bar,
%:baz], and I was making an explicit access
On Wed, 2005-03-16 at 13:42 -0800, Brian Ingerson wrote:
First off, thanks for your kind responses. I'm sure I just got confused
by some web page I was looking at, and overwrote part of my stack that
I'd just populated from the Kwid doc. And thanks also for pointing me to
the Kwid docs where they
Luke Palmer wrote:
Rod Adams writes:
In S29, I currently have C as:
multi sub grep (Any|Junction $test : [EMAIL PROTECTED]) returns List {
gather {
for @values -> $x {
take $x if $x ~~ $test;
}
}
}
That's the listop form. I was referring to the method form:
multi sub grep (
Luke Palmer wrote:
Joe Gottman writes:
multi sub kv (Array @array : [EMAIL PROTECTED]) returns List
Returns the indexes and associated values stored in @array, lazily and in
order by index. Optionally, only those of the slice defined by @indices.
This one is real easy:
multi sub kv (@arr
Joe Gottman writes:
> multi sub kv (Array @array : [EMAIL PROTECTED]) returns List
> Returns the indexes and associated values stored in @array, lazily and in
> order by index. Optionally, only those of the slice defined by @indices.
This one is real easy:
multi sub kv (@array) returns List {
I've been lurking perl.com for years and have always wanted to
contribute. Seems like the Phalanx project is a good place to start.
I'm particularly interested in testing the Net_SSLeay.pm module.
Take a look at the Kwiki on the Hoplites wanted page. You can be the
leader of the team if you want.
Hi,
I've been lurking perl.com for years and have always wanted to
contribute. Seems like the Phalanx project is a good place to start.
I'm particularly interested in testing the Net_SSLeay.pm module.
Any tips on getting started or any 'hoplites' out there who need help
with testing this module?
Folks may have read that Alias has written Test::Inline 2.00
http://use.perl.org/~Alias/journal/23653
I've given up all illusions that I'm ever going to get around to updating
Test::Inline so I've handed the namespace over to Alias. There's some
things which need to be done before its backwards
I just now did
cvs -q update
make distclean
perl Configure.pl
on my x86 SuSE 9.2 laptop and got
. . .
Checking MANIFEST..No such file:
languages/parrot_compiler/lib/Parrot/Test/ParrotCompiler.pm
No such file: languages/parrot_compiler/t/ba
> -Original Message-
> From: Rod Adams [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 16, 2005 3:18 AM
> To: Perl6 Language List
> Subject: New S29 draft up
>
>
> I just posted a fresh copy of S29 to:
>
> http://www.rodadams.net/Perl/S29.pod
> http://www.rodadams.net/Perl/S29.ht
Michael G Schwern wrote:
On Thu, Mar 17, 2005 at 12:06:36AM +1100, Andrew Savige wrote:
However, I was wondering if there is a standard, safe way of testing
simple .pl scripts?
Hmmm. The identical question was asked a bit over a week ago:
http://www.nntp.perl.org/group/perl.qa/3722
I sugg
On Thu, Mar 17, 2005 at 12:06:36AM +1100, Andrew Savige wrote:
> > However, I was wondering if there is a standard, safe way of testing
> > simple .pl scripts?
>
> Hmmm. The identical question was asked a bit over a week ago:
>
> http://www.nntp.perl.org/group/perl.qa/3722
>
> I suggest you star
Rod Adams writes:
> >Uhmm... isn't *&foo the adverbial block? That is, isn't it where grep
> >gets its code block in:
> >
> > @list.grep:{ $_ % 2 }
> >
> >
> >
> In S29, I currently have C as:
>
> multi sub grep (Any|Junction $test : [EMAIL PROTECTED]) returns List {
> gather {
> for @va
On Wed, Mar 16, 2005 at 01:30:04PM -0500, Aaron Sherman wrote:
> On Wed, 2005-03-16 at 12:25, David Storrs wrote:
>
> > I quite like <> as the bracketing characters. They are
> > visually distinctive, they connect well with their adjacent C/X/L/etc
> > without visually merging into it (compare L
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
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 interpolation, not t
On 16/03/05 14:56 -0500, Aaron Sherman wrote:
> On Wed, 2005-03-16 at 14:24, Brian Ingerson wrote:
>
> > vs Kwid:
> >
> > `$x > $y` is about as *easy* as it gets in [Perl]
> >
> > Did you really read `perlkwid.kwid`?
>
> Yes, and can you please stop asking that question? I read it seve
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 interpolation, not the entire
> interpolation. It just wants to be a miscellaneous
On Wednesday 16 March 2005 15:40, Autrijus Tang wrote:
> On Wed, Mar 16, 2005 at 12:09:40PM -0800, Larry Wall wrote:
> > So I'm thinking we'll just go back to "true", both for that reason,
> > and because it does syntactically block the naughty meaning of true as
> > a term (as long as we don't def
On 16/03/05 14:33 -0500, Aaron Sherman wrote:
> On Wed, 2005-03-16 at 14:17, Brian Ingerson wrote:
>
> > Kwid does this by formally changing
> >
> >X<...>
> >
> > into
> >
> >{X...X}
>
> Ok, where is THAT proposal?! I'm reading the doc that's in
> doc/perlkwid.kwid in the pugs source
Larry Wall skribis 2005-03-16 12:17 (-0800):
> for @foo {...}
> is actually short for:
> for @foo -> $_ is rw {...}
Has there been any decision on <-> yet? If <-> is there, it's much
easier to say that without arguments, <-> $_ is used. That way, there is
no surprising magic "is rw
Larry Wall wrote:
Well paint yourself unchagrined, because S04 sez:
Parameters are by default constant within the block. You can
declare a parameter read/write by including the "is rw" trait. If
you rely on $_ as the implicit parameter to a block, then then $_
is considered read/write b
On Wed, Mar 16, 2005 at 12:09:40PM -0800, Larry Wall wrote:
> whereas as a native English speaker would probably expect
>
> $x = whether($a or $b);
>
> So I'm thinking we'll just go back to "true", both for that reason,
> and because it does syntactically block the naughty meaning of true as
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 will sort
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 that?
: >:
: >: I'm really afraid I'm missing some
On Wed, 2005-03-16 at 14:24, Brian Ingerson wrote:
> vs Kwid:
>
> `$x > $y` is about as *easy* as it gets in [Perl]
>
> Did you really read `perlkwid.kwid`?
Yes, and can you please stop asking that question? I read it several
times, and you're starting to get just this side of insultin
Larry Wall wrote:
If we go with my once-upon-a-time notion of using zip(@a;@b), then it
naturally comes in as [EMAIL PROTECTED],[EMAIL PROTECTED]
It pretty much has to use the list of lists syntax, since the number of
Arrays we are zipping is variadic, and that means using a slurpy, which
woul
On Wed, 2005-03-16 at 14:17, Brian Ingerson wrote:
> Kwid does this by formally changing
>
>X<...>
>
> into
>
>{X...X}
Ok, where is THAT proposal?! I'm reading the doc that's in
doc/perlkwid.kwid in the pugs source tree. Hmmm... odd, I just did an
update and it's GONE now... was I loo
On 16/03/05 13:30 -0500, Aaron Sherman wrote:
> On Wed, 2005-03-16 at 12:25, David Storrs wrote:
>
> > I quite like <> as the bracketing characters. They are
> > visually distinctive, they connect well with their adjacent C/X/L/etc
> > without visually merging into it (compare L with L[foo]), and
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 the next slurpy parameter has
to be a sub ref.
Uhmm... isn't *&foo the adverbial
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 that?
:
: I'm really afraid I'm missing something obvious here, but I'm worried
: that neither "whether" nor "indeed" work
On 16/03/05 12:00 -0500, Aaron Sherman wrote:
> On Tue, 2005-03-15 at 13:48, Brian Ingerson wrote:
> > Aaron,
> >
> > Upon reading this, it is unclear to me whether you have read about the
> > Kwid format or you are simply guessing that Kwid is the same syntax
> > used by Kwiki.
>
> I read the Kw
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 the next slurpy parameter has
:
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 the next slurpy parameter has
> to be a sub ref.
Uhmm... isn't *&foo the adverbial block? That is,
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 I missed?
: >
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
Markus Laire writes:
> Larry Wall wrote:
> >Since it's not a problem for syntax that can be recognized at compile
> >time, your slice above might be allowed if you "declare" the thunks
> >with curlies:
> >
> >@3d_slice = @array[ {!($_ % 2)}; 0..9:3; {?test($_)} ];
> >
>
> How does the compiler
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 means. There are still *some* things
> you may have to learn in software dev 101
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 that?
:
: I'm really afraid I'm missing something obvious here, but I'm worried
: that neither "whether" nor "indeed" work very well in many
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 I missed?
>
> wrap/call should do what you want there, but if you want to hack in
>
Michele Dondi writes:
> However I have the impression that there's still "too much" to it.
> Granted, GUIs are intrinsically some order of complexity above textual
> IO, but I think that letting the language have intrinsic markup
> language(-like) features may make things much easier from the
> huf
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 means. There are still *some* things
> you may have to learn in software dev 101 ;)
The problem
On Wed, 2005-03-16 at 12:25, David Storrs wrote:
> I quite like <> as the bracketing characters. They are
> visually distinctive, they connect well with their adjacent C/X/L/etc
> without visually merging into it (compare L with L[foo]), and in
> the circumstance that you want to bracket an unbal
Juerd writes:
> Nicholas Clark skribis 2005-03-15 17:53 (+):
> > On Tue, Mar 15, 2005 at 05:57:57PM +0100, Juerd wrote:
> > > And re its spelling, that's a very good feature, because it'll slowly
> > > teach me how to spell this word. And when I know how to spell it, I can
> > > use it on IRC w
Larry Wall wrote:
Since it's not a problem for syntax that can be recognized at compile
time, your slice above might be allowed if you "declare" the thunks
with curlies:
@3d_slice = @array[ {!($_ % 2)}; 0..9:3; {?test($_)} ];
How does the compiler know that those ';'s within curlies are
List-o
On Wed, Mar 16, 2005 at 08:46:03PM +0800, Autrijus Tang wrote:
: Just a quick question. In Pugs t/op/arith.t we have:
:
: sub tryeq_sloppy ($lhs, $rhs, ?$todo1 = '') {
: ...
: ok($lhs==$rhs,$ todo);
: ...
: }
:
: But it breaks the $?CALLER based error reporting, because
On Wed, Mar 16, 2005 at 06:44:47PM +0100, Thomas Sandlaß wrote:
: Markus Laire wrote:
: >What should index("Hello", "", 999) return in perl6?
:
: Since the first thing that needs definition is how does
: the empty string match, it could be e.g. any(0.."Hello".elems).
If the position of the first
Markus Laire wrote:
What should index("Hello", "", 999) return in perl6?
Since the first thing that needs definition is how does
the empty string match, it could be e.g. any(0.."Hello".elems).
As described in A12 string positions are much more these days
than simple ints. There is a class StrPositi
On Tue, Mar 15, 2005 at 01:54:09AM -0600, Rod Adams wrote:
: A06 says:
:
: If you |shift| or |pop| without an argument, it shifts or pops whatever
: slurpy array is in scope.
:
:
: Shall we assume that @_ is always an alias for this array, so I can say
: something like:
:
: multi sub pop (Ar
On Tue, Mar 15, 2005 at 02:47:33AM -0600, Rod Adams wrote:
: I'm trying to define zip(), but can't come up with a signature for a
: function that returns a lazy list of lvalues, but the list itself is not
: lazy?
If we go with my once-upon-a-time notion of using zip(@a;@b), then it
naturally com
On Tue, Mar 15, 2005 at 02:22:13AM -0600, Rod Adams wrote:
:
: my int @a is shape(Int ; Int) = (1..10 ; 2..100 :by(2) ; 4);
:
: $x = pop @a
: push @a, $x;
: @b = sort @a;
: # etc
:
: I see two views to take with these cases.
:
: 1) flatten the array to one dimension, and act accordingly.
:
: o
On Wed, Mar 16, 2005 at 10:17:33AM +, Richard Proctor wrote:
: On Wed 16 Mar, Rod Adams wrote:
: > I vote for axing C in favor of C and C.
: >
:
: Given A05 states that bare scalars match literally, quotemeta is (almost?)
: obsolete. It can certainly be downgraded.
Except that q:meta would
On Wed, Mar 16, 2005 at 05:31:17PM +0200, Markus Laire wrote:
: What should index("Hello", "", 999) return in perl6?
:
: In perl5 that returns 5, but IMHO -1 would be right result.
Well, neither of those is the right result, since index is probably
not going to be returning integers in Perl 6, bu
On Wed, Mar 16, 2005 at 12:00:28PM -0500, Aaron Sherman wrote:
>
> The one obvious thing to POD users is the replacement of <> with [] or
> {}. Why is this? Because < and > are used in un-balanced ways in a large
> number of situations, so they should not be the primary bracketing
> constructs.
On Wed, Mar 16, 2005 at 06:52:31PM +1100, Andrew Savige wrote:
: # length() and bytes() seem not implemented yet (?) ...
And length will never be implemented because that word is now taboo,
because it is not specific enough as to units in a Unicode world.
More specific methods are now used:
On Tue, 2005-03-15 at 13:48, Brian Ingerson wrote:
> Aaron,
>
> Upon reading this, it is unclear to me whether you have read about the
> Kwid format or you are simply guessing that Kwid is the same syntax
> used by Kwiki.
I read the Kwid documentation from the Pugs distribution in depth.
On Wed, Mar 16, 2005 at 05:33:04PM +0800, Autrijus Tang wrote:
: Also, how does that philosophy fit with the bare thunking in array
: slices, as listed in A05?
:
: @3d_slice = @array[ !($_ % 2) ; 0..9:3; ?test($_) ];
If I recall, the discussions around S9 indicated that it might be a bad
ide
On Wed, 2005-03-16 at 10:31, Markus Laire wrote:
> What should index("Hello", "", 999) return in perl6?
>
> In perl5 that returns 5, but IMHO -1 would be right result.
Urk... exception?
Seriously, if you give index a position that is off the end of the
string, your options should be:
a. Extend
What should index("Hello", "", 999) return in perl6?
In perl5 that returns 5, but IMHO -1 would be right result.
--
Markus Laire
# New Ticket Created by Matt Diephouse
# Please include the string: [perl #34452]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/rt3/Ticket/Display.html?id=34452 >
This TODO item is from an email from Leo, reproduced below with some
context.
Messa
When pugs is invoked as C so that it reads the program from
standard in, I think it should re-open stdin before the code is
executed.
In perl 5:
--
[EMAIL PROTECTED]:~/pugs$ perl -
while () {
print $_;
}
(Ctrl+d)
I type and it repeats
I type and it repeats
In pugs:
--
[EMAIL PROTECTED]:~/p
On Mar 15, 2005, at 1:23 PM, Nathan Gray wrote:
Is there a place for Test.pm from perl5 in the perl6 world? That's the
one I want to use.
You are certainly free to write it, and I think it would be a great
exercise in multi-subs to do so. However the name Test.pm has already
been taken. But I wo
--- Anuradha Dissanayake <[EMAIL PROTECTED]> wrote:
> I'm new to unit testing in Perl, so this may be a stupid question.
>
> Using Test::More to test .pm perl modules is quite simple as you just
> "use" the module in your test executable and call the module's
> subroutines inside your tests.
>
>
On Wed, Mar 16, 2005 at 08:46:03PM +0800, Autrijus Tang wrote:
> Does that form still work with Perl 6? Or should I use this?
>
> { local &_ := &ok; call($lhs == $rhs, $todo); }
s/local/my/ of course. :-)
Thanks,
/Autrijus/
pgpeQ1rscre2e.pgp
Description: PGP signature
Just a quick question. In Pugs t/op/arith.t we have:
sub tryeq_sloppy ($lhs, $rhs, ?$todo1 = '') {
...
ok($lhs==$rhs,$ todo);
...
}
But it breaks the $?CALLER based error reporting, because
it introduces another layer of caller.
In Perl5, I'd do this:
{ loca
Is there a place for Test.pm from perl5 in the perl6 world? That's the
one I want to use.
-kolibrie
I'm new to unit testing in Perl, so this may be a stupid question.
Using Test::More to test .pm perl modules is quite simple as you just
"use" the module in your test executable and call the module's
subroutines inside your tests.
However, I was wondering if there is a standard, safe way of testi
Isn't saying "false doesn't exist" like saying, "dark doesn't exist"?
Why have a word for that?
I'm really afraid I'm missing something obvious here, but I'm worried
that neither "whether" nor "indeed" work very well in many contexts. It
seems to me that testing trueness exists in so many conte
For things like MMD --- I'd like to traverse the hypertext
'linkbacks' to any given method. Which method *exactly* will get
called in the super class? A hypertext documentation system that
introspects on classes could help here. Wouldn't it also be good to
link back to the modules that use
Larry Wall wrote:
And we might even allow exponents on 0x et al., though what radix
the exponent is assumed to be is an interesting question, though.
Well, the perl6-documentation guys tried to hash this out, but were
hampered by a lack of both bits that effected the bits that we were
trying to w
> Let's not stir the mud.
>
> Then Robert better suggested cpanratings.
>
> On Wed, Mar 16, 2005 at 01:41:06AM +1100, Robert wrote:
>
>>cpanratings.perl.org?
>
>
> Which seems fit for the CPAN FAQ.
Ok, thanks. One of these months we will get around to updating
the CPAN FAQ a bit.
--
Jark
In his Wiki
(http://wiki.kn.vutbr.cz/mj/index.cgi?Build%20Parrot%20with%20MinGW),
Michal Juroz lists 3 ways for building Parrot :
1) Build Parrot with MinGW, MSYS and MSYS-DTK
2) Build Parrot with MinGW and ActiveState Perl
3) Build Parrot with MinGW-Perl (Build Perl with MinGW first)
There is a
On Wed 16 Mar, Rod Adams wrote:
> I vote for axing C in favor of C and C.
>
Given A05 states that bare scalars match literally, quotemeta is (almost?)
obsolete. It can certainly be downgraded.
Richard
--
Personal [EMAIL PROTECTED]http://www.waveney.org
Telecoms [EMAIL PROT
On Tue, Mar 15, 2005 at 11:04:31PM -0800, Larry Wall wrote:
> On Wed, Mar 16, 2005 at 01:30:10PM +0800, Autrijus Tang wrote:
> : I wonder if there is a way to expose this trait to the user,
> : though... A quick grep did not find anything. Anyone got ideas?
>
> For the most part we'll delay evalua
I just posted a fresh copy of S29 to:
http://www.rodadams.net/Perl/S29.pod
http://www.rodadams.net/Perl/S29.html
New:
All defined functions have been restructured into packages.
Perl6::Arrays, Perl6::Lists, and Perl6::Hashes are (mostly) written.
Some Math::Basic and Math::Trig functions added.
:'s
I vote for axing C in favor of C and C.
-- Rod Adams
81 matches
Mail list logo