On Sat, Feb 12, 2005 at 01:03:26AM -0600, Rod Adams wrote:
> I also find the following incredibly disturbing:
>
> >perl6 -e "$x = 'cat'|'dog'; say $x;"
> dog
> cat
Would that happen though? What's the signature of C? I think
it's something like
multi sub *say ($stream = $*OUT: *$data)
On 11 Feb 2005, at 19:52, Shawn Sorichetti wrote:
[snip]
I've started working on Test::Output that is based on Schwern's TieOut
module that comes with Test::More. I'm hoping to have it released on
CPAN later tonight.
Test::Output is a self contained so that it can be included with other
modules
On Thu, 14 Nov 2002, Luke Palmer wrote:
> > nest:
> > Nest is the power loop thingy documented in Raphael Finkel's top notch
> > book "Advanced Programming Language Design", near the end of the "Control
> > Structures" chapter -- this book is in PDF format:
> > http://www.nondot.org/sabre/Mi
More hyper-operators
Incidentally, is there any chance we'll have more than one official
hyper-operator in Perl6? According to the S3, there's only one, "the"
hyper-operator, >><<. If I understand, hyper-operators are just operators
which operate on functions (incl
Ok, having just seen Damien's post about built-in methods, I can
answer part of my own post:
Re: more hyper-operators: reduce, thank-you! :) Of course, it'd still be
better as a hyper-operator instead of a function (so that it works on
operators too).
I wrote:
> (speaking of which,
Hi,
I'm currently working on some Parrot bits, including some more cleanup of
the test suite.
For that it would be convenient to have commit right in CVS and rights in
the RequestTracker.
Could a kind soul set that up? My user ID on auth.perl.org is 'bernhard'.
CU, Bernhard
--
/* [EMAIL PROTE
Often when I write a loop I want to run some code at loop entry time. It
would be nice to have a closure trait for this, similar to NEXT for loop
continuation or LAST for loop termination, but there isn't one. I don't
think either FIRST or ENTER do quite what I want. FIRST runs only once,
whi
On Sat, Feb 12, 2005 at 04:44:04PM +1100, Damian Conway wrote:
> Patrick R. Michaud wrote:
>
> >>$x = $Value | 'Default';
> >>instead of :
> >>$x = $Value || 'Default';
> >
> >
> >Hmm, this is an interesting point. I'll let others chime in here,
> >as I don't have a good answer (nor am I at all a
On Sat, Feb 12, 2005 at 10:55:05AM -0600, Patrick R. Michaud wrote:
> On Sat, Feb 12, 2005 at 12:09:37PM +0800, Autrijus Tang wrote:
> > [...]
> > - one() checks its operands for duplicates; if found, it collapses
> > itself into an empty one() junction, thus failing all tests.
> > Is thi
On Sat, Feb 12, 2005 at 11:10:13AM -0600, Patrick R. Michaud wrote:
> No, consider
>
> $a = 1;
> $b = 2;
>
> one($a, $a, $b) # false
> one($b) # true
Right. Evidently I need to sleep real soon. :-)
However, is there a way to remove the $a from the equation? I'd like
On Sat, Feb 12, 2005 at 01:02:45PM +0800, Autrijus Tang wrote:
> On Fri, Feb 11, 2005 at 02:12:51PM -0600, Patrick R. Michaud wrote:
> > I briefly grepped through the apocalypses/synopses and couldn't
> > find the answer -- how do I tell a scalar context to expect a
> > junction of values? In part
On Sat, Feb 12, 2005 at 12:09:37PM +0800, Autrijus Tang wrote:
> [...]
> - one() checks its operands for duplicates; if found, it collapses
> itself into an empty one() junction, thus failing all tests.
> Is this somewhat saner? :-)
Depends on when it's checking its operands for duplicat
On Sun, Feb 13, 2005 at 01:01:15AM +0800, Autrijus Tang wrote:
> On Sat, Feb 12, 2005 at 10:55:05AM -0600, Patrick R. Michaud wrote:
> > On Sat, Feb 12, 2005 at 12:09:37PM +0800, Autrijus Tang wrote:
> > > [...]
> > > - one() checks its operands for duplicates; if found, it collapses
> > >
On Sat, Feb 12, 2005 at 12:41:19AM -0600, Rod Adams wrote:
> >I've given here. For example, a junction can have a value like:
> > $x = ($a & $b) ^ ($c & $d)
> >which is true only if $a and $b are true or $c and $d are true but not
> >both.
>
> That's why I allowed for virtual sets, defined by a
On Sat, Feb 12, 2005 at 03:49:02AM -0600, Jonathan Scott Duff wrote:
> On Sat, Feb 12, 2005 at 01:03:26AM -0600, Rod Adams wrote:
> > I also find the following incredibly disturbing:
> >
> > >perl6 -e "$x = 'cat'|'dog'; say $x;"
> > dog
> > cat
>
> Would that happen though? What's the signature
# New Ticket Created by Markus Amslser
# Please include the string: [perl #34117]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/rt3/Ticket/Display.html?id=34117 >
make html failes currently, because the src/test_main.c file was moved
to examples/c
On Sat, Feb 12, 2005 at 06:34:05PM +0100, Eirik Berg Hanssen wrote:
> I think one([EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) is
> equivalent to all(none([EMAIL PROTECTED]),one([EMAIL PROTECTED])),
> which should permit an implementation using Sets without duplicate
> elements. Whe
> "JG" == Joe Gottman <[EMAIL PROTECTED]> writes:
JG>sub use_first()
JG>{
JG> for 1..2 {
JG> FIRST {say 'entering loop';}
JG> say $_;
JG> LAST{say 'leaving loop';}
JG> }
JG> }
JG> The first time use_first is called it will pr
Michael G Schwern wrote:
On Fri, Feb 11, 2005 at 07:30:24AM -0500, David Golden wrote:
stdout_is { fcn() } $string, "comment"; # exact
stdout_like{ fcn() } qr/regex/, "comment"; # regex match
stdout_count { fcn() } qr/regex/, $count, "comment"; # number of matches
stdout_found { fcn()
Patrick R. Michaud wrote:
On Sat, Feb 12, 2005 at 03:49:02AM -0600, Jonathan Scott Duff wrote:
On Sat, Feb 12, 2005 at 01:03:26AM -0600, Rod Adams wrote:
I also find the following incredibly disturbing:
perl6 -e "$x = 'cat'|'dog'; say $x;"
dog
cat
Would that happen th
Patrick R. Michaud wrote:
On Sat, Feb 12, 2005 at 12:41:19AM -0600, Rod Adams wrote:
Of course we'll always have C. But this is Perl, and I want YAWTDI.
After all, another way to test membership was just added, whereas before
you pretty much just had C.
...another way to test membership wa
On Sat, Feb 12, 2005 at 12:44:05PM -0500, Uri Guttman wrote:
: > "JG" == Joe Gottman <[EMAIL PROTECTED]> writes:
:
: JG>sub use_first()
: JG>{
: JG> for 1..2 {
: JG> FIRST {say 'entering loop';}
: JG> say $_;
: JG> L
On Sat, Feb 12, 2005 at 05:55:48PM +1100, Timothy S. Nelson wrote:
: More hyper-operators
:
:
: Incidentally, is there any chance we'll have more than one official
: hyper-operator in Perl6? According to the S3, there's only one, "the"
: hyper-operator, >><<. If I un
On Sat, Feb 12, 2005 at 01:18:53PM -0600, Rod Adams wrote:
> >>My issue is less that lists and sets are radically different. It is much
> >>more a matter of Junctions and Scalars are radically different. Getting
> >>me to accept that a Scalar holds several different values at once is a
> >>hard sel
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
LW> : JG> The first time use_first is called it will print
LW> : JG> entering loop
LW> : JG> 1
LW> : JG> 2
LW> : JG> leaving loop
LW> :
LW> : JG> but subsequently it will print
LW> : JG> 1
LW> : JG>
On Sat, Feb 12, 2005 at 03:55:40PM -0500, Uri Guttman wrote:
: LW> What's going on here is that the loop body is a closure that is
: LW> cloned upon entry to the loop (you're logically passing a closure
: LW> to the "for()" function that implements the loop), so if there's a
: LW> FIRST ins
On Sat, Feb 12, 2005 at 02:20:45PM -0600, Patrick R. Michaud wrote:
: > And I've yet to receive a good answer for what C<3/any(0,1)> does to $!.
:
: I'm sure that 3/any(0,1) throws some sort of divide by zero exception;
: same as 3/0 would, and places the exception into $!. I don't know
: that $!
Patrick R. Michaud wrote:
On Sat, Feb 12, 2005 at 01:18:53PM -0600, Rod Adams wrote:
My issue is less that lists and sets are radically different. It is much
more a matter of Junctions and Scalars are radically different. Getting
me to accept that a Scalar holds several different values at once
Rod Adams wrote:
I also find the following incredibly disturbing:
>perl6 -e "$x = 'cat'|'dog'; say $x;"
dog
cat
That would be disturbing if that's what happened.
C is just a shorthand for C.
So saying a junction is the same as printing it, which is a run-time error.
Can a junction hold values of
Autrijus wrote:
FWIW, I also find it incredibly disturbing. Although I don't have
to deal with it yet in the side-effect-free FP6, I think one way
to solve this is for the "say" to return a junction of IO actions.
No. It just throws an exception:
Can't output a raw junction
(did yo
On Sat, Feb 12, 2005 at 12:19:46PM -0600, Rod Adams wrote:
> I reread S09, and I believe "autothreading" is the wrong term for the
> iteration that a junction incurs (Even though it appears in the section
> immediately after Junctions. Autothreading is something far weirder,
> dealing with part
Jonathan Scott Duff wrote:
Let's set aside for the moment the fact that slurpy arrays/hashes
aren't autothreaded and talk about a user-defined routine:
sub foo ($alpha) { ... }
It doesn't take much imagination to come up with a mechanism for Perl6
programmers to stop the autothreading:
sub
On Sun, Feb 13, 2005 at 09:53:36AM +1100, Damian Conway wrote:
> Jonathan Scott Duff wrote:
> >The down side is that programmers need to be more aware of
> >subroutine/method side effects and write their programs accordingly.
>
> This is a *down*-side??? ;-)
Indeed ;-)
I'm using "programmer"
Autrijus Tang <[EMAIL PROTECTED]> writes:
> On Sat, Feb 12, 2005 at 11:10:13AM -0600, Patrick R. Michaud wrote:
>> No, consider
>>
>> $a = 1;
>> $b = 2;
>>
>> one($a, $a, $b) # false
>> one($b) # true
>
> Right. Evidently I need to sleep real soon. :-)
>
> However, is
Damian Conway wrote:
Rod Adams wrote:
I also find the following incredibly disturbing:
>perl6 -e "$x = 'cat'|'dog'; say $x;"
dog
cat
That would be disturbing if that's what happened.
C is just a shorthand for C.
So saying a junction is the same as printing it, which is a run-time
error.
So we ha
On Sat, Feb 12, 2005 at 12:47:56PM -0500, David A. Golden wrote:
> >The trouble with this interface is sometimes you want to collect a bunch
> >of output from a bunch of different functions together.
>
> That's why I suggested that it be prototyped to take a code block:
>
> stdout_is {
> fcn1
# New Ticket Created by Markus Amslser
# Please include the string: [perl #34120]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/rt3/Ticket/Display.html?id=34120 >
This patch extends the io NET_DEVEL with the 'server' functions bind,
listen and acc
# New Ticket Created by Markus Amslser
# Please include the string: [perl #34121]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/rt3/Ticket/Display.html?id=34121 >
Now it's getting funny. I have written a tiny webserver in imc, that can
serve the p
Michael G Schwern wrote:
On Sat, Feb 12, 2005 at 12:47:56PM -0500, David A. Golden wrote:
The trouble with this interface is sometimes you want to collect a bunch
of output from a bunch of different functions together.
That's why I suggested that it be prototyped to take a code block:
stdout_is {
39 matches
Mail list logo