00:17
arkiuat left
00:18
arkiuat joined
00:23
arkiuat left
00:40
kjp left
00:41
kjp joined
00:45
kjp left,
kjp joined
00:48
arkiuat joined
00:57
arkiuat left
01:08
arkiuat joined
01:13
arkiuat left
01:38
arkiuat joined
01:46
arkiuat left
01:59
arkiuat joined
02:05
arkiuat left
02:37
arkiuat joined
02:41
arkiuat left
03:12
arkiuat joined
03:17
arkiuat left
03:38
arkiuat joined
03:43
arkiuat left
04:00
arkiuat joined
04:06
arkiuat left
|
|||
disbot | <simon_sibl> would there be a way to do something like this | 04:12 | |
<simon_sibl> for ($input-file.IO.lines[0..^10], 0..*) -> ($line, $number) {...} | 04:13 | ||
04:16
arkiuat joined
|
|||
disbot | <simon_sibl> for 0..* Z $input-file.IO.lines[0..^10] { ok this work ! | 04:18 | |
04:27
hudo__ left
04:28
hudo__ joined
|
|||
disbot | <jubilatious1_98524> ~ % raku -e 'for lines[0..^10].kv -> $k,$v { put join " ", $k,$v };' letter-per-line.txt 0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j | 04:55 | |
<jubilatious1_98524> ~ % raku -e 'say .key => .value for lines[0..^10].pairs;' letter-per-line.txt 0 => a 1 => b 2 => c 3 => d 4 => e 5 => f 6 => g 7 => h 8 => i 9 => j | 05:00 | ||
<jubilatious1_98524> (N.B. don't use say in production scripts). | 05:03 | ||
<simon_sibl> wait why not ? | 05:06 | ||
<jubilatious1_98524> Use put instead. This is because say calls gist on objects and you may end up with truncated output. Example where is 101? (truncation at 100 elements): | 05:18 | ||
<jubilatious1_98524> ~ % raku -e 'say 0...101;' (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...) | 05:19 | ||
<jubilatious1_98524> ~ % raku -e 'put 0...101;' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |||
<jubilatious1_98524> say is great for command-line and REPL exploration. But you'll need un-truncated output in production--so use put (for piping, etc.). | 05:23 | ||
<simon_sibl> aaaah I see, thank you for the advise ! | 06:21 | ||
07:27
arkiuat left
07:56
arkiuat joined
08:01
arkiuat left
08:28
arkiuat joined
08:39
arkiuat left
08:44
lucs left
08:58
lucs joined
09:21
arkiuat joined
09:25
arkiuat left
10:39
arkiuat joined
10:43
arkiuat left
10:49
jmcgnh left
10:51
jmcgnh joined
10:57
tbrowder left
10:58
tbrowder joined
11:06
arkiuat joined
11:11
arkiuat left
11:36
arkiuat joined
11:41
arkiuat left
13:25
arkiuat joined
13:30
arkiuat left
13:44
arkiuat joined
13:50
arkiuat left
14:27
arkiuat joined
14:31
arkiuat left
14:59
arkiuat joined
17:02
ACfromTX left,
ACfromTX joined
|
|||
disbot | <librasteve> fwiw, lines[^10] is a shorter way to say the same thing | 18:24 | |
22:11
jmcgnh left
22:16
jmcgnh joined
22:33
arkiuat left
22:46
arkiuat joined
23:02
arkiuat left
23:08
disbot left,
disbot joined
23:10
arkiuat joined
|