🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
00:07 apac left, itaipu joined 01:12 oodani left, oodani joined 01:27 hulk joined, kylese left 02:15 hulk left, kylese joined 02:16 lichtkind left 02:41 dg left 02:46 dg joined 03:11 LainIwakura joined 03:23 arkiuat left 03:31 apogee_ntv left, apogee_ntv joined 03:36 arkiuat joined
patrickb I've heard of the V language for the first time. vlang.io/ Seems pretty popular. Am I the only one that missed it so far? 03:50
Voldenet vlang is too close to golang for my taste – if I wanted golang I'd just use golang 04:35
It's difficult to like golang – it feels very repetitive because of how error handling works and that extra : in assignment is ugly to look at 04:50
things like [][]string{} are also sufficiently weird, when it comes to compiled languages I prefer nimlang or ziglang – they just feel pleasant to look at in comparison 04:55
elcaro perryprog: You can bench it for yourself -- pastebin.com/czca7sMW 05:08
05:17 Aedil joined 05:37 Pixi left 05:45 melezhik joined 05:47 Sgeo_ joined
Voldenet without benching, I'd expect substr to be a lot faster and grammar be the slowest 05:49
05:50 Sgeo left
Voldenet I've benchmarked, rotor was surprisingly slow 05:54
I'm amazed but it seems that `sub { DateTime.new(year => .substr(0,4), month => .substr(4,2), day => .substr(6,2), hour => .substr(8,2), minute => .substr(10,2), second => .substr(12,2)) given $s }` is not significantly slower 05:56
05:56 Pixi joined 05:57 kaskal left 05:58 kaskal joined
elcaro Yeah, I wouldn't expect it to be. Anytime I need to cut up a string fast, I reach for substr :/ 06:09
Voldenet I mean, when you use named parameters vs positional parameters 06:14
.substr is plain allocate + copy part of the string, I doubt it can get any faster, the only fastest way would be if maybe no copy was done at all 06:16
07:03 [Coke] left 07:10 [Coke] joined 07:29 Aedil left 07:32 ynzoqn joined 07:34 ynzoqn left 07:55 melezhik left 07:57 librasteve_ joined 08:19 dakkar joined 08:29 arkiuat left 08:34 Sgeo_ left 08:57 arkiuat joined 09:02 arkiuat left 09:30 arkiuat joined 09:35 arkiuat left 09:46 LainIwakura left
librasteve I just noticed that Num.FatRat takes a 2nd argument to converts the number to a FatRat with the precision $epsilon. Likely this is what I need - have closed the issue for now and will try it... 09:51
10:03 LainIwakura joined 10:05 arkiuat joined 10:11 LainIwakura left 10:15 arkiuat left 10:24 LainIwakura joined 10:29 lichtkind joined 10:43 arkiuat joined 10:47 arkiuat left 11:01 arkiuat joined
simon_sibl probably late to the party but the new Raku website looks amazing ! 11:04
11:08 arkiuat left 11:20 arkiuat joined 11:25 arkiuat left
librasteve @simon_sibl ... thanks! all written in raku, of course (harcstack.org) 11:25
11:37 crnlskn joined 11:38 arkiuat joined 11:43 lichtkind left 11:44 LainIwakura left 11:47 arkiuat left 11:49 apac joined
simon_sibl I'm not much of a web person but the harc stack looks pretty good I should try to learn and make a little project with it 11:55
11:56 dgl joined 11:58 dg left, dgl is now known as dg 12:00 arkiuat joined 12:04 arkiuat left
mc2 ls 12:20
oops sorry
sjn ls: cannot open directory '.': Permission denied 12:28
12:29 arkiuat joined 12:34 arkiuat left 12:51 Guest96 joined
simon_sibl lmao, that happens to me also more than it should xD 12:59
13:03 arkiuat joined 13:06 stanrifkin joined 13:08 arkiuat left
librasteve ww? 13:23
crnlskn bash: ww: command not found 13:25
scnr
librasteve ww == 'wrong window' (I learned that from lizmat) 13:26
crnlskn oh, I am aware, i was continuing the previous joke :)
librasteve clear 13:27
crnlskn also my fedora install here suggested 'w' as a valid command, which made me realize that 'ww?' could be read as a regex and then *would* math 'w'
er s/math/match
13:30 arkiuat joined 13:35 arkiuat left 14:04 arkiuat joined 14:10 arkiuat left 14:16 Guest96 left, Sgeo joined 14:30 arkiuat joined 14:34 arkiuat left 14:58 melezhik joined
melezhik . 14:58
15:03 arkiuat joined
librasteve o/ 15:47
Voldenet: you wrote
sub tiniest-fat-rat($n = 2) { with $n / 2 { return $n if .FatRat == 0; samewith($n / 2); } }; say tiniest-fat-rat.FatRat.nude; #(1 9223372036854775808) 15:52
evalable6 (1 9223372036854775808)
librasteve which has had me scratching my head ... then I wrote:
15:52 NucleusBiffBot joined, NucleusBiffBot left
say $n.WHAT; ... it's always a (Rat) 15:54
then
$*RAT-OVERFLOW = FatRat;
and it recurses forever 15:55
or you can go
sub tiniest-fat-rat(FatRat $n = <2>.FatRat) {
perryprog "tiniest fat rat" oh my goshhh you have to be doing this on purpose 15:57
librasteve ;-)
16:10 human-blip left
coleman "fatrat" is the hostname of the server that serves raku.org and the docs :D 16:12
16:12 human-blip joined
coleman We don't have many hosts but I'm going to try and find another class name or type or role for the next one. I had to decomission "baggy". RIP baggy. 16:13
16:14 LainIwakura joined
lizmat PSA: it looks like irclogs.raku.org and Geth will be down on Mon 15 Sep from 0600 - 0800 UTC due to electricity works at their data center 16:19
16:20 LainIwakura left 16:32 dakkar left 16:59 Aedil joined 17:07 melezhik left 17:30 crnlskn left
arkiuat I still need to go to old.raku.org to find the information about the IRC channel bots, but I'm pretty sure someone already made an issue for that 17:52
Is there an instance of Commitable running at present? github.com/Raku/whateverable/wiki/Committable 17:59
m: for "2025-05-25T17:00:00" -> $d { for DateTime.new($d).in-timezone(-6*60*60), DateTime.new($d ~ "-06:00") { .julian-date.say } } 18:04
camelia 2460821.208333
2460821.458333
arkiuat so it's not just that .julian-date was ignoring timezone information, but that it was only sometimes doing so, depending on how that information was supplied
I'm not sure how to run this again the fix that lizmat already put in 18:05
this goes back to a discussion on this channel back on May 25, and lizmat's fix I'm referring to is github.com/rakudo/rakudo/pull/5886 18:07
oh, never mind, I just figured out what I'm doing wrong. 18:08
m: for "2025-05-25T17:00:00" -> $d { for DateTime.new($d).in-timezone(-6*60*60), DateTime.new($d ~ "-06:00") { .say } } 18:09
camelia 2025-05-25T11:00:00-06:00
2025-05-25T17:00:00-06:00
arkiuat One is at 11 AM in TZ-6 and the other is at 5pm in TZ-6
but while I'm doing blasts from the past, we also had a couple of discussions about [Z] where I expressed the opinion that it was the matrix-transpose operator, and it turns out there is a section in the Traps doc all about this particular issue: docs.perl6.org/language/traps#Usin...t_of_lists 18:13
weird, how did that "perl6" get in there? I meant docs.raku.org/language/traps#Using...t_of_lists 18:14
18:23 human-blip left 18:25 human-blip joined 18:40 crnlskn joined 18:48 crnlskn left
[Coke] docs.raku.org/language/traps#Using...t_of_lists is the URL on the site. 19:17
19:36 apac left
librasteve arkiuat: yes the bot doc is an open issue …. PRs like that very simple to do and always welcome! (my proposal is a new box on the community page) 19:41
19:49 melezhik joined
melezhik . 19:49
changed theme to light one and added systemd examples, also added some clarity on Sparrow essentials on the start page - sparrowhub.io 19:51
19:58 melezhik left 20:33 arkiuat left 20:42 stanrifkin left 20:44 stanrifkin joined, stanrifkin left 20:46 arkiuat joined 20:50 arkiuat left 20:52 mc2 left 20:57 Aedil left 21:05 arkiuat joined 21:10 arkiuat left 21:22 arkiuat joined 21:27 arkiuat left 21:33 arkiuat joined 22:05 apac joined
Voldenet > perryprog │ "tiniest fat rat" oh my goshhh you have to be doing this on purpose 22:14
Yes. :D
22:19 apac left
Voldenet obviously the largest fat rat the more scary it becomes, so the tiniest one is the least scary 22:19
and "$*RAT-OVERFLOW" makes me imagine the pool of rats :) 22:21
back to the topic, you're absolutely right, when tested on Num it behaves differently
m: sub tiniest-fat-rat(Num() $n = 2) { with $n / 2 { return $n if .FatRat == 0; samewith($n / 2); } }; say tiniest-fat-rat.FatRat.nude; # roughly 1e-6 precision
camelia (1 524288)
Voldenet and in fact changing the precision would let us store numbers with a lot higher precision due to how Num() actually works 22:23
m: my $p = 1e-300; sub tiniest-fat-rat(Num() $n = 2) { with $n / 2 { return $n if .FatRat($p) == 0; samewith($n / 2); } }; say tiniest-fat-rat.FatRat($p).nude; 22:24
camelia (1 66969287949141707559276565566250113160087800731595850465234399273146940695308507655824898675980991132974667057347071676574196580355769627724903609841866092524591048592651443658881716281639819636737213638456540468647387132921242297244784649662981643…
Voldenet "arbitrary" as long as it's larger than 1e-308 of course 22:25
but I still think that parsing Str again in `NumStr -> FatRatStr/FatRat` conversion is a better idea 22:28
23:31 arkiuat left