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.
leont I seem to have finally reduced the dispatcher problem I was seeing yesterday 09:26
m: class Foo { multi method foo(Str:D(Int:D) $foo = 1, |rest) {} }; Foo.new.foo
camelia Ambiguous call to 'foo(Foo: )'; these signatures all match:
(Foo: Str:D(Int:D):D $foo = 1, |rest)
(Foo: Str:D(Int:D):D $foo = 1, |rest)
in block <unit> at <tmp> line 1
Voldenet m: class Foo { multi method foo(Str:D(Int:D) $foo = 1) {} }; Foo.new.fo 09:33
camelia No such method 'fo' for invocant of type 'Foo'. Did you mean any of
these: 'foo', 'so'?
in block <unit> at <tmp> line 1
Voldenet m: class Foo { multi method foo(Str:D(Int:D) $foo = 1) {} }; Foo.new.foo
camelia Ambiguous call to 'foo(Foo: )'; these signatures all match:
(Foo: Str:D(Int:D):D $foo = 1, *%_)
(Foo: Str:D(Int:D):D $foo = 1, *%_)
in block <unit> at <tmp> line 1
Voldenet even more reduced
m: multi sub foo(Str:D(Int:D) $foo = 1) {}; foo 09:34
camelia Ambiguous call to 'foo(...)'; these signatures all match:
(Str:D(Int:D):D $foo = 1)
(Str:D(Int:D):D $foo = 1)
in block <unit> at <tmp> line 1
leont Actually, I think there are two different issues at place in my case, and I've reduced to the wrong one 09:39
tbrowder some time ago we started a detailed doc on how to install rakudo on windows, but i can't find it. any link woul be appreciated. lots of chatter on use on windows on #raku-beginner and those folks could help with the missing doc. ... back later...bye 12:13
p6steve m: my @a = [[0,1],[2,3],[4,5]]; my @b = [Z] @a; say @b; 13:52
camelia [(0 2 4) (1 3 5)]
p6steve BUT ... I want to transpose my AoA to AoA, not to AoL ...
m: my @a = [[0,1],[2,3],[4,5]]; my Array() @b = [Z] @a; say @b; 13:53
camelia [[0 2 4] [1 3 5]]
p6steve en.wikipedia.org/wiki/Rubber_duck_debugging 13:54
tbrowder .seen tadzik 16:11
.seen tadzik
tellable6 tbrowder, I saw tadzik 2021-07-21T07:49:00Z in #raku: <tadzik> .comb predates moarvm quite a lot, but the strands still fit :)
ToddAndMargo Hi All,  IS ther any chance of progress on this bug? 16:17
github.com/perl-foundation-outreac...s/issues/4
It is professionally embarfrasig to give a customer a program that takes 10 to 20 secobds to start running 16:18
tbrowder ToddAndMargo: have you optimized your program? Can you post your code somewhere? 16:29
has anyone had contact with tadzik lately? his Config::INI hasn't been touched since 2017. it has several outstanding issues and a pr. 16:32
ToddAndMargo same code as was previously in Perl 5, but has grown a little.  It 11,629 lines long.  I suppose I could post it to paste bin.  But the problem is easily reproduce with any program.  Perl 5 is almost instantaneous.  What do you mean by optimize?  According to the bug report, second entry  "Most of the compile time is caused by the fact that 16:38
grammars have not been optimized." Is this something I can do myself?
Voldenet >It is professionally embarfrasig to give a customer a program that takes 10 to 20 secobds to start running 16:49
ToddAndMargo all my typos are embarrassing too
Voldenet I've shipped some monolythic apps that took longer to get up
Voldenet iirc there was some trick where you put your script in a module, so raku would precompile it 16:58
ToddAndMargo The .precomp trick is not always practical.  Especially when troubleshoot code as it has to be compiled every time.  It would be idea if the issue could just be fixed. 17:06
Voldenet Ok, I admit that it's sort of pain to work on script like that, maybe there's some sort of syntax that causes this slowdown? 17:11
the trick is to insert `BEGIN { say now; }` every now and then, it might help 17:13
the most problematic would be things altering the grammar (like custom operators) 17:14
Voldenet I've made some script that's supposed to be reasonably slow, but you can see per-line timings before –stagestats ix.io/48X1 17:21
ToddAndMargo take a look at the first entry on the bug report I made.  It included the stagestats 17:26
ToddAndMargo Any chance of getting our intrepid heroes to work on solving this issue? 18:01
lizmat getting more intrepid heroes would help 18:03
tbrowder ToddAndMargo: can you post your code somewhere, or is it secret? If want help you have to cooperate. Not putting code in a module bevause of debugging isn't a good excuse (I know, I do as you do sometime, but I usually have debug lines embedded). 19:05
ToddAndMargo It is not secret.  The issue is not specific to my code though.  Is there some particular reason you want to troubleshoot against my code?  Any code will do.  The longer the better.  I am not after assistance with my code.  I only want the bug fixed.   Do you still need my code?  The code also uses six of my customer pm6 modules.  It will 19:11
be a mess to post.
tbrowder well don't then. you're not going to get any help by just complaining. but if you can zip up your code and put it in a public place, maybe someone can speed it up a little. 19:16
please don't put it here, though. 19:17
maybe attach it to email to a mailing list. 19:19
ToddAndMargo I was seeking as to why you need my code specifically, sinc eit is reproducable on any code.  I will if yo really, really need mine specifically.
I would probably tar.gz it.  Do you have access to Fedora Linux?
tbrowder todd, i don't understand that statement because from my Raku world view, i don't spend too much time analyzing build times. Unless you want to deal with core code, the only thing you can do is try to optimize your own code, and there MAY be something that can gain a few seconds. yes, i run linux, but debian. that may or may not be an issue. 19:42
i assume you always run the latest raku. 19:43
[Coke] easiest thing to do: move the code to a module and have your main script load and run it. 19:45
tbrowder yepp 19:46
er
and that should take place even if you are still debugging it. 19:47
[Coke] adds that note to the bug
any syntax for passing (e.g.) -3 to a program or do I need to parse args by hand for that? 19:52
Voldenet > raku -e 'sub MAIN($n) { say $n }' – -3 20:04
erm
> raku -e 'sub MAIN($n) { say $n }' -- -3 20:05
ToddAndMargo I am not looking for help on my code.  I do know about the .precomp work around.   I just want the bug fixed.   I have a lot of trouble understanding why Perl 5 compile 100 times faster.  My goal here is to get one of our intrepid heroes to fix the compile time. 20:16
Voldenet "fix" would imply that it's broken, but it's simply slow 20:20
sena_kun well, we can change the words, but not facts 20:21
I think the whole issue is a bit erm.
Voldenet I believe that optimizing compile times is some goal in the long run, but isn't something that can be fixed overnight
sena_kun misleading maybe
I mean, it's not like the core devs are not aware of the problem. like they have tons of free time, skills and passion under the belt and all that stops them from making the project fast now is cause nobody asked them 20:22
"oh yeah, how dumb I was, if only someone would tell me the compile time is slow, d'oh, now I'll go fix it, expect results in a week" 20:23
the real problem is lack of interest and thus maintainers 20:24
and it's not something one can solve, really
there are no successful strategies or "do this - get that" kind of thing
thousands of projects got started, a mere fraction gets successful due to how the cards lie on the table 20:25
ugexe i laughed 20:27
Voldenet good for you ;)
sena_kun to be fair, I'm not blaming reporting problems as is, that's something we should probably do, but some requests are simply unreasonable 20:29
ToddAndMargo 20 seconds or longer to start your program is embarrassing in front of a customer.  You can't even throw up a splash screen until after the compile 20:34
sena_kun true 20:35
Voldenet ToddAndMargo: but you can display splash screen before compilation ends
BEGIN { } will get executed before the code is parsed 20:36
Voldenet consider this, process will start before parse is done: ix.io/48Yq 20:46
(in fact you can put that kill/await directly below BEGIN block) 20:47
[Coke] Voldenet: I mean as a named arg 20:49
ToddAndMargo I am going to have to try that BEGIN thing with a call to libnotify.  Cool 20:50
gfldex lolibloggedalittle: gfldex.wordpress.com/2022/08/28/data-sparkle/ 21:32