🦋 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: ... | Logs can be inspected at colabti.org/irclogger/irclogger_log/raku
Set by lizmat on 21 April 2021.
japhb (While TinyFloats also supports *EN*coding, I'm not using that in CBOR::Simple yet, because it would probably slow encoding num arrays quite a bit. Correctly encoding binary16 is non-trivial. :-/ ) 00:00
00:08 |Sno| joined 00:12 |Sno| left
moon-child japhb: signed nan doesn't work on windows? 00:23
japhb moon-child: Windows defaults NaN's representation to the opposite sign bit as everyone else, but the sign bit for NaN is explictly supposed to be ignored, so I just squash it to be the same everywhere to get byte-equivalent encodings everywhere. 00:28
moon-child ahhh
00:57 softmoth joined 01:19 defaultxr joined 01:28 abraxxa left 01:29 abraxxa joined 01:30 wamba joined 01:57 kvw_5_ joined 02:00 kvw_5 left 02:06 Kaiepi joined 02:09 frost-lab joined 02:33 gitsome left 02:47 softmoth left 02:49 sivoais left 02:51 sivoais joined 02:56 frost-lab left 02:57 neshpion joined 03:00 frost-lab joined 03:08 guifa2 left 03:24 Xliff joined
Xliff \o 03:24
tellable6 2021-04-23T06:31:23Z #raku <El_Che> Xliff: is your network faster than your disk?
neshpion i wish 03:25
Xliff .tell El_Che I doubt it. Why do you ask? 03:26
tellable6 Xliff, I'll pass your message to El_Che
Xliff Can someone illustrate the best way to append elements from one array to another in nqp?
Would something like this work? pastebin.com/4vbyLJpH 03:37
tonyo how do you mean? just a push or a flattening push? 03:45
Xliff Just a push 03:59
Actually, no. A flatenning push.
My bad.
04:04 wamba left 04:06 neshpion left 04:10 neshpion joined 04:31 Sgeo left 04:32 Sgeo joined 04:34 abraxxa left 04:35 abraxxa joined 04:39 sno joined 05:03 neshpion left 05:09 frost-lab left 05:12 jmerelo joined 06:00 rindolf joined 06:02 ToddAndMargo joined
ToddAndMargo Hi All,  How do I put a literal in a regex?    `$JsonAddr ~~ s| Q[⏏;] .* ||;` 06:03
I am trying to match on a semicolon 06:04
CIAvash ';'? 06:05
ToddAndMargo yes 06:06
g="rumble.com",b="/embedJS/u3";f.l=d(...rorHandler 06:07
I am trying to dump everything after and including the semicolon
$JsonAddr ~~ s| "\⏏x" .* ||; 06:09
moon-child S/.*(';'.*)/\1/ 06:13
ToddAndMargo I missed the ().  Thank you! 06:16
Xliff Can someone illustrate the best way to append elements from one array to another in nqp?
Would something like this work? pastebin.com/4vbyLJpH
06:19 ToddAndMargo left
b2gills Xliff: token string { <q> {} ~ $<q> [.*?] } # Note that {} is necessary to update $/. Also I did a bunch of more work to match all of the [#define] at: replit.com/@BradGilbert/MobileBeneficialPixels 06:27
Xliff And... that link can't be loaded ATM. Oh. There it is. Thanks, B2gills! 06:28
06:31 domidumont joined 06:34 ufobat joined 06:40 abraxxa left 06:42 abraxxa joined
elcaro 06:49
06:58 pecastro joined 07:04 wamba joined 07:05 Kaiepi left, Kaiepi joined 07:11 asymptotically joined 07:15 grimler32 left 07:17 parabolize left 07:24 brtastic joined 07:28 brtastic left 07:29 brtastic joined, dakkar joined 07:33 __jrjsmrtn__ joined 07:35 _jrjsmrtn left 07:42 sno left 07:47 Sgeo left 08:09 sno joined 08:15 abraxxa left 08:16 abraxxa joined 08:24 ukine joined, ukine left 08:25 abraxxa left 08:26 rindolf left, abraxxa joined 08:36 sno left 08:40 ukine joined 08:42 rindolf joined 08:52 sno joined 08:58 frost-lab joined
lizmat clickbaits and another Rakudo Weekly News hits the Net: rakudoweekly.blog/2021/04/26/2021-...leastable/ 09:13
09:28 abraxxa left 09:40 epony left 09:49 DiffieHellman left 09:50 DiffieHellman joined 09:51 abraxxa joined 09:58 wamba left
Xliff Can someone illustrate the best way to append elements from one array to another in nqp? 10:27
Would something like this work? pastebin.com/4vbyLJpH
lizmat github.com/Raku/nqp/blob/master/do...own#splice 10:31
make sure $count is zero
Xliff ^^
10:32 wamba joined 10:33 morayj joined
Xliff lizmat: So in the above pastebin, that change might look like this? 10:34
@named := nqp::splice(@named, nqp::decont($also.Array), nqp::elems(@named), 0) 10:36
m: use nqp; my @a := (1, 2, 3); my @also := <a b c>; @named := nqp::splice(@named, @also), nqp::elems(@named), 0); @named.gist.sau 10:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@named' is not declared
at <tmp>:1
------> 3y @a := (1, 2, 3); my @also := <a b c>; 7⏏5@named := nqp::splice(@named, @also), nq
Xliff m: use nqp; my @a := (1, 2, 3); my @also := <a b c>; @named := nqp::splice(@named, @also), nqp::elems(@named), 0); @named.gist.sau
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@named' is not declared
at <tmp>:1
------> 3y @a := (1, 2, 3); my @also := <a b c>; 7⏏5@named := nqp::splice(@named, @also), nq
Xliff m: use nqp; my @a := (1, 2, 3); my @also := <a b c>; @named := nqp::splice(@named, @also), nqp::elems(@named), 0); @named.gist.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@named' is not declared
at <tmp>:1
------> 3y @a := (1, 2, 3); my @also := <a b c>; 7⏏5@named := nqp::splice(@named, @also), nq
Xliff m: use nqp; my @named := (1, 2, 3); my @also := <a b c>; @named := nqp::splice(@named, @also), nqp::elems(@named), 0); @named.gist.say 10:38
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3ce(@named, @also), nqp::elems(@named), 07⏏5); @named.gist.say
Xliff m: use nqp; my @named := (1, 2, 3); my @also := <a b c>; @named := nqp::splice(@named, @also, nqp::elems(@named), 0); @named.gst.say
camelia This type (List) does not support elems
in block <unit> at <tmp> line 1
Xliff Huh.
10:39 aluaces left
Xliff m: use nqp; my @named := 1, 2, 3; my @also := <a b c>; @named := nqp::splice(@named, @also), nqp::elems(@named), 0); @named.gist.say 10:40
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3ce(@named, @also), nqp::elems(@named), 07⏏5); @named.gist.say
Xliff m: use nqp; my @named := 1, 2, 3; say nqp::elems(@named) 10:41
camelia This type (List) does not support elems
in block <unit> at <tmp> line 1
Xliff lizmat: Why this error?
lizmat @names is a HLL List
*@named 10:42
use nqp; my @named := nqp::list(1, 2, 3); say nqp::elems(@named)
m: use nqp; my @named := nqp::list(1, 2, 3); say nqp::elems(@named)
camelia Type check failed in binding; expected Positional but got List ((1, 2, 3))
in block <unit> at <tmp> line 1
lizmat m: use nqp; my $named := nqp::list(1, 2, 3); say nqp::elems($named)
camelia 3
lizmat when using nqp in Raku, probably best to stick to $ sigils 10:43
Xliff lizmat++
lizmat: Thanks much. So what would be the nqp equivalent of .gist? 10:47
lizmat there is none
.gist is a HLL concept 10:48
Xliff Best way to output an array, then?
lizmat if it is a nqp::list, use dd
m: dd nqp::list(1,2,3)
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find nqp::list, did you forget 'use nqp;' ?
at <tmp>:1
------> 3dd nqp::list(1,2,3)7⏏5<EOL>
lizmat m: use nqp; dd nqp::list(1,2,3)
camelia (1, 2, 3)
Xliff dd works!
lizmat in general, dd is capable of handling several primitive types 10:49
gfldex lolibloggedalittle: gfldex.wordpress.com/2021/04/27/th...-a-riddle/
Xliff gfldex: Nice article. Still made my head hurt. 10:51
Are you saying that... in this case, since NotNil is Nil's child, Nil's .new will always override? 10:52
m: class NotNil is Nil {}; say NotNil.new.^name 10:53
camelia Nil
Xliff Ouch. Is there any way to know ahead of time which classes will cause this behavior?
Xliff makes mental note to never subclass Nil. 10:54
m: class NotNil is Nil { method new { self.CREATE }; }; say NotNil.new.^name
camelia NotNil
Xliff That took a long time.
m: class NotNil is Nil { method new { self.CREATE }; }; say NotNil.new.^name
camelia NotNil
Xliff That time not-so-much.
gfldex Xliff: I don't think Nil actually needs that short cut. We never really instanciate Nil. 10:59
11:30 gitsome joined 11:32 morayj left 11:51 aluaces joined
lizmat github.com/rakudo/star/releases/tag/2021.04 12:02
tyil++
tyil :>
sena_kun tyil++ 12:16
El_Che++
Altreus now also including *buntu 21.04 # is this censorship or fuzzy matching? 12:17
tyil Altreus: *buntu is generally done to refer to Ubuntu and derivates, such as Kubuntu or Xubuntu
Altreus aha 12:21
And mint
:)
12:24 brtastic left 12:40 brtastic joined 12:43 brtastic1 joined 12:44 brtastic left, brtastic1 is now known as brtastic 12:56 dogbert17 joined 12:59 dogbert11 left
El_Che hi sena_kun 13:02
tellable6 2021-04-27T03:26:06Z #raku <Xliff> El_Che I doubt it. Why do you ask?
sena_kun El_Che, hey hey. Can I be of any help or you are being polite responding to my praise for the new release packaging? :) 13:03
El_Che I was yesterday's day old when I discovered sena_kun and Avatar
Altai-man
wwere the same person :)
sena_kun ah, well, that's me. :) 13:04
sorry for the confusion
El_Che I probably talked to you "both" on different occasions without realizing that
:)
sena_kun El_Che, I don't remember you being impolite in any way so far, so I guess you are a nice person disregarding if I'm sena_kun or Altai-man. :) 13:05
El_Che good, you never know :) 13:06
13:15 epony joined
andinus m: say (4, 6, 5).sort eqv (4, 5,6) 13:42
camelia False
andinus why is this false ^?
m: say (4, 5,6) eqv (4,5,6)
camelia True
13:47 Sgeo joined
vrurg m: say (4, 6, 5).sort.WHICH 13:49
camelia Seq|84289712
vrurg m: say (4, 5,6).WHICH
camelia List|57238480
vrurg andinus: That's why. 13:50
andinus i see, looks like ~~ does what i want 13:51
masak my secret shame: I couldn't tell you what a Seq was if my lunch depended on it
vrurg andinus: that's what you need most of the time.
13:51 Geth joined
vrurg m: say (4, 6, 5).sort.List eqv (4, 5,6) 13:52
camelia True
13:52 Geth left
andinus so i have a list of 3 numbers, and there are several cases i need to match against 13:52
the list is sorted
case #1: 4, 5, 6 ;; case #2: all same digits ;; case #3: 2 same digits 13:53
is there a better way to handle #2 & #3 other than just writing if/elsif for each possible combination?
vrurg andinus: you mean matching (4,5,6) and (5,6,4), for example? 13:55
I'd guess sorting both and eqv the result is the best. 13:56
andinus no, matching (x, x, y) ;; matching (x, x, x) where x can be any integer 13:57
vrurg andinus: sorry, still don't get what exactly you need. So, you have (4,5,6) and (6,6,5). Is it a match? 13:59
andinus no, i just need to match for cases. something like: if @rolls ~~ (** all same digits **) 14:00
14:00 Geth joined
andinus ** all same digits ** should match (1, 1, 1), (2,2,2) and so on.. 14:00
14:00 Geth left
andinus i'm trying to write www.netexl.com/howtoplay/cee-lo/ in raku 14:01
vrurg m: say bag(4,4,9)
camelia Bag(4(2) 9)
vrurg m: say set(4,4,9).elems 14:02
camelia 2
vrurg m: say set(4,4,4).elems
camelia 1
14:03 gitsome left
andinus oh thanks, i could make it work with set and bags 14:03
vrurg andinus: you may also consult with docs.raku.org/language/operators as you may need things like intersections, differences, etc. 14:05
andinus i see, thanks 14:07
14:07 Geth joined 14:08 wamba left
tyil lizmat: you around? 14:08
lizmat about to leave for a few hours 14:14
tyil ^^
tyil ah
enjoy the sun, then :D
lizmat well, if I can do something quickly for you, I will :) 14:15
tyil I wanted to ask you to re-send a github event that is usually handed over to geth
lizmat ok, which one ?
tyil I want to see how much I've just broken
any should work
wait, rakudo/star is also set up for this, I can test this myself 14:16
lizmat I've just resent one
tyil alright, I have some more work to do I see :'D 14:17
thanks!
lizmat yw
tyil now go out and enjoy the weather :>
lizmat afk for a few hours&
I will!
14:22 Geth left 14:24 Geth joined
andinus say i have a bag(x, x, y) and want "y", is there a good way to get it? x, y are integers 14:24
m: bag(1, 3, 3)
camelia WARNINGS for <tmp>:
Useless use of "bag(1, 3, 3)" in expression "bag(1, 3, 3)" in sink context (line 1)
andinus # need 1 here
m: say bag(1, 1, 2) 14:25
camelia Bag(1(2) 2)
14:25 Geth left
andinus # need 2 here 14:25
14:25 Geth joined
andinus m: say bag(1, 1, 3){1} 14:26
camelia 2
14:27 frost-lab left
andinus something better than just looping over 1, 2, 3 and finding out what has been repeated only once? 14:29
14:29 Geth left 14:30 Geth joined 14:32 sno left 14:33 Geth left 14:34 parabolize joined 14:35 Geth joined, ufobat_ joined 14:37 ufobat left 14:38 Geth left 14:40 Geth joined, Geth left 14:41 grimler32 joined, Geth joined
grimler32 Evil People Messed with my LIFE! Are there any universe editors here with access to the 4 bit 3 dimensional god code at the multiverse level?? 14:42
gfldex m : say bag(1,1,2).repeated 14:45
m: say bag(1,1,2).repeated
camelia ()
gfldex m: say bag(1,1,2).list.sort.repeated
camelia ()
gfldex m: say bag(1,1,2).list.grep(*.value > 1)».key; 14:50
camelia (1)
gfldex andinus: like so ^^^ ? 14:51
14:53 wamba joined
andinus hmm that does what i want, thanks 14:57
Altreus grimler32: r/fifthworldproblems
15:06 sno joined 15:08 sno left 15:11 b2gills left 15:12 b2gills joined 15:23 sno joined 15:24 domidumont left
Xliff Is there a setlocale() analog for Raku? 15:26
dakkar Xliff: the C function? what are you trying to accomplish? 15:50
m: use NativeCall;sub setlocale(int32 $category,Str $locale --> Str) is native {*};say setlocale(6,"") 15:54
camelia LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C
dakkar (6 is LC_ALL on my machine, it seems to be LC_CTYPE on that one) 15:55
m: use NativeCall;sub setlocale(int32 $category,Str $locale --> Str) is native {*};say setlocale(1,"")
camelia C
dakkar m: use NativeCall;sub setlocale(int32 $category,Str $locale --> Str) is native {*};say setlocale(2,"")
camelia C
dakkar (ah, the joy of C macros used as enums…)
15:58 sno left 15:59 sno joined 16:06 sno left 16:18 wamba left 16:22 brtastic left 16:41 dakkar left 16:49 domidumont joined 17:07 sno joined 17:08 vrurg left 17:25 abraxxa left 17:26 MasterDuke left 17:27 abraxxa joined 17:32 aborazmeh joined 17:34 wamba joined 17:37 sno left 17:39 domidumont left 17:40 asymptotically left 17:45 sno joined 17:49 sno left 17:51 sno joined 17:56 sno left 17:59 sno joined 18:01 maggotbrain left 18:03 maggotbrain joined 18:04 sno left 18:05 sno joined 18:10 marcusr left 18:15 sno left 18:17 maggotbrain left 18:19 maggotbrain joined 18:21 simcop2387_ joined 18:22 xi joined 18:25 aborazmeh left 18:26 abraxxa left 18:27 sno joined 18:28 AlexDaniel` left, simcop2387 left, xi- left, Bucciarati left, Bucciarati joined 18:29 abraxxa joined
Xliff use NativeCall;sub setlocale(int32 $category,Str $locale --> Str) is native {*};say setlocale(9,"") 18:30
m: use NativeCall;sub setlocale(int32 $category,Str $locale --> Str) is native {*};say setlocale(9,"")
camelia C
Xliff dakkar: ^^ That, but in a way that will work for different environments.
tellable6 Xliff, I'll pass your message to dakkar
Xliff Unfortunately, I think this may be another one of those things that has to be compiled into a helper lib because macros are not accessible by NativeCall without cheats. 18:31
18:31 AlexDaniel` joined
tonyo what are you doing that you want to modify the user's environment? 18:32
18:33 abraxxa left, sno left 18:36 sno joined 18:40 m6locks left 18:41 sno left 18:44 sno joined 18:46 MasterDuke joined, m6locks joined 18:48 patrickb joined 18:50 sno left 18:53 sno joined 18:57 Black_Ribbon joined 18:59 sno left 19:01 marcusr joined 19:02 sno joined 19:03 aborazmeh joined 19:05 jmerelo left 19:06 sno left 19:08 sno joined 19:13 lichtkind joined 19:16 sno left, sno joined 19:22 sno left, vrurg joined 19:25 sno joined 19:32 sno left, sno joined 19:39 sno left 19:40 sno joined 19:45 MasterDuke left, MasterDuke joined 19:54 sno left 19:55 sno joined 20:02 sno left 20:03 sno joined 20:09 wamba left 20:10 sno left 20:12 sno joined 20:15 MasterDuke left 20:22 Geth left 20:27 sno left 20:29 sno joined 20:33 brtastic joined 20:35 sno left 20:36 sno joined 20:43 patrickb left, sno left 20:45 sno joined 20:50 sno left 20:52 sno joined 20:58 sno left 21:00 sno joined 21:03 guifa2 joined 21:05 sno left 21:06 sno joined 21:07 brtastic1 joined, brtastic left, brtastic1 is now known as brtastic 21:15 sno left 21:16 sno joined 21:23 sno left 21:25 sno joined 21:30 simcop2387_ left, simcop2387_ joined, simcop2387_ is now known as simcop2387\ 21:31 simcop2387\ is now known as simcop2387 21:32 MasterDuke joined 21:33 Xliff left 21:41 Geth joined, Geth left 21:42 Geth joined 21:46 stoned75 joined
Geth doc/supply-batch-ms-3744: 9fc243e169 | (Stoned Elipot)++ | doc/Type/Supply.pod6
Note ms granularity for Supply.batch ref #3744
21:47
doc: stoned++ created pull request #3878:
Note ms granularity for Supply.batch ref #3744
21:48
21:48 linkable6 left 21:49 sno left 21:50 sno joined 21:56 sno left 21:58 sno joined 22:03 sno left 22:06 ufobat_ left 22:16 stoned75_ joined 22:20 stoned75 left 22:22 aborazmeh left 22:24 sno joined 22:29 sno left 22:32 sno joined 22:45 pecastro left 22:49 brtastic1 joined, brtastic left, brtastic1 is now known as brtastic 22:51 sno left 22:53 sno joined 22:58 sno left 22:59 sno joined 23:06 sno left 23:07 aborazmeh joined, sno joined 23:13 sno left 23:15 sno joined 23:17 brtastic left 23:20 sno left 23:22 pecastro joined, sno joined 23:27 ionsolo joined 23:28 sno left 23:29 sno joined 23:32 BuildTheRobots left 23:33 BuildTheRobots joined 23:35 sno left 23:38 sno joined 23:44 sno left 23:45 sno joined 23:47 rindolf left 23:52 sno left 23:53 ionsolo left, sno joined 23:58 sno left