🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 8 June 2022.
00:03 Kaiepi left 00:07 reportable6 left 00:08 Sgeo joined 00:09 reportable6 joined 00:41 pamplemousse joined 00:45 pamplemousse left
Xliff Can I reset the current position in a regex? 00:51
Or a grammar?
leont What do you mean with reset? 01:23
Xliff I want to set the regex current position back a few characters after a specific match 01:25
leont I think the answer is yes, but I forgot the details 01:27
I think it involves adding a method that returns a Match whose position is where you want to be, and then calling that as a rule 01:31
But I probably got some detail wrong there
Someone has written a blogpost about this, but I can't find it back 01:32
It may have been www.codesections.com/blog/regex-de...and-trait/ 01:37
01:45 perlbot left 01:46 simcop2387 left, simcop2387 joined 01:49 perlbot joined 01:50 Xliff left 02:09 frost joined 02:51 Xliff joined 02:57 Xliff left 03:01 nort joined 03:42 [Coke] left 03:52 [Coke] joined 04:16 samebchase joined 05:16 unicodable6 left, coverable6 left, reportable6 left, bisectable6 left, sourceable6 left, committable6 left, notable6 left, quotable6 left, linkable6 left, releasable6 left, bloatable6 left, statisfiable6 left, greppable6 left, tellable6 left, nativecallable6 left, evalable6 left, squashable6 left, shareable6 left, benchable6 left 05:17 coverable6 joined, squashable6 joined, bisectable6 joined, unicodable6 joined, shareable6 joined, notable6 joined, reportable6 joined 05:18 evalable6 joined, statisfiable6 joined, tellable6 joined, sourceable6 joined, committable6 joined, linkable6 joined, quotable6 joined 05:19 releasable6 joined, benchable6 joined, greppable6 joined, nativecallable6 joined, bloatable6 joined 05:35 Kaiepi joined 05:41 jmcgnh left 05:52 jmcgnh joined 06:07 deoac left 06:08 reportable6 left 06:10 Sgeo left 06:11 reportable6 joined 07:11 linkable6 left, unicodable6 left, evalable6 left, coverable6 left, nativecallable6 left, bloatable6 left, squashable6 left, bisectable6 left, committable6 left, releasable6 left, greppable6 left, quotable6 left, notable6 left, statisfiable6 left, tellable6 left, sourceable6 left, benchable6 left, reportable6 left, shareable6 left, notable6 joined, unicodable6 joined, quotable6 joined, committable6 joined, statisfiable6 joined, nativecallable6 joined, benchable6 joined 07:12 bisectable6 joined, coverable6 joined, greppable6 joined 07:13 reportable6 joined, linkable6 joined, shareable6 joined, sourceable6 joined, tellable6 joined, evalable6 joined, releasable6 joined, squashable6 joined 07:14 bloatable6 joined
Nemokosch Haven't seen codesections around for a while 07:49
do you know anything about him?
08:06 moon joined 09:06 notable6 left, statisfiable6 left, committable6 left, releasable6 left, tellable6 left, squashable6 left, evalable6 left, unicodable6 left, linkable6 left, greppable6 left, coverable6 left, sourceable6 left, quotable6 left, bisectable6 left, nativecallable6 left, benchable6 left, shareable6 left, bloatable6 left, reportable6 left 09:07 quotable6 joined, benchable6 joined, tellable6 joined, releasable6 joined, shareable6 joined, statisfiable6 joined, bisectable6 joined, squashable6 joined, sourceable6 joined 09:08 committable6 joined, unicodable6 joined, evalable6 joined, lichtkind joined, coverable6 joined, reportable6 joined, notable6 joined 09:09 linkable6 joined, nativecallable6 joined, bloatable6 joined, greppable6 joined 09:45 [Coke] left 09:51 moon left 10:30 [Coke] joined
lizmat weekly: conf.raku.org/2022/schedule 10:40
notable6 lizmat, Noted! (weekly)
Nemokosch 🥁 10:47
leont For some reason «my sub signal(int32 $signal, long $func) is native { * }» doesn't work on Windows. I'm pretty sure windows has a signal function even if it's only half functional. 11:16
Do I have to use an explicit library for functions from the Universal C Runtime? That would be counter-intuitive. 11:18
11:20 squashable6 left 11:21 squashable6 joined
lizmat leont: how does Perl handle signal on Windows ? 11:33
leont Though the signal function. I've seen it used. I've seen it documented (docs.microsoft.com/en-us/cpp/c-run...msvc-170). I don't get what I'm doing wrong. 11:38
11:43 squashable6 left 11:45 squashable6 joined 12:05 reportable6 left 12:08 reportable6 joined 12:26 Kaiepi left 12:31 frost left 12:45 andm joined 12:52 Altai-man joined 13:12 Altai-man left 13:18 Altai-man joined
[Coke] (Terminal spinners) so today I tried again, basically the same code, but with stdout bufferring disabled (which I had it disabled at some point in previous testing), and it seems to JFW. 13:31
[Coke] realizes that "WJF" is a friendly anagram of "JFW" 13:32
13:41 Kaiepi joined 13:55 andm left 14:17 Guest4721 joined 14:18 Guest4721 left 14:23 lichtkind left
[Coke] ends up with a progress bar that he can define chunks of percentages for, and either mark each chunk as done, or set its size and add a count of elements towards that size. so now he has a setup chunk, the main processing chunk, and a finalize chunk, where the middle one has more fine grained control. whee. 14:56
the intermediate info being stored in a simple AoA, but all hidden behind the class so no one has to see me cheating.
Nemokosch PR when? 14:59
[Coke] Is that to me? I'm not going to submit this against Terminal::Spinners - right now it's a wrapper, though I could make it standalone - but also, I developed it on work time for a work project. 15:00
Nemokosch I don't see how that should hold you back tbh 15:05
15:13 Kaiepi left, Kaiepi joined 15:40 euandreh joined
[Coke] Don't want to violate my employment contract. 15:49
For many folks, if you develop something on work time, without special arrangement, it's the intellectual property of the company. If you then release that software without consent or attribution, you can face legal consequences and/or job termination. 15:50
If this were a big thing, I'd have thought if I wanted it to be OSS before starting and clearing it with legal, or maybe specifically working on this small part off hours.
this is small enough that it's just not worth it.
(conversely: it's also small enough that: would my employer care? probably not. I don't care to find out the hard way) 15:53
Nemokosch flexible working time be like 15:55
[Coke] Yup, could probably argue it. 15:56
16:33 mexen joined
[Coke] I have a nested data structure. if one of the points is already a Hash, I can call .push: <some other hash> and it incorporates the hash key/values at the right spot. if the original hash doesn't exist yet and I .push, it autovivifies as an array instead. Is there a one liner to force the .push to autoviv a hash in that case, or do I need to (as I am now) explicitly viv the hash first? 16:57
gfldex [Coke]: did you try a SemiList to be precise about them multi-dim-key? (If I got what you want to do.) 17:11
17:14 MasterDuke left
Voldenet m: my %h; %h<y>.push({a => 2, b => 3, c => 4}); say %h 17:14
camelia {y => [{a => 2, b => 3, c => 4}]}
Voldenet m: my %h; (%h<y> //= {}).push({a => 2, b => 3, c => 4}); say %h 17:15
camelia {y => {a => 2, b => 3, c => 4}}
Voldenet [Coke]: ^
Nahita IIUC (probably not) `@arr[$pos] .= Hash.push: %g;` is my attempt. `@arr[$pos]` could become `%h{$key}`
Voldenet .Hash wil generate new hash every time 17:17
…I think
m: my @d; @d[0].Hash.push({a => 2, b => 3, c => 4}); say @d; 17:18
camelia []
Voldenet m: my @d; (@d[0].=Hash).push({a => 2, b => 3, c => 4}); say @d; 17:19
camelia [{a => 2, b => 3, c => 4}]
Voldenet works
Nahita for `%h`, i get `Hash|140736539238528` when `.WHICH`'ing itself and `.Hash` of it; that means no new hash or does it? 17:20
ok, i tested with `=:=` to get True 17:22
Voldenet .Hash only is simply coercing invocant to hash
leont Apparently, NativeCall doesn't check if symbols exist until you call them, this is making life more difficult than I had expected 17:24
[Coke] I can't golf this, but I have a loop {}; if an array is empty, I last out of the loop. at the end of the array, I am setting the array to the remaining list of work. With debug output, I am seeing that I set the array to [], zero elements. repeat the loop. somehow this array now has a single Any, in it. wtf. 17:25
aha. Just had to explain it here to see the truth. all set. :P 17:27
(the truth: that loop {} was in a for loop; first time through worked fine, second time through had the weird data, not the first.)
17:55 Altai-man left 18:07 reportable6 left 18:08 reportable6 joined
[Coke] MoarVM oops: MVM_str_hash_fetch_nocheck called with a hashtable pointer that turned stale 18:27
reran the program, no error 18:28
18:44 TieUpYourCamel left 18:57 TieUpYourCamel joined 18:59 Kaipei joined 19:02 Kaiepi left
lizmat [Coke]: that indicates multi-thread access to a hash to me 19:16
while (at least) one of them is making changes
jdv thats mr clark territorry, no? 19:47
lizmat yeah, Nicholas has done a lot of work in that area 19:49
20:02 Xliff joined 20:12 rypervenche left 20:16 rypervenche joined 20:17 simcop2387 left, perlbot left 20:19 simcop2387 joined 20:21 perlbot joined 20:36 irc_user joined 20:54 Altai-man joined 20:58 pamplemousse joined 21:04 pamplemousse left 21:24 Altai-man left 21:31 Kaiepi joined 21:33 Kaipei left 21:49 perlbot left, simcop2387 left 22:06 simcop2387 joined 22:07 perlbot joined 22:30 nort left 23:16 irc_user left 23:24 squashable6 left 23:26 squashable6 joined