This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html Set by lizmat on 8 June 2022. |
|||
01:56
dano left,
dano joined
03:45
stanrifkin_ joined
03:48
stanrifkin left
05:36
stanrifkin_ left
08:11
habere-et-disper joined
|
|||
habere-et-disper | Why do I need .cache here as it seems bound to $foo already... | 08:14 | |
m: say gather for ^'raku'.chars -> $foo { take 'raku'.comb.rotate( $foo.cache ) } | |||
camelia | ((a k u r) (a k u r) (a k u r) (a k u r)) | ||
habere-et-disper | m: say gather for ^'raku'.chars -> $foo { take 'raku'.comb.rotate( $foo ) } | 08:15 | |
camelia | The iterator of this Seq is already in use/consumed by another Seq (you might solve this by adding .cache on usages of the Seq, or by assigning the Seq into an array) in block <unit> at <tmp> line 1 |
||
09:46
habere-et-disper left
11:14
habere-et-disper joined
|
|||
rcmlz | Apparently the type changes by using .cache | 11:27 | |
m: for ^'raku'.chars -> $foo { say $foo.WHAT }; for ^'raku'.chars -> $foo { say $foo.cache.WHAT }; | |||
Raku eval | (Int) (Int) (Int) (Int) (List) (List) (List) (List) | ||
nahita3882 | issue seems to be .rotate(0) rather than caching or not | 11:51 | |
or maybe both idk, but: | 11:52 | ||
m: (3, 4).Seq.rotate(0).say | 11:53 | ||
Raku eval | Exit code: 1 The iterator of this Seq is already in use/consumed by another Seq (you might solve this by adding .cache on usages of the Seq, or by assigning the Seq into an array) in block <unit> at main.raku line 1 | ||
nahita3882 | .rotate(0) on a Seq returns self, i guess ther eis something with that | ||
also in the working version habere-et-disper shares with .cache in, all outputs are (a k u r), i.e., when $foo is 1, which is very interesting, no? | 11:55 | ||
habere-et-disper | Why can't I use Empty here... | 12:02 | |
m: say ( (3,2,1), { .skip } ...^ :!elems ) | 12:03 | ||
camelia | ((3 2 1) (2 1) (1)) | ||
habere-et-disper | m: say ( (3,2,1), { .skip } ...^ Empty ) | ||
camelia | Cannot get sequence endpoint from an empty list (use * or :!elems instead?) in block <unit> at <tmp> line 1 |
||
habere-et-disper | The sequence operator endpoint is smartmatching against each generated element and... | 12:05 | |
m: say Empty ~~ () | |||
camelia | True | ||
12:08
habere-et-disper left
12:34
habere-et-disper joined
|
|||
habere-et-disper | It also seems clearer to state something in a positive (non-negating) way as there is less unravelling. | 12:37 | |
12:47
habere-et-disper left,
stanrifkin joined
14:51
stanrifkin left
15:54
habere-et-disper joined
16:19
habere-et-disper left
17:12
habere-et-disper joined
17:27
stanrifkin joined
17:28
stanrifkin left
18:11
stanrifkin joined
18:30
habere-et-disper left
18:32
stanrifkin left
22:18
habere-et-disper joined
22:36
habere-et-disper left
22:40
habere-et-disper joined
23:46
habere-et-disper left
|