»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:04 aborazmeh joined, aborazmeh left, aborazmeh joined 00:08 chee left 00:16 leont joined 00:18 molaf joined, molaf left, chee joined 00:24 netrino left 00:35 w_richard_w joined 00:43 zacts left 00:45 zacts joined 01:08 patrickb joined 01:12 b2gills joined
Kaiepi news.perlfoundation.org/2019/03/gra...votes.html 01:23
i got the grant!
01:24 zacts left
MasterDuke Kaiepi++ 01:25
timotimo heck yeah 01:26
3 votes of 5, that's pretty good
01:26 zacts joined 01:27 lucasb left 01:28 zacts left, zacts joined
timotimo i hope yours doesn't end up taking much longer than anticipated like mine did 01:32
01:44 loops joined
patrickb Congratulations Kaiepi! 02:08
02:09 patrickb left
guifa Kaiepi++ 02:09
So I have a class A. Under special conditions, A.new should return a class B is A. How do I define them so that they work? A can’t compile because B hasn’t been defined, but I can’t stub B is A { … } because A hasn’t been declared. But if I declare A as a stub, then B’s stub fails because it requires a composed class. 02:18
errr ignore all that I didn’t mean to send anything until I tried a few other things 02:19
02:20 zachk left
guifa (Answer stub role A, stub class A-generic does A, stub class B does A, then actually define A with a new method that decides which type to return, and then define classes A-generic and B that do A) 02:23
02:25 zacts left, mowcat joined 02:30 zacts joined 02:37 zacts left
vrurg guifa: Not sure if got your problem correctly, but perhaps dynamic obtainting of a type with ::('B') could work for you. In this case the class would be resolved at run time. 02:39
Then stubbing should be ok.
guifa ooh! I didn’t think about that 02:40
I finally got it to work but I quite rather like that solution because it’s not quite as messy. I’m sure it’s smidgen slower but for what i’m doing that overhead isn’t bad
vrurg You could speed things up by pre-caching the resolved type somewhere – in a class variable, for example. 02:42
guifa vrurg++ 02:43
vrurg m: class C { }; my \CC = C; my $a = CC.new; say $a.WHAT 02:44
camelia (C)
guifa I just tried that and it worked — with much cleaner code that all the stubbed stuff
vrurg I know. Looks like I went through similar issue once. Though I needed a typecheck – a child to validate its parent. 02:45
But otherwise it's same kind cyclic class dependency which could only be resolved with a loose link. 02:46
guifa oh hey, you can apparently throw it in a CHECK phaser. 02:48
So it’s basically as close to compile time as possible 02:49
Heck, I’d pretty much just call that compile time.
$foo = (CHECK ::(‘bar’)).new: @xyz 02:50
03:15 w17t left 03:34 aborazmeh left 03:44 zacts joined 03:51 leont left 04:06 klapperl joined 04:08 Cabanossi left 04:19 Cabanossi joined 04:44 mowcat left 05:03 sno left 05:10 w_richard_w left
Xliff guifa: Got code? I'd love to take a look. 05:16
Kaiepi: Congratulations on the grant!
m: $*PERL.comipler.version.say 05:17
camelia No such method 'comipler' for invocant of type 'Perl'. Did you mean 'compiler'?
in block <unit> at <tmp> line 1
Xliff m: $*PERL.compiler.version.say
camelia v2018.12.321.g.845433.b.47
05:18 w17t joined 05:31 zacts left 05:49 ToddAndMargo joined
ToddAndMargo Hi All. I would like to write a regex that will find an Esc (27) and whack it and the next three letters too (don't care what they are). So far I have this. What am I doing wrong? 05:50
$ p6 'my $x="123"~chr(27)~"abcdefg"; say $x; $x~~s:g/"{chr(27)}"**4//; say $x;'
Figured it out. Use dots for any character. ]$ p6 'my $x="123"~chr(27)~"abcdefg"; say $x; $x~~s:g/ "{chr(27)}" ... //; say $x;' 123bcdefg 123defg 05:52
06:14 ToddAndMargo left
moritz nana na nana 06:22
sorry, wrong chat
m: say chr(27)
06:28 sauvin joined 06:30 jmerelo joined
jmerelo releasable6: status 06:31
releasable6 jmerelo, Next release will happen when it's ready. 2 blockers. 319 out of 321 commits logged
jmerelo, Details: gist.github.com/bdb5aa01a35e7851ea...60d773f815
jmerelo squashable6: status
squashable6 jmerelo, ⚠🍕 Next SQUASHathon in ≈5 hours (2019-03-02 UTC-14⌁UTC+12). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
Geth doc: c4eff3c7ad | (JJ Merelo)++ | doc/Language/classtut.pod6
Adds a new example, closes #2617
synopsebot Link: doc.perl6.org/language/classtut
07:04 eseyman left, Xliff left 07:08 reach_satori left 07:09 reach_satori joined, eseyman joined, drclaw1 left 07:16 ravenousmoose joined 07:18 zacts joined 07:19 domidumont joined 07:29 zacts left, reach_satori left 07:38 |oLa| joined 07:43 zacts joined 07:51 zacts left, rindolf joined, jcarty joined 07:53 zacts joined 07:55 jmerelo left 07:59 robertle joined 08:03 ravenousmoose left 08:05 ravenousmoose joined 08:22 reach_satori joined 08:32 netrino joined 08:34 aborazmeh joined, aborazmeh left, aborazmeh joined 08:35 netrino_ joined 08:37 netrino left 08:45 dct joined 08:49 patrickb joined 08:55 zacts left, dct left 09:01 sena_kun joined 09:07 Xliff joined 09:18 zacts joined 09:24 xenowoolfy joined, xenowoolfy left
rindolf Hi all! How can I fix this line - if (my ($s, $e, $sum) = $l ~~ m:P5/^start = (\d+) ; end = (\d+) ; sum = (\d+)$/) 09:27
sena_kun what is "fix"? "port? 09:30
rindolf sena_kun: yes
sena_kun give me some seconds...
m: with ('1;2;3' ~~ /(\d)';'(\d)';'(\d)/) { my ($s, $e, $sum) = ($0, $1, $2); say "$s;$e;$sum"; } 09:31
camelia 1;2;3
sena_kun I'd write it like this.
09:32 netrino_ left
sena_kun if I understand you correctly. And my understanding of P5 regexes is not the best too, so please explain further if something is missing. :) 09:32
rindolf sena_kun: i want to return several vars as captures 09:33
sena_kun well, $s, $e and $sum contain Match objects. 09:34
they are stringified because of "", but those are not strings.
rindolf perlbot: eval: if (my ($s, $e) = "12 ; 34" =~ /^(\d+) ; (\d+)\z/) { say $s,$e} else { die;} 09:35
perlbot rindolf: 5===SORRY!5=== Error while compiling /tmp/iDYkahINWQ Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at /tmp/iDYkahINWQ:1 ------> 3if (my ($s, $e) = "12 ; 34" =~7⏏5 /^(\d+) ; (\d+)\z/) { say $s,$e} else { [Exited 1]
rindolf perlbot: eval5: if (my ($s, $e) = "12 ; 34" =~ /^(\d+) ; (\d+)\z/) { say $s,$e} else { die;}
perlbot: p5eval: if (my ($s, $e) = "12 ; 34" =~ /^(\d+) ; (\d+)\z/) { say $s,$e} else { die;} 09:36
sena_kun sorry, I don't know Perl anyway. :(
rindolf perlbot: stupid bot
sena_kun if you want it to `die` if no match is given, just `without {die}` will be enough.
m: with ('1;2;3' ~~ /(\d)';'(\d)';'(\d)/) { my ($s, $e, $sum) = ($0, $1, $2); say $s.postmatch } 09:37
camelia ;2;3
rindolf perlbot: eval: 1+1
perlbot rindolf: WARNINGS for /tmp/HTr4zXkapG: Useless use of "+" in expression "1+1" in sink context (line 1)
sena_kun m: with ('1;2;' ~~ /(\d)';'(\d)';'(\d)/) { my ($s, $e, $sum) = ($0, $1, $2); say $s.postmatch } else { die 'Too bad' }
camelia Too bad
in block <unit> at <tmp> line 1
sena_kun m: with ('1;2;3' ~~ /(\d)';'(\d)';'(\d)/) { my ($s, $e, $sum) = ($0, $1, $2); say $s.postmatch } else { die 'Too bad' }
camelia ;2;3
rindolf simcop2387: hi, how do i eval p5 here? 09:38
sena_kun m: with (my ($match) = ('1;2;3' ~~ /(\d)';'(\d)';'(\d)/)) { say $match[2] } 09:39
camelia 「3」
rindolf perlbot: help eval
perlbot rindolf: The eval plugin. Evaluates various different languages. Syntax, eval: code; also pleval deparse. You can use different perl versions by doing eval5.X, e.g. eval5.5: print "$]"; You can also add s or w to the eval to quickly add strict or warnings. sweval: print $foo;
rindolf perlbot: eval5.18: if (my ($s, $e) = "12 ; 34" =~ /^(\d+) ; (\d+)\z/) { say $s,$e} else { die;}
perlbot rindolf: ERROR: Can't locate object method "say" via package "12" (perhaps you forgot to load "12"?) at (IRC) line 1.
rindolf perlbot: eval5.18: use 5.018; if (my ($s, $e) = "12 ; 34" =~ /^(\d+) ; (\d+)\z/) { say $s,$e} else { die;} 09:40
perlbot rindolf: 1234
rindolf hallelujah
sena_kun: is there anyway to avoid using $0, $1, etc. and return a list? 09:41
09:42 pecastro joined
sena_kun oh, there is 09:42
give me a second...
rindolf sena_kun: thanks 09:43
sena_kun m: with (my ($s, $e, $sum) = ('1;2;3' ~~ /(\d)';'(\d)';'(\d)/).list) { say $s }
camelia 「1」
sena_kun :)
m: with (my ($s, $e, $sum) = ('1;2;3' ~~ /(\d)';'(\d)';'(\d)/).list) { say $s; say $sum; say $sum.^name }
camelia 「1」
rindolf sena_kun: thanks 09:44
sena_kun \o/
never thought about it before and firstly it was like "Hmm, I don't think there may be such a thing", but then "Ok, let's try to apply .list on it, maybe it'll work out".
rindolf sena_kun: it works 09:45
09:48 ravenousmoose left 09:59 ravenousmoose joined 10:03 ravenousmoose left 10:11 ravenousmoose joined 10:21 eliasr joined
lizmat weekly: blogs.perl.org/users/swiss_perl_wor...-2019.html 10:22
notable6 lizmat, Noted!
10:24 aborazmeh left 10:29 aborazmeh joined, aborazmeh left, aborazmeh joined 10:30 dominix_ joined 10:32 robertle left 10:34 dominix left 10:35 nightfrog left, nightfrog joined 10:55 reach_satori left 11:03 cpan-p6 left 11:04 cpan-p6 joined
cpan-p6 New module released to CPAN! perl6-cache-async (0.1.6) by 03ROBERTLE 11:04
11:15 zacts left 11:16 domidumont left 11:23 ravenousmoose left 11:39 aborazmeh left 11:44 robertle joined 11:47 pecastro left 12:01 leont joined 12:14 zacts joined 12:15 aborazmeh joined, aborazmeh left, aborazmeh joined 12:20 ravenousmoose joined 12:23 dct joined 12:34 dct left 12:40 zacts left 12:53 dct joined 12:59 ravenousmoose left
discord6 <Vendethiel> I should book some tickets to switzerland..:) 12:59
13:00 domidumont joined 13:07 dct left 13:14 domidumont left 13:16 domidumont joined 13:19 lucasb joined 13:23 scimon joined
rindolf hi all, so i wrote this in p6 today - paste.debian.net/1070851 - a bit ugly but gets the job done 13:26
sena_kun: thanks again 13:27
sena_kun :>
lucasb rindolf: hello. you used m:P5, was there a need for it? :) 13:29
patrickb .seen salortiz 13:30
yoleaux I haven't seen salortiz around.
rindolf lucasb: i haven't studied p6 native patterns yet
13:30 robertle left
lucasb rindolf: ah, ok. I just wanted to warn you that the P5 patterns have uncertain future in Perl 6 13:31
sena_kun and there is a proposal about moving it out from core into a module 13:32
13:32 robertle joined
rindolf lucasb: ah 13:34
patrickb .seen sortiz 13:35
yoleaux I saw sortiz 20 Feb 2019 23:13Z in #perl6-dev: <sortiz> AlexDaniel: Thank you for the original report
13:38 w17t left
guifa Xliff: bit.ly/2UdxAU3 13:39
Line 6 you’ll see it, (CHECK ::(‘UnicodeLocaleExtension’)).new: @subtags 13:40
13:43 ravenousmoose joined 13:45 robertle left
Geth perl6-examples/games-shebang: 2bf3958714 | (Daniel Mita)++ | 6 files
Add shebang to games and make executable
perl6-examples: mienaikage++ created pull request #60:
Add shebang to games and make executable
13:57 mikfire joined 14:01 robertle joined
leont rindolf: yeah, it doesn't look very sixish 14:07
e.g. my @l = lines($log); 14:08
14:11 gregf_ left, jcarty left
rindolf leont: ah 14:13
leont And in a p6 regex it's usually most convenient to capture by name 14:14
14:20 robertle left, robertle joined
tobs not sure if this use of `react for` is hammering something or creating a bottleneck somewhere but it's damn convenient hastebin.com/atipemorex.pl 14:26
14:29 aborazmeh left 14:35 robertle left 14:46 w17t joined 14:58 abraxxa left 15:04 ravenousmoose left 15:07 mahafyi joined 15:12 skids joined 15:23 marmor joined
rindolf tobs: hastebin.com/raw/atipemorex.pl is slow 15:39
Geth perl6-examples: 2bf3958714 | (Daniel Mita)++ | 6 files
Add shebang to games and make executable
perl6-examples: 6750c63ccf | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | 6 files
Merge pull request #60 from perl6/games-shebang

Add shebang to games and make executable
tobs rindolf: yah, do you know why? 15:40
rindolf tobs: no 15:41
tobs: error
tobs: use paste.debian.net/
15:42 zachk joined, dct joined
rindolf tobs: i have no control over hastebin 15:42
tobs ah, the domain.
15:43 zachk left, zachk joined
tobs sorry, I've already gone home and the file is on my work computer 15:43
rindolf tobs: ah 15:44
tobs: use github/etc next time
which reminds me that i need to clean my ~/* files 15:45
15:48 dct left 15:49 robertle joined 15:57 jmerelo joined
jmerelo squashable6: status 15:57
squashable6 jmerelo, 🍕🍕 SQUASHathon is in progress! The end of the event in 1 day and ≈22 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
jmerelo OK, who's in? 15:58
squashable6: log
squashable6 jmerelo, Nothing there yet
AlexDaniel o yay
good morning
jmerelo AlexDaniel: hi!
Just back from a meeting
leont What is the state of 2019.02? 16:03
16:05 robertle left
rindolf AlexDaniel: hi 16:06
jmerelo releasable6: status 16:07
releasable6 jmerelo, Next release will happen when it's ready. 2 blockers. 319 out of 321 commits logged
jmerelo, Details: gist.github.com/be5b28e61a236831c3...f1ae48d49b
jmerelo leont: ^^^^^^
16:08 w17t left
AlexDaniel leont: waiting for a moarvm release 16:08
squashable6 🍕 JJ++ wrote a comment on “Checklist for 6.d”: github.com/perl6/doc/issues/2632#i...-468717045 16:09
🍕🍕🍕 First contribution by JJ++! ♥
AlexDaniel rindolf: hello!
leont: basically, all the technical bits are ready, so it will be out as soon as all bureaucracy is handled 16:10
squashable6 🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632
🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 16:11
🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 16:13
🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 16:14
🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 16:15
Geth doc: 655e4025b0 | (JJ Merelo)++ | 2 files
Clarifies deprecation IO.path subst-mutate refs #2632
squashable6 🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 16:16
16:16 pmurias joined
squashable6 🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 16:17
🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 16:18
pmurias wouldn't the :P5 regex syntax be usefull too for porting regexes from other languages that have Perl 5 compatible regexes?
leont The flatmap deprecation still annoys me
squashable6 🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 16:19
jmerelo AlexDaniel++ 16:20
leont: it's not big deal. flat and map do the same. And you have duckmap, which has a duck. 16:21
16:21 marmor left
leont But it's syntactically rather convenient 16:22
AlexDaniel convenient to write? 16:23
16:24 domidumont left
leont Maps (any kind) tend to read nice at the tail IME 16:25
Especially when combined with colon method syntax
AlexDaniel so is there anything wrong with `flat @foo.map(…)` or `@foo.map(…).flat` ? 16:29
leont Only aesthetically ;-) 16:32
flat @foo.map is what I ended up doing 16:33
16:34 ferreira left 16:35 epony joined
squashable6 🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 16:37
leont @foo.map({ bsdkjlafhaslfhs;kjnaskjdflkfdsjhalskjfhlasjfdkADasdhkjashd }).flat has a rather important thing too far to the end
Geth doc: c2daa96626 | (JJ Merelo)++ | doc/Type/IO/Path.pod6
Clarifies deprecation child refs #2632
doc: 529383f7ed | (JJ Merelo)++ | doc/Type/Str.pod6
Clarifies deprecation :count refs #2632
synopsebot Link: doc.perl6.org/type/IO::Path
Link: doc.perl6.org/type/Str
doc: 899e840cfe | (JJ Merelo)++ | doc/Type/Test.pod6
Adds description for is_approx

And also deprecation notice... Refs #2632.
synopsebot Link: doc.perl6.org/type/Test
AlexDaniel m: say <a b c d e>.flatmap({ $_ xx 2 }) 16:41
camelia (a a b b c c d d e e)
AlexDaniel m: say <a b c d e>.map({ $_ xx 2 }).flat
camelia (a a b b c c d d e e)
AlexDaniel m: say <a b c d e>.map({ slip $_ xx 2 })
camelia (a a b b c c d d e e)
AlexDaniel m: say <a b c d e>.map({ |($_ xx 2) })
camelia (a a b b c c d d e e)
AlexDaniel m: say flat <a b c d e>.map({ $_ xx 2 })
camelia (a a b b c c d d e e)
AlexDaniel m: say() <== flat() <== <a b c d e>.map({ slip $_ xx 2 }) 16:42
camelia (a a b b c c d d e e)
squashable6 🍕 JJ++ opened issue “Document environment variables for testing”: github.com/perl6/doc/issues/2637 16:45
16:45 mowcat joined, w17t joined
squashable6 🍕 JJ++ wrote a comment on “Checklist for 6.d”: github.com/perl6/doc/issues/2632#i...-468730347 16:46
🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 16:49
16:51 scimon left
squashable6 🍕 JJ++ wrote a comment on “Checklist for 6.d”: github.com/perl6/doc/issues/2632#i...-468732439 16:52
🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 16:53
🍕 AlexDaniel++ wrote a comment on “Checklist for 6.d”: github.com/perl6/doc/issues/2632#i...-468733351 16:55
🍕🍕🍕 First contribution by AlexDaniel++! ♥
16:57 mniip left
squashable6 🍕 JJ++ wrote a comment on “Checklist for 6.d”: github.com/perl6/doc/issues/2632#i...-468734716 16:59
🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 17:02
Geth doc: 64849995ee | (JJ Merelo)++ | doc/Type/Channel.pod6
Adds 6.d behavior refs #2632
synopsebot Link: doc.perl6.org/type/Channel
doc: 1697e0f7c6 | (JJ Merelo)++ | doc/Language/concurrency.pod6
Clarifies whenever thanks @AlexDaniel refs 2632
synopsebot Link: doc.perl6.org/language/concurrency
squashable6 🍕 Leont++ wrote a comment on “Checklist for 6.d”: github.com/perl6/doc/issues/2632#i...-468737420 17:07
🍕🍕🍕 First contribution by Leont++! ♥
17:09 pmurias left 17:13 ferreira joined
squashable6 🍕 JJ++ opened issue “Incongruous sentence in Channel.close”: github.com/perl6/doc/issues/2638 17:15
17:16 mniip joined, nekomune left 17:18 nekomune joined 17:21 sno joined
squashable6 🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 17:22
🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 17:31
Geth doc: 9cb4be7a95 | (JJ Merelo)++ | doc/Language/variables.pod6
Adds deprecation for (), thanks @leont, refs #2632
synopsebot Link: doc.perl6.org/language/variables
doc: a0b3055b9f | (JJ Merelo)++ | doc/Language/nativetypes.pod6
Adds clarification on native init, refs #2632
synopsebot Link: doc.perl6.org/language/nativetypes
17:33 leont left
jmerelo OK, I'll stick around, but no more commits for a while. Anyone wants a Camelia plush toy? Join the squashathon! 17:35
17:43 denis_ joined 17:48 denis_ left
timotimo oh, the squashathon is nao 17:51
jmerelo timotimo: right! 17:53
17:57 kurahaupo joined 18:03 eliasr left 18:14 ravenousmoose joined 18:17 molaf joined 18:31 ravenousmoose left 18:54 patrickb left 18:58 vike1 left 19:09 vike1 joined 19:15 patrickb joined 19:22 sauvin left 19:31 ravenousmoose joined 19:35 ravenous_ joined 19:36 kurahaupo left 19:37 kurahaupo joined 19:48 ferreira left 20:01 ExtraCrispy left, jmerelo left 20:02 ExtraCrispy joined, dct joined
discord6 <kawaii> beginner question: I have a race condition somehow between two synchronous routines, how do I go about debugging this? :] 20:04
<kawaii> well, two routines I think are synchronous.. 20:05
<kawaii> (they are both within a react/whenever block however
timotimo print debugging, lol 20:06
20:16 reach_satori joined
AlexDaniel kawaii: maybe you can show some code? 20:17
20:18 reach_satori_ joined, reach_satori left 20:19 kurahaupo left, kurahaupo joined 20:22 |oLa| left
vrurg Is there a switch which makes 'use fatal' the default? 20:22
discord6 <kawaii> AlexDaniel: here we go, pushed some code: github.com/kawaii/pd-keiken/blob/m...ken.p6#L37 my issue is that the grant-level-roles routine seems to execute before grant-experience has even finished, which I did not think possible 20:24
<kawaii> and then I end up with output like this bliantehshark gained 18 experience points! bliantehshark needs level NaN 5 is role ID 534153805441269761 10 is role ID 534153833404956683
<kawaii> it takes the NaN and decides to just assign the user ALL of the roles in the hash 20:25
20:28 cydf joined
discord6 <kawaii> (this is a situation where the user has 0 experience points, and therefore no entry in the database until grant-experience has finished, if that wasn't clear) 20:29
20:29 ferreira joined 20:32 netrino joined 20:33 cpage_ joined
AlexDaniel kawaii: this is weird 20:35
20:35 cpage left, cpage_ is now known as cpage
discord6 <kawaii> AlexDaniel: my code or the issue? ;} 20:36
AlexDaniel the issue
discord6 <kawaii> i'm correct in thinking these specific routines of my code are entirely synchronous right? there shouldn't be room for a race condition yet there it is 20:37
rindolf squashable6: status
squashable6 rindolf, 🍕🍕 SQUASHathon is in progress! The end of the event in 1 day and ≈17 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
AlexDaniel what does `next` do in that case?
squashable6 rindolf, Log and stats: gist.github.com/fa1eb37f87feee9f47...bf952f5107
timotimo vrurg: does -Mfatal work?
vrurg timotimo: No. 20:38
AlexDaniel kawaii: yes, you are correct, that's the point of `react` block
timotimo d'oh
discord6 <kawaii> AlexDaniel: the next there means to not proceed to the rest of the code
<kawaii> i.e. if they ran a command, catch it there and don't proceed to give them exp etc... 20:39
20:39 molaf left
AlexDaniel kawaii: does `next` work with whenevers? 20:39
vrurg timotimo: it's a tricky case. I'm trying to fix subsets and the warning comes from some core location.
I just can't find that location...
timotimo you can catch the warning and print a backtrace 20:40
m: sub check-it-out { CONTROL { Backtrace.new.full.say }; Str + Int }; check-it-out
camelia in code at SETTING::src/core/Backtrace.pm6 line 85
in method new at SETTING::src/core/Backtrace.pm6 line 85
in block at <tmp> line 1
in any at <tmp> line 1
in sub warn at SETTING::src/core/control.pm6 line 188
in method Numeri…
discord6 <kawaii> AlexDaniel: it seems to be doing what it is supposed to, if a message is prefixed with ! it is caught by the commands unit module and then other logic executes 20:41
vrurg timotimo: Doesn't work either. I'm working with S02-types/subset.t from specs and it's the only plave where I can install the CONTROL. but it didn't help. 20:42
vrurg is gonna bisect with debug prints now.
AlexDaniel kawaii: interesting… I don't think that is documented…
I also don't think that it works right 20:43
let me double check…
discord6 <kawaii> @altreus™ told me about it, he might know more than I do :]
AlexDaniel oh, it works, yeah 20:44
timotimo vrurg: you can try the debugserver! \o/
vrurg timotimo: CLI debugging? My all-time nightmare. 20:45
timotimo if you have Comma, you can do it with a gui
AlexDaniel so if you put `next` in a subroutine, it will either next a loop or next a whenever depending on where you call it xD
timotimo tbh the CLI of the debugserver client is ... really quite not so great
AlexDaniel jnthn: ↑ there's no way that could be a good idea, right? 20:46
timotimo but a whenever is a loop
discord6 <altreus™> perl5 warns you that you're nexting a loop that you're dynamically but not lexically in 20:47
timotimo oh, it does?
discord6 <altreus™> shouldn't use next in a subroutine because subroutines can be run from without a loop
<altreus™> It actually says exiting subroutine via next but it's the same set of circumstances 20:48
timotimo we don't have checked exceptions :P
discord6 <altreus™> ok back to recording
AlexDaniel m: sub foo() { next }; foo
camelia ===SORRY!===
next without loop construct
AlexDaniel well, what a shitty error message :)
discord6 <altreus™> @kawaii can haltingly explain things
AlexDaniel m: sub foo() { last }; foo
camelia ===SORRY!===
last without loop construct
timotimo that's a compile time error
i thought it would work out fine 20:49
i suppose it has to be inside a loop lexically
AlexDaniel timotimo: except that it's not
squashable6 🍕 coke++ opened issue “split spellcheck for code”: github.com/perl6/doc/issues/2639
🍕🍕🍕 First contribution by coke++! ♥
AlexDaniel rule of thumb: if you're seeing a SORRY without a line number, it's not a compile-time error :D
m: sub foo() { last }; say ‘compile-time my arse’; foo 20:50
camelia compile-time my arse
last without loop construct
timotimo d'oh
sorry about that
Geth doc: 65952caa4f | Coke++ | 2 files
learn new words
vrurg timotimo: No, I haven't got Comma yet. Waiting for the community edition to give it a try begore buying. 20:52
AlexDaniel but you don't need Comma for that 20:53
or am I missing something?
timotimo you do not
it just gives you a gui
AlexDaniel I remember debugging things successfully just using the command line
not the most convenient process, I admit, but it does work. Kinda wish somebody integrates it into emacs perl6-mode eventually
20:54 ravenousmoose left
AlexDaniel also definitely not too inconvenient 20:54
20:54 sortiz joined
AlexDaniel RT#130442 20:55
synopsebot RT#130442 [new]: rt.perl.org/Ticket/Display.html?id=130442 [REGRESSION] [LTA] redo without a loop no longer prints the line number, also claims it is a compile-time error (redo)
20:55 dct left, ravenous_ left
Geth ecosystem: 45dcebc869 | (Salvador Ortiz)++ (committed using GitHub Web editor) | META.list
Add NativeLibs to ecosystem

See github.com/salortiz/NativeLibs
20:56 ravenousmoose joined
AlexDaniel OK now that's R#2725 20:58
synopsebot R#2725 [open]: github.com/rakudo/rakudo/issues/2725 [LTA][regression] next/last/redo without loop constructs prints a bad error message
discord6 <kawaii> nice unintentional find there 21:06
21:10 pmurias joined 21:25 dct joined
guifa Okay okay so it’s not quite the same but …  21:41
guifa finally squashed an insanely annoying overly eager/greedy grammar bug in his module
21:42 dct left 21:45 zacts joined
AlexDaniel kawaii: let me know if you figure it out 21:46
it's likely an issue in your logic somewhere, not a problem in rakudo
but who knows
discord6 <kawaii> AlexDaniel: well, I'm now working on making my code safer to these NaN issues, I have a problem where both NaN || 0; and NaN // 0; return NaN and not the 0 I want though. :] 21:55
<kawaii> m: NaN || 0; 21:56
AlexDaniel m: say NaN || 0
camelia NaN
AlexDaniel m: say NaN.isNaN ?? 42 !! 0
camelia 42
discord6 <Rogue> NaN is truthy so it will do that
AlexDaniel m: my $x = NaN; say $x.isNaN ?? 42 !! $x
camelia 42
AlexDaniel m: my $x = 50; say $x.isNaN ?? 42 !! $x
camelia 50
AlexDaniel yeah you have to use isNaN
discord6 <Rogue> me no likey this: 21:57
<Rogue> m: say NaN == NaN
<Rogue> oh, the bot doesn't work with the bridge, right
<Rogue> anyway NaN != NaN but NaN === NaN 21:58
<kawaii> so something like if @xp[0] == NaN { return 0; }?
21:58 Ptolemarch joined 21:59 epony left
AlexDaniel m: say NaN == NaN 22:01
camelia False
AlexDaniel m: say NaN === NaN
camelia True
discord6 <Rogue> That rubs me very wrongly 22:03
AlexDaniel Rogue: why? 22:06
“Value identity operator.”
seems to be identical to me
discord6 <Rogue> == is the numeric equality operator, and NaN is a number in a sense (NaN ~~ Numeric, after all) 22:08
<Rogue> NaN == NaN ought to be true, and I frankly can't fathom what oddity is amking it false
<kawaii> return @xp[0] unless @xp[0].isNaN { return 0 }; pointer on where I'm going wrong here?
<Rogue> you can't have a block after an unless like that 22:09
<kawaii> I've used blocks after unless in the past though 🤔 is this somehow different? 22:10
MasterDuke Rogue: it's like nil in SQL. you can't do `where foo == null`, you have to do `where foo is null`
discord6 <Rogue> Are you against the ternary for any reason? Could do `return @xp[0].isNaN ?? @xp[0] !! 0;``
<kawaii> @Rogue first time I've come across it just now, however it still returns NaN apparently Directive d not applicable for type Num 22:13
<Rogue> Oh, oops, it should be the other way round
<Rogue> ... ?? 0 !! @xp[0] 22:14
Geth doc: f250c6c99d | Coke++ | doc/Type/IO/Path.pod6
remove stray ', syntax error
synopsebot Link: doc.perl6.org/type/IO::Path
masak Rogue: NaN should be unequal to itself according to the IEEE 754 spec.
Rogue: what's cool about Perl 6 is that it (correctly) distinguishes `==` (numerical identity) from `===` (actual identity)
so you don't get the typical problem where you can't even check against NaN 22:15
discord6 <kawaii> @Rogue hey that works! many thanks
<Rogue> Yeah, I get that and that's great, but still, it seems odd to have something of type Numeric have such counterintuitive behavior on a "numeric equality" operator 22:16
masak again, it's not Perl 6, it's IEEE 754. that's just how NaN is supposed to behave.
discord6 <Rogue> I do wonder about their rationale 22:17
masak and it makes some weird amount of sense too, because two arithmetical failures shouldn't compare as being the same failure
^ that's the rationale
discord6 <Rogue> I suppose so
masak that's also why there are many separate possible NaN values, of which NaN is just the privileged one
22:18 dct joined
masak m: say Inf - Inf; say 0 * Inf; say Inf - Inf == 0 * Inf 22:18
camelia NaN
masak I'd rather that comparison be False than True, to be honest 22:19
guifa The nice thing though is that if you don’t like it, you could always override the comparison :-)
masak just like if you don't enjoy the fact that 2 + 2 == 4... :P
m: multi infix:<+>(2, 2) { 5 }; say 2 + 2
camelia 5
masak grins evilly 22:20
discord6 <Rogue> Sneak that one into your next module