01:10 hulk joined, [Coke] left, kylese left 01:58 annamalai left 01:59 annamalai joined 02:09 annamalai left, annamalai joined 02:14 annamalai left 02:15 annamalai joined, hulk left, kylese joined 02:17 cm left 02:24 cm joined 03:02 annamalai left 03:03 annamalai joined 03:09 annamalai left 03:25 annamalai joined 03:26 vasko4535586 left 03:28 vasko4535586 joined 03:40 annamalai left, annamalai joined 05:00 Aedil joined 05:20 annamalai left, annamalai joined 06:45 thatonelutenist left 06:46 thatonelutenist joined 07:06 Aedil left 08:57 librasteve_ joined
librasteve_ ./ 08:58
more often than not, I accuse Raku of a bug only to find that it is a feature … today is different 08:59
m: my FatRat $x = <100000000000000000/11111111111111>.FatRat; say $x.round(0.01).^name;
evalable6 Rat
librasteve_ m: my FatRat $x = <100000000000000000/11111111111111>.FatRat; say $x.round(1e-1).^name; 09:00
evalable6 Num
librasteve_ I am not too worried about (1) - since a Rat is just a low precision FatRat, but (2) means that I cannot round a Rat with a Num as the $scale without risking loss of precision 09:02
my guess is that the round() internals just use Raku math and that that applies the infectiousness rules so that a Num $scale infects the [Rat|FatRat] invocant with its numminess - is this worthy of a Rakudo issue? 09:04
or perhaps a note in the docs? 09:09
09:37 Aedil joined 10:13 Sgeo left 11:23 belluzj joined 11:55 belluzj left, annamalai left, annamalai joined 11:59 annamalai left 12:00 annamalai joined
lizmat librasteve_: if FatRat doesn't have it's own .round method, that feels like a bug 12:20
disbot2 <librasteve> ok i’ll make an issue … tx 12:23
lizmat yeah, looks like there's no Rational.round logic 12:36
also, are you aware of $*RAT-OVERFLOW ? docs.raku.org/language/variables#$*RAT-OVERFLOW 12:39
disbot2 <librasteve> yep
<librasteve> Physics::Measure sets it to FatRat 12:40
<librasteve> since a lot of physics constants eg (mass of electron) are very small so good to max out the precision 12:41
13:28 annamalai left, annamalai joined
disbot2 <melezhik.> gemini.google.com/share/1524bc4cc758 16:18
<melezhik.> gemini.google.com/share/8f6d7e6229b1 16:22
16:24 johnjay left
disbot2 <melezhik.> Gemini LLM is pretty accurate 16:32
<melezhik.> Though still has some minor mistakes 16:41
16:49 johnjay joined 16:55 manu_ is now known as eseyman
disbot2 <melezhik.> gemini.google.com/share/7815baaafca5 17:02
ugexe I merged the last PR required for `RAKUDO_RAKUAST=1 make install` to complete 17:42
disbot2 <melezhik.> So comparing with Python - gemini.google.com/share/6c9cb0525996
<melezhik.> “Parsing a sudoers file completely from scratch in Python is notoriously difficult because its configuration grammar is highly complex (handling aliases, overrides, defaults, and specific user/host matching). Relying purely on regular expressions for critical security audits can lead to false positives or, worse, false negatives.” 17:43
ugexe now we need to fix whatever fails for `RAKUDO_RAKUAST=1 make test` and `RAKUDO_RAKUAST=1 make spectest` when built with a rakuast rakudo i.e. `make clean && RAKUDO_RAKUAST=1 make install`) 17:44
disbot2 <melezhik.> Ok . Comparison Python vs Sparrow6/Raku - gemini.google.com/share/c3b8c660c53f 17:53
<melezhik.> Very interesting
18:04 belluzj joined
SmokeMachine apogee_ntv: is there a way to, if I’m subscribed to “a” (being its value {x => 1, y => 2}) when I change “a”, “b” (adding value 42, then a would become { x => 1, y => 2, b => 42 } “a”, “b” would be triggered, make “a” be triggered as well? 18:06
apogee_ntv I'm a bit confused, these are store values? 18:31
Or events? 18:32
Are you a widget or a handler? :D
SmokeMachine Handler 18:40
apogee_ntv So handler subscribes to event/update-a, then updates a in the store which should trigger b? Generally you would just have handler emit event/update-b after, with new value of a.
SmokeMachine I’m trying to use something like this: www.irccloud.com/pastebin/TTzx7OPg 18:41
avuserow is there a way to wrap a failure? in my case I want to add context 18:44
m: sub foo {my $v = to-bool("bar"); fail "it failed: {$_.Str}" without $v; 1;}; sub to-bool($s) {return True if $s.lc eq "true"; fail "oh no"}; foo()
evalable6 (exit code 1) it failed: (HANDLED) oh no
in s…
avuserow, Full output: gist.github.com/5b76df0bc412327d89...02df6b4216
SmokeMachine I mean, the sore of data is a tree, is there a way to, when updating a node, emit event(s) that would be consumed by all nodes from that branch? From the node updated to the root? I mean, if a node of a branch is updated the whole branch is updated
avuserow ^ that works except for the extra "(HANDLED)" text
lucs Is there somewhere a list of the "tags" that can be or are attached to modules in raku.land? 18:47
And can those tags help in searching for modules? 18:48
apogee_ntv SmokeMachine: Can you explain the whole data flow so I can make sure I'm answering right? You want to react to a node changing but what's changing the node?
You can subscribe-with-callback to the node, or write the whole branch in the effect that changes the node. 18:49
or you can subscribe-with-callback to the whole tree, that will detect when a node changes. Emit an event and handle it. 18:50
lucs Hmm... I just noticed that by clicking on a tag attached to some module, they are all listed on the right. 18:51
Yeah, that's good enough. 18:52
(for now) 18:55
SmokeMachine apogee_ntv: currently on Selkie::UI I have what I call state variables (not `state $var`, that stores its value on Selkie::Store and always gets its value from there as well. When you usa that kind of variable it automatically subscribes to a store event related to the path of the data on the store. And every time the variable is assigned, it dispatches an event to update it on the store and then every block changing widgets values based on 18:57
that variable are ran again. Now I’m writing the array and hash versions of state variables. On hash I don’t want it to send all the hash data when a value is updated (%var<key> = 42). I want to send only what has changed. On the store it seems to work.. but the subscriptions will not be triggered…
apogee_ntv Oh right. So you want to diff old value and new value and return the diff basically? 18:58
In the subscription?
You can't do it on the push side but you can do it on the pull side, cache current value then subscribe whole branch. Then when branch hits the sub, diff the two and return the diff. 18:59
SmokeMachine No, the value that is sent is not very relevant to me…I have many subscriptions waiting for “a”, I want them to also be triggered when the path “a” changes (works currently), but also when the path “a”, “b”, or “a”, “c”… so it “a” is the first key, I want the subscriptions to be triggered… is that possible? 19:04
I mean if the path <a b c> changes, I’d like it to trigger subscriptions that are waiting for: <a b c>, <a b> and <a> 19:06
patrickb ugexe: Very impressive! Thank you very much for your work on this! 19:11
SmokeMachine I just realised maybe I want the oposite… I should subscribe to the complete path and that should just work, I suppose… 19:13
apogee_ntv It should as long as you replace the ancestor on write, otherwise I *think* values-equal will short circuit on equal hashrefs (don't have the code in front of me to check). 19:14
You could also do sub-computed and do deep equality check manually IIRC. 19:15
SmokeMachine: paste2.org/eEf7fc1C Is that the behavior you want? 19:23
SmokeMachine That’s kinda what I have… 19:26
apogee_ntv Yeah so you would sub to a, then it would fire on a, a b, a b c. or sub to a b, would fire on a b, a b c
SmokeMachine Originally it was only using the “root path”. I’m trying to subscribe to the whole path now… www.irccloud.com/pastebin/FKDBNn4L 19:27
19:36 Aedil left 20:02 Sgeo joined 20:10 Sgeo left 20:11 Sgeo joined 20:13 belluzj left 20:18 jjido joined 20:37 habere-et-disper joined
apogee_ntv Yeah so it short circuits on === which is not ideal for containers. Code I pasted should work if you sub to the root. 20:45
21:38 [Coke] joined 21:47 jjido left 23:54 habere-et-disper left