Raku Conference Day 2 on Youtube: www.youtube.com/watch?v=BL9-XdC9WYI 🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). 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 14 August 2022.
Geth Raku-Steering-Council/main: 1186586459 | (Nick Logan)++ (committed using GitHub Web editor) | minutes/20220903.md
Add RSC meeting minutes for 2022-09-03
01:17
Geth__ doc: mreitinger++ created pull request #4106:
Update concurrency.pod6
11:35
gfldex lolibloggedalittle: gfldex.wordpress.com/2022/09/04/as...tionality/ 13:53
stevied I'm seeing some really weird behavior: stackoverflow.com/questions/735996...5_73599629
anyone have any inkling on what the issue might be?
probably has something to do with garbage collection maybe? 14:07
nine stevied: what happens when you set MVM_SPESH_DISABLE=1 ? 14:36
tellable6 nine, I'll pass your message to stevied
stevied @nine, thanks, I'll give it a shot. 14:38
I discovered that if I get rid of the loop entirely and manually call the win api function, everything works perfectly. 14:39
but let me try that magic setting there now
nine: yup! that did the trick. holy cow. what does that tell us? 14:47
nine That there is a spesh or JIT bug :/ Can you please try again with MVM_JIT_DISABLE=1 instead of MVM_SPESH_DISABLE=1? 14:48
stevied ok 14:49
give me a sec, not familiar with env variables in powershell
nine, with SPESH removed and JIT added to env, the problem has returned 14:53
Nemokosch > my &unique-char = { (once $str.comb.BagHash»--){$_}:!exists } 14:57
damn, it's still readable
can we obfuscate it further? 14:58
😄
stevied nine should I report this bug? Is there any kind of workaround for my code that would make it work without the env variable setting? 15:02
nine I found a workaround 15:27
If I move the RegEnumKeyExW from outside the loop and into the loop, it works perfectly. 15:28
see stackoverflow.com/a/73600441/1641112 15:30
thanks for helping me troubleshoot this. was driving me crazy.
ugexe well if its a JIT issue you can only rely on that its worked around on your specific computer at this specific instance 15:31
nine It's a spesh issue and definitely worth reporting. 16:03
stevied ok, thanks. will do 16:42
Nemokosch I saw something interesting 20:51
Nemokosch . 20:52
tellable6 2022-09-02T18:08:24Z #raku <p6steve> nemokosch: I imagine something like this ... interesting
Nemokosch m: (1, 2) >>~>> ' ' <<~<< <a b c> andthen .raku.say
camelia ("1 a", "2 b", "1 c")
Nemokosch I don't mind that it works the way it does but it would be nice to know the reason 20:53
Nemokosch m: (1, 2) >>~<< <a b c>
camelia Potential difficulties:
Useless use of >>~<< in sink context
at <tmp>:1
------> (1, 2) ⏏>>~<< <a b c>
Lists on either side of non-dwimmy hyperop of infix:<~> are not of the same length while recursing
left: 2 elements, r…
Nemokosch so yeah, this wouldn't work, "non-dwimmy" and all 20:54
but "transitively" it did work
guifa The arrows are one of those things I forget exactly how they work, even though I know there is a logic to them haha 20:55
Nemokosch I can make it worse... 21:01
Nemokosch m: (1, 2) <<~<< ' ' <<~<< <a b c> andthen .raku.say
camelia Lists on either side of non-dwimmy hyperop of infix:<~> are not of the same length while recursing
left: 2 elements, right: 1 elements
in block <unit> at <tmp> line 1
Nemokosch could someone put it into words what happened here? 21:05
as opposed to the >>~>> ' ' <<~<< case
gfldex `(1, 2) <<~<< ' '` the LHS got 2 elements and the RHS 1. So the arrows point in the wrong direction. 22:33
Nemokosch m: (1, 2) <<~<< ' ' andthen .say 22:43
camelia Lists on either side of non-dwimmy hyperop of infix:<~> are not of the same length while recursing
left: 2 elements, right: 1 elements
in block <unit> at <tmp> line 1
Nemokosch not exactly: 22:45
m: (1, 2) <<~<< (' ',) andthen .say
camelia (1 )
Nemokosch Actually I wonder if there isn't an issue for stuff like `(1, 2) <<~<< ' '` to work 22:46
anyway, didn't buy the explanation, this is not about length
gfldex m: (1, 2) «~» ' ' andthen .say 22:48
camelia (1 2 )
Nemokosch the hyper meta-operator isn't documented too well, we already know that 22:51
> They apply a given operator enclosed (or preceded or followed, in the case of unary operators) by « and/or » to one or two lists, returning the resulting list, with the pointy part of « or » aimed at the shorter list. 22:52
this is simply not true - you can aim towards the longer list as well and that also seems to have a pretty clear semantics
the direction of the arrow determines the direction of the data flow, somewhat like with the feed operator 22:54
> Single elements are turned to a list, so they can be used too. 22:55
This is something that didn't happen in the first example: ' ' wasn't turned into a list, and if it were, the same call would have succeeded
so two subsequent statements are wrong in two different ways: in the first case, the actual behavior is more reasonable than the docced behavior; in the second case, it's vice versa
nopy hello. For C++ project I want to use a simpler, probably dynamic language to develop front-ends. Would you recommend Rakudo for that? 22:59
Previously I've used Python but that turned out to be a massive headache :( 23:00
Nemokosch hence the name, right? :D
nopy Python is easy, but it is a trap really 23:01
Nemokosch Hi good sir. In fact, Rakudo is the name of the state-of-art Raku compiler, not the language itself. Also, I don't know why you struggled with Python as your scripting language - if it was too heavyweight, then I'm afraid Raku has no chance to be a better option
nopy It wasn't too heavy weight. But a ton of little problems needed hacks and that is just a massive time sink 23:03
Like little GUI freezes because of the GIL that is really hard to work around
gfldex C++ bindings are not well supported by NativeCall. You may end up with C-shims. If that is fine for you, Rakudo might be worth a shot. 23:04
nopy where you have to call into C, unlock the GIL, do the threading in C, call from C back to python and so on
I've seen that already and I don't think that would be a problem. 23:05
Are there any good GUI bindings available? 23:06
gfldex see: raku.land/?q=gnome 23:08
Nemokosch Leon had that interesting idea about integrating with Gnome objects... 23:12
now we know one person who would be interested :D
nopy ty 23:14
Can Rakudo be embedded? 23:15
nvm. just seen the moarvm code ^^ 23:16
the gtk bindings are really good and comprehensive. wow 23:23
guifa That's mostly all Xliff's work, IIRC. EXtremely thorough work 23:24
nopy how can pass around integer arrays of sizes non-native to raku like int16_t* ? 23:26
ugexe Detected: Program:Win32/Bearfoos.B!ml, Affected items: C:\rakubrew\bin\rakubrew.exe 23:41
heh
nopy is it normal that rakudo is that ram/cpu intensive? 23:58
nopy my html/JS front-end has about ~20k LOC. I generated a raku script with 20k LOC but that eats 800 MB ram and takes 20 secs to parse. 23:59