coleman what's LTM mean in this context? 00:23
guifa patrickb: here's a way 00:52
my @routines = <abc defg hijklm>; my %routines := @routines.Set; my token routine { <!ww> $<name>=[.*?] <!ww> <?{ %routines{~$<name>} }> }; say 'asd abc woek' ~~ &routine 00:53
evalable6 「abc」
name => 「abc」
guifa basically, you grab what COULD be a match -- once -- and then check it in a set which is O(1), much better than O(n) that is a bare @routines 00:54
lizmat / ab5tract : AIUI {} breaks LTM for the token itself, @routines is like inserting the a|b|c in a [ ], so the LTM still has to happen for that particular group 00:55
ab5tract That’s what I figured
guifa oooh -- I wonder if it would be possible to optimize this for at compile time 00:56
00:56 LainExperiments joined
guifa like if you have @foo = <abc ade foo fooo>, you could do O(@foo), capture that, analyze it at compile time (so must be known then) and rewrite it as [ a [bc|de] | foo o? ] 00:57
obviously, can only do it for compile time stuff, but it'd be a pretty straight forward algorithm 00:59
coleman: LTM is longest token matching. A old gotcha in regex of yore was to do something like (go | going | gone) and try to match it on 'He's going to the store'. 01:00
It'll actually match go first, because it's the first alternation 01:01
so most of the time you'd need to sort it. LTM basically says "we'll try each alternation, and the one that's the longest wins first" 01:02
01:22 Manifest0 left 02:55 hulk joined 02:57 kylese left 03:06 human-blip joined 03:10 LainExperiments left 03:15 hulk left, kylese joined 04:28 japhb joined 04:57 guifa left 06:30 Sgeo left 06:31 sivoais_ left 06:41 Aedil left 06:42 sivoais joined 08:00 ACfromTX left 08:02 Aedil joined 08:45 Manifest0 joined 08:48 sena_kun joined
patrickb Thinking a bit on this, I think the problem is not the LTM. I'm pretty sure Raku is smart enough to sort the LTM alternatives and create a decent NFA. Instead the issue probably is, that interpolating that variable means the regex is dynamic and it will have to recreate the thing from scratch on every use. 08:58
08:59 dakkar joined
patrickb I didn't verify yet (by doing some timing tests), but I'll do so. My guess is, that the idea to match blindly and check afterwards should work (but not as optimal as could be) and the best way would be to just type out the alternatives in the token literally and not do any interpolation at all. 09:00
09:51 lizmat_ joined 09:54 lizmat left 10:00 lizmat_ left, lizmat joined 10:04 sena_kun left
jdv coleman: Longest Token Match 11:33
tbrowder i have a question on using rak in a program. as i understand from reading its docs, the first arg must be either a pattern to search for in files or a Callable. 11:54
my question is: how do i construct a Callable that says "look at all files that meet this test"? 11:56
rak has very many ways to say that with with named args, so i need a Callable that says "pass me on to the named args" 11:57
in debian using find i would start with "find /" and press on 11:58
but i haven't figured out how to do that with rak 12:02
lizmat '{ .meets-the-test }' 12:08
librasteve just a thought… this may be an opportunity for rakuAST … ie inspection of the AST produced by that token/alternation may be quite inefficient and maybe you could cut out unneeded actions? 12:19
lizmat weekly: andrewshitov.com/2024/11/02/a-language-a-day/ 12:22
notable6 lizmat, Noted! (weekly)
tbrowder lizmat: thanks! 12:28
12:28 guifa joined 13:10 guifa left
tbrowder lizmat: it looks like rak is inspecting file contents even with {.meets-the-test}. is there a way to completely ignore inspecting the contents? 13:15
lizmat did you specify --find ? 13:22
tbrowder no 13:23
lizmat rak --find '{ $_ contains an IO::Path object of each selected file }'
tbrowder hm, i added .find and now get errors about meets-the-test doesn't work on path object 13:26
lizmat --find you mean?
we should probably move this to #raku-rak or to an issue 13:27
tbrowder i need to join that channel... 13:28
14:33 LainExperiments joined
Geth raku.org: 690b09d8c0 | (Patrick Böker)++ | source/compilers/index.html
Remove broken and mostly redundant link

  ... to the rakudo.org Download page. It's redundant because `rakudo.org/`
has a huge and prominent "Download" button in the center. So linking to
  `rakudo.org/` is sufficient. Also linking to subpages of other sites is a
bit of a bad practice.
16:46
raku.org: b191ec22f1 | (Patrick Böker)++ | source/compilers/index.html
Be less flashy in the compilers/impl headings

By de-emphasizing the NQP GitHub link a bit.
raku.org: 0f99be9d82 | (Patrick Böker)++ (committed using GitHub Web editor) | source/compilers/index.html
Merge pull request #224 from patrickbkr/fix-broken-impl-download-link

Fix broken impl download link
17:00 LainExperiments left 17:32 LainExperiments joined 17:37 dakkar left
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2024/11/04/2024-43-one-of-21/ 17:41
librasteve 🍬 17:44
17:46 xinming left 18:21 sivoais left 18:25 sena_kun joined 18:32 sivoais joined 19:13 LainExperiments left 19:15 LainExperiments joined 19:18 abraxxa-home joined
[Coke] wonders if anyone else here has to do "CPE" training for their job (continuing professional education) (mainly a requirement any place I've worked with accountants, even if you're not an accountant yourself) 19:44
coleman Yes, for American Express, which I was a contractor at for a while 19:48
Lots of stuff about financial crimes that wouldn't come up most likely, but compliance demands that all employees complete training every year 19:49
20:43 Aedil left 20:52 LainExperiments6 joined 20:53 LainExperiments left 20:59 LainExperiments6 left 21:37 LainExperiments joined 21:46 LainExperiments left
timo on zef.land i regularly run into 429 Too Many Requests; am I doing something wrong? 21:58
22:07 abraxxa-home left
Geth raku.org: 3b00eb592e | (Coleman McFarland)++ | 2 files
Add Dockerfile to serve static files with Caddy

We add a basic Caddyfile that compiles static assets to ./online and then serves these from the web root /usr/share/caddy inside the container.
404 handlers are TODO
22:12
22:17 blendux joined 22:21 blendux left 22:23 tobs left
lizmat timo: I've seen that occasionally 23:06
timo i wonder if it has to do with the search-as-you-type in the search box? 23:07
lizmat could very well be
reminds me one time at former $work where a bug in JS caused a DDOS on the servers :-) 23:09
23:24 sena_kun left
El_Che hallo 23:45
23:47 Sgeo joined