🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
sjn m: say $*TOLERANCE; say e ** (i * π) - 1 ≅ 0; 01:24
camelia 1e-15
False
sjn m: say $*TOLERANCE; say e ** (i * π) - 1; say e ** (i * π) - 1 ≅ 0; 01:25
camelia 1e-15
-2+1.2246467991473532e-16i
False
[Coke] Does tolerance work on complexes? 02:02
sjn [Coke]: nvm, my formula was wrong, it works perfectly fine after correction :) 03:29
moritz m: say e ** (i * π) + 1 ≅ 0 06:54
camelia True
jmerelo moritz: nice 07:21
m: say e ** (i * π) + 1 07:22
camelia 0+1.2246467991473532e-16i
stoned75 jmerelo ? hi ! 07:34
jmerelo stoned75: hi! About to leave for office... 07:41
stoned75 ok no problem. I will catch you later by email or whatever 07:45
and so am I (on my way to office) :) 07:46
Geth whateverable/Altai-man-patch-1: aed05135dc | Altai-man++ (committed using GitHub Web editor) | lib/Whateverable.pm6
Use modern HLL name

Preserving backward compatibility with the old one
09:38
whateverable: Altai-man++ created pull request #373:
Use modern HLL name
09:39
Geth whateverable: aed05135dc | Altai-man++ (committed using GitHub Web editor) | lib/Whateverable.pm6
Use modern HLL name

Preserving backward compatibility with the old one
09:41
whateverable: af31cc5129 | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | lib/Whateverable.pm6
Merge pull request #373 from Raku/Altai-man-patch-1

Use modern HLL name
pmurias . 11:05
cpan-raku New module released to CPAN! EventSource::Server (0.0.5) by 03JSTOWE 11:13
sarna why is mi6 so slow to start? hello world takes 0.2s on my laptop, mi6 --help takes 0.65s 11:19
sarna I'm browsing the code and it looks like the only thing it's doing is printing the usage... hmm 11:25
lizmat sarna: the first time? or every time ? 11:34
sarna lizmat: it started getting faster after a couple executions, but still takes 0.45s 11:35
I'm trying to put Trait::Traced on it, without much success (yet!)
lizmat you could set RAKUD_MODULE_DEBUG=1 and see what it is doing loading modules
sarna mein gott, it's doing a lot 11:36
:( looks like it's the module loading 11:37
but that'd mean raku apps would get slower the bigger they get
lizmat well, more modules means more work: that applies to any language 11:39
even with compiled libraries, more libraries means more linking / resolving work 11:40
sarna sure 11:40
pmurias how long do TPF votes takes? 11:46
lizmat depends :-) 11:51
I guess you should ping [Coke]
[Coke] there are "standard" TPF grants which I manage, but anything through Hague or one of the directed flows (like perl5 maintenance) go through someone on the board. 14:13
(I'm not on the board)
I will ping Makoto and ask.
rindolf Hi all! This - paste.debian.net/1127886/ - solution to projecteuler.net/problem=686 is very slow in raku 14:55
lizmat rindolf: if you run this with --profile, are there things that look like they could be improved ? 14:58
rindolf lizmat: let me see 15:00
rindolf lizmat: www.shlomifish.org/Files/files/tex...50474.html 15:02
lizmat nothing really unsuspected ther 15:04
you could try using native ints, but I guess that would defeat the purpose, no
?
rindolf lizmat: no, it should not 15:05
cpan-raku New module released to CPAN! String::Fields (0.0.5) by 03ELIZABETH 15:08
rindolf lizmat: paste.debian.net/1127896/ - still too slow 15:17
japhb rindolf: The first if is probably unnecessarily slow. It should be postfix to avoid the block, it should be comparing to a number (`$mult >= 1_000_000_000_000_000`), and the stringification should be dropped (switching the second if condition to `$mult.starts-with('123')`) 15:30
rindolf japhb: ok 15:32
[Coke] a style comment: loop doesn't need the ;; 15:33
ryan83 I seem to have made a change in some module that is causing it to precompile every time. What is the best way to track down what module file and then what code is causing this? 15:34
guifa2 lizmat: sorry I couldn't get the CPAN upload done in time for weekly. Next week I promise! (i got back late from my trip and CPAN has a few more steps than I was thinking) 15:35
japhb rindolf: I'm also just curious whether uint64 is any different from int, performance-wise.
ryan83 Is there a general rule of what types of statements/expressions cause a module to always precopile? 15:37
rindolf japhb: seems that uint64 is better 15:44
[Coke] I may be missing something, but unless you're updating the file's timestamp, it shouldn't recompile each time you run it. 15:45
guifa2 . o O ( maybe there's some weird file/dir permission thing not allowing the precompile to be saved? ) 15:47
[Coke] How are you tracking that it's precompiling each time? 15:48
ryan83 i want to try and prove that... right now I just know the startup time is all of a sudden much longer... similar to the first run after changing code
rindolf japhb: it still takes over 8 minutes to complete 15:49
lizmat guifa: no worries, there's plenty in this week's WRN 15:52
japhb rindolf: What's par time? 15:53
rindolf japhb: par?
japhb acceptable. (As in the phrase "par for the course", referring to expected golf strokes to complete) 15:54
Well, acceptable-standard-expected, all as one idea. 15:55
[Coke] you can check the precomp lib dir and see if the precomp file is getting modified. 15:56
rindolf japhb: p5 runs it in 22s ; pypy3 in 8.8s 16:04
japhb: hmmm... it takes cpython3 1m26s 16:06
ryan83 [Coke]: do you know how to track down anything int the precomp dir... iit is not organized in a human readable way... 16:08
lizmat and another Rakudo Weekly News hits the Net: rakudoweekly.blog/2020/01/27/2020-...pringtime/
Guest78373 rindolf: what happens if you change 'my $x = Str($mult);' to 'my $x = ~$mult;' ? 16:09
[Coke] ryan83: if I were on linux, I'd do a recursive ls -l and find the latest mtime after each invocation and see if it was getting updated. 16:12
rindolf Guest78373: this is what i have now - paste.debian.net/1127905/
[Coke] Without seeing your code, it may just be that you inadvertently added code that is getting executed legitimately. 16:13
Guest78373 rindolf: is this correct? Found 678910 => 193060223 16:18
rindolf Guest78373: yes
Guest78373 ok, sec 16:19
rindolf: this takes 1m3s on my $work machine, gist.github.com/dogbert17/9e039d6a...b4e0aba220 16:20
rindolf Guest78373: trying that here 16:24
Guest78373: thanks
Guest78373: 1m4s here - not too bad 16:25
Guest78373: thanks
japhb is mystified as to why doing `my $x = ~$mult;` is faster than just using the fact that starts-with will coerce a Cool ... maybe because it has to do int -> Int first? 16:27
[Coke] I think you'd still need to go through Int if you call .Str 16:28
(anything that resolves to a method call on a native probably has to go to the default Object type for that native before invocation) 16:29
japhb [Coke]: No, I menat Cool coercing probably has to wrap first, but ~ is very low level as I recall, and can use the native stringification. 16:30
Or maybe I'm just remembering NQP too much. 16:31
rindolf Guest78373: japhb : changing +<= 1 to *= 2 brings it down to 1m1s 16:38
japhb rindolf: I was wondering how much difference that would make. 16:43
So at this point, we're well faster than cpython3. That's a good start. Still 1/3 the speed of p5 for this though. :-( 16:44
Geth doc: 7ede5a201b | (JJ Merelo)++ | doc/Type/independent-routines.pod6
Adds new definitions while prepping for #2632
16:59
linkable6 Link: docs.raku.org/type/independent-routines
doc: 7df5a5455b | (JJ Merelo)++ | doc/Type/independent-routines.pod6
Adds warnings on bare put and bare put for #2632
linkable6 DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d
Geth doc: eac1c035da | (Elizabeth Mattijsen)++ | doc/Language/variables.pod6
Mention $*RAKU
18:30
linkable6 Link: docs.raku.org/language/variables
Geth doc: 24708bd039 | (Elizabeth Mattijsen)++ | 2 files
Move Perl.pod6 to Raku.pod6

No changes to keep git history
18:33
doc: fdc3ec6898 | (Elizabeth Mattijsen)++ | 2 files
Complete the Perl -> Raku class rename
18:37
sena_kun releasable6: status 19:09
releasable6 sena_kun, Next release will happen when it's ready. There are no known blockers. 0 out of 540 commits logged
sena_kun, Details: gist.github.com/cb022e15f38526d6a3...7518b0ac38
Geth doc: 7e63b100ef | (Elizabeth Mattijsen)++ | type-graph.txt
Add new Raku class, change Perl dependency
antoniogamiz Raku org has github pages enabled? 19:11
AlexDaniel antoniogamiz: I think it should be enabled for each repo separately? 19:14
antoniogamiz: which repo do you have in mind?
antoniogamiz Raku/Documentable
because each build generate and push its documentation automatically 19:15
jmerelo antoniogamiz: I think AlexDaniel is right. I guess I can enable it for Raku/Documentable
AlexDaniel antoniogamiz: “Your GitHub Pages site is currently being built from the gh-pages branch. Learn more.”
jmerelo Thanks, AlexDaniel 19:16
antoniogamiz mmm
AlexDaniel I didn't do anything
antoniogamiz and what's the url? because raku.github.io/Documentable/ is not working
jmerelo antoniogamiz: still being built 19:17
antoniogamiz: maybe try to push again there 19:18
antoniogamiz jmerelo: where did you check that?
jmerelo Or maybe it takes a good while
antoniogamiz: in settings, same as AlexDaniel
antoniogamiz ah, i cannot see settings
AlexDaniel antoniogamiz: what about now? 19:19
antoniogamiz now i can, thanks :D 19:20
cpan-raku New module released to CPAN! Gnome::N (0.15.4) by 03MARTIMM 19:21
guifa lizmat: wow no kidding. Huge weekly this week 19:30
lizmat :-) glad you like it
cpan-raku New module released to CPAN! Gnome::Gdk3 (0.15.2) by 03MARTIMM 19:37
stoned75 is z-script still current ? 19:48
AlexDaniel stoned75: it should work 19:53
rypervenche I don't know if it's already been done, but I sent in a ticket to Github to hopefully get the Raku extensions added to syntax highlighting. 20:19
Grinnz rypervenche: it is pending popularity of the extension use across github, monitored here: github.com/github/linguist/issues/4219 20:22
pedr0 Hi everybody, I've got a very naive question
I am getting stuck when looping through an array of array - the inner array contains (Any) values which seem to cause the for loop to halt as soon as it gets ne 20:23
*one
rypervenche Grinnz: Ah, thanks.
pedr0 if I am iteratin an array which contains both array and strings, what is the right for loop to use ? for @array -> $in or for @array -> @in ? 20:25
does it make any difference ? 20:26
pedr0 In other words - how would I loop through [ ThisIsAString (Any) [1 2 3] [123]] ? 20:29
El_Che for @array -> $list 20:32
I would do that
lizmat m: my @a = [1,2,3],[4,5,6]; for @a -> @b { for @b -> $c { say $c } }
camelia 1
2
3
4
5
6
pedr0 yeah but what if in the first level array are mixed arrays and strings ? 20:36
lizmat m: my @a = [1,2,3],42,[4,5,6]; for @a -> @b { for @b -> $c { say $c } } 20:39
camelia 1
Type check failed in binding to parameter '@b'; expected Positional but got Int (42)
in block <unit> at <tmp> line 1

2
3
lizmat m: my @a = [1,2,3],42,[4,5,6]; for @a -> $b { for @$b -> $c { say $c } }
camelia 1
2
3
42
4
5
6
lizmat pedr0 ^^
m: my @a = [1,2,3],42,[4,5,6]; for @a -> $b { for $b.list -> $c { say $c } } 20:40
camelia 1
2
3
42
4
5
6
lizmat pedr0: if you don't like the linenoisyness of @$b you can do $b.list 20:40
pedr0 thanks a lot - any way I can get rid of those "Any" in the array ? 20:44
It is basically an array where sometimes an index is defied, sometimes not
*defined
guifa (Any) is an undefined value
That can happen sometimes — if your code ends up producing them, to avoid it when looping there’s two ways 20:46
for @array.grep(*.defined) { … }
or for @array { next unless .defined } 
pedr0 oh, I did not know any of that
let me try
can I filter them to remove all this complications ? for instance creating a new array ? 20:48
[Coke] If you have gaps in the Array, do you want something in the slot other than an undefined Any?
pedr0 I suppose I could for @array.grep(.defined) -> $element { myNewArrray.append($element) }
[Coke] You could change the default value, you could change how you print the Array's contents...
pedr0 I would rather prefer to get rid of them altogheter 20:49
[Coke] if you have gaps and are skipping the gaps... do you need the gaps in the first place?
pedr0 that's not under my control, unfortunately. Fair point though
[Coke] then yes, your line just above seems reasonable.
pedr0++ 20:50
guifa It’s not uncommon to do a for loop on an array with some methods called on it
for @foo.grep(*.defined).map(*.Str.chomp) { … } 20:51
or some such stuff like that
But you could also do that when getting the area too 20:52
my @foo = sub-that-gives-a-list-with-undefined-values.grep(*.defined);
(There’s not really any best way per se — I always go with whatever is most maintainable. In your case, it sounds like setting the array initially with the filter values might be best and then I’d just add a comment saying “Booooooo this sub returns undefined values in its array that we don’t want, shame on its author”) 20:53
Kaiepi .tell jmerelo, saw your message, just trying to think of projects that i would be good for mentoring for and appealing for students. who's the target audience for these grants? 21:06
tellable6 Kaiepi, I'll pass your message to jmerelo
guifa Kaiepi: you talking about the GSoC? 21:07
Kaiepi yeah
tellable6 2020-01-26T19:33:37Z #raku <jmerelo> Kaiepi can you please submit your ideas through as a PR here? github.com/perl-foundation-outreac...2020-ideas
guifa I was thinking about applying for one — I’m *teeeeeechnically* still going to be a student at the date they require
(My graduation date — assuming I defend on time — is going to be in May) 21:08
Kaiepi ah, so college/university students? 21:09
guifa Yeah 21:10
Kaiepi aight, other thing i'm wondering about is the level of experience with raku needed
Kaiepi i'm guessing it'd be more for people who either don't know the language or have a small amount of experience 21:11
guifa The idea of GSoC is more that Google pays students to contribute to open source software 21:14
So for instance I might apply with my project being beefing up Raku’s international support (I mean, that’s cheating a bit — I’m already doing it but still, if Google wanted to help foot the bill lol) 21:15
Kaiepi ah 21:16
guifa IIRC samcv did it with Unicode support in MoarVM 21:18
patrickb .tell El_Che I managed to set up a build setup that creates stuff for Mac, Win and Linux for the rakubrew thingy using CircleCI. It was a rather pleasant experience. I'd be willing to do the same for rakudo. But I don't want to stomp on the work you already did in that area. What do you think? Would a CircleCI setup be a good way forward? 21:38
tellable6 patrickb, I'll pass your message to El_Che
thundergnat .tell rindolf Re: slow project euler 686; try rosettacode.org/wiki/First_power_of..._12#Perl_6 22:15
tellable6 thundergnat, I'll pass your message to rindolf
pmurias lizmat: the vote passed :) 22:29
MasterDuke pmurias++ 22:33