in the Stratego
language.
This sounds very much like what has been envisioned for Perl 6. I wonder if
the Perl6 team can leverage (in the future) the work done for Spoofax?
Regards,
Henry
--
Henry Baragar
Instantiated Software
version of a larger spec.
Richard (finanalyst)
--
Henry Baragar
Instantiated Software
([*])
and of course a sub without an explicit return statement returns the
value of the last expression.
I do think captures are inherently impressive, but not easy to
explain...
Got a link?
Daniel.
--
Henry Baragar
Instantiated Software
416-907-8454 x42
On May 23, 2009 11:31:35 pm John M. Dlugosz wrote:
Henry Baragar Henry.Baragar-at-instantiated.ca |Perl 6| wrote:
sub f2 (@y) {say @y.WHAT; say +...@y}; f2(Nil);
Array()
1
Why doesn't +...@y produce 0, not 1? It's an empty list.
From rakudo:
sub f2 (@y) {say @y[0
hope to give back just as much, once
I've caught back up. In any case, what I learn I will document for all
who come later.
--John
--
Henry Baragar
Instantiated Software
416-907-8454 x42
a $. For example,
sub f1 ($x, @y, @z) { ... }
Before I get any farther with this line of thought, I want to know if
I'm missing something important.
Thanks,
--John
--
Henry Baragar
Instantiated Software
416-907-8454 x42
On May 23, 2009 04:10:49 pm John M. Dlugosz wrote:
Henry Baragar Henry.Baragar-at-instantiated.ca |Perl 6| wrote:
I think that in your Example 1, that you may be making too making too
much of a distinction between $a and @a. That is:
sub f2(@y) {...}
has exactly the same signature
of type Int() for @y in call to f1
in sub f1 (unknown:1)
called from Main (unknown:1)
Regards,
Henry
Regards,
Henry
Thanks,
--John
--
Henry Baragar
Instantiated Software
416-907-8454 x42
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.
I submit
Patrick R. Michaud wrote:
On Fri, Mar 27, 2009 at 05:49:02PM -0400, Henry Baragar wrote:
I believe that there are hands where $p = 15|26 which would not beat a
hand where $d = 17.
I believe that the correct way to calculate the value of the hand is:
my $p = ([+] @p).map{.eigenstates
Daniel Ruoso wrote:
But even to compare two hands it gets weird...
my @a = 1|11, 9, 1|11;
my @b = 6,9,6;
my $pa = [+] @a;
my $pb = [+] @b;
if ($pa = 21 $pb = 21) {
if ($pa $pb) {
# B0RK3D
}
}
That happens because $pa and $pb are a singular value, and that's how
junctions
valid perl6 syntax. In pseudo-perl5
I would do it as:
my $p = max grep {$_ 21} map {$_.eigenstates} [+] @p;
HB
Richard (finanalyst)
--
Henry Baragar
Principal
Instantiated Software Inc.
416-907-8454 ext 42
I am starting to get overwhelmed by the number of special names and I am
wondering why we need to have a flat naming space?
For example, wouldn't it be easier to remember (and to introspect) the
following?
$*SYSTEM.uid
$*SYSTEM.euid
$*SYSTEM.pid
$*SYSTEM.perl
$*SYSTEM.env
13 matches
Mail list logo