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. |
|||
00:41
razetime joined
|
|||
Mason | so if I want to implement a more performant type to be a key to a hash | 02:46 | |
how would I go about it | 02:47 | ||
specifically something faster than using `"{$a},{$b}"` as the ket | |||
specifically something faster than using `"{$a},{$b}"` as the key | |||
I understand which is the key, but is it really not possible to go faster? | |||
02:55
MasterDuke left
03:57
kjp left
04:00
kjp joined
04:43
Heptite left
05:06
discord-raku-bot left
05:09
discord-raku-bot joined
05:19
discord-raku-bot left
05:36
razetime left,
razetime joined
05:41
discord-raku-bot joined
05:49
discord-raku-bot left
06:01
discord-raku-bot joined
06:06
discord-raku-bot left
07:47
discord-raku-bot joined
07:49
discord-raku-bot left,
discord-raku-bot joined
07:54
discord-raku-bot left
08:00
discord-raku-bot joined,
discord-raku-bot left
09:10
dakkar joined
|
|||
lizmat | Mason that's enough information to give a good answer to | 10:08 | |
12:29
Kaiepi left
12:56
Kaiepi joined
13:47
Heptite joined
14:17
discord-raku-bot joined
14:37
razetime left
17:44
dakkar left
20:23
Heptite left
20:24
Heptite joined
21:40
MasterDuke joined
|
|||
yabobay | how do i pass a array with 3 elements to a function that accepts 3 arguments? | 22:39 | |
Nemokosch | I think slip can work | 22:44 | |
|@arr, or @arr.Slip, or slip @arr | |||
yabobay | ```pl | 22:48 | |
sub brint(@bitmap) { | |||
for @bitmap { | |||
ansi($_.Slip).say | |||
} | |||
print "\e\n"; | |||
} | |||
``` | |||
here's my current code. it gives me this error: | |||
``` | |||
Too few positionals passed; expected 3 arguments but got 1 | |||
in sub ansi at test.raku line 23 | |||
in sub brint at test.raku line 28 | |||
in block <unit> at test.raku line 35 | |||
``` | |||
changing the $ to a @ gives me the same error | 22:49 | ||
Nemokosch | changing $ to @ wouldn't do anything useful I think | 22:53 | |
what about |$_ ? | |||
yabobay | alright so that fixed the issue entirely | 22:54 | |
i just don't know what that means or what it does | |||
Nemokosch | it unrolls the content into arguments | 22:56 | |
I wish it worked with .Slip as well | |||
yabobay | but what's the logic behind that | ||
nvm | |||
that's literally what it does | |||
Nemokosch | docs.raku.org/routine/%7C | ||
yabobay | i thought it did something else and we just harnessed that to do this thing |