00:26 lichtkind left 01:13 librasteve_ left
disbot6 <jubilatious1_98524> m: my @a = 1,2,3; @a = @a[*],4; .say for @a; 01:42
<aruniecrisps> I think I'm done with my article 02:01
<aruniecrisps> for Raku advent
02:52 hulk joined, kylese left 03:13 Aedil left 03:15 hulk left, kylese joined 03:54 kjp left 03:55 kjp joined
Geth advent/main: c9daf0f0a5 | randyl++ (committed using GitHub Web editor) | raku-advent-2025/authors.md
Claim a spot for randyl on the advent calendar
03:55
05:16 stanrifkin joined 05:33 simcop2387 left, simcop2387 joined 05:35 stanrifkin left 05:43 Aedil joined 06:01 phogg left 08:03 samebchase left 08:04 Aedil left 09:02 snonux left 09:47 snonux joined
disbot6 <librasteve> @aruniecrisps ++ 10:03
10:20 Some-body_ joined 10:22 DarthGandalf left 10:23 Some-body_ is now known as DarthGandalf 11:00 Aedil joined 11:07 Sgeo left 11:58 samebchase joined 12:10 demostanis_ joined
demostanis_ hello 12:10
say [+] map {[[&(::("&infix:<$(@_[*-1])>"))]] @_[0..*-2]},[Z] "input.txt".IO.lines>>.words;
does anyone know how to shorten this even further? that's AOC's day 6
disbot6 <librasteve> o/ 13:39
13:41 librasteve_ joined
disbot6 <aruniecrisps> @librasteve do you want me to schedule the article or no 14:07
<librasteve> that's fine - I can take it from here - much appreciate the contribution! 14:10
<librasteve> i have a question about datastar (and maybe HTMX 4) - in the current HARC stack, the Counter example looks like this harcstack.org 14:11
<librasteve> however, I recently saw this example in JSX (which I guess lives in React land)...
<librasteve> cdn.discordapp.com/attachments/633...0972b& 14:12
<librasteve> my question is how to adjust HARC stack so that Components can be more like the JSX example - can datastar do this? 14:13
14:56 stanrifkin joined 15:15 stanrifkin left
disbot6 <aruniecrisps> @librasteve it's a bit more complicated than I would imagine, to my understanding the Racket web server framework and Seaside in the Smalltalk achieve this with continuations 15:34
<aruniecrisps> That example works in JS because the state that's being store is only being modified in component and we don't have to worry about other parties trying to change the data 15:35
<aruniecrisps> I have a couple of ideas if you're ever down to hop on a call 16:13
16:28 Pixi left 16:29 johnjaye left 16:32 lichtkind joined, lichtkind left 16:43 Pixi joined
disbot6 <aruniecrisps> @librasteve i have one question: what exactly does the sub respond do? 17:01
<aruniecrisps> in the example
<librasteve> can't see respond in that example, but irrc it is a way to go =item C<method toggle> adjusts the state and ends with the C<respond> sub (which calls C<.HTML>) ... this became redundant since self.Str now calls self.HTML 17:10
18:03 melezhik joined
disbot6 <aruniecrisps> I think I asked this earlier but is there only one instance of a component registered for an app? 18:49
<aruniecrisps> Like when you register the component in Cro does it instantiate a component per connection?
19:05 korvo joined
disbot6 <librasteve> no problem to ask twice :-) … so Air::Component does three main things when you go class MyThing does Component {} - assign a unique serial number to each object, tells Cro to make a route for each method marked is controller and call the method on the particular object when that route is hit passing in the arms 19:12
<librasteve> in Wordpress each object has a canonical name based on post id - so there is a huge posts table :: in Air each object has a canonical name made of class name-serial 19:15
<librasteve> to answer your question, you need to pass either the type class MyThing or just one instance of MyThing as an arg to site … like site(:register(MyThing, …)).serve 19:42
<aruniecrisps> So the idea that I had was that for each client that sends a request to the page that renders the component an object would be instantiated and there would be a random string ID for that object, that way the state of that component would remain encapsulated, which is what it looks you're doing 20:10
<aruniecrisps> Datastar in addition to handling SSE, also lets you send a JSON response back which it patches into the signals that it sets up on the client side 20:12
<aruniecrisps> So you could simply return JSON back instead of returning HTML if you want 20:13
20:13 melezhik left
disbot6 <aruniecrisps> You can also return Javascript to execute on the client side if you want 20:13
20:24 Sgeo joined 20:27 tgt joined
disbot6 <librasteve> thanks for the explanation… not quite right in that Air does not track client or session state … all Air::Component instances are prebuilt on the server (like all wordpress posts are in the db) … the serial id is so that you can have multiple copies of a component (eg several nav bars) 20:32
<librasteve> several tables, several forms and so on 20:33
20:35 tgt left
disbot6 <librasteve> I see that you would need this in the event you want the server to store each client state … i cannot see that this would be a good direction for Air, except that you would want some kind of cookie / local state stored on client (eg for login status or other session storage) … so in the counter example, i think that there’s a count value per browser in the JSX, but in Air, the count value is intended to be a shared 20:38
global value
<librasteve> food for thought - thanks! 20:39
20:39 Aedil left 20:51 librasteve_ left 21:40 demostanis_ left