|
20:05
TempIRCLogger left,
TempIRCLogger joined
20:06
TempIRCLogger left
20:07
TempIRCLogger joined
|
|||
| Hydrazer | how do you convert a number from base b to base 10 with a variable? i tried doing ```pl | 21:44 | |
| my $base = 6; | |||
| my $num = "12345"; | |||
| say :6($num); | |||
| say :$base($num); | |||
| ``` and im getting ``` | |||
| 1865 | |||
| No such method 'CALL-ME' for invocant of type 'Pair' | |||
| in block <unit> at file0.code line 4 | |||
| ``` | |||
| how do you convert a number from base b to base 10 with a variable? i tried doing ```pl | 21:45 | ||
| my $base = 6; | |||
| my $num = "12345"; | |||
| say :6($num); | |||
| say :$base($num); | |||
| ``` and im getting ``` | |||
| 1865 | |||
| No such method 'CALL-ME' for invocant of type 'Pair' | |||
| in block <unit> at file0.code line 4 | |||
| ``` would like both outputs to be the same | |||
| how do you convert a number from base b to base 10 with a variable? i tried doing ```pl | 21:46 | ||
| my $base = 6; | |||
| my $num = "12345"; | |||
| say :6($num); | |||
| say :$base($num); | |||
| ``` and im getting ``` | |||
| 1865 | |||
| No such method 'CALL-ME' for invocant of type 'Pair' | |||
| in block <unit> at file0.code line 5 | |||
| ``` would like both outputs to be the same | |||
| Nemokosch | not sure if this syntax will work, there is the parse-base function though | 22:12 | |
| docs.raku.org/routine/parse-base | 22:13 | ||
| Hydrazer | oh nice | 22:14 | |
|
22:35
colemanx joined
|
|||
| colemanx | Hello, everyone! I'm reading Raku Fundamentals 2nd ed. The async chapter has this example code envs.sh/pg | 23:19 | |
| The for loop, it's not synchronously executed, it seems. | |||
| How does that work? Are "for" sometimes sync and sometimes async? | 23:20 | ||
| If you have this book, the code is page 70 | |||