|
05:57
sibl joined
06:17
swaggboi left
06:30
swaggboi joined
08:04
sibl` joined
08:05
sibl left
08:11
sibl`` joined
08:13
sibl` left
08:18
dakkar joined
08:24
sibl``` joined
08:26
sibl`` left
08:30
sibl``` is now known as sibl,
sibl left,
sibl joined
09:44
sibl left
10:20
sibl joined
10:22
sibl left,
sibl joined
13:23
sibl left
|
|||
| disbot4 | <comborico> Also, I'm wondering why the default read-only does not apply with 'for' loop. my $foo = 1; for 1..3 { $foo = $_ } | 16:23 | |
|
16:37
dakkar left
|
|||
| lizmat | comborico this is intentional | 17:10 | |
| m: my @a = 1,2,3,4,5; $_++ for @a; dd @a | |||
| camelia | [2, 3, 4, 5, 6] | ||
| lizmat | and why "default read-only" ? | 17:11 | |
| where do you get that from? | |||
| disbot4 | <comborico> The need to use 'is rw' or 'is copy' when mutating an outside variable within a subroutine. | 17:55 | |
| <comborico> My LISP Guide to Raku is so much different than the other guides. I think you all won't like it. But I'm working on styling it and getting it uploaded today. | 18:05 | ||
| <comborico> It's more of a book format. | 18:06 | ||
| lizmat | well, in the case of for, it's really about binding | 19:22 | |
| m: $_++ for 1..4 | |||
| camelia | Cannot resolve caller postfix:<++>(Int:D); the following candidates match the type but require mutable arguments: (Mu:D $a is rw) (Int:D $a is rw --> Int:D) (int $a is rw --> int) (uint $a is rw --> uint) (num $a is rw … |
||
| lizmat | m: $_ = 1 for 1..4 | ||
| camelia | Cannot assign to an immutable value in block <unit> at <tmp> line 1 |
||
| lizmat | m: my @a = 1,2,3,4,5; $_++ for @a; dd @a | ||
| camelia | [2, 3, 4, 5, 6] | ||
| lizmat | in that case, $_ is bound to each container in the array | 19:23 | |
| and you *can* do ++ on containers :-) | |||
| disbot4 | <antononcube> We know, those LISPers can't restrain themselves... | 19:38 | |
| <comborico> I am considering your examples, but I'm pretty mixed up. For now, I will just put it aside. | 20:11 | ||
|
22:02
sjn left
22:24
sjn joined
|
|||