🦋 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.
00:05 MasterDuke joined 00:40 MasterDuke left 01:39 Oshawott joined 01:42 archenoth left 02:04 frost left 02:23 _Xliff_ left 02:50 swaggboi left 02:59 swaggboi joined 03:28 frost joined 04:28 nativecallable6 left, coverable6 left, tellable6 left, quotable6 left, sourceable6 left, greppable6 left, unicodable6 left, evalable6 left, releasable6 left, reportable6 left, notable6 left, benchable6 left, bisectable6 left, committable6 left, squashable6 left, shareable6 left, linkable6 left, statisfiable6 left, bloatable6 left, unicodable6 joined, tellable6 joined, committable6 joined, notable6 joined, coverable6 joined, benchable6 joined 04:29 reportable6 joined, squashable6 joined 04:30 bloatable6 joined, shareable6 joined 04:31 linkable6 joined, quotable6 joined
Geth doc: c6819b428f | Coke++ | doc/Language/variables.pod6
pass example compilation test
05:16
linkable6 Link: docs.raku.org/language/variables
05:18 SmokeMachine left 05:19 ecocode__ left, leont left, zostay left, patterner_ left 05:20 rjbs left, kawaii_ left, pjlsergeant left, zostay joined, pony left, skaji_ joined, skaji left, skaji_ is now known as skaji 05:21 patterner_ joined, ecocode__ joined 05:22 leont joined, kawaii_ joined, pjlsergeant joined, pony joined, rjbs joined 05:28 evalable6 joined 05:29 bisectable6 joined 05:30 releasable6 joined, nativecallable6 joined 05:32 SmokeMachine joined 06:03 reportable6 left 06:06 reportable6 joined 06:13 euandreh left 06:17 seednode4 left 06:18 seednode4 joined 07:17 Sgeo_ left 07:30 statisfiable6 joined, greppable6 joined, sourceable6 joined 08:30 evalable6 left, linkable6 left 08:32 linkable6 joined 09:08 MasterDuke joined 09:15 frost left, frost joined 09:30 evalable6 joined 10:28 frost left 10:38 frost joined 11:38 linkable6 left, evalable6 left 11:40 evalable6 joined 11:45 xinming__ left 11:46 xinming__ joined 12:03 reportable6 left 12:04 reportable6 joined 12:29 jess joined 12:40 linkable6 joined 12:45 kylese joined
Geth doc: 2f821909ee | (Christian Bartolomäus)++ | doc/Type/Proc/Async.pod6
Remove duplicate word
12:58
linkable6 Link: docs.raku.org/type/Proc::Async
13:06 discord-raku-bot left 13:56 discord-raku-bot joined 14:22 kylese left 15:22 evalable6 left, linkable6 left 15:25 frost left 15:27 Skarsnik joined
Skarsnik Hello 15:48
lizmat, any luck with the BEGIN/INIT stuff in a module? x) 15:50
Nemokosch suppers
15:57 monkey_ joined 16:13 Sgeo joined
japhb Trying to figure out status on the URI install issue: I saw ugexe fixed zef's confusion about URI versus URI::Template. I know [Coke] noticed the same install problems with URI that I did, and jonathanstowe confirmed it was most likely a Rakudo regression, not a URI change (since there haven't been any). Was there any progress after that? 16:36
16:37 suman joined
suman Suppose I have a hash my %new_hash = {"madam" => 4, "sir" => 1, "student" => 3}; 16:37
How to print the keys with higher values in this case: get the keys madam and student
japhb m: my %new_hash = madam => 4, sir => 1, student => 3; .say for %new_hash.sort(*.value).head(2); 16:39
camelia sir => 1
student => 3
japhb m: my %new_hash = madam => 4, sir => 1, student => 3; .say for %new_hash.sort(-*.value).head(2);
camelia madam => 4
student => 3
japhb (Forgot to reverse the sort direction)
suman @japhb Rather than elements of hash, I just wish to get the last two highest keys 16:40
japhb m: my %new_hash = madam => 4, sir => 1, student => 3; .key.say for %new_hash.sort(-*.value).head(2); 16:41
camelia madam
student
japhb Or
m: my %new_hash = madam => 4, sir => 1, student => 3; .say for %new_hash.sort(-*.value).head(2).map(*.key);
camelia madam
student
suman (y) 16:42
japhb (Technically it is possible to determine k-th greatest faster than sorting the whole array (by partitioning), but doesn't seem worth the hassle here.)
suman If you have time, it would be great to see that solution too '=D 16:44
japhb I don't think we have convenient optimized built-ins for that ... it would require writing out the partition algorithm by hand. Not conceptually difficult, but famously easy to make non-obvious mistakes and get off-by-one errors and such. 16:46
Unless your hash has a LOT of elements (at least thousands), I'd just stick with the (fairly well-written) sort routine. 16:47
suman @japhb Can you please tell me how to print keys who have specific values. If a hash has value=1, then it will print all keys with value 1. 16:59
my %hash={abc => 1, bcd => 1, cde => 1, def => 1, efg => 1}; 17:00
here it has to print all keys because all have val=1
lizmat feels like we're doing someone's home work :-) 17:01
m: my %a = :1a,:1b,:2c,:3d; say %a.map: { .key if .value == 1 } 17:02
camelia (a b)
suman Haha no no, I was looking to solve k-mer problem in bioinformatics in rakuish way '=D 17:03
ugexe m: my %foo = a => 1, b => 1, c => 3; say %foo.categorize(*.value, :as(*.key))<1> 17:05
camelia (Any)
ugexe m: my %foo = a => 1, b => 1, c => 3; say %foo.categorize(*.value, :as(*.key)){1} 17:06
camelia [a b]
suman (y) 17:09
17:23 suman left 17:43 sftp left 17:51 suman joined
suman I do say $heredocs.subst("\n",:g) to remove all newlines and get a combined string in heredocs. 18:02
18:02 reportable6 left
suman Is it good ? 18:03
18:03 reportable6 joined
suman Uploaded file: uploads.kiwiirc.com/files/04ae635f.../test.raku 18:04
18:06 jess left 18:09 sftp joined 18:14 sftp left 18:20 suman left 18:22 sftp joined 18:37 arun007 joined 18:39 squashable6 left 18:40 arun007 left 19:24 linkable6 joined 19:25 evalable6 joined 19:42 squashable6 joined 19:53 euandreh joined 20:09 monkey_ left 20:22 sena_kun joined 20:23 sena_kun left 20:24 Altai-man left 20:25 melika joined
melika hi 20:25
20:30 thundergnat joined
thundergnat m: my %hash = abc => 1, bcd => 2, cde => 1, def => 3, efg => 1, hij => 2, klm => 1, nop => 2; say (% .push: %hash.invert)<1>; 20:31
camelia [abc efg cde klm]
21:30 evalable6 left, linkable6 left 21:32 melika left 21:33 linkable6 joined 21:49 squashable6 left 21:52 squashable6 joined 22:01 sftp left 22:12 sftp joined 22:16 sftp left, sftp_ joined, sftp_ is now known as sftp 22:33 Sgeo_ joined, Sgeo left 22:38 sftp left
japhb Found the URI problem: github.com/raku-community-modules/...-962519559 22:44
22:58 sftp joined 23:18 sftp left
lucs y 23:23
ww
23:27 Kaiepi left 23:29 holyghost_ left
Nemokosch c ww? 23:31
23:32 Kaiepi joined, evalable6 joined 23:51 sftp joined 23:55 jess joined 23:56 sftp left