|
00:57
pisa joined
01:39
pisa left
04:07
dominix joined
04:08
dominix left
|
|||
| Anton Antonov | What is the best way of checking that an array is an array hashes or it can be coerced into one? Right now I am using `try { my Hash @arr-of-hashes = @arr }; if !$ { die ... }` , but that might be seen as too cumbersome and/or not direct enough... | 17:38 | |
| What is the best way of checking that an array is an array hashes or it can be coerced into one? Right now I am using `try { my Hash @arr-of-hashes = @arr }; if !$ { die ... }` , but that might be seen as too cumbersome and/or not direct enough and/or slow... | 17:41 | ||
|
18:06
qwert123 joined
|
|||
| qwert123 | Hello :) | 18:06 | |
| I've just installed rakudo | |||
| rakuUser | m: | 18:07 | |
| ``` | |||
| my Str @str-array; | |||
| my Hash @hash-array; | |||
| say "is \@str-array an Array of Hashes? ", @str-array.^name eq "Array[Hash]"; | |||
| say "is \@hash-array an Array of Hashes? ", @hash-array.^name eq "Array[Hash]"; | |||
| ``` | |||
| m: | 18:08 | ||
| my Str @str-array; | |||
| my Hash @hash-array; | |||
| say "is \@str-array an Array of Hashes? ", @str-array.^name eq "Array[Hash]"; | |||
| say "is \@hash-array an Array of Hashes? ", @hash-array.^name eq "Array[Hash]"; | |||
| qwert123 | when I run "raku", I have "bash: raku : commande introuvable" that is "unfindable command" | ||
| rakuUser | one way that i can think of. it is this one | 18:09 | |
| qwert123 | when I run "perl6" | ||
| I have "Unhandled exception: Failed to write string to stream: broken pipe" | |||
| I don't find anything about that in the Web | 18:10 | ||
| [Coke] | How did you install raku? | 18:11 | |
| and what OS are you on? | |||
| and does 'perl6 --version' work? | |||
|
18:12
rakuUser joined
|
|||
| qwert123 | apt install rakudo | 18:13 | |
| 'perl6 --version' gives the same error | 18:14 | ||
| I didn't want to write bold | 18:18 | ||
| OS : linux | |||
| rakuUser | i think this is even better | 18:21 | |
| m: | |||
| my Str @str-array; | |||
| my Hash @hash-array; | |||
| @str-array.isa(Array[Hash]); | |||
| @hash-array.isa(Array[Hash]); | |||
| i think this is even better | |||
| m: | |||
| my Str @str-array; | |||
| my Hash @hash-array; | |||
| @str-array.isa(Array[Hash]); | |||
| @hash-array.isa(Array[Hash]); | |||
| m: | 18:22 | ||
| my Str @str-array; | |||
| my Hash @hash-array; | |||
| say @str-array.isa(Array[Hash]); | |||
| say @hash-array.isa(Array[Hash]); | |||
| qwert123 | I have also 'at <unknown>:1 (/usr/share/perl6/runtime/CORE.setting.moarvm:print_exception)' | ||
| Anton Antonov | <@!256545253111234581> Thank you! Looks good and better! | ||
| [Coke] | I'm guessing your apt install is giving you an old/broken version. You could try using the Rakudo * installation, or the dockerfile, or building from source. (or reporting the error up through the maintainer of the apt version) | 18:49 | |
| qwert123 | Thank you very much :), I'll try that | 18:53 | |
|
19:03
qwert123 left
19:57
discord-raku-bot left,
discord-raku-bot joined
|
|||