@ToddandMargo wrote:
Now I understand. You are using Str as a
> skip, skip, drop 2, skip, drop 4
> This is a sequential workaround.
> Also I was confused as I though Str was only
> a type declaration and could be used this way.
> What I would like to see is direct access, without the
> skips
.new( I => @will_become_I_soon );
Hmmm. 1002 ways!
or
my $CC = AA.new( I => [ flat( Str xx 400, "four hundred", Str xx 2000-400-1,
"two thousand" ) ] );
Sweet! Thank you!
No use case. I am just in learning mode on
the different ways to pre-salt an object on
creation.
aybe the experts can suggest a better class design.
-Tom
Hi Tom,
I am only trying to write down the various
ways to pre-salting an object on creation.
In practice, if I can not figure out how to
pre-salt in the declaration, I just put what
I want into what I want right under the object
decla
> On Jul 6, 2021, at 3:10 PM, Tom Browder wrote:
>
> On Tue, Jul 6, 2021 at 14:53 ToddAndMargo via perl6-users
> wrote:
> ...
> writing out 2000 skips is not practical.
>
> Todd, why don't you tell us what you're really trying to do, i.e., what is
> your use case? Maybe the experts can sug
On Tue, Jul 6, 2021 at 14:53 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
...
> writing out 2000 skips is not practical.
Todd, why don't you tell us what you're really trying to do, i.e., what is
your use case? Maybe the experts can suggest a better class design.
-Tom
On Tue, Jul 6, 2021 at 10:42 AM ToddAndMargo via perl6-users
mailto:perl6-us...@perl.org>> wrote:
>> On Tue, Jul 6, 2021 at 9:39 AM ToddAndMargo via perl6-users
>> I am confused.
>>
>> What I am after it pre-salting $CC.I with
>> $CC.[0] = "abc"
>>
Hi,
for your last question, let's use again what Norman showed you earlier:
> class AA { has Str @.I is rw }
(AA)
> my $CC = AA.new(I => [Str, Str, 'two', Str, 'four'])
AA.new(I => Array[Str].new(Str, Str, "two", Str, "four"))
> say $CC.I[0]
(Str)
> say $CC.I[2]
two
> say $CC.I[4]
four
In this ca
On Tue, Jul 6, 2021 at 9:39 AM ToddAndMargo via perl6-users
I am confused.
What I am after it pre-salting $CC.I with
$CC.[0] = "abc"
$CC.[1] = "def"
with the ".new" functions when I create $CC
-T
On 7/6/21 12:52 AM, Fernando Santagata wrote:
Hello,
I thin
27;a'
AA.new(I => Array[Str].new("a"))
> $bb.I[0]
a
On Tue, Jul 6, 2021 at 9:39 AM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> >> On Tue, 6 Jul 2021 at 10:55, ToddAndMargo via perl6-users
> >> mailto:perl6-us...@perl.org>&g
On Tue, 6 Jul 2021 at 10:55, ToddAndMargo via perl6-users
mailto:perl6-us...@perl.org>> wrote:
Hi All,
On creation, I would like to salt some of the
values inside an object when the variable
inside is an array:
First a concept test:
$ p6 'class AA { has St
y[Str].new(Str, "abc"))
> say $CC.I;
[(Str) abc]
> say $CC.I[1];
abc
> $CC.I[0] = "zyz";
zyz
> say $CC.I;
[zyz abc]
>
On Tue, 6 Jul 2021 at 10:55, ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> Hi All,
>
> On creation, I woul
Hi All,
On creation, I would like to salt some of the
values inside an object when the variable
inside is an array:
First a concept test:
$ p6 'class AA { has Str @.I is rw; }; my $CC= AA.new; $CC.I[1] = "def";
say $CC.I[1];'
def
Now for the pre-salt test
$ p6 '
On 12/19/20 4:49 PM, Brad Gilbert wrote:
You can interpolate a method call in a string, but you need the parens.
say "$FruitStand.location() has $FruitStand.apples() apples in stock";
Cool! Now four ways of doing it:
print $FruitStand.location ~ "has " ~ $FruitStand.apples ~"
app
hels via perl6-users wrote:
>> > Hi Laurent, I get:
>> >
>> > Fruitstand in Fruit<140431957910656>.location has
>> > Fruit<140431957910656>.apples apples.
>> >
>> > [Rakudo v2020.10]
>> >
>> > Best, Bill.
>> >
apples.";
Is the "." at the end of the apples literal or syntax?
>
>> > Fruitstand in Fruit<140431957910656>.location has
>> > Fruit<140431957910656>.apples apples.
>> >
>> > [Rakudo v2020.10]
>> >
>> > Best, Bill.
>> >
>>
>> Hi Bill,
>>
>> From my notes in progr
> Fruit<140431957910656>.apples apples.
> >
> > [Rakudo v2020.10]
> >
> > Best, Bill.
> >
>
> Hi Bill,
>
> From my notes in progress:
>
> -T
>
>
> *** addressing values inside and object ***
>
> Reading:
>say $
On 12/18/20 9:42 AM, William Michels via perl6-users wrote:
Hi Laurent, I get:
Fruitstand in Fruit<140431957910656>.location has
Fruit<140431957910656>.apples apples.
[Rakudo v2020.10]
Best, Bill.
Hi Bill,
From my notes in progress:
-T
*** addressing values insid
a class is a blueprint for manufacturing objects, you can
> construct as many object as you want.
>
> 2. As an example, you can try:
>
> say " Fruitstand in $FruitStand.location has $FruitStand.apples apples.";
>
> 2. As you declared your class the object attributes will not
er Fruit) in $banana.colour would
output "green". ($banana.ripen would be a method defined in the class
to change "green" to "yellow" and "yellow" to "brown".
On 12/18/20, Laurent Rosenfeld via perl6-users wrote:
> Hi Todd,
>
> 1. Ye
Hi Todd,
1. Yes, a class is a blueprint for manufacturing objects, you can construct
as many object as you want.
2. As an example, you can try:
say " Fruitstand in $FruitStand.location has $FruitStand.apples apples.";
2. As you declared your class the object attributes will not
oranges => 200,
bananas => 50 );
1) am I correct that I can make as many objects as I
want out of a particular class?
2 ) what is the syntax to read an element inside an
object?
3) what is the syntax to write to an element inside an
object?
I am confused, again.
-T
$!pre-compiled.perl.say;
> }
> }
>
>
> # File: test.pl6
> ---
> use lib ;
> use A;
>
> my A $x .= new;
> $x.test;
>
>
> % ./test.pl6
> Cannot invoke this object (REPR: Null; VMNull)
> in block at /
})
> })
> };
>
> method test {
> $!pre-compiled.perl.say;
> }
> }
>
>
> # File: test.pl6
> ---
> use lib ;
> use A;
>
> my A $x .= new;
};
method test {
$!pre-compiled.perl.say;
}
}
# File: test.pl6
---
use lib ;
use A;
my A $x .= new;
$x.test;
% ./test.pl6
Cannot invoke this object (REPR: Null; VMNull)
in block at /git-repos/test/lib/Loader.pm6 (Loader) line 31
in
ertainly a simple way.
>> But this checks for the value of True rather than the object type Bool
>> right? What if I wanted to know if an Int, (with any given value) were
>> among the values?
>>
>> Best regards
>> Mikkel
>>
>> On Thu, 15 Aug 2019 at
Oh. That's easy use an any junction.
say any(@objects) ~~ Bool;
On Thu, 15 Aug 2019 at 16:10, Mikkel wrote:
> Hi Simon
>
> That was certainly a simple way.
> But this checks for the value of True rather than the object type Bool
> right? What if I wanted to know if an
Isn't that a smart match on a type object?
> say @objects.any ~~ Bool
True
> say @objects.any ~~ Rat
False
-y
-y
On Thu, Aug 15, 2019 at 8:11 AM Mikkel wrote:
>
> Hi Simon
>
> That was certainly a simple way.
> But this checks for the value of True rather than
Hi Simon
That was certainly a simple way.
But this checks for the value of True rather than the object type Bool
right? What if I wanted to know if an Int, (with any given value) were
among the values?
Best regards
Mikkel
On Thu, 15 Aug 2019 at 16:38, Simon Proctor wrote:
> The easiest opt
@objects = [1, True, "string", 5, Str.new];
> Containing different kind of objects. It could be Ints, Strs and Bools.
> Is there a nice way of determining if for example a Bool is present in the
> array, returning True or False whether the given object is present or not?
>
se whether the given object is present or not?
Best Regards
Mikkel Birkedam
Aiui the most salient feature of your new type is being syntax sugar
for conveniently creating and naming a sum type that includes `Failure`,
i.e. instead of:
my $foo where Int | Failure;
$foo = 42;
$foo = Failure;
$foo = 'nope'; # Type check failed in assignment to $foo; expected
Not sure what you mean by 'leaking into CORE', but I wouldn't use Metamodel::
namespace too. My suggestion would be to use Type::SumHOW or
Type::Metamodel::SumHOW. The latter is better from namespace structuring point
of view unless long names disgust you.
Best regards,
Vadim Belman
> On Apr 8
I wrote a small sum type module that subclasses
Perl6::Metamodel::SubsetHOW. I was thinking of naming it either
Type::Sum or Metamodel::SumHOW, but Type::Sum doesn't follow the style
Rakudo uses for naming MOP classes, and Metamodel::SumHOW may not be a
good name because it'd leak the module in
> m: ^2 .map: &say
> > rakudo-moar 86e7b2: OUTPUT: «===SORRY!===Cannot find method
> > 'count' on object of type NQPMu»
>
> Fixed with commit
>
https://github.com/rakudo/rakudo/commit/f3efe5e6b4a9ee59f71ca11cb90ef78539be45e3
pair.value = 1; $pair;
> > number => 1
> >
> > Method freeze make the value of the Pair read-only, by removing it
> > from its
> > Scalar container, and returns the value.
> >
> >> $pair.freeze;
> > 1
> >> $pair.value = 2;
> >
On Mon, 18 Sep 2017 13:52:21 -0700, b...@abrij.org wrote:
> On Thu, 19 Jun 2014 17:45:23 -0700, elizabeth wrote:
> > Additional finds:
> >
> > [19:24:52] m: my @a; my $c = 1; @a.push: $($c,1); $c =
> > "hi"; @a.push: $($c,2); say @a.perl
> > [19:24:53] <+camelia>rakudo-moar 8812ca: OUTPUT«
t explodes if you try to both detache and use the &sub map:
> m: ^2 .map: &say
> rakudo-moar 86e7b2: OUTPUT: «===SORRY!===Cannot find method
> 'count' on object of type NQPMu»
Fixed with commit
https://github.com/rakudo/rakudo/commit/f3efe5e6b4a9ee59f71ca11cb90ef78539be45e3
On Wed, 14 Dec 2016 15:14:27 -0800, c...@zoffix.com wrote:
> Seems an optimizer bug. Running with --optimize=off does not have the
> issue present.
Fixed and tested as https://github.com/rakudo/rakudo/issues/1465
On Wed, 14 Dec 2016 15:14:27 -0800, c...@zoffix.com wrote:
> Seems an optimizer bug. Running with --optimize=off does not have the
> issue present.
Fixed and tested as https://github.com/rakudo/rakudo/issues/1465
uot;foo")SetHash.new("foo")SetHash.new("foo")»
>
> On second iteration ends up being a type object:
>
> m: react whenever Supply.interval(.3) { state %goods is
> SetHash; $++ > 3 and done; dd %goods; %goods++; }
> rakudo-moar 3755c0: OUTPUT: «SetHash.new()Se
uot;foo")SetHash.new("foo")SetHash.new("foo")»
>
> On second iteration ends up being a type object:
>
> m: react whenever Supply.interval(.3) { state %goods is
> SetHash; $++ > 3 and done; dd %goods; %goods++; }
> rakudo-moar 3755c0: OUTPUT: «SetHash.new()Se
r to it's default.
> # That default is undefined, what can't work with $_.defined and should
> # work (by design, not my opinion) with :D.
> # Either way, I would like to get a type object when asking for WHAT.
> # may be related to RT#127958
Thanks for the report.
It's
r to it's default.
> # That default is undefined, what can't work with $_.defined and should
> # work (by design, not my opinion) with :D.
> # Either way, I would like to get a type object when asking for WHAT.
> # may be related to RT#127958
Thanks for the report.
It's
ash is not the same object as Str(Any):
$ ./perl6-j -e 'use nqp; say nqp::eqaddr(Str(Any), {"a"=>1}.keyof)'
0
$ ./perl6-m -e 'use nqp; say nqp::eqaddr(Str(Any), {"a"=>1}.keyof)'
1
That's why some tests in S09-typed-arrays/hashes.t and S32-hash/
Still reproducible (2017.11,HEAD(e5b660e))
On 2013-03-30 16:55:04, masak wrote:
> r: class A { has ::B $.b }; class B {}; print B.new; print
> A.new.b.new
> rakudo ba5e04: OUTPUT«B<-905822265>No such method 'new' for
> invocant of type 'B' in block at /tmp/TluLYMLqwz:1»
> masak: ^^ hmm
> th
What is this thing about? Was there a code snippet that got lost?
On 2015-04-18 10:16:32, elizabeth wrote:
> [19:13:51] if nothing else it showed that a Proxy leaks
> through a not-is-rw method
> [19:13:55] _mg_ (~anonymous@95.88.244.237) left IRC. (Client
> Quit)
> [19:13:57] Yes, that's a bug.
tance, but a type object was passed [...]
> ..rakudo-jvm 4a74e7: OUTPUT«(Odd)Cannot look up attributes
> in a type object [...]
> ..rakudo-moar 4a74e7: OUTPUT«(Odd)Invocant requires an
> instance, but a type object was passed [...]
> huh.
> r: my Int $i; say $i % 2
> ra
Heh, this behavior lives its own life. See
https://gist.github.com/Whateverable/df882a7545b2aa4cd0575909934f4c48
Since 2017.07 it is producing this message:
Died with Exception
Actually thrown at:
in block at /tmp/m_9jvp4WTp line 1
I think that's reasonable. Marking as 「testneeded」.
On 2015-
ception -I. -e 'use Suptest; class Bar {}'
>
> This gives rise to:
>
> Cannot find method 'EXPORTHOW::SUPERSEDE::class' on object of type
> EXPORTHOW::SUPERSEDE::class
> at gen/moar/BOOTSTRAP.nqp:3009
> (/home/jonathan/.rakudobrew/moar-nom/install/share/nqp/l
ception -I. -e 'use Suptest; class Bar {}'
>
> This gives rise to:
>
> Cannot find method 'EXPORTHOW::SUPERSEDE::class' on object of type
> EXPORTHOW::SUPERSEDE::class
> at gen/moar/BOOTSTRAP.nqp:3009
> (/home/jonathan/.rakudobrew/moar-nom/install/share/nqp/l
t;> use Test;
> Nil;
>> my %str = question => 42;
> {question => 42}
>> is %str.pick, %str.pairs.pick;
> ok 1 -
> True
>> is %str.roll, %str.pairs.roll;
> ok 2 -
> True
>
> But these methods appear to be unaware of the object hash abstraction:
&
t;> use Test;
> Nil;
>> my %str = question => 42;
> {question => 42}
>> is %str.pick, %str.pairs.pick;
> ok 1 -
> True
>> is %str.roll, %str.pairs.roll;
> ok 2 -
> True
>
> But these methods appear to be unaware of the object hash abstraction:
&
to be unaware of the object hash abstraction:
> my %obj{Any} = question => 42;
{question => 42}
> is %obj.pick, %obj.pairs.pick;
not ok 3 -
# Failed test at line 1
# expected: 'question 42'
# got: 'Str|question question42'
False
> is %obj.rol
W {
> has $.foo;
> }
> }
>
>
> Which is exercised with:
>
> perl6 --ll-exception -I. -e 'use Suptest; class Bar {}'
>
> This gives rise to:
>
> Cannot find method 'EXPORTHOW::SUPERSEDE::class' on object of type
> EXPORTHOW::SUPERSEDE::clas
is Metamodel::ClassHOW {
has $.foo;
}
}
Which is exercised with:
perl6 --ll-exception -I. -e 'use Suptest; class Bar {}'
This gives rise to:
Cannot find method 'EXPORTHOW::SUPERSEDE::class' on object of type
EXPORTHOW::SUPERSEDE::class
at gen/
s. If I can get new() to load up all attributes, then there will be no
need for a clunky new()->my-more-complete-init() in my classes. Hundreds of
classes…
Perl 6 provides a comprehensive simplest-case for Object Construction (OC) when
only attributes are specified -- defaults &
ssage-
From: Timo Paulssen [mailto:t...@wakelift.de]
Sent: Thursday, October 5, 2017 13:56
To: Mark Devine ; perl6-us...@perl.org
Subject: Re: Perl 6 Object Construction - General Advice
The main difference between BUILD and TWEAK is that BUILD will replace all
default and requiredness handling,
The main difference between BUILD and TWEAK is that BUILD will replace
all default and requiredness handling, while TWEAK keeps it intact.
TWEAK gets run after these aspects had their turn, so if you have an "is
required" attribute that doesn't get a value passed, the BUILDALL
process will throw th
This was fixed during the uncurse merge. Bisect log (20 candidates):
https://gist.github.com/7cedc2e2e35913544f75bc5fc89bd088
「testneeded」
On 2016-11-26 18:36:35, alex.jakime...@gmail.com wrote:
> *Code:*
> dd ‘789’.comb(/ . {say $/} /)'
>
> *Result:*
> 「7」
> 「7」
> 「7」
> slip()
>
> It may seem l
r
difficulties indicate that you should rethink your design. I believe that
in the common case you should be able to do with the basic standard ways of
object construction. Maybe parsing that input should be someone else's job,
not that of the constructors.
new is there is no sane way to inherit them from
superclasses or make them usable from subclasses without baking them into
the entire object hierarchy. They make sense only for things like what Java
calls final classes, and even then probably only for atomic value types
(e.g. things like Int where th
I wrote another more in-depth (but potentially less useful to you) mail
about this further down the thread, but I thought it'd be good to point
this out near the top:
I think the /self.bless(|%args)!initialize/ idiom is a work-around for
/submethod TWEAK/ not yet existing when this code was writte
Here's the internal details of the guts:
BUILDALL has so far been sort of an interpreter for something called the
"buildplan". When a class gets composed (usually what happens
immediately when the parser sees the closing } of the class definition)
all attributes are considered along with their def
On Sun, Oct 1, 2017 at 1:02 PM, yary wrote:
>
> I hadn't heard of TWEAK, thought that BUILD was for setting private
> attributes and other tasks the object runs to build itself.
>
IIRC having BUILD overrides default values, so if you want to have those
and still adjust
I barely write any p6 but my impression was to avoid bless, and stick with
using named arguments for object creation. Using positional parameters
forces creating a "method new ..."
I hadn't heard of TWEAK, thought that BUILD was for setting private
attributes and other tasks the
On Saturday, September 30, Mark Devine wrote:
> My most common OC case: initialize attributes at OC time from external
> input that will be parsed with grammars &/| scrubbed with elaborate
> conditional tests.
I like to use assignment for simple things and TWEAK for
complicated things --
cl
Perl 6,
I am preparing to write several classes for some Perl 6 apps I intend to craft
in support of a prominent backup suite. In looking at the documentation & some
of the modules published in the Perl 6 ecosystem, I’m not quite sure that I can
identify the best idiomatic object construc
uot;key = <$key> value =<$value>\n" );
if ( $key eq "to" ) { $SmtpHandle.print( "$key=
#delimiter is a comma\n" ); }
elsif ( $key eq "FileName" ) { $SmtpHandle.print( "$key=
#delimiter is a comma\n" );
t;\n" );
if( $key eq "to" ) { $SmtpHandle.print( "$key=
#delimiter is a comma\n" ); }
elsif ( $key eq "FileName" ) { $SmtpHandle.print( "$key=
#delimiter is a comma\n" ); }
else { $SmtpHandl
PrintGreen ( "key = <$key> value =<$value>\n" );
>if( $key eq "to" ) { $SmtpHandle.print( "$key=
> #delimiter is a comma\n" ); }
>elsif ( $key eq "FileName" ) { $SmtpHandle.print( "$key= #delim
space after the = sign. \n" );
$SmtpHandle.print( "#\n" );
for %SmtpIni.kv -> $key, $value {
PrintGreen ( "key = <$key> value =<$value>\n" );
if( $key eq "to" ) { $SmtpHandle.print( "$key=
#delimi
Final issues resolved with
https://github.com/rakudo/rakudo/commit/cee1be22cff6153506e31df2916f8a0be27b5fc8
On Sat, 16 Sep 2017 12:12:35 -0700, david.warring wrote:
> Tests added with roast commit
> https://github.com/perl6/roast/commit/d776a06e52c35d6cbb7b7bbade7b7a15b97ecff8
>
> One remaining
On Thu, 19 Jun 2014 17:45:23 -0700, elizabeth wrote:
> Additional finds:
>
> [19:24:52] m: my @a; my $c = 1; @a.push: $($c,1); $c =
> "hi"; @a.push: $($c,2); say @a.perl
> [19:24:53] <+camelia>rakudo-moar 8812ca: OUTPUT«Array.new($("hi",
> 1), $("hi", 2))»
> [19:25:09] it would appear
Tests added with roast commit
https://github.com/perl6/roast/commit/d776a06e52c35d6cbb7b7bbade7b7a15b97ecff8
One remaining todo test for the subset of a subset case, ie:
subset S of Int; subset S2 of S; say S2.isa(S)
On Sun, Sep 17, 2017 at 6:34 AM, David Warring
wrote:
> After that commit: su
Tests added with roast commit
https://github.com/perl6/roast/commit/d776a06e52c35d6cbb7b7bbade7b7a15b97ecff8
One remaining todo test for the subset of a subset case, ie:
subset S of Int; subset S2 of S; say S2.isa(S)
On Sun, Sep 17, 2017 at 6:34 AM, David Warring
wrote:
> After that commit: su
After that commit: subset S of Int; S.isa(True) returns true as expected.
I've noticed a quibble with subset of a subset:
perl6 -e'subset S of Int; subset S2 of S; say S2.isa(S)'
False
Should be True.
On Sun, Sep 17, 2017 at 3:17 AM, Aleks-Daniel Jakimenko-Aleksejev via RT <
perl6-bugs-follo...
After that commit: subset S of Int; S.isa(True) returns true as expected.
I've noticed a quibble with subset of a subset:
perl6 -e'subset S of Int; subset S2 of S; say S2.isa(S)'
False
Should be True.
On Sun, Sep 17, 2017 at 3:17 AM, Aleks-Daniel Jakimenko-Aleksejev via RT <
perl6-bugs-follo...
What about this commit?
https://github.com/rakudo/rakudo/commit/0704cd97226e6300194342c88cef1c5fe711
On 2017-09-12 13:55:51, david.warring wrote:
> current behavior of isa method on a subset:
>
> % perl6 -v
> This is Rakudo version 2017.08-110-g5f3350656 built on MoarVM version
> 2017.08.1-156
# New Ticket Created by David Warring
# Please include the string: [perl #132073]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=132073 >
current behavior of isa method on a subset:
% perl6 -v
This is Rakudo version 2017.08-1
# New Ticket Created by Vittore Scolari
# Please include the string: [perl #132051]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=132051 >
The following script
role DataNo {
method Blob() {
my \T = uint8;
Although that particular error message seems to be specific to `Blob`, it also
breaks with other parametric roles (such as `Array`), because the generic
parameter T of the outer role seems to be passed through without being
specialized first.
Shorter examples:
➜ role R[::T] { method a { A
This bug is still present in
Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version
2017.08.1-19-g151a2563
implementing Perl 6.c.
But remove the explicit initializer `= T` (which should be redundant,
right?), and it blows up:
➜ role R [::T] { has T $.a }; say R[Int].new.a;
No such method 'gist' for invocant of type 'T'
in block at line 1
Looks like the automatic initializer for `$.a`
The problem only appears if `m//` is used directly as the RHS of `~~`:
$_ = 'a' | 'b';
say m/a/; # any(「a」, Nil)
say $_ ~~ m/a/; # False
say $_ ~~ { m/a/ }; # any(「a」, Nil)
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev
# Please include the string: [perl #131925]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=131925 >
Code:
say so $*DISTRO.Str|$*KERNEL.Str ~~ /linux/
Result:
True
Cod
, and returns the value.
>
>> $pair.freeze;
>1
>> $pair.value = 2;
>Cannot modify an immutable Int (1)
> in block at line 1
>
> The problem is that freeze does more than that. It changes the object
> identity as returned by WHICH as well:
>
>&g
, and returns the value.
>
>> $pair.freeze;
>1
>> $pair.value = 2;
>Cannot modify an immutable Int (1)
> in block at line 1
>
> The problem is that freeze does more than that. It changes the object
> identity as returned by WHICH as well:
>
>&g
, by removing it from its
Scalar container, and returns the value.
> $pair.freeze;
1
> $pair.value = 2;
Cannot modify an immutable Int (1)
in block at line 1
The problem is that freeze does more than that. It changes the object
identity as returned by WHICH as
the subject line of all future correspondence about this issue.
> > # https://rt.perl.org/Ticket/Display.html?id=127858 >
> >
> >
> > $ cat > A.pm6
> > unit module A;
> >
> > constant @a is export = map { (1 +< $_) => 1 }, ^3;
> >
> &g
the subject line of all future correspondence about this issue.
> > # https://rt.perl.org/Ticket/Display.html?id=127858 >
> >
> >
> > $ cat > A.pm6
> > unit module A;
> >
> > constant @a is export = map { (1 +< $_) => 1 }, ^3;
> >
> &g
IB=. perl6 -e 'use A; say @a[1];'
> Cannot invoke this object
> in block at /home/grondilu/A.pm6 (A) line 3
> in block at -e line 1
>
> $ perl6 -e 'module A { constant @a is export = map { (1 +< $_) => 1 }, ^3;
> }; import A; say @a[1];'
> 2 => 1
IB=. perl6 -e 'use A; say @a[1];'
> Cannot invoke this object
> in block at /home/grondilu/A.pm6 (A) line 3
> in block at -e line 1
>
> $ perl6 -e 'module A { constant @a is export = map { (1 +< $_) => 1 }, ^3;
> }; import A; say @a[1];'
> 2 => 1
On Fri, 21 Jul 2017 07:30:38 -0700, comdog wrote:
> When I run perl6-debug-m from the Rakudo Star, I get this error:
>
> $ perl6-debug-m test.p6
> Cannot find method 'setlang' on object of type Perl6::HookGrammar
>at gen/moar/perl6-debug.nqp:407
> (/Application
On Fri, 21 Jul 2017 07:30:38 -0700, comdog wrote:
> When I run perl6-debug-m from the Rakudo Star, I get this error:
>
> $ perl6-debug-m test.p6
> Cannot find method 'setlang' on object of type Perl6::HookGrammar
>at gen/moar/perl6-debug.nqp:407
> (/Application
Already fixed in newer versions
Already fixed in newer versions
perl6-debug-m test.p6
Cannot find method 'setlang' on object of type Perl6::HookGrammar
at gen/moar/perl6-debug.nqp:407
(/Applications/Rakudo/share/perl6/runtime/perl6-debug.moarvm:comp_unit)
from src/Perl6/Grammar.nqp:492
(/Applications/Rakudo/share/nqp/lib/Perl6/Grammar.mo
# New Ticket Created by Zoffix Znet
# Please include the string: [perl #131639]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=131639 >
Originally found this in behaviour of Z meta operator:
m: dd .any Z .any
rakudo
: *.say
rakudo-moar 86e7b2: OUTPUT: «01»
m: (^2).map: &say
rakudo-moar 86e7b2: OUTPUT: «01»
But explodes if you try to both detache and use the &sub map:
m: ^2 .map: &say
rakudo-moar 86e7b2: OUTPUT: «===SORRY!===Cannot find method 'count' on
object of type NQPMu»
1 - 100 of 1553 matches
Mail list logo