[Coke] ugexe: any concern about order of processing those PRs? 00:01
ugexe i don't think it should matter but it probably makes sense to do them in the order they were submitted. there are probably a couple of commit messages that reference fixes from other PRs 00:04
[Coke] +1 00:06
just opened a bunch of depreated warnings on modules... and then realized many of them point back to JSON::Fast 00:45
and then there's several coming from various Cro::* 00:47
01:16 kylese left 01:18 kylese joined
SmokeMachine apogee_ntv: my first try on writing Selkie::UI: usercontent.irccloud-cdn.com/file/....17.46.gif 01:20
apogee_ntv SmokeMachine: Nice, it's very readable. 01:28
SmokeMachine apogee_ntv: thanks. Yes, I think that’s starting well 01:38
01:58 annamalai left 02:15 kylese left, kylese joined 02:56 johnjay joined 03:29 lichtkind joined 03:32 lichtkind_ left 03:57 Aedil joined 05:00 topnep left 05:01 topnep joined 05:36 annamalai joined 07:01 Aedil left 07:08 kurahaupo joined 07:37 soverysour joined 07:42 soverysour left 08:13 masayoshi left 08:38 annamalai left 08:42 annamalai joined 09:47 [Coke]_ joined, [Coke] left 10:11 Sgeo left 11:17 topnep left 11:22 topnep joined 11:34 soverysour joined 11:42 soverysour left 13:27 annamalai left 13:51 soverysour joined, soverysour left, soverysour joined 13:56 soverysour left 13:57 Aedil joined 14:34 tinita_ is now known as tinita
SmokeMachine apogee_ntv: a new change on that. It's kinda handling state values using the Selkie::Store internally and automatically creating subscriptions to path to update the what should be changed (label on this case): usercontent.irccloud-cdn.com/file/....01.12.gif 15:06
15:11 [Coke]_ is now known as [Coke]
Voldenet but there's no need to type in "val", is there? It can be automatically assigned (a'la react style) 15:26
with val as optional description 15:27
and maybe related component instance
`my UInt $val := use-state 0` 15:32
SmokeMachine I use the “val” there to use as the path on the store 15:36
I think I should use the name of the var as the path… 15:37
Voldenet you could autogenerate it
SmokeMachine the problem on autogenerating it is if you need to update/use it from another place 15:38
Voldenet IMO state is not supposed to be passed around like that
it's like having global variables
Yes, global variables are useful so it should be possible to assign them 15:39
but you kinda don't want them to be the default
something like `sub new-id { <$> ~ ++$ };` maybe
it'd be the best to pass the proxy directly to the component 15:44
kinda similar style to what signaljs 15:45
or angular do
erm, solidjs*
it's very cheap to propagade if the proxy would also have subscribe
propagate, even
since then store could be even fully bypassed - store can contain all proxies still for replayability ofc 15:46
or ui transitions
something like `$fetching = True; $data = ""; start-transition { $address = await fetch-text "/api/address"; $data = await fetch-text $address; $fetching = False }`, that runs in the bg and only commits values to the store upon completion` 15:49
but that'd obviously complicate proxy, because then it can't simply assign values, but needs to be aware of pending transition somehow, with $*transition maybe 15:50
SmokeMachine I changed `get-state-var($name, $default?)` to `get-state($default?, :$name = UUID.new.Str)` but about the name, I'm still not sure... you will not call it every time you need state, it returns a Proxy that automatically makes the "widget"'s methods subscribe any change on that path, so, when I do `Button.label({ $var ?? "BLE $var" !! "BLA $var" })` it automatically makes the `.label(...)` be called every tine `$var` changes... 15:51
(not only when `$var` changes, but mostly because when $var changes, it updates the store and when the store changes, it calls the `label`...) 15:53
Voldenet I don't mean the dev's perspective, I mean that Selkie::Store itself uses %!db for storage 15:54
so it's kinda maintaining large hash that's bound to be slow for large trees 15:56
However, it could store proxies!
SmokeMachine I'm currently not using `register-handler`, only the path store, I'm not really sure how both are related... 15:58
apogee_ntv register-handler picks up when component emits event, writes to the store. 15:59
SmokeMachine This is how I'm handling state: www.irccloud.com/pastebin/Oc8J9RK4/
apogee_ntv It means components are completely isolated from writing state, single responsibility.
Voldenet `$store.get-in: $name` is the lookup 16:00
apogee_ntv Yeah canonically you would have the component emit an event, then 0..n handlers can handle the event to update state.
github.com/m-doughty/Selkie/blob/m...unter.raku Like this 16:01
Otherwise you can get a race condition where 2 components try to write state at the same time. Handlers emit effects and effects are applied sequentially.
Voldenet m: my %db = :42foo; sub get-in($id) { %db{$id} }; say get-in <foo>; sub get-proxy($id) is rw { %db{$id} }; my $foo-var := get-proxy <foo>; $foo-var++; say get-in <foo>; 16:03
evalable6 42
43
Voldenet this kinda works, value is still in the %db - Proxy can throw in a global state lock too 16:04
I'm mentioning it because anything string-related is expensive
data races it the problem that js kinda solves by default, since it can't do this… :D 16:07
but you can cheat and emulate js event loop
SmokeMachine apogee_ntv: so, instead of using assoc-in, should I be editing events and auto subscring it to update the value?
apogee_ntv Yeah, emit event from component, have a handler that's subscribed to the event and then emit an effect from the handler. 16:09
or multiple effects if you need.
16:13 annamalai joined
Voldenet uh so 16:15
m: my %db = :42foo; my $ch = Channel.new; my $event-loop = start react whenever $ch { $_() }; END { $ch.close; await $event-loop; }; sub get-proxy is rw { my $var := %db{$^id}; Proxy.new(FETCH => {…}, STORE => sub ($, $value) { $ch.send({ $var = $value }) }) }; my $p := get-proxy <foo>; $p = 1; sleep .5; say %db
evalable6 {foo => 1}
Voldenet event-loop would have to also get read queries and resolve them through promises
so i'm not sure if that's a good idea after all, it sounds heavy too 16:16
SmokeMachine apogee_ntv: is there a way to to make Selkie stop swallowing the error messages? 16:20
apogee_ntv: Is it looking better now? www.irccloud.com/pastebin/sBfShiWv/ 16:29
apogee_ntv SmokeMachine: You can set an error log file or handle. It swallows them by default to avoid printing them all over the screen. 16:45
Yeah that looks right. You might want to let people specify the event name for easier debugging. 16:46
disbot2 <jany9781> Hello all, what is the latest status on running Raku in the browser? I saw that there's a JS backend, and I tried to build Rakudo locally with --backends=moar,js. But that eventually fails with ``` /home/.../nqp/nqp-m --module-path=/home/.../nqp/gen/js/stage1 --target=mbc --output=/home/.../nqp/gen/js/stage1/HLL/Backend.moarvm src/vm/js/HLL/Backend.nqp No registered operation handler for 'setmethcache' at 16:52
NQP::src/vm/moar/QAST/QASTOperationsMAST.nqp:96 (/home/.../nqp/QAST.moarvm:compile_op) from NQP::src/vm/moar/QAST/QASTCompilerMAST.nqp:1503 (/home/.../nqp/QAST.moarvm:compile_node) from NQP::src/vm/moar/QAST/QASTCompilerMAST.nqp:660 (/home/.../nqp/QAST.moarvm:as_mast) etc.
16:56 belluzj joined, belluzj1 joined 16:57 belluzj left, belluzj1 is now known as belluzj
[Coke] JS backend is bitrotted at this point, apologies. 17:33
If there isn't a ticket with that particular error, please feel free to open one - probably on the raku/nqp repo. 17:34
[Coke] tries a JS build 17:35
I can open the ticket, presumably I'll have this error shortly 17:38
oh, wow, I'm several versions behind on node, one moment... 17:39
El_Che hi 17:46
tellable6 2026-04-25T19:40:31Z #raku-dev <[Coke]> el_che binary releases for 2026.04 can start
El_Che ah nice
will start them on my side as well 17:47
[Coke] I'm not even getting past the "install npm deps" stage. 17:56
El_Che: this release was surprisingly smooth, so I'm sure I screwed something up. :)
El_Che bad timing. New fedora in a few days 17:58
goodtiming for ubuntu, though
[Coke] if I run 'npm install' in the nqp dir, I get a bunch of npm warn deprecated errors, about source-map-url, inflight, urix, resolve-url... 18:00
source-map-url doesn't appear in the repo.
just trying to make sure this is an issue with raku/nqp and not a very old set of installed modules from the the last time I used node 18:05
El_Che I get some flapping tests 18:08
will be ok if I rebuild, probably
[Coke] jany9781 - I can't get past 'npm install' here on the mac.
disbot2 <jany9781> It needs node version 12 and python 3.10; I used mise locally to get the right ones: mise use node@12 and mise use python@3.10 18:09
18:09 Sussy joined, Sussy left
El_Che t/09-moar/Line_Break__LineBreak.t, t/12-rakuast/xx-fixed-in-rakuast.rakutest 18:09
18:10 Sussy_Touriat joined
[Coke] oh, whoops, I just upgraded to latest node 18:10
I'm at 2x that version number. :)
Sussy_Touriat Hey how is everyone
The Sussy tourist is here
18:12 Sgeo joined
disbot2 <jany9781> Thanks for investigating in any case 🙂 I also had a thought that maybe MoarVM could be compiled to WASM with emscripten (instead of using the JS backend), as an alternative way of getting to the same result of Raku in the browser? But I don't know enough about the build process to have an idea whether that would work at all. I just started trying locally to use emscripten to build MoarVM, but I'm just playing for now, I've never used that tool, 18:13
and never contributed to MoarVM or Rakudo either.
timo the biggest difficulty you will face is that libuv doesn't compile to wasm 18:16
18:21 Sussy_Touriat left
Voldenet there's hardly any point of making libuv work on the browser, so it's not a surprise that it doesn't work 18:36
in making, even
19:08 coleman left 19:09 coleman joined 19:24 abraxxa joined 19:56 belluzj left 20:08 Aedil left
El_Che [Coke]: I could build everything after 3 runs. Now waiting on ClousSmith to add Fedora 44 to the repos 20:25
disbot2 <librasteve> Jany: hi! just caught your question - with something like HTMX you can run raku (eg in a sandbox) on the server side and stream back to browser - perhaps that is not useful for you, but I thought I would mention as an option... 20:30
20:36 havochunter left
timo Santa Claus Smith? 21:03
El_Che hehe 21:08
timo: I saw your ticket. Is there a speed price to be paid when moarvm is build with --debug=3? If so, maybe a new debug package would be in order for when debug is needed 21:09
timo normally, distros put debug data in separate files, but i've never done it myself, it's always been something the distro tooling does 21:11
otherwise, the debug data is in a section of the file that isn't mapped when you normally load a library
the debug data can go in a separate package too 21:12
and of course it could also go on a debuginfo server 21:13
El_Che I would need to check that. Thing is that with the new arm packages, it may be a steep price. There is no JIT there
timo why would the price be related to the jit?
El_Che I mean that raku on arm is not fast
of debgug build make it run slightly slower, it would not be nice 21:14
*if
timo the debug info parts of the file aren't loaded unless you have a debugger do it for you or some other kind of tool
i don't think there's a performance difference with -g3 or without 21:15
El_Che I see
so the drawback is size then? 21:16
timo yes, though if you find the right invocation it'd go into a separate .rpm
21:18 abraxxa left
timo more importantly maybe, you can grab the debug info stuff to help figure out a core dump, or to symbolize stack traces where all you have are addresses 21:23
lizmat El_Che: re I mean that raku on arm is not fast: Rakudo is faster on my MBP (on Apple Silicon) than anything Intel based I've ever used 21:30
timo the apple silicon macbooks are also more powerful than a lot of devices you might buy with an arm on it 21:43
like, compare a raspberry pi 5 with a macbook pro. the price difference is huge, and the difference in computing power is also really large
lizmat true... but therefore the general remark "I mean that raku on arm is not fast" is at least incomplete :-) 21:44
timo or even a high-end flagship android smartphone is not going to get anywhere close to apple silicon laptops
i have honestly not attempted to use an arm based server or desktop device so far 21:48
so no clue how they compare
21:50 topnep left, topnep joined
El_Che I have arm VM's 22:26
they are not as fast as a macbook 22:27
arm, think of containers on alpine on cheap VMs
(I have no idea whatsoever what's the speedup is of x64 JIT) 22:28
SmokeMachine apogee_ntv: my second implementation (with some changes): usercontent.irccloud-cdn.com/file/....40.25.gif 23:41
github.com/FCO/Selkie-UI/blob/main/text.raku 23:44
it's not much, but what I currently have is here: github.com/FCO/Selkie-UI/tree/main