On Tue, Nov 18, 2003 at 11:14:54AM -0500, Dan Sugalski wrote:
: On Tue, 18 Nov 2003, Simon Cozens wrote:
:
: > [EMAIL PROTECTED] (Austin Hastings) writes:
: > > This is what I was talking about when I mentioned being able to do:
: > > &cleanup .= { push @moves: [$i, $j]; }
: >
: > This reminds m
Larry Wall writes:
> If you write:
>
> multi method add( $self: Foo $foo, Bar $bar );
>
> then there are multiple add methods in the current class. Note the
> invocant is not optional in this case. Also, there's an implied
> second colon after $bar, indicating the end of the arguments to be
Michael G Schwern wrote:
Disabling tests for subjective reasons (they take "too long", they don't
test critical functionality, etc...) is a slippery slope.
I've seen this approach used successfully in a commercial setting. The
key is to make sure that the long tests do get run by someone.
If u
- Original Message -
From: "Jonathan Lang" <[EMAIL PROTECTED]>
> So the following three declarations cover very similar (but not quite
> identical) things:
>
> multi sub call ($a: $b) {...}
> submethod invoke ($a: $b) {...}
> method check ($a: $b) {...}
>
> All three of these use mu
- Original Message -
From: "Austin Hastings" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, November 18, 2003 3:04 PM
Subject: [perl] RE: s/// in string context should return the string
> As a "Bvalue" where possible, so they can cascade and nest.
Exc
I think most everyone is missing the new simplicity of the current
conception of "multi". It's now completely orthogonal to scoping
issues. It merely says, "I'm putting multiple names into a spot
that would ordinarily demand a unique name."
In other words, what a name means in a given scope is a
Jonathan Lang wrote:
multi sub call ($a, $b: $c) {...}
multi submethod invoke ($a, $b: $c) {...}
multi method check ($a, $b: $c) {...}
Why do we suddenly need to append the "multi" keyword to "submethod" and
"method"?
So the compiler knows we really did mean for that (sub)method to be multip
On Tuesday, November 18, 2003, at 06:44 PM, Joseph Ryan wrote:
And also if @array_of_random_values contains 'ok'.
D'oh! See Damian's solution, then. ;-)
David
--
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://w
David Wheeler wrote:
Isn't that just:
for @array_of_random_values_and_types, 'ok' -> $t {
when 'ok' { yada(); last }
last unless some_sort_of_test($t);
}
IOW, the topic is only 'ok' when all of the items in the array have been
processed
Unless, of course, the string 'ok'
Michael G Schwern wrote:
> Disabling tests for subjective reasons (they take "too long", they don't
> test critical functionality, etc...) is a slippery slope. For that reason
> I'd agree with Curtis and say that everything is always run by default
> and users can then elect what to turn off. PER
David Wheeler wrote:
On Tuesday, November 18, 2003, at 06:11 PM, Joseph Ryan wrote:
Not to be a jerk, but how about:
my $is_ok = 1;
for @array_of_random_values_and_types -> $t {
if not some_sort_of_test($t) {
$is_ok = 0;
last;
}
}
if $is_ok {
On Tuesday, November 18, 2003, at 06:11 PM, Joseph Ryan wrote:
Not to be a jerk, but how about:
my $is_ok = 1;
for @array_of_random_values_and_types -> $t {
if not some_sort_of_test($t) {
$is_ok = 0;
last;
}
}
if $is_ok {
yada() # has sideef
Joseph Ryan wrote:
Not to be a jerk, but how about:
my $is_ok = 1;
for @array_of_random_values_and_types -> $t {
if not some_sort_of_test($t) {
$is_ok = 0;
last;
}
}
if $is_ok {
yada() # has sideeffects...
}
That's just:
given @array_
Damian Conway wrote:
Seiler Thomas wrote:
So... lets call a function instead:
my $is_ok = 1;
for 0..6 -> $t {
if abs(@new[$t] - @new[$t+1]) > 3 {
$is_ok = 0;
last;
}
}
if $is_ok {
yada() # has sideeffects...
}
That's just:
On Tue, Nov 18, 2003 at 12:23:19PM -0500, Potozniak, Andrew wrote:
> Is anyone going to develop this, or is all of this just
> wishfull/theorhetical thinking?
Boy, that sounds like a volunteer if I ever heard one!
Anyhow, it looks like Test::LongString is what you want. Now say thank you
to Ra
On Wed, Nov 19, 2003 at 09:30:19AM +1100, Andrew Savige wrote:
> > Also, I would recommend something like PERL_SKIP_LONG_TESTS. By
> > default, all tests should be run to prevent the user accidentally
> > forget to run some tests.
>
> If some tests take hours to run, running them by default will
Luke Palmer wrote:
> Jonathan Lang writes:
> > Luke Palmer wrote:
> > > Well, "multi" is no longer a declarator in its own right, but rather
> > > a modifier. Synopsis & Exegesis 6 show this.
> >
> > I don't know about Exegesis 6,
>
> Then you should probably read it. It is the most recent o
Seiler Thomas wrote:
So... lets call a function instead:
my $is_ok = 1;
for 0..6 -> $t {
if abs(@new[$t] - @new[$t+1]) > 3 {
$is_ok = 0;
last;
}
}
if $is_ok {
yada() # has sideeffects...
}
That's just:
for 0..6, 'ok' -> $
Damian Conway wrote:
> push @moves, [$i, $j];
> for 0..6 -> $t {
> if abs(@new[$t] - @new[$t+1]) > 3 {
> pop @moves;
> last;
> }
> }
>
>
Indeed, an elegant way around the problem.
So... lets call a function instead:
my $is_ok = 1;
Ovid wrote:
> --- Kate L Pugh wrote:
> > This was discussed on this list back in June. I'm wanting to
> > implement it now and am wondering if Andrew's suggestion (below) has
> > been taken up by anyone. Is PERL_TEST_LONG what people here
> > generally
> > expect to be the right environment varia
On Tue, 18 Nov 2003, Austin Hastings wrote:
>
>
> > -Original Message-
> > From: Dan Sugalski [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, November 18, 2003 4:34 PM
> > To: Language List
> > Subject: RE: Control flow variables
> >
> >
> > On Tue, 18 Nov 2003, Austin Hastings wrote:
> >
> >
> -Original Message-
> From: Dan Sugalski [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 18, 2003 4:34 PM
> To: Language List
> Subject: RE: Control flow variables
>
>
> On Tue, 18 Nov 2003, Austin Hastings wrote:
>
> > This seems excessive, but easily discarded during optimization.
Luke Palmer wrote:
My C/C typo may
have misled you, but the original example pushed only if *none* of them
passed the condition.
Ah, sorry, I misunderstood.
So you want:
push @moves, [$i, $j];
for 0..6 -> $t {
if abs(@new[$t] - @new[$t+1]) > 3 {
pop @moves;
Added 'num' as an alias for 'float'. Both map to the Parrot Nx registers.
-Melvin
Austin Hastings writes:
> > From: Luke Palmer [mailto:[EMAIL PROTECTED]
> >
> > Austin Hastings writes:
> > > > From: Michael Lazzaro [mailto:[EMAIL PROTECTED]
> > > >
> > > > Would that then imply that
> > > >
> > > > sub blah {
> > > >... # 1
> > > >return if $a;
On Tue, 18 Nov 2003, Austin Hastings wrote:
> This seems excessive, but easily discarded during optimization. On the other
> hand, I don't trust the "last statement evaluated" behavior for loops, since
> the optimizer could very well do surprising things to loop statements.
> (Likewise, however, f
> -Original Message-
> From: Luke Palmer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 18, 2003 3:11 PM
> To: Austin Hastings
> Cc: Michael Lazzaro; [EMAIL PROTECTED]
> Subject: Re: Control flow variables
>
>
> Austin Hastings writes:
> >
> >
> > > -Original Message-
> >
> -Original Message-
> From: Damian Conway [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 18, 2003 4:02 PM
> To: Language List
> Subject: Re: Control flow variables
>
>
> Luke Palmer started a discussion:
>
>
> > I see this idiom a lot in code. You loop through some values on a
> >
Damian Conway writes:
> Luke Palmer started a discussion:
>
>
> >I see this idiom a lot in code. You loop through some values on a
> >condition, and do something only if the condition was never true.
> >$is_ok is a control flow variable, something I like to minimize. Now,
> >there are other way
Looks like things are fixed. I committed the following:
-Melvin
Revision Changes Path
1.58 +8 -0 parrot/imcc/imc.h
Index: imc.h
===
RCS file: /cvs/public/parrot/imcc/imc.h,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -
Michael Lazzaro wrote:
So, just to make sure, these two lines are both valid, but do completely
different things:
return if $a;
Means:
if ($a) { return }
return if $a { $a }
Means:
if ($a) { return $a } else { return undef }
Damian
Luke Palmer started a discussion:
I see this idiom a lot in code. You loop through some values on a
condition, and do something only if the condition was never true.
$is_ok is a control flow variable, something I like to minimize. Now,
there are other ways to do this:
if (0..6 ==> grep -> $
On 18 Nov 2003 18:37:57 +0100, Juergen Boemmels
<[EMAIL PROTECTED]> wrote:
>I assume he runs it with perl Configure.pl --ask
Yes
>The problem is that --ask option of has not the knowledge to change
>the options according to the compiler. I don't know a simple fix for
>this.
>
>A workaround soluti
Would that then imply that
sub blah {
... # 1
return if $a;# 2
... # 3
}
...would return $a if $a was true, and fall through to (3) if it was
false?
It sure should, provided there were a correct context waiting, which
would
quite nicel
Austin Hastings writes:
>
>
> > -Original Message-
> > From: Michael Lazzaro [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, November 18, 2003 2:06 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Control flow variables
> >
> >
> >
> > On Tuesday, November 18, 2003, at 06:38 AM, Simon Cozens wr
Austin Hastings writes:
>
>
> > -Original Message-
> > From: Michael Lazzaro [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, November 18, 2003 2:06 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Control flow variables
> >
> >
> >
> > On Tuesday, November 18, 2003, at 06:38 AM, Simon Cozens wr
> -Original Message-
> From: Michael Lazzaro [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 18, 2003 2:06 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Control flow variables
>
>
>
> On Tuesday, November 18, 2003, at 06:38 AM, Simon Cozens wrote:
> > Given that we've introduced the conce
As a "Bvalue" where possible, so they can cascade and nest.
=Austin
> -Original Message-
> From: Stephane Payrard [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 18, 2003 12:19 PM
> To: [EMAIL PROTECTED]
> Subject: s/// in string context should return the string
>
>
> s/// in strin
Hi,
I've attached an example of calling a Win32 API using NCI. As it's a new
file, I diff'd it against /dev/null. Suggest it goes in examples/pni, along
with the Qt one that someone else has sent in a patch for (which is what
reminded me to send this one in).
Jonathan
win32api.imc.diff
Descri
On Tuesday, November 18, 2003, at 06:38 AM, Simon Cozens wrote:
Given that we've introduced the concept of "if" having a return status:
my $result = if ($a) { $a } else { $b };
Would that then imply that
sub blah {
... # 1
return if $a;# 2
...
--- Kate L Pugh <[EMAIL PROTECTED]> wrote:
> This was discussed on this list back in June. I'm wanting to
> implement it now and am wondering if Andrew's suggestion (below) has
> been taken up by anyone. Is PERL_TEST_LONG what people here
> generally
> expect to be the right environment variable
OOPS, totally miss-read your code, ignore my first part of my last
message.
--
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Luke Palmer wrote:
I was reading the most recent article on perl.com, and a code segment
reminded me of something I see rather often in code that I don't like.
Here's the code, Perl6ized:
... ;
my $is_ok = 1;
for 0..6 -> $t {
if abs(@new[$t] - @new[$t+1]) > 3 {
$is_
s/// in string context should return the string after substituion.
It seems obvious to me but I mention it because I can't find it
in the apocalypses.
--
stef
# New Ticket Created by Ilya Martynov
# Please include the string: [perl #24514]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt2/Ticket/Display.html?id=24514 >
1. There are incorrect instructions on running the example
2. .so extension should be
This was discussed on this list back in June. I'm wanting to
implement it now and am wondering if Andrew's suggestion (below) has
been taken up by anyone. Is PERL_TEST_LONG what people here generally
expect to be the right environment variable to set to enable
long-running tests?
(I know I could
- Original Message -
From: "Melvin Smith" <[EMAIL PROTECTED]>
> Can you confirm that this is fixed? Upgrading my flex from 2.5.4 -> 2.5.6
> fixed the unist.d include issue. I checked in a new lexer just now.
'fraid not. The #include for it is now enclosed in this block:-
/* Special case
"Jonathan Worthington" <[EMAIL PROTECTED]> writes:
> Pete sent me some further info off list, here's what happens when he runs
> Configure:-
I assume he runs it with
perl Configure.pl --ask
> Parrot Version 0.0.13 Configure 2.0
> Copyright (C) 2001-2003 The Perl Foundation. All Rights Reserved.
Potozniak, Andrew wrote:
>
> Is anyone going to develop this, or is all of this just
> wishfull/theorhetical thinking? If someone will develop this are we going
> to add it to Test::More or create a module wrapped around Test::More with
> the added functionality?
What is "this" feature you're re
Sterling Hughes wrote:
The reason I think parrot-compilers would be useful, is that its
dedicated to helping people (like me) write compilers for parrot,
whereas (in my understanding), perl6-internals@ is really about the
development of the vm itself (I would subscribe to both). I see
parrot-
On Nov 18, 2003, at 9:07 AM, Sterling Hughes wrote:
The reason I think parrot-compilers would be useful, is that its
dedicated to helping people (like me) write compilers for parrot,
whereas (in my understanding), perl6-internals@ is really about the
development of the vm itself (I would subscr
Is anyone going to develop this, or is all of this just
wishfull/theorhetical thinking? If someone will develop this are we going
to add it to Test::More or create a module wrapped around Test::More with
the added functionality?
Toodles,
~~Andrew
(Chrom sorry about the repeatforgot to use t
The reason I think parrot-compilers would be useful, is that its
dedicated to helping people (like me) write compilers for parrot,
whereas (in my understanding), perl6-internals@ is really about the
development of the vm itself (I would subscribe to both). I see
parrot-compilers@ as opening up
On Tue, 18 Nov 2003, Jeff Clites wrote:
> On Nov 17, 2003, at 11:22 AM, Melvin Smith wrote:
>
> > In the past couple of years we've seen several sub-projects pop-up
> > and subsequently fizzle out (maybe due to Parrot slow
> > progress or maybe due to lack of critical mass).
> >
> > I propose cr
On Nov 17, 2003, at 11:07 AM, Leopold Toetsch wrote:
Jeff Clites <[EMAIL PROTECTED]> wrote:
My main point is that you can't do conditional library loading. This
code will try to load the "doesnt_exist" library, and I don't think it
should:
branch HERE
loadlib P1, "doesnt_exist
> -Original Message-
> From: Luke Palmer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 18, 2003 10:49 AM
> To: Austin Hastings
> Cc: Language List
> Subject: Re: Control flow variables
>
>
> Austin Hastings writes:
> > Luke Palmer wrote:
> > > I was reading the most recent articl
Can you confirm that this is fixed? Upgrading my flex from 2.5.4 -> 2.5.6
fixed the unist.d include issue. I checked in a new lexer just now.
-Melvin
At 09:49 AM 11/18/2003 +0200, Nick Kostirya wrote:
Again broken :-)
See http://bugs6.perl.org/rt2/Ticket/Display.html?id=24260
> Hi,
>
> When buil
On Nov 17, 2003, at 11:22 AM, Melvin Smith wrote:
In the past couple of years we've seen several sub-projects pop-up
and subsequently fizzle out (maybe due to Parrot slow
progress or maybe due to lack of critical mass).
I propose creating 'parrot-compilers' as a general
purpose list for any and al
On Tue, 18 Nov 2003, Simon Cozens wrote:
> [EMAIL PROTECTED] (Austin Hastings) writes:
> > This is what I was talking about when I mentioned being able to do:
> > &cleanup .= { push @moves: [$i, $j]; }
>
> This reminds me of something I thought the other day might be useful:
>
> $cleanup = b
On 18 Nov 2003 15:09:34 +0100, Juergen Boemmels
<[EMAIL PROTECTED]> wrote:
>Pete Lomax <[EMAIL PROTECTED]> writes:
>
>> Hi,
>> I've only just installed perl. Running Configure.pl on a windows box,
>> I got 'bad command or file name' because line 12 of
>> config\init\hints.pl is:
>> my $hints =
[EMAIL PROTECTED] (Austin Hastings) writes:
> This is what I was talking about when I mentioned being able to do:
> &cleanup .= { push @moves: [$i, $j]; }
This reminds me of something I thought the other day might be useful:
$cleanup = bless {}, class {
method DESTROY { ... }
}
On Tue, 18 Nov 2003, Simon Cozens wrote:
> [EMAIL PROTECTED] (Dan Sugalski) writes:
> > > Luke Palmer:
> > > > That's illegal anyway. Can't chain statement modifiers :-)
> > Will be able to.
>
> I thought as much; Perl 6 will only be finally finished when the biotech
> is sufficiently advanced to
Austin Hastings writes:
> Luke Palmer wrote:
> > I was reading the most recent article on perl.com, and a code segment
> > reminded me of something I see rather often in code that I don't like.
> > Here's the code, Perl6ized:
> >
> > ... ;
> > my $is_ok = 1;
> > for 0..6 -> $t {
> >
> -Original Message-
> From: Luke Palmer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 18, 2003 9:21 AM
> To: Language List
> Subject: Control flow variables
>
>
> I was reading the most recent article on perl.com, and a code segment
> reminded me of something I see rather often i
At 01:50 PM 11/18/2003 +0100, Leopold Toetsch wrote:
Melvin Smith <[EMAIL PROTECTED]> wrote:
> I propose creating 'parrot-compilers' as a general
> purpose list for any and all language development
As long as traffic on p6i is as low as current, I don't see the need for
another list.
I'm concerned
[EMAIL PROTECTED] (Dan Sugalski) writes:
> > Luke Palmer:
> > > That's illegal anyway. Can't chain statement modifiers :-)
> Will be able to.
I thought as much; Perl 6 will only be finally finished when the biotech
is sufficiently advanced to massively clone Larry...
--
Sometimes it's better n
On Tue, 18 Nov 2003, Simon Cozens wrote:
> Luke Palmer:
> > That's illegal anyway. Can't chain statement modifiers :-)
>
> Bah, should be able to!
Will be able to.
Dan
--"it's like this"---
Dan Sugalsk
Luke Palmer:
> Well... it is and isn't. At first sight, it makes the language look
> huge, the parser complex, a lot of syntax to master, etc. It also seems
> to me that there is little discrimination when adding new syntax.
Correct.
> But I've come to look at it another way. Perl 6 is doing
> On Tue, 18 Nov 2003, Juergen Boemmels wrote:
>
> > Pete Lomax <[EMAIL PROTECTED]> writes:
> >
> > > Hi,
> > > I've only just installed perl. Running Configure.pl on a windows box,
> > > I got 'bad command or file name' because line 12 of
> > > config\init\hints.pl is:
> > > my $hints = "config/
boemmels at physik.uni-kl dot de wrote:
> Pete Lomax writes:
>
> > I've only just installed perl. Running Configure.pl on a
> > windows box, I got 'bad command or file name' because line
> > 12 of config\init\hints.pl is:
> > my $hints = "config/init/hints/" . lc($^O) . ".pl";
> > I had to chan
Simon Cozens writes:
> [EMAIL PROTECTED] (Luke Palmer) writes:
> > I was reading the most recent article on perl.com, and a code segment
> > reminded me of something I see rather often in code that I don't like.
>
> The code in question got me thinking too; I wanted to find a cleaner
> way to writ
At 10:49 AM 11/18/2003 +0100, Leopold Toetsch wrote:
Jonathan Worthington <[EMAIL PROTECTED]> wrote:
> Hi,
> When building under Win32:-
> imclexer.c
> imcc/imclexer.c(13) : fatal error C1083: Cannot open include file:
> 'unistd.h': No such file or directory
It seems, that Melvin's flex is slightl
On Tue, 18 Nov 2003, Juergen Boemmels wrote:
> Pete Lomax <[EMAIL PROTECTED]> writes:
>
> > Hi,
> > I've only just installed perl. Running Configure.pl on a windows box,
> > I got 'bad command or file name' because line 12 of
> > config\init\hints.pl is:
> > my $hints = "config/init/hints/" . lc
Pete Lomax <[EMAIL PROTECTED]> writes:
> Hi,
> I've only just installed perl. Running Configure.pl on a windows box,
> I got 'bad command or file name' because line 12 of
> config\init\hints.pl is:
> my $hints = "config/init/hints/" . lc($^O) . ".pl";
> I had to change it to:
> my $hints = "p
[EMAIL PROTECTED] (Luke Palmer) writes:
> I was reading the most recent article on perl.com, and a code segment
> reminded me of something I see rather often in code that I don't like.
The code in question got me thinking too; I wanted to find a cleaner
way to write it, but didn't see one.
> So,
I was reading the most recent article on perl.com, and a code segment
reminded me of something I see rather often in code that I don't like.
Here's the code, Perl6ized:
... ;
my $is_ok = 1;
for 0..6 -> $t {
if abs(@new[$t] - @new[$t+1]) > 3 {
$is_ok = 0;
--- Begin Message ---
I
Think this would be cool, and I will help.
my research masters is retargetting gcj to parrot.
I am only a month into it so I have not put up a project page yet.
On Tuesday 18 November 2003 00:04, Joseph Ryan wrote:
> Pete Lomax wrote:
> >On Mon, 17 Nov 2003 11:35:51 -08
Jonathan Lang writes:
> My apologies for the break in the chain of responses; I lost your reply
> before I could reply to it, and had to retrieve it from the list archives.
>
>
> Luke Palmer wrote:
> > Well, "multi" is no longer a declarator in its own right, but rather a
> > modifier. Synopsis
Melvin Smith <[EMAIL PROTECTED]> wrote:
> I propose creating 'parrot-compilers' as a general
> purpose list for any and all language development
As long as traffic on p6i is as low as current, I don't see the need for
another list.
> -Melvin
leo
On Mon, Nov 17, 2003 at 08:58:17PM +, Pete Lomax wrote:
>
> >I think this would be a *very* cool thing.
>
> What he said.
>
> Pete
idem
--
stef
Jonathan Worthington <[EMAIL PROTECTED]> wrote:
> Hi,
> When building under Win32:-
> imclexer.c
> imcc/imclexer.c(13) : fatal error C1083: Cannot open include file:
> 'unistd.h': No such file or directory
It seems, that Melvin's flex is slightly older then mine. A diff of the
relevant part of (
Again broken :-)
See http://bugs6.perl.org/rt2/Ticket/Display.html?id=24260
> Hi,
>
> When building under Win32:-
>
> imclexer.c
> imcc/imclexer.c(13) : fatal error C1083: Cannot open include file:
> 'unistd.h': No such file or directory
> NMAKE : fatal error U1077: 'F:\Perl\bin\perl.exe' : re
82 matches
Mail list logo