01:34 kylese left 01:35 kylese joined 02:11 zetaaaa left 02:15 kylese left, kylese joined 03:07 leedo_ left 03:28 leedo joined 04:12 Aedil joined 04:15 Aedil left, Aedil joined 05:39 Sgeo left 07:18 Aedil left 07:59 dakkar joined 08:00 sena_kun joined
SmokeMachine Hi again! So yesterday I started playing with the CSS selectors idea... then I added a Str multi to ast-query... this is how it's looking for now: usercontent.irccloud-cdn.com/file/.../image.png 08:05
09:21 MorayJ joined
MorayJ Hello - I'm tyring to watch a file with `my $supply = IO::Notification.watch-path( "./log.txt" ).act({say 'Hello'}); sleep 100`. I've got the sleep in, because I want the script to keep running (is there a better way?). And is the sleep, sleeping the Supply. The response to changing the file is erratic. One save may get 1 response, another will get none, and another will get multiple. 09:39
I'm using Rakudo™ v2024.09
To make that more of question - how would I keep a script running to watch a file and just send one change response whenver the file changes? :-) 09:48
lizmat MorayJ: fwiw, on MacOS I've found that notices of changes may actually take quite a long time before the OS delivers them 09:58
also, the number of change notices indeed varies, so much I usuallly have that supply run through .squish 09:59
as far as I've been able to determine, it's the OS being "flaky"... not Raku 10:00
10:02 MorayJ left 10:04 MorayJ joined
MorayJ Ah, ok. Thanks. I'm on Ubuntu and presumably seeing the same issues - thank you. May just try visiting the log periodically rather than waiting for a notify... 10:06
lizmat FWIW, the watch-file feature *is* being used by the irclogs.raku.org site, so that any new lines (stored by raku.land/zef:lizmat/IRC::Client::...n::Logger) are seen by the server 10:11
to allow the "live" feature to work
10:40 Aedil joined
SmokeMachine I have tested that many times while I was writing github.com/FCO/Configuration on Mac OS and didn't get a delay.. odd... 10:58
lizmat it also depends on how busy the system is 11:08
it's apparently low prio
11:30 MorayJ left, MorayJ joined 11:48 timo left, timo joined
holmdunc Wonder whether any flakiness is down to use of FSEvents (vs Kqueue): watchexec.github.io/docs/macos-fsevents.html 12:01
antononcube @SmokeMachine Is the use of "Configuration" an alternative to using "TOML"? raku.land/zef:tony-o/TOML 12:52
SmokeMachine yes, I think it could be... The idea with Configuration is having a declared way of a config, and it can (if you want) while your code is running... something that uses Configuration under the hood is this: github.com/FCO/RakuCron 12:56
antononcube I have to decide should I use "TOML", "YAMLish", or "Configuration" for configuring (Jupyter) chatbooks. I was considering using "YAMLish", but since @bduggan uses "TOML", I might use that too. 12:57
Hmm... that is probably a good idea for Jupyter notebooks in general. OTH, notebooks are "restarted" often (at Ieast mine are), so having run-time configuration changes is less important. 12:59
I can see important though when very bulky and time consuming computations are run. Restarting would loose the context. 13:00
SmokeMachine with Configuration you define a class that your configuration will look like and it will generate a "builder" to you... so, for example, if you want to have a config for a DB (for example) you can define your class like: `class DBConfig { has Str $.host = "localhost"; has UInt $.port = 5432; has Str $.database = "postgres" } ` then your configuration could look like: `config { .database = "a_different_db_name" }` 13:03
13:18 xinming left 13:19 xinming joined 13:48 dakkar left 13:55 dakkar joined 14:04 dakkar left 14:05 dakkar joined
SmokeMachine is the error on the first try a problem? usercontent.irccloud-cdn.com/file/.../image.png 14:16
ab5tract MorayJ: instead of sleep you might want to look into using react / whenever 14:57
15:19 aristotle joined
patrickb This could be misread as you encouraging people to sleep deprivation... 15:40
15:41 kaskal left 15:46 kaskal joined 16:00 MorayJ left 16:35 dakkar left 16:39 kaskal left 16:42 kaskal joined 16:57 vrurg_ left 16:59 vrurg joined
roguerakudev has anyone else seen issues with the last statement in a for block not executing? 17:16
I think there's some overzealous optimization happening or something
in another file I am exporting this with sub EXPORT: '&qlog' => sub qlog(*@_, *%_) { Logging::qlog($caller-name, |@_, |%_) }; 17:19
scullucs Never happened to me. Do you happen to have some golfed down code where this occurs? 17:20
roguerakudev that Logging::qlog sub ultimately prints to either STDOUT or STDERR, and at first I thought this was just a buffering/flushing issue, but I don't think it is
a pointy block like for ^2 -> $i { qlog :d, "Alpha $i"; qlog :d, "Beta $i"; } only prints Alpha 0 and Alpha 1 17:21
it works fine if it's just a plain block without the pointy bit 17:22
I suspect something to do with last line implicit return and optimization 17:23
the same thing with say instead of my exported logging routine works as expected, though
ah, and if I add --> Nil to that qlog signature, it works as expected 17:25
this is probably enough info to make a github issue... one sec 17:26
scullucs I would like to reproduce the problem on my machine, but I'm missing some elements: the Logging module, the $caller-name variable. Needs more golfing? 😕 17:27
roguerakudev yeah, working now to golf it down to something transferrable 17:28
17:40 vrurg_ joined, vrurg left
trying to reproduce this minimally is giving me challenges as usual... 17:42
17:43 clarkema left
lucs Hmm... I hadn't realized that a signature like ``(*@_, *%_)`` could work properly 17:58
m: sub baz(*@a, *%h) { say @a.join, '-', %h.values.join; }; baz 1, a => 11, 2, 3, b => 22, c => 33, 4; 17:59
camelia 1234-332211
roguerakudev yeah, it slurps all the positional and named params
convenient for passthrough like what I'm doing
lucs I was surprised that they could be interleaved.
18:04 vrurg joined 18:05 vrurg_ left 18:23 Aedil left
librasteve I have enjoyed YAMLish … it is very natural for config structures and the YAMLish module is very well designed so you can override the defaults if you need 19:38
antononcube Good to know! 19:48
SmokeMachine I'm almost liking the CSS selector way... my new test: usercontent.irccloud-cdn.com/file/.../image.png 20:41
that 2 should probably not be wrapped with ""... but otherwise it thinks its a class name... maybe I should fix that some how... 20:44
I mean that recursively can be a new node definition: github.com/FCO/ASTQuery/blob/main/...akumod#L35 20:47
Xliff vrurg: Heya. Did you get my message about IP::Addr? 20:57
vrurg Xliff: yes, and even replied to it. Though, the link you provided gives me "no page found". 20:58
Xliff OOB: Does anyone know what "cr.$dispose()" means? I'm trying to convert that bit of Javascript to Raku
vrurg: You did. Huh. Lemme check. 20:59
vrurg Without the page I have no context.
21:01 teatime joined
Xliff Do you have an email I can use? Or are you registered on Repl.it? 21:05
If not, I'll have to move it somewhere else.
librasteve my friend ChatGPT says in JavaScript, dispose() methods are often used to signal the cleanup of objects that won't be needed anymore to prevent memory leaks.
;-) 21:06
Xliff librasteve: Yea, well the response I got from #javascript is that cr.$dispose calls the method named "$dispose" 21:07
Which is just.... wrong... on so many levels! :)
Javascript is not Raku! So why the sigil!?!?
librasteve yeah - sorry ... I can't add anything 21:08
vrurg Xliff: they use it sometimes to mark some kind of system-like stuff. See jquery, for example. 21:12
They treat $ is an allowed identificator symbol, AFAIK.
Xliff *groan* -- *smh* 21:14
librasteve anyone know where is the live version of cro http source on gh? (I am planning a PR) 21:16
htmx.org/essays/template-fragments/ (if you are interested)
21:52 guifa joined
guifa vo/ 21:54
patrickb librasteve: github.com/croservices/cro-http/ 22:03
librasteve patrickb: thanks! please can you add me to the croservices admin? 22:05
(this is a test to confirm that this GH repo has been transferred to the community)
;-)
(you) being anyone on here with the power 22:06
or tell me an active admin that can review and approve my pr 22:07
must sleep - will check back 2morrow 22:08
patrickb can you link the PR?
I'm very willing to review PRs. 22:09
We do have a policy of requiring one approving review for merging PRs.
22:31 bdju left 22:33 bdju joined 23:01 Sgeo joined
roguerakudev So I was unable to get a minimal reproduction of the other issue (I will keep trying), but I ran into another fresh problem which was easier to reproduce 23:03
github.com/rakudo/rakudo/issues/5671
23:04 sena_kun left
Oops, that title is totally wrong... used the same tab I had open for the previous problem lol 23:07