🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 25 August 2021. |
|||
japhb | Doc_Holliwould: your multi isn't in the scope of the definition of sort. | 00:00 | |
You can fake it by using a 2-arg function for sort, rather than a 1-arg, which is implicitly using the *builtin* cmp. | |||
00:02
andrea[m]123 joined,
reportable6 left
00:04
andrea[m]123 left
00:10
kjp joined
00:11
andrea[m]123 joined
00:17
euandreh joined
00:33
Guest6924 left
00:38
Tirifto left
00:49
releasable6 joined
00:50
statisfiable6 joined,
bloatable6 joined
00:54
Tirifto joined
01:03
reportable6 joined
01:05
dogbert11 joined
01:08
dogbert17 left
01:14
Doc_Holliwould left
01:50
linkable6 joined
02:30
aca joined,
aca is now known as Guest9169
02:50
euandreh left
03:02
nine left,
nine joined
03:48
greppable6 joined
03:49
nativecallable6 joined
04:13
lizmat_ joined,
RakuIRCLogger left
04:14
TempIRCLogger left,
tejr left,
tejr joined
04:15
Geth left
05:15
statisfiable6 left,
squashable6 left,
quotable6 left,
bloatable6 left,
tellable6 left,
bisectable6 left,
linkable6 left,
releasable6 left,
greppable6 left,
sourceable6 left,
coverable6 left,
evalable6 left,
committable6 left,
shareable6 left,
unicodable6 left,
notable6 left,
reportable6 left,
nativecallable6 left,
benchable6 left,
reportable6 joined
05:16
committable6 joined,
linkable6 joined
05:17
coverable6 joined,
quotable6 joined,
evalable6 joined
05:18
shareable6 joined,
squashable6 joined
05:41
tejr left
05:42
tejr joined
05:54
polettix joined,
kybr joined,
gugod joined,
pjlsergeant joined,
rjbs joined,
oodani joined,
Juerd joined
05:55
Maylay joined
06:02
reportable6 left,
dpk joined,
bingos joined
06:03
tinita joined,
Guest9169 left,
esh joined,
spacekookie joined,
Henry151 joined
06:17
nativecallable6 joined
06:18
sourceable6 joined,
seednode4 left,
benchable6 joined,
tellable6 joined
06:19
seednode4 joined
06:46
Sgeo left
07:04
reportable6 joined
07:15
statisfiable6 joined,
bisectable6 joined
07:17
notable6 joined,
greppable6 joined
07:48
Manifest0 joined
08:16
unicodable6 joined
08:25
Geth joined
08:26
lizmat_ left,
TempIRCLogger joined,
lizmat joined
08:28
dogbert17 joined,
dogbert11 left
08:35
dogbert11 joined
08:37
dogbert17 left
08:44
dogbert17 joined
08:46
dogbert11 left
08:50
dogbert11 joined
08:53
dogbert17 left
08:55
dakkar joined
08:56
dogbert11 left,
dogbert11 joined
09:12
dogbert17 joined
09:16
dogbert11 left
09:17
releasable6 joined
|
|||
lizmat | notable6: weekly | 09:51 | |
notable6 | lizmat, 2 notes: 2021-10-28T12:19:14Z <lizmat>: www.reddit.com/r/rakulang/ we have just passed the 1000 Rakoons mark! ; 2021-10-31T23:33:34Z <melezhik>: weekly update for Raku on #mybfio - mybf.io/?language=Raku&filter=top | ||
09:52
dogbert11 joined
09:55
dogbert17 left
10:03
dogbert17 joined
10:04
dogbert11 left
11:04
linkable6 left,
evalable6 left
11:17
bloatable6 joined
|
|||
lizmat | notable6: weekly reset | 11:28 | |
notable6 | lizmat, Moved existing notes to “weekly_2021-11-01T11:28:38Z” | ||
[Coke] | Hope folks had a pleasant Halloween. | 11:30 | |
lizmat | oh, is that what that was? :-) | ||
lizmat just assumed Covid19 had turned ugly :-) | |||
Altreus | how do you think it started? :D | ||
11:54
euandreh joined
12:02
reportable6 left
12:04
evalable6 joined
12:06
linkable6 joined
12:23
djerius left
12:25
djerius joined
|
|||
Anton Antonov | If you want to generate lists with random pet names or random bullshit job titles please take a look at the package `Data::Generators` . github.com/antononcube/Raku-Data-Generators | 12:33 | |
12:43
dszz joined
12:48
bob joined,
bob left
12:58
frost joined
13:03
dszz left
13:04
reportable6 joined
13:05
Sgeo joined
|
|||
Skarsnik | Hello there ^^ | 13:25 | |
13:27
Skarsnik joined
|
|||
Skarsnik | m:sub piko {react whenever Promise.in(1) { return 42;}}; piko(); | 13:27 | |
evalable6 | (exit code 1) MoarVM panic: Internal error: Unwound entire stack and missed handler | ||
Skarsnik | Today, in "Skarsnik does some Raku and find a new bug" xD | 13:28 | |
lizmat | And yet another Rakudo Weekly news hits the Net: rakudoweekly.blog/2021/11/01/2021-...0-rakoons/ | 13:37 | |
Skarsnik | Nice :) | 13:42 | |
13:49
frost left
|
|||
Skarsnik | Hm, I am trying to send request to a UPD server, it seems my second attempt at using print-to fail and prevent me from getting the reply | 14:03 | |
It's my second attempt at reading the data that fail, not sure why :( | 14:07 | ||
timo | well, with udp you never know! :D | 14:09 | |
Skarsnik | code is like sub write-socket ($towrite) {await $socket.print-to("127.0.0.1", 55355, $towrite);} | 14:10 | |
sub read-socket {my $toret; | 14:11 | ||
react whenever $socket.Supply -> $data { $toret = $data; | |||
done();} | |||
return $toret;} | |||
read-socket fails the second time (Yes I don't need a async api x)) | 14:12 | ||
ugexe | seems a bit odd that $socket would be a global variable, no? | ||
Skarsnik | Died because of the exception: | 14:13 | |
connection already in progress | |||
timo | hm, getting the supply twice, huh? | ||
i assume requesting the supply is what turns listening on | |||
Skarsnik | it's just a dumb script to poke at RetroArch udp api | ||
timo | perhaps you can't get .Supply a second time as fast unless you SO_REUSEADDR | 14:14 | |
ugexe | sure, but your computer only cares about logic not if its just a dumb script | ||
timo | i'd really just grab $socket.Supply.Channel early and use that | ||
14:15
Resol joined
|
|||
Skarsnik | Ok that worked, thank timo :) | 14:19 | |
14:21
Manifest0 left
14:24
Resol left
|
|||
Skarsnik | How could I replace .raku On Buf/Blob to print Hex value and not Int? | 14:24 | |
timo | m: Buf.new(1, 2, 10, 20, 90, 91, 92).format("%x").say | 14:25 | |
camelia | No such method 'format' for invocant of type 'Buf' in block <unit> at <tmp> line 1 |
||
timo | m: Buf.new(1, 2, 10, 20, 90, 91, 92).list.format("%x").say | ||
camelia | No such method 'format' for invocant of type 'List' in block <unit> at <tmp> line 1 |
||
timo | oh? | ||
ah | |||
m: Buf.new(1, 2, 10, 20, 90, 91, 92).fmt("%x").say | |||
camelia | No such method 'fmt' for invocant of type 'Buf' in block <unit> at <tmp> line 1 |
||
timo | m: Buf.new(1, 2, 10, 20, 90, 91, 92).list.fmt("%x").say | ||
camelia | 1 2 a 14 5a 5b 5c | ||
timo | m: Buf.new(1, 2, 10, 20, 90, 91, 92).list.fmt("%02x", ",").say | ||
camelia | 01,02,0a,14,5a,5b,5c | ||
japhb | Those buffer contents are giving me flashbacks of the last week's work (parsing ANSI control code schemes) | 14:31 | |
14:38
Manifest0 joined
14:51
Altai-man joined,
Voldenet left,
Altai-man left
|
|||
Skarsnik | damn, no method to search a buffer in another one x) | 14:52 | |
14:54
Voldenet joined
15:01
gordonfish left
15:06
monkey_ joined
15:28
andrea[m]123 left
15:53
monkey_ left
16:02
Voldenet left
16:07
Voldenet joined
16:11
abraxxa-home joined
16:34
monkey_ joined
16:59
andrea[m]123 joined
17:12
monkey_ left
17:18
djerius left
17:20
djerius joined
17:42
dakkar left
18:02
reportable6 left
18:04
reportable6 joined
18:06
euandreh left
18:07
euandreh joined
18:13
abraxxa-home left,
abraxxa-home joined
18:17
euandreh left
18:26
gordonfish joined
19:00
melezhik joined
|
|||
melezhik | how can I check that an array includes another array? | 19:00 | |
ugexe | m: my @a = 1,2,3,4,5,6; my @b = 2,3,4; say @a.rotor(@b.elems => -(@b.elems - 1)).grep(* ~~ @b) | 19:06 | |
camelia | ((2 3 4)) | ||
19:07
euandreh joined
|
|||
melezhik | m: say (1,2,5).contains([1,2]) | 19:09 | |
camelia | Calling '.contains' on a List, did you mean 'needle (elem) list'? True in block <unit> at <tmp> line 1 |
||
ugexe | i dont think that does what you want | 19:10 | |
melezhik | m: say (1,2).contains([1,2,5]) | 19:11 | |
camelia | Calling '.contains' on a List, did you mean 'needle (elem) list'? False in block <unit> at <tmp> line 1 |
||
melezhik | ugexe why? | ||
ugexe | maybe it does... i thought .contains stringified lists | ||
m: my @a = 1,2,3; say @a.contains("1 2") | 19:12 | ||
camelia | Calling '.contains' on a Array, did you mean 'needle (elem) list'? True in block <unit> at <tmp> line 1 |
||
ugexe | that probably isnt the behavior you desire | ||
melezhik | what do you mean ? warnings? | ||
ugexe | well do you expect @a = 1,2,3 to contains "1 2"? | 19:13 | |
tonyo | m: my @a = 1,2; say "1 2".contains(@a) | ||
camelia | True | ||
tonyo | m: my $a = (1,2); say "1 25".contains($a) | ||
camelia | True | ||
melezhik | yeah, but I need check for arrays ... | 19:15 | |
ugexe | yes, that is why we are telling you .contains doesnt work | 19:16 | |
melezhik | ok | ||
ugexe | m: my @a = 1,2,3,4,5,6; my @b = 2,3,4; say @a.rotor(@b.elems => -(@b.elems - 1)).grep(* ~~ @b) | ||
camelia | ((2 3 4)) | ||
melezhik | so the only way is the code you've shared before? | ||
MasterDuke | m: my @a = 1,2,3,4,5,6; my @b = 2,3,4; say @b (elem) @a.rotor(@b.elems => -(@b.elems - 1)) # i'm sort of surprised this doesn't work | 19:19 | |
camelia | False | ||
ugexe | i mean you could use (&) but i assume you want the items in the same sequence | 19:20 | |
i.e. 1,2,3 doesnt match 1,2,9,3 | |||
melezhik | ah , no, I mean I don't need to take an order into account for this ... | 19:21 | |
MasterDuke | m: my @a = 1,2,"c",4,5,6; my @b = "c",8; say so all(@b.map(* (elem) @a)); my @c = "c",6; say so all(@c.map(* (elem) @a)); | 19:26 | |
camelia | False True |
||
19:28
notna joined
|
|||
tonyo | my $arr = [1,2,3]; my $search = [1,2]; say [&&] |([||] $arr.map(* == $_) for $search); | 19:30 | |
evalable6 | True | ||
tonyo | if you don't care about order | ||
m: my $arr = [1,2,3]; my $search = [1,2,4]; say [&&] |([||] $arr.map(* == $_) for $search); | 19:31 | ||
camelia | True | ||
tonyo | oops. | ||
something like that | |||
m: my $arr = [1,2,3]; my $search = [1,2,4]; say [&&] ([||] $arr.map(* == $_) for |$search); | 19:34 | ||
camelia | False | ||
tonyo | m: my $arr = [1,2,3]; my $search = [1,2]; say [&&] ([||] $arr.map(* == $_) for |$search); | ||
camelia | True | ||
19:39
melezhik left
19:42
lucerne left,
AntonOks joined
|
|||
AntonOks | hi dev's. who has commit and the like right on github.com/rakudo/star? | 19:45 | |
19:45
greyrat left
|
|||
AntonOks | it would be great if someone looks into github.com/rakudo/star/pull/167 | 19:45 | |
19:45
greyrat joined
|
|||
AntonOks | any feedback for that pull is highly appreciated... | 19:45 | |
19:45
lucerne joined
19:48
notna left
19:53
Kaiepi left,
Kaiepi joined
20:01
AntonOks left
20:05
stoned75 joined
|
|||
Geth | doc: cddc09f799 | (Stoned Elipot)++ | doc/Language/operators.pod6 Document U+2A75 and U+2A76 operator aliases ref #3922 |
20:12 | |
linkable6 | Link: docs.raku.org/language/operators | ||
20:12
linkable6 left
20:31
melezhik joined
|
|||
melezhik | . | 20:31 | |
I have created devops weekly on top of mybfio projects and added on Raku project there, feel free to add your project if you consider them devops related - www.reddit.com/r/devops/comments/q...on_mybfio/ | 20:32 | ||
there is only one there right now | |||
20:36
melezhik left
20:40
stoned75 left
|
|||
tonyo | .tell melezhik not sure you saw this for array in array - `my $arr = [1,2,3]; my $search = [1,2,4]; say [&&] ([||] $arr.map(* == $_) for |$search);` | 21:06 | |
tellable6 | tonyo, I'll pass your message to melezhik | ||
tonyo | could even be shortened to `my $arr = (1,2,3); my $search = (1,2); say [&&] ([||] $_ ∈ $arr for |$search);` | 21:09 | |
21:36
abraxxa-home left
21:44
tejr left
21:45
tejr joined
21:55
Xliff left,
Xliff_ joined
22:13
linkable6 joined
22:16
Guest90 joined
22:28
melezhik joined
|
|||
melezhik | . | 22:28 | |
tellable6 | 2021-11-01T21:06:45Z #raku <tonyo> melezhik not sure you saw this for array in array - `my $arr = [1,2,3]; my $search = [1,2,4]; say [&&] ([||] $arr.map(* == $_) for |$search);` | ||
melezhik | .tell tonyo: - thanks | ||
tellable6 | melezhik, I'll pass your message to tonyo | ||
22:39
melezhik left
|
|||
tonyo | if you care about ordering then use a loop | 22:57 | |
tellable6 | 2021-11-01T22:28:48Z #raku <melezhik> tonyo: - thanks | ||
23:39
evalable6 left,
linkable6 left
23:43
dogbert17 left
23:45
Guest90 left
23:46
dogbert17 joined
|