00:22 ds7832 left 00:46 zetaaaa left
[Coke] tbrowder++ 01:07
01:18 arkiuat joined 01:22 zetaaaa joined
arkiuat I'd have more to say about mi6 issue 188 if I had more experience with mi6, but after looking over the two different JSON::Class modules on zef and noticing that they have completely disjoint runtime dependencies, it seems pretty obvious this needs to be addressed somewhere in the infrastructure 01:23
but I don't know enough to have opinions whether it's mi6 that needs fixing or zef or core
01:46 hulk joined 01:47 kylese left 02:15 hulk left, kylese joined 02:25 sourceable6 left, notable6 left, shareable6 left, notable6 joined, quotable6 left, unicodable6 left, committable6 left, greppable6 left 02:27 committable6 joined, bloatable6 left, linkable6 left 02:28 shareable6 joined, sourceable6 joined, greppable6 joined, unicodable6 joined, quotable6 joined 02:29 bloatable6 joined, linkable6 joined 02:36 zetaaaa left 03:44 Aedil joined 03:45 arkiuat left 03:55 stanrifkin_ joined 03:57 stanrifkin left 03:58 arkiuat joined 04:03 arkiuat left 04:11 arkiuat joined 06:01 Pixi__ is now known as Pixi 06:37 abraxxa-home joined 06:51 arkiuat left 07:10 arkiuat joined 07:12 Sgeo left 07:14 arkiuat left 07:17 Sgeo joined 07:32 human-blip left 07:34 apac joined, human-blip joined 07:41 human-blip left 07:43 human-blip joined, arkiuat joined 07:48 arkiuat left 07:50 stanrifkin_ left 08:13 apac left 08:18 arkiuat joined 08:23 arkiuat left 08:25 lichtkind joined 08:42 LainIwakura left 08:48 ds7832 joined 08:49 arkiuat joined 08:54 arkiuat left
disbot6 <librasteve> [Coke] SQLite is best for DB in GH, otherwise check out what is supported by DBIish and Red modules 08:54
<librasteve> johnjaye: on what modules to start with (web database), I would say that Cro is the mainstream web framework (cro.raku.org) and Red is a great ORM (object relational mapper). There are others… :-) … mention DBIish if you want to connect to a database without ORM. 09:04
<librasteve> I wrote the HARC stack library to help me quickly make working websites in pure raku (and to build the new raku.org site) … if I were you I would start with raku.land/zef:librasteve/Air::Examples … there are docs at librasteve.github.io/Air and a set of introductory (if potty) web posts starting at rakujourney.wordpress.com/2025/03/...arc-stack/ 09:08
<librasteve> since Red does not cut in until example 12 or so, don’t need to install that module for a bit … the main benefit is that you can quickly get working real web sites and play around with raku in a smooth learning curve 09:10
<librasteve> main caveat is that Air::Functional embeds HTML routines in your raku code, as opposed to eg Cro template language and that takes a bit of time to get your head around 09:11
<librasteve> here to help if you have any questions … feedback also welcome
09:21 arkiuat joined 09:26 arkiuat left 09:51 arkiuat joined 09:56 arkiuat left 10:20 stanrifkin joined 10:26 arkiuat joined 10:31 arkiuat left
ds7832 In trying out the main example on EVAL in the docs, docs.raku.org/routine/EVAL#(Indepe...utine_EVAL . It seems that the compiler error regarding EVAL is not only suppressed by "use MONKEY;" or by "use MONKEY-SEE-NO-EVAL;", but even by the innocuous looking "use Test;" alone. Is that how it's supposed to be? 10:39
m: use Test; my $a = 'say "42"'; EVAL $a 10:41
camelia 42
ds7832 m: my $a = 'say "43"'; EVAL $a
camelia ===SORRY!=== Error while compiling <tmp>
EVAL is a very dangerous function!!! (use the MONKEY-SEE-NO-EVAL pragma
to override this error but only if you're VERY sure your data contains
no injection attacks).
at <tmp>:1
------> my $a = 'say "4…
Voldenet I suppose it makes sense because Test has functions that eval 10:50
m: use Test; eval-lives-ok('die 42') 10:51
camelia not ok 1 -
# Failed test at <tmp> line 1
# Error: 42
10:52 arkiuat joined
Voldenet and it's very unlikely for tests to be actually executed with unsafe data 10:53
10:56 arkiuat left
ds7832 Voldenet: yeah, technically it makes sense. I now think that's also what the text above the main code example (docs.raku.org/type/independent-rou...tine_EVAL) was trying to say. I've now added an explicit comment behind `use Test;` in a related PR of mine (#4653). 11:04
disbot6 <jubilatious1_98524> weekly: unix.stackexchange.com/questions/8...389#800389 11:08
Voldenet jubilatious1_98524: that actually looks like a perfect opportunity to use classify subroutine 11:17
m: dir.map(*.basename).classify({ $0.Str if m/^ (<alpha>**3..* [ \h | _ ]+) / }).say # it'd be something like that 11:18
camelia {(HANDLED) Cannot pop from an empty Array
in block <unit> at <tmp> line 1
=> [.cpanm], (HANDLED) Cannot pop from an empty Array
in block <unit> at <tmp> line 1
=> [precomp], (HANDLED) Cannot pop from an empty Array
in block <unit> at…
Voldenet m: dir.map(*.basename).classify({ m/^ (<alpha>**3..* [ \h | _ ]+) / andthen $0.Str orelse "" }).say # maybe this 11:19
camelia { => [.cpanm .local .npm .rcc Perlito evalbot log nqp-js p1 p2 std .bashrc mbox .cpan dalek-queue rakudo-j-inst-1 rakudo-j-1 rakudo-j-inst-2 rakudo-j-2 .cdmem lib testdir-112 testdir-212 .gitconfig bin Inline-Perl5 .zef .perl6 file.txt precomp rakudo-…
Voldenet good opportunity to show off stdlib 11:20
disbot6 <jubilatious1_98524> @Voldenet tried to translate Perl code but gave up. It's a bit of a mix, maybe Perl-coders in that forum can read it, maybe not.
<jubilatious1_98524> @Voldenet (also sure i tried collate at one point but never revisited... ). 11:21
<jubilatious1_98524> Here's the cognate Perl answer: unix.stackexchange.com/questions/8...301#800301 11:23
Voldenet yeah, that perl answer kinda makes sense, because of how easy defining vars is 11:25
though in raku you need `my %hash` and it makes it a bit more verbose
11:26 arkiuat joined
disbot6 <jubilatious1_98524> OP asks to recover files from multiple directories. I decided to drop the whole find . -print0 piped input to show what Raku could do alone. 11:27
11:28 ds7832 left
disbot6 <jubilatious1_98524> I like your orelse suggestion! 11:28
Voldenet I'm not too sure about dir() - `find .` has better pre-filtering facilities 11:29
11:31 arkiuat left
Voldenet and recursive dir is slightly more complicated tha it should be 11:32
11:39 ds7832 joined 11:41 librasteve_ joined
librasteve_ weekly: unix.stackexchange.com/questions/8...389#800389 11:41
notable6 librasteve_, Noted! (weekly)
11:44 Sgeo left
disbot6 <jubilatious1_98524> @Voldenet you are now credited. 11:44
Voldenet :D 11:46
you should probably change it to the version with andthen/orelse
because classify expects to always get one definite value 11:47
otherwise you get `mapper on classify-list computed to an item with different number of elements in it than previous items, which cannot be used because all values need to have the same number of elements. Mixed-level classification is not supported.` 11:48
11:52 arkiuat joined 11:57 arkiuat left 12:10 apac joined 12:28 arkiuat joined
tbrowder i do recommend raku module File::Find for most any serious file and dir needs 12:30
tellable6 2025-10-10T23:51:47Z #raku <[Coke]> tbrowder - can you followup on github.com/Raku/Blin/issues/42 ?
tbrowder (so done) 12:31
12:32 arkiuat left 12:53 arkiuat joined 12:59 arkiuat left 13:09 apac left 13:20 arkiuat joined 13:24 arkiuat left 13:36 apac joined 13:52 arkiuat joined 13:54 apac left 13:57 arkiuat left 13:58 librasteve_ left
disbot6 <jubilatious1_98524> @Voldenet oh, did I post the wrong one? I checked it here first and it seemed to work perfectly. I'll revisit it later today, thx! 14:03
14:16 arkiuat joined 14:55 abraxxa-home left 15:22 simcop2387 left, arkiuat left 15:50 arkiuat joined 15:56 arkiuat left
johnjaye thanks librasteve that's what i was interested in 15:58
disbot6 <librasteve> yw 16:00
johnjaye amazing. does that discord bridge ping you or did you just happen to be here 16:14
16:17 ds7832 left 16:22 arkiuat joined 16:27 arkiuat left, ds7832 joined 16:40 ds7823 joined
Voldenet jubilatious1_98524: yeah, it works until you encounter the case where regex doesn't match the filename – I've tried it against the "good input" too at first, only corrected after running it on random folder 16:41
16:54 ds7832 left 16:55 arkiuat joined 17:02 simcop2387 joined 17:14 arkiuat left 17:26 arkiuat joined 17:31 arkiuat left 17:59 arkiuat joined 18:07 arkiuat left 18:09 guifa_ joined 18:10 guifa left 18:30 simcop2387 left 18:36 arkiuat joined 18:40 arkiuat left
disbot6 <jubilatious1_98524> @Voldenet I'm playing with the "andthen $0.Str orelse """ code and gives weird empty string as key. I also tried raku -e '.say for dir.map(*.basename).classify({ m/^ (<alpha>**3..* [ \h | _ ]+) / ?? $0.Str !! "" });' which does the same thing. 18:52
19:02 Sgeo joined 19:03 arkiuat joined 19:08 arkiuat left
disbot6 <librasteve> just coincidence … 19:10
19:13 guifa_ left 19:14 guifa joined
Voldenet jubilatious1_98524: classify is very simple - it groups array items by returned values 19:14
value*
but you have to return something, so in `orelse` (regex not matched) case I return nothing 19:15
`orelse Nil` would work too
then you can discard Nil 19:17
hm, .categorize would not require that
since it accepts 0..Inf values
19:18 itaipu left
Voldenet and then the original answer with if would work 19:19
m: dir.map(*.basename).categorize({ $0.Str if m/^ (<alpha>**3..* [ \h | _ ]+) / }).say
camelia {}
19:21 arkiuat joined 19:22 itaipu joined 19:51 arkiuat left 19:56 simcop2387 joined 20:04 arkiuat joined 20:09 arkiuat left
sjn has updated the sticker he made for FOSDEM 2025. New version is here: github.com/sjn/stickers/blob/main/...humans.png 20:10
comments appreciated; I hope to print some of these for FOSDEM next year 20:11
oops, wrong url. 20:12
github.com/sjn/stickers/tree/main/...for-humans <- correct one
20:22 arkiuat joined 20:27 arkiuat left 20:31 stanrifkin left 20:41 kylese left 20:54 arkiuat joined
ds7823 sjn: in my eyes a general thing with the "-Ofun" term is that, not coming from the world of C or other compilers using that flag, it's only understandable with an explanation (and without one the "O" could on a quick glance even be mistaken for a zero). 21:07
Perhaps you could make equivalent stickers where it's simply spelled out, "optimized for fun" / "optimized for humans"? I think that would in fact go very well 21:08
21:22 apac joined
disbot6 <librasteve> ds7823: the -Ofun motto is well established and accepted, we are now also working with the strapline “works the way you think” (after quite a lot of back and forth) on raku.org… I think that we need to avoid adding another, similar but different, motto … remember that marketing, SEO, humans latch onto consistent repetition 21:37
22:04 arkiuat left 22:05 arkiuat joined 22:10 arkiuat left 22:17 arkiuat joined
disbot6 <sjoshuan> What do you think about the previous iteration of the sticker? github.com/sjn/stickers/blob/main/...humans.png 22:31
22:47 ds7823 left, apac left 23:01 samebchase3 joined 23:02 ds7832 joined 23:04 gugod left, Ekho left, samebchase left, samebchase3 is now known as samebchase 23:05 ds7832 left, Ekho- joined 23:09 gugod joined
arkiuat I dunno: "works the way you think" will now forever remind me of the person (thicket?) who was so offended by the presumption in github.com/Raku/raku.org/issues/258 23:35
disbot6 <jubilatious1_98524> @arkuiat This classify answer seems overly verbose,but replicates the code I came up with yesterday (i.e. gets rid of Empty key): 23:46
<jubilatious1_98524> raku -e '.say unless .key eq "" for dir.map(*.basename).classify({ m/^ (<alpha>**3..* [ \h | _ ]+) / && $0.Str // ""}).sort;' 23:47
<jubilatious1_98524> Maybe classify needs a :skip-empty adverb, just like split? 23:49