[03:19] *** DarthGandalf left
[03:20] *** DarthGandalf joined
[03:32] *** DarthGandalf left
[04:55] *** sibl joined
[05:51] *** DarthGandalf joined
[05:52] *** sibl left
[07:58] *** Manifest0 joined
[07:59] *** sibl joined
[08:06] *** sibl left
[08:28] *** sibl joined
[08:37] *** sibl left
[09:13] *** leifgunnar left
[09:20] *** leifgunnar joined
[11:31] *** human-blip left
[11:35] *** human-blip joined
[13:30] <disbot4> <simon_sibl> I am aware that may not be my brightest moment and is more on the side of 'clever' than readable but is there a way to have named variable here instead of using .[0] and .[1] like $^ip $^mask even tho thats an array ?

[13:30] <disbot4> <simon_sibl> $cidr.split('/', 2).&{min-max-ip(ipv4-to-uint32(.[0]), 0xFFFFFFFF +< (32 - .[1]))}.&{.[0] .. .[1]}.lazy.map(&uint32-to-ipv4);

[13:32] <lizmat> turn the Callable into a sub with arguments?

[13:33] <disbot4> <simon_sibl> like .&(-> [$ip, $mask] {}) ?

[15:46] <thowe> I have a GraphQL interface that limits records it returns to 10000.  If I want to take 2 identically structured JSON objects, and merge them, is that something one of the JSON libs will do?  Alternatively, if I "from-json" them into Raku objects, is there some shortcut to merge those if they are structured the same, or do I just need to manually do it?

[16:13] <disbot4> <antononcube> What is the structure?

[16:16] <disbot4> <antononcube> @thowe From what I outlined I see several approaches, depending on factors, like, structure, desired speed of computations, etc. 1. Using "Hash::Merge" 2. Using the graph algebra functions of "Graph" 3. Just ask an LLM to do it (or five)

[16:17] <disbot4> <antononcube> Mind you, in Raku, 3 can be done programmatically and be reliable. It can be direct manipulation by the LLM or generating corresponding code (Python, or Raku, or whatever.)

[16:41] <thowe> It's a simple structure, it's just that I have to eat it in multiple pieces.  I can merge easily by looping through it, I just thought there might be a shortcut I didn't know about.

[17:34] *** human-blip left
[17:36] *** human-blip joined
[18:46] <disbot4> <comborico> I wonder why the list data structure didn't get its own sigil.  Probably an unnecessary addition just for technicality's sake.

[19:49] <disbot4> <comborico> https://docs.raku.org/language/101-basics  I don't understand this interaction at $names.sort({ %sets {$_} }).  How is $names connected to the hash table completely unaffiliated with it?  $name is being sorted according to %sets, but what is connecting $names (a list of names) to %sets (table of names and values)?  (I understand a bit about the topical variable -- that isn't the source of my confusion.)

[19:49] <disbot4> <comborico> https://cdn.discordapp.com/attachments/768511641758466088/1507470460059648010/image.png?ex=6a1204c5&is=6a10b345&hm=b968074ab0a00abbbb9668c18c409ff56be6a41df251dcaee079efa476af4013&

[19:51] <disbot4> <librasteve> thowe: I used Hash::Merge recently … suggest you start with that

[19:53] <disbot4> <comborico> @names.sort does the sorting alphabetically -- SORT working on the array elements in @names.  But now SORT is working on %sets, yet it somehow matches the keys in $set with elements in array @names.

[19:53] <disbot4> <librasteve> @comborico hi! thanks for your feedback on 101 …

[19:53] <disbot4> <librasteve> I am curious, what languages (if any) do you know already?

[19:54] <disbot4> <comborico> ...common lisp.

[19:55] <disbot4> <comborico> But I'm pretty much a novice, though I've studied programming for years.  I've studied others.

[19:56] <disbot4> <librasteve> oh - that's helpful - thanks1

[19:57] <disbot4> <librasteve> on the sigils, Array @ and Hash % are the "fully loaded" types and get the sigil treatment - everything else List, Map, Set, Scalar and so on gets a $

[20:00] <disbot4> <comborico> I see.

[20:02] <disbot4> <librasteve> looking at your question $names.sort({ %sets{$_} }) the sort method takes a block {} and sets the topic $_ of the block to the current value, it then uses the result of the block (so in this case the value of %sets for each name item) as the decider as to the sort order

[20:04] <disbot4> <comborico> What is current value of the block at the beginning?

[20:06] <disbot4> <comborico> Another angle, %sets.sort yields alphabetical order.  %matches yields the same.  How is even the value being reached to be ordered.  I may have to take a break on this.  I feel the mental gymnastics taking place in the old noggin'.  You wrote that article then?

[20:07] <disbot4> <librasteve> not guilty on writing that one!

[20:08] <disbot4> <comborico> In the REPL, I tried %sets.sort{$_}, but error.  I take it .sort and .sort with an argument of a block behave differently?

[20:10] <disbot4> <librasteve> m: my @names = <a b c>; say @names

[20:10] <disbot4> <Raku eval>  [a b c] 

[20:10] <disbot4> <comborico> Go on.

