On Wed, 1 Apr 2009, John Macdonald wrote:
> If I understand correctly, (which is by no means assured) a function
> call with a junction as an argument generally acts as if it were
> autothreaded. So:
>
> $x = any(1,2,3);
> $y = f($x);
>
> should work like:
>
> $y = any( f(1),
On Wed, 1 Apr 2009, Richard Hainsworth wrote:
> A closer examination of Martin's message indicates that he tends to think
> that hitting a junction ought to thread the entire program throughout the
> rest of the lifespan of said junction
Yes -- and well put, thank-you.
The trick is that since con
On Tue, 31 Mar 2009, Jon Lang wrote:
> Another issue: what happens if conditional code mutates a junction
> that it filtered? For example:
>
> $x = any (-5 .. 5);
> if $x > 0 { $x++ };
>
> At this point, which of the following does $x equal?
>
> any(-4 .. 6) # the original junction get
Mark J. Reed wrote:
[I] wrote:
So I'd vote for going with simple semantics that are easy to explain --
that is, don't attempt implicit junctional collapse. Provide operators to
collapse when needed, but don't attempt to be too clever.
While it's easier to find clever programmers than to write
On Wed, Apr 01, 2009 at 08:40:12AM -0700, Dave Whipp wrote:
> That said, the semantics of a chained relop really should work correctly
> for this. If you only reference a junction once in an expression, then
> it should behave as such: {a
On Tue, Mar 31, 2009 at 10:54:33PM -0700, Jon Lang wrote:
: * Why are pointy blocks forbidden from enclosing their signatures in
: parentheses, or from using the ":( ... )" notation? Is this a
: holdover from the early days, when parentheses denoted a list? Or is
: there still a good reason not t
On Wed, Apr 1, 2009 at 11:49 AM, Dave Whipp wrote:
> The problem I see with this (other than implementation issues) is that it
> would lead to unintuitive behavior in some cases:
>
> my $x = one(10,20);
> if $x > 15 {
> # here, $x collapsed to "20"
> if $x > 5 { say "$x > 5" } else { say "not $
HaloO,
Moritz Lenz wrote:
* What types are you allowed to assign to an invocant?
Whatever the type constraint says. When you write
class Foo { method bar ($x, $y) }, then bar's signature gets an invocant
of type Foo implicitly. If you write ... method bar (A $s:, $x, $y),
then the type constra
HaloO,
John Macdonald wrote:
Unless autothreading is also implied by conditionals, $y
and $z would have significantly different results; $y ===
any(undef,undef,undef) while $z === any(1,2,3).
This is why I'm opting for statical analysis of auto-threaded
conditionals.
But, if
autothreading
On Wed, Apr 01, 2009 at 09:55:37AM -0300, Daniel Ruoso wrote:
> Em Qua, 2009-04-01 às 05:41 -0700, Jon Lang escreveu:
> > ...nor would I expect it to. I'm just wondering if (@_, %_) _are_
> > still part of a placeholder-generated signature. In short, is there a
> > way to access a slurpy array or
Jon Lang wrote:
[proposal that conditional statements should collapse junctions]
$x = +1 | -1;
if $x > 0 { say "$x is positive." }
else { say "$x is negative." }
I suspect that both codeblocks would be executed; but within the first
block, $x == +1, and within the second codeblock,
HaloO,
Richard Hainsworth wrote:
( $a <= any(-1,+1) && any(-1,+1) <= $b )(*A)
[..]
$tmp = any(-1,+1);
$a <= $tmp && $tmp <= $b (*B*)
Quite how the lines I have labelled (A) and (*B*) are
different, I do not understand. Unless wrapping a junctio
HaloO,
Jon Lang wrote:
Another issue: what happens if conditional code mutates a junction
that it filtered? For example:
$x = any (-5 .. 5);
if $x > 0 { $x++ };
At this point, which of the following does $x equal?
any(-4 .. 6) # the original junction gets mutated
any(-5 .. 0,
Richard Hainsworth wrote:
Thinking about Jon Lang's -1|+1 example in another way, I wondered about
simultaneous conditions.
Consider
$x = any (1,2,5,6)
How do we compose a conditional that asks if any of this set of
eigenstates are simultaneously both > 2 and < 5?
Clearly the desired answer
On Wed, Apr 01, 2009 at 09:44:43AM -0400, Mark J. Reed wrote:
> The idea is that junctions should usually be invisible to the code,
> and autothreading handles them behind the scenes. [ ... ]
If I understand correctly, (which is by no means assured) a function
call with a junction as an argument
# New Ticket Created by Daniel Ruoso
# Please include the string: [perl #64344]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=64344 >
not entirely sure what's going on there. what is the use case in
general for declaring
Author: moritz
Date: 2009-04-01 16:03:18 +0200 (Wed, 01 Apr 2009)
New Revision: 26042
Modified:
docs/Perl6/Spec/S04-control.pod
Log:
[S04] fixed illegal construct, sbp++
Modified: docs/Perl6/Spec/S04-control.pod
===
--- docs/Perl6
The idea is that junctions should usually be invisible to the code,
and autothreading handles them behind the scenes. Once you start
using the eigenstates as a collection, you're breaking the model and
not gaining anything over just using a regular collection type.
But the "behind the scenes"
On Wednesday, April 01 2009 07:38 am, Richard Hainsworth wrote:
> Right now, yes. I'm arguing that the way that they're designed to
> work doesn't DWIM. Try a slightly different example:
>
> 0 <= $x <= 1 # 0 is less than $x is less than 1.
> $x ~~ 0..1 # $x is in the range of 0 to 1.
>
>
Em Qua, 2009-04-01 às 05:41 -0700, Jon Lang escreveu:
> On Wed, Apr 1, 2009 at 5:07 AM, Daniel Ruoso wrote:
> > The concept of "invocant" only exists in terms of syntax now. In runtime
> > the invocant is simply the first positional argument. This simplifies
> > things a lot.
> I think you're conf
On Wed, Apr 1, 2009 at 5:07 AM, Daniel Ruoso wrote:
> Em Ter, 2009-03-31 às 22:54 -0700, Jon Lang escreveu:
>> Yes, I know that there is no S08. I'm working on writing one, and I'd
>> like some feedback to help me do so.
>
> ++
>
>> My draft is going to be about Signatures and Captures. Thus, my
On Sat Mar 21 06:28:26 2009, Cybera wrote:
> Checked out revision 37535.
> Can't exec "C:/Program": No such file or directory at
>build/gen_parrot.pl line 63.
Attached patch solves this (and possible some other issues)
--
Bacek
diff --git a/build/gen_parrot.pl b/build/gen_parrot.pl
index f
On Wed, Apr 1, 2009 at 12:58 AM, Richard Hainsworth
wrote:
> Thinking about Jon Lang's -1|+1 example in another way, I wondered about
> simultaneous conditions.
>
> Consider
>
> $x = any (1,2,5,6)
>
> How do we compose a conditional that asks if any of this set of eigenstates
> are simultaneously
Em Ter, 2009-03-31 às 22:54 -0700, Jon Lang escreveu:
> Yes, I know that there is no S08. I'm working on writing one, and I'd
> like some feedback to help me do so.
++
> My draft is going to be about Signatures and Captures. Thus, my questions:
> Invocants:
The concept of "invocant" only exist
Jonathan Worthington wrote:
> Jon Lang wrote:
>>
>> Invocants:
>>
>> * Does anyone object to roles having an invocant, and that invocant
>> referring to the class that is doing the role?
>>
>>
>
> Yes; on further reflection, the ability to type that invocant raises all
> kinds of possible WTFs with
This email was mistakenly not sent to the p6l list.
Jon writes:
On Wed, Apr 1, 2009 at 12:54 AM, Richard Hainsworth
wrote:
Jon Lang wrote:
In "Junction Algebra", Martin Kealey wrote:
On Mon, 30 Mar 2009, Mark J. Reed wrote:
( $a <= any(-1,+1) <= $b ) ==
( $a <= any(-1,+1) && a
Jon Lang wrote:
Invocants:
* Is it illegal to specify an invocant in a sub, or is it merely
nonsensical? That is, should the compiler complain, or should it
silently treat the invocant as the first positional parameter? (The
latter has the advantage that you don't have to worry about what the
Richard (>):
> Consider
>
> $x = any (1,2,5,6)
>
> How do we compose a conditional that asks if any of this set of eigenstates
> are simultaneously both > 2 and < 5?
> Clearly the desired answer for $x is False, but
>
> my $x = any(1,2,5,6); say ?( 2 < $x < 5); # true
>
> Is there some combination
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #64332]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=64332 >
rakudo: my %hash = (1 => 2); say "{%hash<>}";
rakudo 78cb4c: OUTPUT«»
hmmm.
bug?
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #64310]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=64310 >
rakudo: sub foo { my $a = 5; say $^a }; foo(7)
rakudo c01555: OUTPUT«5»
that looks..
Thinking about Jon Lang's -1|+1 example in another way, I wondered about
simultaneous conditions.
Consider
$x = any (1,2,5,6)
How do we compose a conditional that asks if any of this set of
eigenstates are simultaneously both > 2 and < 5?
Clearly the desired answer for $x is False, but
my $
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #64330]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=64330 >
masak: if /.../ { ... } # should that test the truthness of
the regex object?
rakudo:
I can't comment on most of your questions, but the few that I can answer
are inline below...
Jon Lang wrote:
> Yes, I know that there is no S08. I'm working on writing one,
++
> * What types are you allowed to assign to an invocant?
Whatever the type constraint says. When you write
class Foo
33 matches
Mail list logo