This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:00 Summer left, Summer joined 00:31 Summer left, Summer joined 01:01 Summer left 01:02 Summer joined 01:32 Summer left, Summer joined 02:00 MasterDuke joined 02:03 Summer left, Summer joined 02:33 Summer left 02:34 Summer joined 03:04 Summer left, Summer joined 03:35 Summer left, Summer joined 04:05 Summer left 04:06 Summer joined 04:36 Summer left, Summer joined 05:07 Summer left, Summer joined 05:37 Summer left 05:38 Summer joined 06:08 Summer left 06:09 Summer joined 06:39 Summer left, Summer joined 06:50 MasterDuke left 07:09 Summer left 07:10 Summer joined 07:16 Summer left 10:36 guifa left 15:39 gdown- joined 16:10 lizmat left 16:11 lizmat joined 16:21 lizmat left 16:50 lizmat joined
rcmlz Hello, how can I use throttle() to limit the call to lets say 1 per second? I somehow can not make it work. Thank you. 18:24
m: my atomicint $lock = 0; react { whenever watch-recursive($dir).throttle(1) { if cas($lock, 0, 1) { $runner.run; cas($lock, 1, 0); } } }
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Variable '$dir' is not declared. Did you mean '&dir'? at /home/glot/main.raku:3 ------> whenever watch-recursive(⏏$dir).throttle(1) {
rcmlz It works like this but I suspect that there will be many events emited by watch-recursive() (from IO::Notification::Recursive). I also fail to get it working using the build in watch-path(). 18:28
ab5tract rcmlz: are you trying to have `$runner.run` call once every second? or you only want to process one event per second? 18:51