02:27 razetime joined 02:48 Howsthat joined 02:54 Howsthat40 joined 02:56 Howsthat40 left 05:19 SmokeMachine left, SmokeMachine joined 06:04 Howsthat left 10:19 razetime left 10:20 razetime joined 11:22 zacts joined 12:13 zacts left 12:37 razetime left 12:56 razetime joined 15:13 razetime left 15:21 razetime joined
Whaaat = Prince of Cows#5266> I need to check a string for certain characters, count them, keep them counted in their certain category, and also make my code die if invalid characters are in the string 15:47
Prince of Cows#5266> I would like to use a bag
Prince of Cows#5266> and elem 15:52
16:39 martinthewildpig joined 16:40 martinthewildpig left 17:06 razetime left
Hydrazer what are you having issue with it seems like it would work 17:52
what are you having issue with it seems like it would work @Whaaat => Prince of Cows#5266 17:58
Whaaat = Prince of Cows#5266> Not sure how to code out the bag, *, grep, comb, anything else 18:03
Hydrazer i mean you can coerce the bag into a hash and then just use it as normal ```pl 18:07
my %h = <3 4 5 3 2 1 6 2 6 6 6>.Bag;
say %h{6};
```
i mean you can coerce the bag into a hash and then just use it as normal ```pl 18:08
my %h = <3 4 5 3 2 1 6 2 6 6 6>.Bag;
say %h{6};
``````pl
say <3 4 5 3 2 1 6 2 6 6 6>.grep(* > 3)[^5]
```
usually if you want to see the entire object you can apply `dd` on it 18:10
```pl
dd <3 4 5 3 2 1 6 2 6 6 6>.Bag
```
usually if you want to see the entire object you can call`dd` on it 18:11
```pl
dd <3 4 5 3 2 1 6 2 6 6 6>.Bag
```
usually if you want to see the entire object you can call `dd` on it
```pl
dd <3 4 5 3 2 1 6 2 6 6 6>.Bag
```
stevied i'm trying to do things in a more raku-like manner and not use loops 18:23
so i have this:
`$dom_post.find('h1, h2, h3, h4, h5, h6').map(*.text).list.is_copy ~~ s/\+.*//;`
i want to modify the text in header tags
but the string is immutable
any way around that?
the is_copy is my futitle attempt to address the problem. just throws an error
I know it's `is copy`
Whaaat = Prince of Cows#5266> I solved the problem! 21:31
Hydrazer nice 21:41
gfldex @stevied#8273 `.list` coerces to `List`, `.Array` may work. 21:43
Whaaat = Prince of Cows#5266> ty @Hydrazer#4827 21:44
22:04 discord-raku-bot left, discord-raku-bot joined
stevied ok, thanks, @gfldex#8222 . will try it out later. just went back to a loop for now. though I also .text method may just return an immutable string and there's not way to modify it. not sure. 22:10
seems kind of silly that it can't be changed easily with the Dom::Tiny 22:11
gfldex Threads don't like mutability. 22:12
stevied yeah, that's something on my list to learn. threading. shit.
I think I tried light weight threads once with perl maybe 15 years ago. not sure it can sill be done in perl