|
05:22
small_petit joined
05:38
small_petit left
06:10
parv joined
08:06
small_petit joined
08:13
small_petit left
10:29
atroxaper joined
10:56
atroxaper left
13:51
aoeuidhtns joined
|
|||
| Hydrazer | is there a way you give type signatures to multi dimensional arrays for example ```pl | 13:52 | |
| Array[Array[Int]] @bruh = [[1,2,3],[2,3,4],[5,3,2]]; | |||
| ``` | |||
|
14:15
aoeuidhtns left
14:17
parv left
|
|||
| Morfent | there's `of`, but | 14:19 | |
| m:``` | |||
| my @bruh is Array of Array of Int = [[1,2,3],[2,3,4],[5,3,2]] | |||
| ``` | |||
| typed arrays get very annoying very fast | |||
| m:``` | 14:27 | ||
| say my @bruh is Array of Array[Int]() = [[1,2,3],[2,3,4],[5,3,2]] | |||
| ``` | |||
| this can only get rid of one layer of grossness, unfortunately | 14:28 | ||
| this can only get rid of one layer of grossness in this case, unfortunately | |||
| `of` can only get rid of one layer of grossness in this case, unfortunately | 14:30 | ||
| Xueji | So there's no way how to type many times nested arrays? | 14:32 | |
| Morfent | each layer needs to be typed before the next in some way | ||
| m:``` | 14:34 | ||
| my @bruh is Array of Array() of Int = [[1,2,3],[2,3,4],[5,3,2]] | |||
| ``` | |||
| this bot takes a while... | |||
| ^ i wonder if that's a little easier now | |||
| ^ i wonder if that's a little easier to implement now | |||
| it feels too restrictive to me | 14:36 | ||
| there's an issue to do with this somewhere though | 14:38 | ||
| github.com/rakudo/rakudo/issues/4517 | 14:41 | ||
| doing `of` for coercions may be limited by | |||
| github.com/Raku/problem-solving/issues/299 | |||
| github.com/rakudo/rakudo/issues/4517 | 14:42 | ||
| doing `of` for coercions may be limited by <github.com/Raku/problem-solving/issues/299> | |||
| ^ i wonder if that's valid and a little easier to implement now | 14:52 | ||
| Hydrazer | that is interesting | ||
| what does 3 dimensions look like? | 14:55 | ||
| Zephyr | is there a simpler way to do `((0 xx 9) xx 9)`? preferably for any number of dimensions | 14:56 | |
| Nemokosch | what is the associativity of xx? | 14:58 | |
| Morfent | left | 15:01 | |
| Zephyr | oh, I can do `0 xx 9 xx 9` | ||
| Morfent | looks like it | ||
| m:``` | |||
| say (0 xx 9 xx 9) eqv ([xx] 0, 9, 9) | |||
| ``` | |||
| m:``` | 15:03 | ||
| say (0 xx 9 xx 9); | |||
| say [xx] 0, 9, 9; | |||
| ``` | |||
| Nemokosch | why did it say False then? | 15:05 | |
| Zephyr | looks the same to me, theoretically `[xx] 0, |(9 xx $n)` should work for $n dimensions | ||
| Nemokosch | they pretty darn seem equivalent xd | ||
| Zephyr | not sure | ||
| Morfent | they might need to have equivalent iterators or something, lemme check | ||
| Hydrazer | second one is Seq[Seq] | ||
| second one is Seq of Seq of Int | |||
| Zephyr | m:``` | 15:07 | |
| (0 xx 9 xx 9).map({ $_.WHAT })``` | |||
| does the bot need a space | |||
| nvm, forgot say | |||
| but yes the first one seems to be a Seq of List of Int instead | |||
| m: say (0 xx 9 xx 9).map({ $_.WHAT }) | 15:09 | ||
| well, that takes a while | |||
| anyway, thanks! `[xx] 0, |(9 xx $n)` takes care of my issue | |||
| Morfent | np 🙂 | ||
| Nemokosch | cool 👌 | 15:27 | |
|
19:12
TempIRCLogger left
20:10
parv joined
|
|||
| gfldex | m:``` | 20:58 | |
| is-deeply {0 xx 9 xx 9}, {[xx] 0, 9, 9}, 'is it?'; | |||
| ``` | |||
|
20:59
discord-raku-bot left
21:00
discord-raku-bot joined
|
|||
| m:``` | 21:00 | ||
| is-deeply {0 xx 9 xx 9}, {[xx] 0, 9, 9}, 'is it?'; # DO AS YOU ARE ASKED! | |||
| ``` | |||
| m:``` | 21:02 | ||
| is-deeply {0 xx 9 xx 9}, {[xx] 0, 9, 9}, 'is it?'; # DO AS YOU ARE ASKED! PLEASE? | |||
| ``` | |||
| m:``` | |||
| is-deeply (0 xx 9 xx 9), ([xx] 0, 9, 9), 'is it?'; | |||
| ``` | |||
| `use Test;` and `is-deeply` can help to find differences in listy things. | 21:04 | ||
| colemanx | I am having trouble structuring my code to make a script in ./bin import classes in ./lib | 21:12 | |
| Here is my repo github.com/dontlaugh/App-Kubedee | |||
| this recent commit is a concise demonstration of what I've tried to do github.com/dontlaugh/App-Kubedee/c...f8b3690ede | 21:13 | ||
| And here is a pastebin of my error when running my ./bin/kubedee.rake script | 21:15 | ||
| pb.envs.net/?21c9e9cb06d7a76e#Gde9...NJpn4kounP | |||
| oh no I set this and it kind of got past that error export RAKULIB=$PWD/lib | 21:18 | ||
| must I always set RAKULIB for all my projects? | 21:19 | ||
| gfldex | colemanx: After you did `zef install .` you don't. When working with local repos I use `raku -Ilib …`, often within a little Makefile. | 21:23 | |
| colemanx | ah that is a good tipe | 21:30 | |
| oh no! `zef install .` does not seem to work | 21:31 | ||
| but -I lib does | |||
| here is my terminal output pb.envs.net/?9918760cfcc4d0a3#zBri...ms9L7wHD1g | 21:32 | ||
| it installed my script to /home/coleman/rakudo/share/perl6/site/bin, and it looks in some rakudo directories, but perhaps my module is not set up right | 21:33 | ||
| I will try adding my example class to META6.json | 21:34 | ||
| okay cool. Updating META6.json to include the classes that my script in ./bin needed to import fixed my error. | 21:40 | ||
| It is a little surprising that by executable in ./bin is moved and installed automatically, but I needed to specifically enumerate my classes in META6.json | |||
| But I am pretty new to structuring larger projects in Raku. And perhaps there is a good reason for this. | 21:42 | ||
| In any case, the goal of this project is a Raku rewrite of a bash tool. I have many static assets enumarated in my resources section of META6.json, but it's unclear if I will actually use them long-term | 21:43 | ||
| I have read online there is some debate about how "resources" should be used, and I would like to put as much into Raku as possible. But right now I really need to delegate some imaging building tasks to Hashicorp's Packer, becuase I'm pretty productive with that. | 21:44 | ||
|
22:10
TempIRCLogger joined
|
|||