🦋 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.
Xliff \o 02:13
melezhik o/ 10:07
what is quick way to check if string is in base64 ?
antononcube Good question. One way is, of course, checking does decoding It makes sense. 10:16
What did ChatGPT say? 🙂 10:17
melezhik stackoverflow.com/questions/857150...ded-or-not
 I need some sort of help to port this regex to Raku
lizmat melezhik: off the top of my head: / ^(<[A..Za..z0..9+/]> ** 4)* (<[A..Za..z0..9+/]> ** 3 "=" | <[A..Za..z0..9+/]> ** 2 "==")? $/ 10:26
without positional capture: / ^[<[A..Za..z0..9+/]> ** 4]* [<[A..Za..z0..9+/]> ** 3 "=" | <[A..Za..z0..9+/]> ** 2 "=="]? $/ 10:27
melezhik. Liz++ 10:30
Appreciate it
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2024/04/08/2024-14-15-1k-75/ 12:45
antononcube @lizmat Thank you for your efforts on the rakudo-weekly. (And otherwise.) 13:45
tbrowder lizmat: ditto 👏 13:59
librasteve: you mentioned multilingual modules. see my Date::Names for one way to handle it. 14:06
probably won't quite fit yr use case 14:07
antononcube @tbrowder Which use case you are refering too. (Cannot easily find it above...) 14:14
tbrowder oh, in the weekly, one of the questions about dynamic module names, thought it was librasteve 14:53
librasteve tbrowder: tx! will take a peek 17:18
yes - good ... half my batttle is solved by this approach ... thanks for the steer 17:20
the way that Physics::Measure works is that a bunch of "label" classes are defined like this: class Distance is Measure is export {}; `class Time is Measure is export {}; `class Speed is Measure is export {}; ... 17:22
then you can go my $d = 5m; my $t = 10s; my $s = $d/$t; say $s.WHAT; # Speed 17:23
so I use the type system to reject badly formed math like say $d + $t; #cannot add two different types 17:24
I think from a design pov that this is pretty natural - in nature Distance is truly a different type of thing to Time ... 17:25
... BUT when it comes to localization I am thinking ahead to having locallized class names like Longueur, Temps and Vitesse ... so the missing link for me is to be able to load these from an fr.rakumod and then subsequently export them out via the general use statement where eg Date::Names has something like use Date::Names :lang<de<; 17:30
use Date::Names :lang<fr>;
and so on
anyway - still open to new ideas on the SO question ... stackoverflow.com/questions/782686...es-in-raku 17:32
appreciate all the help! 17:34
Geth docker: b4705bce4e | AntonOks++ | 4 files
Bump to 2024.03 and change alpine to alpine:latest
19:48
docker: 64657bbc83 | (Anton Oks)++ (committed using GitHub Web editor) | 4 files
Merge pull request #64 from AntonOks/bump_to_2024.03

Bump to 2024.03 and change alpine to alpine:latest
dr.shuppet Do you require the class name, as returned by .^name, to be localized, or is having only the symbol name localized fine? 20:09
If the latter is fine, you can just export different names in different export packages: $ cat Physics.rakumod unit module Physics; my class Length { has Int $.value; } my package EXPORT::en { OUR::<Length> := Length; } my package EXPORT::de { OUR::<Länge> := Length; } $ raku -I. -e 'use Physics :en; say Length;' (Length) $ raku -I. -e 'use Physics :de; say Länge;' (Length) 20:16
I'm quite sure the name can also be changed by using a modified metaclass 20:25