[00:01] *** stmuk_ left [00:07] *** w_richard_w joined [00:08] *** enheh_ left [00:08] *** enheh_ joined [00:15] *** hythm_ joined [00:20] *** kurahaupo_ joined [00:20] *** hythm_ left [00:22] *** kurahaupo left [00:28] *** comborico1611 left [00:28] *** skids joined [00:34] *** stmuk_ joined [00:36] *** stmuk left [00:41] *** raschipi joined [00:43] *** wamba left [00:53] :) [00:59] *** markong left [01:17] *** molaf left [01:18] *** raschipi left [01:26] *** llfourn left [01:29] *** molaf joined [01:34] *** epony left [01:39] *** Kaiepi left [01:39] *** Kaiepi joined [01:40] *** MasterDuke joined [01:45] *** ilbot3 left [01:56] *** ilbot3 joined [01:56] *** ChanServ sets mode: +v ilbot3 [01:56] *** pilne left [01:57] *** Zoffix left [02:01] *** aborazmeh joined [02:01] *** aborazmeh left [02:01] *** aborazmeh joined [02:17] *** _28_ria left [02:53] *** hythm_ joined [02:54] p6: my %h1 = a => { b => True }, c => { d => True }, e => { f => True, g => True }; my %h2 = c => { d => False }, h => { i => True }, e => { f => False }; my %h3 = %h2 »=» %h1; say %h3; [02:54] rakudo-moar 91ae5efca: OUTPUT: «{c => {d => True}, e => {f => True}, h => {i => (Any)}}␤» [02:57] is it possible to merge two hashes, %h1 and %h2, combining the keys recursively, with %h2 values overwriting %h1 if keys are same?,,, for the above output, %h3 should be: %h3 a => { b => True }, c => { d => False }, e => f => False, g => True }, h => { i => True } [03:01] *** aborazmeh left [03:02] m: my %h1 = a => { b => True }, c => { d => True }, e => { f => True, g => True }; my %h2 = c => { d => False }, h => { i => True }, e => { f => False }; my %h3 = %h1, %h2; say %h3 [03:02] rakudo-moar 91ae5efca: OUTPUT: «{a => {b => True}, c => {d => False}, e => {f => False}, h => {i => True}}␤» [03:03] hm. that loses 'g' [03:04] It has a inner hash [03:05] wondering if hyper operator can help in this case, I tried a few ways but I could not make it work [03:07] *** _28_ria joined [03:12] *** _28_ria left [03:19] *** mcmillhj joined [03:22] *** psychoslave joined [03:24] *** mcmillhj left [03:40] *** MasterDuke left [03:41] *** Qwerasd joined [03:41] *** hythm_ left [03:42] Hey, is there some kind of wizardry that would allow me to see what parameters a callable accepts? [03:42] Like programmatically. [03:44] *** eliasr left [03:57] Nvm got it, Block.signature [04:09] *** skids left [04:11] *** AlexDaniel is now known as AlexDaniel`` [04:11] *** AlexDaniel`` is now known as AlexDaniel [04:18] *** AlexDaniel`` joined [04:22] *** ryn1x left [04:30] *** psychoslave left [04:37] *** psychoslave joined [04:50] *** curan joined [05:10] *** jmerelo joined [05:11] *** curan left [05:12] *** curan joined [05:15] ¦ doc: 224a0bcf01 | (JJ Merelo)++ | doc/Language/testing.pod6 [05:15] ¦ doc: Completes preamble to fix compilation errors [05:15] ¦ doc: [05:15] ¦ doc: Fixes #2055 [05:15] ¦ doc: review: https://github.com/perl6/doc/commit/224a0bcf01 [05:15] Link: https://doc.perl6.org/language/testing [05:21] *** wamba joined [05:23] *** wamba left [05:24] *** sauvin joined [05:24] *** wamba joined [05:54] *** domidumont joined [05:55] *** troys left [05:56] ¦ doc: bc8b41d69d | (JJ Merelo)++ | doc/Language/variables.pod6 [05:56] ¦ doc: Adds info on possible distro names closes #2054 [05:56] ¦ doc: review: https://github.com/perl6/doc/commit/bc8b41d69d [05:56] ¦ doc: b0ac6c8771 | (JJ Merelo)++ | doc/Language/variables.pod6 [05:56] ¦ doc: Changed anchors and added a few missing ones [05:56] Link: https://doc.perl6.org/language/variables [05:56] ¦ doc: review: https://github.com/perl6/doc/commit/b0ac6c8771 [05:57] squashable6: status [05:57] jmerelo, Next SQUASHathon in 7 days and ≈4 hours (2018-06-02 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day [05:58] *** domidumont left [05:59] *** domidumont joined [06:02] *** shareable6 left [06:14] *** HaraldJoerg joined [06:22] *** jmerelo left [06:23] *** wamba left [06:35] *** stmuk joined [06:38] *** stmuk_ left [06:39] *** darutoko joined [06:49] *** robertle joined [06:50] *** psychoslave left [06:51] *** psychoslave joined [06:56] *** xtreak joined [06:57] *** wamba joined [07:01] *** rindolf joined [07:03] *** jmerelo joined [07:03] o/ [07:05] *** wamba left [07:08] *** wamba joined [07:13] *** epony joined [07:28] *** Guest14918 left [07:28] *** SHODAN joined [07:28] *** DarthGandalf joined [08:06] Another SO question with a problem I bumped into today https://stackoverflow.com/questions/50524378/element-membership-and-identity [08:06] m: say (1,1) === (1,1) [08:06] rakudo-moar afbbf8f82: OUTPUT: «False␤» [08:06] Related to that above, but also to how set membership works. [08:09] *** pmmmm left [08:09] my $a = (1,1); $a === $a => true [08:09] === is more about pointer equality [08:09] (1,1) eqv (1,1) => true [08:09] note I know little of what I speak, but I had the same sort of structural comparison question (two Bufs) and solved it with eqv [08:09] *** stmuk_ joined [08:10] donpdonp: that seems to be the case; the problem is that set membership seems to be using that instead of eqv or == [08:10] So the strange behavior I point to in the SO question occurs... [08:12] *** stmuk left [08:12] *** wamba left [08:13] *** stmuk joined [08:15] *** stmuk_ left [08:15] ¦ doc: 169d2127db | (JJ Merelo)++ | doc/Language/math.pod6 [08:15] ¦ doc: Adds exact Rational arithmetic [08:15] ¦ doc: review: https://github.com/perl6/doc/commit/169d2127db [08:15] ¦ doc: 34ec3dcb0c | (JJ Merelo)++ | doc/Language/math.pod6 [08:15] ¦ doc: Adds approximate equality, refs #114 [08:15] Link: https://doc.perl6.org/language/math [08:15] ¦ doc: review: https://github.com/perl6/doc/commit/34ec3dcb0c [08:15] ¦ doc: d670de3250 | (JJ Merelo)++ | 2 files [08:15] ¦ doc: Adds content to the sequences section [08:15] ¦ doc: [08:15] ¦ doc: Also learns new words. Refs #114 [08:15] ¦ doc: review: https://github.com/perl6/doc/commit/d670de3250 [08:21] *** xtreak left [08:30] *** eiro left [08:39] How do I print an error in a catch block? [08:40] nvm [08:42] *** kurahaupo_ is now known as kurahaupo [08:44] Qwerasd: inside a catch block? [08:44] Figured it out that it was placed in $_ rather than $! [08:45] Qwerasd: right. It's contextualized, so you can access it via $_ or using .say, for instance. [08:46] *** andrzejku joined [08:48] *** andrzejku_ left [08:54] *** andrzejku_ joined [08:56] *** ChoHag left [08:56] How can I remove an element from an array when looping through it with a for loop? [08:57] *** ChoHag joined [08:57] *** andrzejku left [09:02] *** wamba joined [09:04] Qwerasd, using slice [09:04] How do I do that with like for @array -> $elem {} [09:05] sorry, splice [09:05] Qwerasd, no, it would not work in that form [09:05] How would I do that though? I don't have the index. [09:05] Using while I think [09:05] I don't really want to use the long c-style for loop if I don't have to. [09:07] It's UB in Perl 6 that remove element from Array you are iterating [09:07] UB? [09:07] yeah, I think [09:08] undefined behavior, you must heard it from C [09:12] Qwerasd: how big is the array? Can't you just use grep? [09:12] or map [09:13] I just bit the bullet and used loop(;;) [09:13] right, that will work [09:13] Qwerasd: what's wrong with just 'loop { }' ? [09:14] loop(;;) and in loop(my $i = 0; $i < @arr.elems; $i++) [09:14] as in* [09:20] *** Guest9472 is now known as Altreus [09:20] *** Altreus is now known as Guest72158 [09:32] *** Qwerasd left [09:32] *** Guest72158 is now known as Altreus [09:33] *** domidumont left [09:40] *** eliasr joined [09:43] New CPAN upload: Test-Declare-0.0.2.tar.gz by DARRENF http://modules.perl6.org/dist/Test::Declare:cpan:DARRENF [09:48] *** w_richard_w left [10:10] *** wamba left [10:12] *** ZzZombo joined [10:14] *** ryn1x joined [10:18] *** ZzZombo left [10:33] ¦ doc: e29fe251a2 | (JJ Merelo)++ | 2 files [10:33] ¦ doc: Eliminates link to code [10:33] ¦ doc: [10:33] ¦ doc: Rewrites paragraph to show clearly the nature of these values. Closes #2054. [10:33] ¦ doc: [10:33] ¦ doc: Also reflows that paragraph (ref #2056) (and some others) and makes some typographic [10:33] ¦ doc: changes, changing to periods and capitalizing where needed. [10:33] ¦ doc: review: https://github.com/perl6/doc/commit/e29fe251a2 [10:37] *** ZzZombo joined [10:44] *** wamba joined [10:46] m: Uni.new(x2000).NFC.list.base(16) [10:46] rakudo-moar 7e3aa2f22: OUTPUT: «5===SORRY!5=== Error while compiling ␤Undeclared routine:␤ x2000 used at line 1␤␤» [10:47] m: Uni.new(0x2000).NFC.list.base(16) [10:47] rakudo-moar 7e3aa2f22: OUTPUT: «No such method 'base' for invocant of type 'Seq'. Did you mean any of these?␤ Hash␤ asec␤ hash␤ race␤␤ in block at line 1␤␤» [10:49] m: say Uni.new(0x2000).NFC.list.base(16) [10:49] rakudo-moar 7e3aa2f22: OUTPUT: «No such method 'base' for invocant of type 'Seq'. Did you mean any of these?␤ Hash␤ asec␤ hash␤ race␤␤ in block at line 1␤␤» [10:50] m: say Uni.new(0x2000).NFC.list [10:50] rakudo-moar 7e3aa2f22: OUTPUT: «(8194)␤» [10:50] m: say Uni.new(0x2000).NFC.list>>.base(16) [10:50] rakudo-moar 7e3aa2f22: OUTPUT: «(2002)␤» [10:53] m: say Uni.new(0x2000).NFC.list.map(*.base(16)); [10:53] rakudo-moar 7e3aa2f22: OUTPUT: «(2002)␤» [10:55] m: say Uni.new(0x2000 .. 0x200A).NFC.list.map(*.base(16)); [10:55] rakudo-moar 7e3aa2f22: OUTPUT: «(2002 2003 2002 2003 2004 2005 2006 2007 2008 2009 200A)␤» [10:57] say Uni.new(0x2000) [10:57] tbrowder_, rakudo-moar 7e3aa2f22: OUTPUT: «Uni:0x<2000>␤» [11:07] *** markong joined [11:11] *** skids joined [11:15] ¦ doc/master: 4 commits pushed by (JJ Merelo)++ [11:15] ¦ doc/master: cf8f0c3292 | Reformats styleguide paragraphs to #2056 and #2057. [11:15] ¦ doc/master: 5046aa3e54 | A bit of paragraph wrapping and typo changes [11:15] ¦ doc/master: 3b07e78a2c | Adds a rule on text itself in pod files. [11:15] ¦ doc/master: 9037f4c533 | Discouragement of implementation-specific docs added to STYLEGUIDE. [11:15] ¦ doc/master: review: https://github.com/perl6/doc/compare/e29fe251a2f6...9037f4c53381 [11:18] *** domidumont joined [11:19] *** squashable6 left [11:20] *** squashable6 joined [11:20] *** ChanServ sets mode: +v squashable6 [11:21] *** wamba left [11:36] *** skids left [11:42] *** [Sno] joined [11:42] *** natrys joined [11:44] *** itaylor57 joined [11:44] *** sno left [11:49] ¦ doc: e3182d93cf | (JJ Merelo)++ | 2 files [11:49] ¦ doc: Fleshes out system file [11:49] ¦ doc: review: https://github.com/perl6/doc/commit/e3182d93cf [11:49] *** benjikun left [11:51] *** benjikun joined [11:54] *** jmerelo left [11:58] *** mcmillhj joined [12:01] *** psychoslave left [12:14] *** mcmillhj left [12:26] *** jmerelo joined [12:30] *** SteffanW joined [12:35] *** margeas joined [12:36] *** markong left [12:50] m: say $*ARGFILES.filename; [12:50] rakudo-moar 7e3aa2f22: OUTPUT: «No such method 'filename' for invocant of type 'IO::ArgFiles'␤ in block at line 1␤␤» [12:51] *** psychoslave_ joined [12:51] *** markong joined [12:51] m: $*AGFILES.^methods(:local) [12:51] rakudo-moar 7e3aa2f22: ( no output ) [12:52] m: say $*AGFILES.^methods(:local) [12:52] rakudo-moar 7e3aa2f22: OUTPUT: «(DESTROY AT-POS AT-KEY defined handled Capture Int Num Numeric Set SetHash Bag BagHash Mix MixHash mess sink self CALL-ME FALLBACK STORE new Bool Str gist perl exception backtrace BUILDALL)␤» [12:52] m: say $*AGFILES.^name [12:52] rakudo-moar 7e3aa2f22: OUTPUT: «Failure␤» [12:52] ARG [12:52] m: say $*A$GFILES.^name [12:52] rakudo-moar 7e3aa2f22: OUTPUT: «5===SORRY!5=== Error while compiling ␤Two terms in a row␤at :1␤------> 3say $*A7⏏5$GFILES.^name␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement mod…» [12:52] moritz: yes :-) [12:52] :D [12:52] m: say $*ARGFILES.^name [12:52] rakudo-moar 7e3aa2f22: OUTPUT: «IO::ArgFiles␤» [12:52] m: say $*ARGFILES.^methods(:local) [12:52] rakudo-moar 7e3aa2f22: OUTPUT: «()␤» [12:52] m: say $*ARGFILES.^methods [12:52] rakudo-moar 7e3aa2f22: OUTPUT: «(write on-switch lines encoding IO t slurp-rest seek path out-buffer opened handles getc flush words split slurp readchars put printf print-nl open gist print nl-in perl native-descriptor eof comb DESTROY tell say read next-handle new get chomp lock M…» [12:52] *** margeas left [12:53] at least I noticed that I was confused :) [12:53] Related to this: https://github.com/perl6/doc/issues/2058 [12:53] It's probably path... [12:53] Instead of filename, I guess... [12:54] m: say $*ARGFILES.path; [12:54] rakudo-moar 7e3aa2f22: OUTPUT: «IO::Special.new("")␤» [12:56] ¦ doc: 4ae64b89f2 | (JJ Merelo)++ | doc/Language/5to6-perlvar.pod6 [12:56] ¦ doc: :zap: filename → path closes #2058 [12:56] ¦ doc: review: https://github.com/perl6/doc/commit/4ae64b89f2 [12:56] Link: https://doc.perl6.org/language/5to6-perlvar [13:01] *** jmerelo left [13:04] *** curan left [13:05] *** MilkmanDan left [13:05] *** margeas joined [13:06] *** MilkmanDan joined [13:06] *** markong left [13:18] *** skids joined [13:23] New CPAN upload: Net-servent-0.0.1.tar.gz by ELIZABETH https://cpan.metacpan.org/authors/id/E/EL/ELIZABETH/Perl6/Net-servent-0.0.1.tar.gz [13:25] *** ChoHag left [13:52] Inside a class that is an Array, can I use shortcuts for self like $.foo etc, but for accessing elements of the array? $.[0] doesn't seem to work [13:53] you could give the invocant a shorter name by putting it into the signature [13:57] *** itaipu joined [14:00] *** lucasb joined [14:15] I wonder if this lines were removed: https://github.com/rakudo/rakudo/blob/master/src/Perl6/Grammar.nqp#L2147-L2150 [14:15] then $.[5] would be possible [14:17] and what would that mean ? [14:18] same as self.[5] [14:18] inside Positional classes [14:19] hmmm... [14:20] Hmm I'll just use self for now :) [14:21] m: class Test is Array { method test(\S: $a) { S[$a] } }; Test.new(1, 2, 3).test(1) [14:21] rakudo-moar 847d3d60b: ( no output ) [14:21] m: class Test is Array { method test(\S: $a) { S[$a] } }; say Test.new(1, 2, 3).test(1) [14:21] rakudo-moar 847d3d60b: OUTPUT: «2␤» [14:21] jkramer: does that make things better? [14:23] timotimo: I don't really need to save those bytes :) I just assumed $.[0] would work since .[0] with $_ does and I was curious [14:23] m: class Test is Array { method test($_: $a) { .[$a] } }; say Test.new(1, 2, 3).test(1) [14:23] rakudo-moar 847d3d60b: OUTPUT: «2␤» [14:23] you can have it your way :D [14:23] Unrelated question: are there words for the directions of diagonals? Like / (top-right to bottom-left) and \ (top-left to bottom-right) [14:24] yes! I compiled a list of those aliases! haha [14:24] just a sec [14:26] diagonal names: [14:26] [\] main, major, principal, primary, leading [14:26] [/] anti, minor, counter, secondary, trailing [14:26] Ha, wonderful :D Thanks! [14:26] naming things is hard [14:29] *** wamba joined [14:37] *** AlexDaniel` left [14:41] *** ZzZombo left [14:44] *** mahafyi joined [14:55] *** Luneburg joined [14:55] Does perl6 have a Fibonacci function in the standard library? [14:55] .tell Qwerasd `for @arr.kv -> $i, $_ { @arr.splice($i,1) when 5 }` [14:55] b2gills: I'll pass your message to Qwerasd. [14:56] m: .say for 1, 1, * + * ... *; # no need, it is easy to create a Fibonacci sequence [14:57] rakudo-moar 847d3d60b: OUTPUT: «(timeout)1␤1␤2␤3␤5␤8␤13␤21␤34␤55␤89␤144␤233␤377␤610␤987␤1597␤2584␤4181␤6765␤10946␤17711␤28657␤46368␤75025␤121393␤196418␤317811␤514229␤832040␤1346269␤2178309␤3524578␤5702887␤9227465␤…» [14:57] Is there a variant of zip/Z that works on partials? So when one lists is shorter than the other it still continues [14:57] jkramer: roundrobin [14:57] b2gills: Thanks [14:58] b2gills: Sweet, thanks! [15:06] *** margeas is now known as markong [15:06] *** wamba left [15:07] *** Azry joined [15:14] *** SteffanW left [15:21] *** robertle left [15:24] *** rindolf left [15:25] m: my $sequence = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGCC";loop (my $i = 0; $i <= $sequence.chars; $i++) { say $sequence[$i];} [15:25] rakudo-moar 847d3d60b: OUTPUT: «AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGCC␤Index out of range. Is: 1, should be in 0..0␤ in block at line 1␤␤» [15:26] Is there any way to loop through a string? [15:26] you want substr, not indexing [15:26] a Str is a single entity, not a fake list [15:26] what you really want is .comb, it looks like [15:26] or that, yes [15:28] geekosaur: Thanks, what does .comb actually do though? I can see it adds spacing between the characters? [15:29] Without arguments it returns a list of the single characters [15:29] that's just how a list is rendered by default. it explodes the Str into a list of characters [15:30] Thanks ;) [15:31] you can use .perl to see what the value actually looks like, or use "dd" instead of "say" to get even more internal detail (usually too much unless you're debugging) [15:31] m: say "abc".comb.perl [15:31] rakudo-moar 847d3d60b: OUTPUT: «("a", "b", "c").Seq␤» [15:31] *** mahafyi left [15:31] *** jmerelo joined [15:32] (Seq is a read-only, one-shot list; saves memory and garbage collection time for most ephemeral lists) [15:34] Luneburg: rather than `loop (my $i = 0; $i <= $sequence.chars; $i++) {…}` use `for 0..$sequence.chars -> $i {…}` or better yet in this case `for $sequence.comb { say $_ }` [15:34] *** domidumont left [15:35] m: say "abcdefghijklmnop".comb(3).perl [15:35] rakudo-moar 847d3d60b: OUTPUT: «("abc", "def", "ghi", "jkl", "mno", "p").Seq␤» [15:35] also a very useful feature of comb [15:35] Basically you should almost never use `loop (;;)`, as you are probably doing something that is easier done another way. [15:42] *** zacts joined [15:43] *** margeas joined [15:45] *** sjn joined [15:46] *** markong left [15:46] *** raschipi joined [15:58] *** kst joined [15:59] *** psychoslave_ left [16:15] *** cosimo left [16:21] *** ChoHag joined [16:25] *** Kaiepi left [16:25] *** Kaiepi joined [16:27] *** Kaiepi left [16:28] *** Kaiepi joined [16:28] *** Kaiepi left [16:29] *** Kaiepi joined [16:29] *** Luneburg left [16:51] *** raynold joined [16:59] *** pilne joined [17:08] *** markong joined [17:09] *** rindolf joined [17:10] *** margeas left [17:14] ¦ doc/master: 5 commits pushed by (JJ Merelo)++ [17:14] ¦ doc/master: d93a61e3a4 | Finishes section on CLI refs #114 [17:14] ¦ doc/master: 4a8a288489 | Reformatting native call for shorter lines [17:14] ¦ doc/master: c76c2d05ad | Reformats for shorter lines [17:14] ¦ doc/master: 214347cdaf | Adds links to @lizmat's p5 modules [17:14] ¦ doc/master: 08ecc2fc1d | Finishes first full version of the system interaction page. [17:14] ¦ doc/master: review: https://github.com/perl6/doc/compare/4ae64b89f202...08ecc2fc1da3 [17:15] ¦ doc: 4a162095c8 | (JJ Merelo)++ | 3 files [17:15] ¦ doc: Finishes first full version of the system interaction page. [17:15] ¦ doc: [17:15] ¦ doc: Refs #114. It's rather brief and not (never) perfect, but it's a good [17:15] ¦ doc: guide on how to interact with the system. I'll check this page now and [17:15] ¦ doc: move on to the next one. [17:15] ¦ doc: review: https://github.com/perl6/doc/commit/4a162095c8 [17:18] *** markong left [17:19] *** margeas joined [17:20] *** domidumont joined [17:21] releasable6: status [17:21] jmerelo, Next release in ≈22 days and ≈1 hour. 1 blocker. 0 out of 19 commits logged (⚠ 9 warnings) [17:21] jmerelo, Details: https://gist.github.com/7729c6305faa4a4dea325cfc1f7ff713 [17:22] So we have a new version... [17:23] *** sjoshi joined [17:25] *** athenot left [17:26] *** athenot joined [17:28] *** ChoHag left [17:30] mm [17:30] didn't know that [17:32] *** natrys left [17:33] let's spin some packages on travis and see how it goes :) [17:34] *** enheh_ left [17:35] *** enheh_ joined [17:38] *** sjoshi left [17:39] *** sjoshi joined [17:39] *** ChoHag joined [17:46] *** markong joined [17:47] whenever you want to call methods on a new anonymous state var, you have to wrap it in parentheses, right? like ($).foo, (@).bar and (%).baz [17:48] because otherwise it would be interpreted as calls to the object/class the code is inside: $.foo, @.bar, %.baz [17:48] *** margeas left [17:49] lucasb: say what? [17:49] I didn't see any other idiom to do that, you get to create one. [17:49] *except* when the call is a subscripts, like @.[...] or %.{...}, %.<...>, in this case you are calling on the anonymous state var [17:49] lucasb: is that documented? [17:50] jmerelo: which part? :) [17:50] why would you use anonymous vars if you reference the later? Is there an added value there? [17:50] lucasb: well, pretty much everything... [17:51] ok, let me conclude, then I go back to the raised issues :D [17:52] What I'm suggesting is that syntax like @.[42] %.{'key'}, %. be changed to mean access to the current object/class the code is within [17:52] m: $.foo [17:52] rakudo-moar 847d3d60b: OUTPUT: «5===SORRY!5=== Error while compiling ␤Variable $.foo used where no 'self' is available␤at :1␤------> 3$.foo7⏏5␤ expecting any of:␤ term␤» [17:53] lucasb: $.foo is syntactic sugar for self.foo [17:53] obviously, *if* the objects are of the type Associative and Positional, etc. [17:53] that's probably the reason why you have to put the () around, to disambiguate [17:53] jmerelo: you are correct. the same way @.foo and %.foo also are [17:54] jmerelo: correct. and I want that to stay the same [17:54] in things like @.[42] %.{'key'}, %., it should be required to put () around too! [17:55] (@).[42] (%).{'key'}, (%). if you want to access the anonymous state var, otherwise let this syntax mean access to the current self object [17:56] lucasb: so what you are saying is try to extend that same criterium to other "bracketing" things, so that $. == self whenever possible. [17:56] yes, exactly :) [17:56] so @.[42] would be self[42] if that makes any sense. [17:57] except that there's a problem with "$." being the old P5 special var, so I took it out of the examples [17:57] lucasb: OK, it's not a documentation problem then :-), although it might be good if you open an issue with some example where disambiguation needs to be done. [17:57] lucasb: old p5 special vars are not really a problem. [17:58] lucasb: maybe you should open a discussion in the rakudo repo, after checking what the specification says about that. If it's not specced, it might be reasonably argued. [18:01] *** Zoffix joined [18:01] AlexDaniel++ samcv++ # release [18:01] AlexDaniel++ samcv++ and the rest of the team [18:02] lucasb: why add a gazillion variants of some cryptic syntax? Especially one that's close to anon vars. [18:02] Reminds me of a joke I heard on Twitter: "Perl 6 is what happens when the answer to every bikeshedding session is: 'Let's do both!'" [18:03] Zoffix: now that you mention twitter... https://twitter.com/jjmerelo/status/1000069722224852992 [18:03] jmerelo: what am I looking at? [18:04] Zoffix: the official extraofficial announcement of perl 6 2018.05 [18:05] Zoffix: my suggestion would make things more orthogonal than they currently are [18:05] lucasb: and especially one that's close to attribute syntax that isn't entirely trivial for newcomers to understand. It's quite a lot of mental processing required to discern $. between anon state var, attribute access or just a method call on self. [18:05] Zoffix: I mean, if you're looking at that Twitter URL. [18:05] I don't know why folks use $.foo syntax for non-attribute method calls. Seems like a good way to confuse the reader [18:07] well, maybe folks have a usecase, since self.foo is different from $.foo :) [18:08] They are contextualizers, right? $.foo is $(self.foo), @.foo is @(self.foo), %.foo is %(self.foo) [18:08] m: class { method foo { 1,2,3 }; method bar { self.foo } }.bar.perl.say [18:08] rakudo-moar 847d3d60b: OUTPUT: «(1, 2, 3)␤» [18:08] m: class { method foo { 1,2,3 }; method bar { $.foo } }.bar.perl.say [18:08] rakudo-moar 847d3d60b: OUTPUT: «$(1, 2, 3)␤» [18:09] lucasb: because it's not just %.. It's also %»., %».+, %».*, %».+, %.&bar and dozens more variants. Which of those would mean `self` and which would mean a static anon? Or will you now force all static var use to use parens? [18:10] *** sjoshi left [18:10] *** markong left [18:10] In fact, when $.+foo syntax was being argued for, I said, no don't add it, because then we'll start going insane. And here we are, proposing more things. And how many people used $.+foo syntax? One? [18:10] I'm suggesting only method-ish calls [18:10] lucasb: why the omission then? [18:11] This is all special casing: %. works, but only (as you earlier said) `self` is an Associate and now only with "method-ish" calls, which I don't even know the definition of. [18:12] currently, %. always means (%). [18:12] currently, $.foo always means $(self.foo) [18:13] I'm not suggesting *if and only if* classes are Positional, Associative, etc. [18:13] "it's not just %.. It'sit's not just %.. It's also %»., %».+, %».*, %».+, %.&bar and dozens more variants" <-- that's what I meant with a big language some days ago :) [18:13] The syntax should be invariant [18:14] mst: would you be able to add a link to our second logger to the /topic of #perl6-dev #moarvm #perl6-toolchain : http://colabti.org/irclogger/irclogger_logs/perl6 or give one of the non-op regulars ops so they could do it themselves? [18:15] uhh [18:15] *** markong joined [18:15] it ... seems to be in /topic ? [18:15] mst: I think it's three different links actually: http://colabti.org/irclogger/irclogger_logs/perl6-dev http://colabti.org/irclogger/irclogger_logs/moarvm and http://colabti.org/irclogger/irclogger_logs/perl6-toolchain but the logger people want us to add to the topic before they start logging [18:15] AlexDaniel: right? [18:16] mst: only in this channel, but not in #perl6-dev, #moarvm, and #perl6-toolchain [18:16] ah [18:16] *** ChanServ sets mode: -v ilogger2 [18:17] correct, this channel is fine [18:18] Zoffix: right, you now have access to all four to do '/msg chanserv op' [18:18] mst++ thanks [18:18] mst++ [18:18] and I stole #moarvm from diakopter and gave jnthn perms there too [18:18] if anybody wants anybody else adding, just shout [18:19] actually [18:19] * mst adds AlexDaniel to all four [18:19] thanks [18:19] AlexDaniel: well volunteered, my main objective here is that if your bots go nuts you can kick/ban/unban them etc. [18:20] thanks for the well wishing of the release :) [18:22] u: butterfly [18:22] Zoffix, U+1F98B BUTTERFLY [So] (🦋) [18:22] u: abnteh [18:22] AlexDaniel, Found nothing! [18:23] hm, was it always that fast? [18:23] *** ChanServ sets mode: +o Zoffix [18:23] *** Zoffix changes topic to: »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! 🦋 [18:23] *** Zoffix sets mode: -o Zoffix [18:23] (just added 🦋 after "unicode is our friend") [18:24] Did it work? Doesn't show up right in the irc logs (and I don't see those chairs in my terminal) [18:24] I mean chars [18:24] But I don't see any chairs either [18:24] shows up correctly: http://colabti.org/irclogger/irclogger_log/perl6?date=2018-05-25#l494 [18:24] looks fine here [18:25] cool [18:25] *** sauvin left [18:25] but yeah, not here: https://irclog.perlgeek.de/perl6/2018-05-25#i_16206699 [18:27] *** espadrine_ joined [18:30] *** Kaiepi left [18:30] *** Kaiepi joined [18:30] ⑁⑁⑁⑁ [18:31] u: ⑁ [18:31] raschipi, U+2441 OCR CHAIR [So] (⑁) [18:32] *** Azry left [18:32] *** Azry joined [18:32] *** kurahaupo left [18:34] *** Zoffix left [18:34] *** kurahaupo joined [18:35] ¦ doc: 6c41a4b120 | (JJ Merelo)++ | 2 files [18:35] ¦ doc: Start rewriting of the hashmap language page [18:35] ¦ doc: [18:35] ¦ doc: Follows #1682 advice of moving the top-heavy part of the Hash type to [18:35] ¦ doc: this page. That part has been rewritten in similarity to Array, by [18:35] ¦ doc: making references to its general behavior using parallelisms between [18:35] ¦ doc: them. This also goes towards fulfillment of the roadmap #114 [18:35] ¦ doc: review: https://github.com/perl6/doc/commit/6c41a4b120 [18:44] *** Azry left [18:44] *** Azry joined [18:47] *** ilogger2 joined [18:47] *** ChanServ sets mode: +v ilogger2 [18:51] ¦ doc: a484eb9149 | (JJ Merelo)++ | doc/Language/hashmap.pod6 [18:51] ¦ doc: Reflows and adds maps info where necessary [18:51] ¦ doc: [18:51] ¦ doc: Since this document now talks about hashes *and* maps, some sentences [18:51] ¦ doc: must include them. Refs #1682. [18:51] Link: https://doc.perl6.org/language/hashmap [18:51] ¦ doc: review: https://github.com/perl6/doc/commit/a484eb9149 [18:54] *** ilogger2 joined [18:54] *** ChanServ sets mode: +v ilogger2 [18:57] IRC logging is a huge privacy nightmare; I might have to stop doing that if the GDPR really hits [18:59] :( [19:00] moritz: it strikes me that I've had immense use of the IRC logs over the years. mille grazie [19:01] masak: my pleasure. So far I don't have concrete plans to shut them down, but... [19:02] there are so many unsolved problems [19:02] * GDPR requires explicit consent before processing data. Getting consent from every IRC user is simply impossible [19:02] * It's not clear if nick names automatically consistitute personally identifiable information [19:03] * It's not clear to me how to process requests for data removal without destroying the whole context of a conversation [19:03] right [19:04] on the plus side, I'm not logging any IP addresses [19:04] are you allowed to mark in some way if a conversation has had messages removed? [19:04] I'm pretty sure I do [19:05] so I could replace all removed messages with nickname (removed) and line (removed) [19:05] I wonder what Matrix folks figured out regarding GDPR and their freenode bridge [19:05] it gets really murky if somebody has messages (partially) bounced off of bots [19:05] but through that bridge you can't get messages from before you joined the channel [19:06] I'm not logging any IP addresses --> You're required to do that by Brazillian law, btw [19:06] The GDPR could potentially affect even bots [19:07] If you somehow log whoever is asking and what they asked... [19:07] rrrrrrrrrrrrrrrrrrriight [19:07] raschipi: how charming :-) [19:07] quotable6 actually caches irc logs… [19:08] fwiw on the webserver side I delete the last octet of IPs in the logs [19:09] But Freenode is the one required, not people that archive the messages. [19:09] (and the last 4 bytes for IPv6 addresses) [19:09] * masak .oO( we're letting you know that your processing^Wprivacy is important to us ) [19:10] *** comborico1611 joined [19:10] Anonymity is forbidden by the constitution in Brazil. [19:11] is that why they fought with WhatsApp? [19:11] I find it sadly amusing that nations call themselves republics when they don't even pretend to be. At least in America, we pretend to be a republic. [19:12] Well, not specifically using the Constitution directly, but the laws implement the constitutional mandate saying they need to point which IP adress said what and when. [19:13] With the IP number and the timestamp, after a WHOIS, you can go to the ASN and they need to point which customer it came from. [19:14] s/ASN/AS/ [19:14] ... unless there's a NAT inbetween [19:21] Well, if the ISP keeps the NAT, they need to keep records. If the client has it, that will narrow the investigation to a very small area. And it doesn't deal with a VPN and much less Tor. [19:23] But most people aren't that sofisticated and they regularly inprison people for what they said on the internet. [19:25] https://translate.google.com/translate?sl=auto&tl=en&js=y&u=https%3A%2F%2Fcbncuritiba.com%2Fpreso-em-operacao-de-combate-crimes-na-internet-e-velho-conhecido-da-policia%2F [19:25] At least they don't jail people for their political opinions like the UK does. [19:30] raschipi: hehe, daora topar com outros brasileiros aqui. que legal que vc tbm curte P6 :) [19:31] Outro zuca é o SmokeMachine [19:32] \o/ [19:37] *** |Sno| joined [19:40] *** wamba joined [19:59] *** MasterDuke joined [20:14] m: sub got ( $x where ^10) { say $x.perl } ; got "1" ; [20:14] rakudo-moar 847d3d60b: OUTPUT: «"1"␤» [20:14] m: sub got ( $x where ^10) { say $x.perl } ; got "2" ; [20:14] rakudo-moar 847d3d60b: OUTPUT: «Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Str ("2")␤ in sub got at line 1␤ in block at line 1␤␤» [20:15] m: sub got ( $x where ^10) { dd $x } ; got "1" ; [20:15] rakudo-moar 847d3d60b: OUTPUT: «Str $x = "1"␤» [20:15] m: sub got ( $x where ^10) { dd $x } ; got "2" ; [20:15] rakudo-moar 847d3d60b: OUTPUT: «Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Str ("2")␤ in sub got at line 1␤ in block at line 1␤␤» [20:21] m: sub got ( $x where ^10) { dd $x } ; got(2) ; [20:21] rakudo-moar 847d3d60b: OUTPUT: «Int $x = 2␤» [20:21] m: sub got ( $x where ^10) { dd $x } ; got "0" ; [20:21] rakudo-moar 847d3d60b: OUTPUT: «Str $x = "0"␤» [20:21] m: sub got ( $x where ^10) { dd $x } ; got 11 ; [20:21] rakudo-moar 847d3d60b: OUTPUT: «Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Int (11)␤ in sub got at line 1␤ in block at line 1␤␤» [20:27] *** Herby_ joined [20:27] \o [20:31] o/ [20:33] m: sub got ( $x where ^10) { dd $x } ; got split(/\,/,"1,1")[0] ; [20:33] rakudo-moar 847d3d60b: OUTPUT: «Str $x = "1"␤» [20:33] m: sub got ( $x where ^10) { dd $x } ; got split(/\,/,"2,1")[0] ; [20:33] rakudo-moar 847d3d60b: OUTPUT: «Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Str ("2")␤ in sub got at line 1␤ in block at line 1␤␤» [20:34] is this odd? [20:37] m: say "9" ~~ ^10 [20:37] rakudo-moar 847d3d60b: OUTPUT: «False␤» [20:37] m: say 9 ~~ ^10 [20:37] rakudo-moar 847d3d60b: OUTPUT: «True␤» [20:37] i don't find it terribly odd [20:37] you can have a coercive type constraint in the signature, though [20:37] m: sub got ( Int() $x where ^10) { dd $x } ; got split(/\,/,"2,1")[0] ; [20:37] rakudo-moar 847d3d60b: OUTPUT: «2␤» [20:38] m: say "9" == ^10 [20:38] rakudo-moar 847d3d60b: OUTPUT: «False␤» [20:38] oh, i don't think i saw correctly [20:38] m: say 9 == ^10 [20:38] rakudo-moar 847d3d60b: OUTPUT: «False␤» [20:38] say "1" ~~ ^10 [20:38] timotimo, rakudo-moar 847d3d60b: OUTPUT: «True␤» [20:38] yeah, that is kind of weird [20:38] say "2" ~~ ^10 [20:38] timotimo, rakudo-moar 847d3d60b: OUTPUT: «False␤» [20:38] s: ^10, "ACCEPTS", ("2") [20:38] timotimo, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Range, Str, Str); none of these signatures match:␤ ($thing, Str:D $method, Capture $c)␤ ($thing, Str:D $method)␤ (&code)␤ (&code, Capture $c)␤ in block at -e line 6␤␤ [20:38] s: ^10, "ACCEPTS", \("2") [20:38] timotimo, Sauce is at https://github.com/rakudo/rakudo/blob/847d3d60b/src/core/Range.pm6#L429 [20:39] not "1" before 0 [20:39] oops, sorry [20:39] in the signature, the right side is an int [20:39] oooh, where is eq not == [20:39] no, where is ~~ [20:40] m: say not "1" after 10 [20:40] rakudo-moar 847d3d60b: OUTPUT: «True␤» [20:40] m: say not "2" after 10 [20:40] rakudo-moar 847d3d60b: OUTPUT: «False␤» [20:40] m: say "01234567890".comb.grep(^6) [20:40] rakudo-moar 847d3d60b: OUTPUT: «(0 1 2 3 4 5 0)␤» [20:41] is it lexicographical sorting that messes this up? [20:41] m: say "01234567890".comb.grep(45..69) [20:41] rakudo-moar 847d3d60b: OUTPUT: «(5 6)␤» [20:41] looks like [20:41] that looks a lot like a trap [20:43] i have seen a few example that use $x where ^10 to check an int 0..10, but in a case where I split a string and pass to method it's not happy [20:44] yeah, it's doing lexicon comparison [20:44] the numbers have to come after 0 but before 10 in the lexicon, but 10 comes before 2 [20:45] so the only numbers that would fit in ^10 would be 0 and 1 [20:45] https://github.com/rakudo/rakudo/blob/master/src/core/Any.pm6#L498-L504 [20:46] in p5 it was always clear the operater coerces the arguments [20:46] before and after always do str comparison [20:46] should they have different multis for doing different comparisons? [20:47] aren't before and after DWIM comparisons? [20:47] leg and friends always do str comparison [20:47] well, 'cmp' is Stringy [20:47] s: &infix:, \(1, 2) [20:47] timotimo, Sauce is at https://github.com/rakudo/rakudo/blob/847d3d60b/src/core/Order.pm6#L46 [20:48] oops, sorry, mixed with Perl 5 [20:48] i was about to say [20:48] :) [20:50] I think this multi get selected for this case: https://github.com/rakudo/rakudo/blob/master/src/core/Order.pm6#L10-L13 [20:51] and so, ends up being Stringy comparison [20:51] s: &infix:, \(1, "2") [20:51] timotimo, Sauce is at https://github.com/rakudo/rakudo/blob/847d3d60b/src/core/Order.pm6#L15 [20:51] s: &infix:, \("2", 1) [20:51] timotimo, Sauce is at https://github.com/rakudo/rakudo/blob/847d3d60b/src/core/Order.pm6#L22 [20:51] *** Kaiepi joined [20:51] is there a numberic version of where in the signature? [20:51] actually, the two below it, but it comes out the same way [20:52] you can use the coercion type i showed above [20:52] m: sub got ( Int() $x where ^10) { dd $x } ; got split(/\,/,"2,1")[0]; [20:52] rakudo-moar 847d3d60b: OUTPUT: «2␤» [20:52] this one [20:53] timotimo: yes but that is not obvious from the docs on signatures or the examples [20:54] "where" uses smartmatch semantics, so you have to search for that [20:54] if there isn't a link from "where" to "smartmatch" that's worth an issue in the issue tracker [20:57] * ktown reads https://docs.perl6.org/type/Signature again [20:57] The where clause doesn't need to be a code block, anything on the right of the where-clause will be used to smart-match the argument against it. So you can also write: [20:57] that's where the link is [20:58] https://docs.perl6.org/language/operators#infix_~~ [20:58] though i'd even say it should link to ACCEPTS instead? [20:58] huh [20:58] that only handles ranges overlapping [20:58] that seems like a major oversight [20:59] When smart-matching a Range of integers with a Cool (string) the ACCEPTS methods exploits the before and after operators in order to check that the Cool value is overlapping the range: [20:59] down around the "sub can-turn-into" stuff [21:06] not sure what part of that is relevant here [21:09] in javacript you need parseInt because there is no hint for the coercion. p5 never had that issue. But here I passed a string to an Int comparison and got an error sometimes (0 and 1 are special) [21:10] smartmatch is not int comparison, it's dwim comparison [21:10] yes... [21:10] i love how you can pretty well do whatever you want with roles https://hastebin.com/cezazuyeja.pl [21:10] if you want it a different way, you can also have "where 0 <= * < 10 [21:11] " in the signature [21:11] that will be a numeric comparison and that will work as you expect it to [21:13] yah, that would be the note to add to the docs to force a numeric range comparison the "where ^10" or "where 0..10" did not do what I expected [21:15] I always thing "10" is a string but 10 is an int but in this case it's not [21:16] *think [21:16] it is surprising to have string comparison there, yeah [21:17] *** raschipi joined [21:17] *** Herby_ left [21:20] m: 10 ~~ "10" [21:20] rakudo-moar 847d3d60b: ( no output ) [21:20] m: say 10 ~~ "10" [21:20] rakudo-moar 847d3d60b: OUTPUT: «True␤» [21:21] i'm not completely (just mostly) crazy [21:23] I don't see why Numeric.ACCEPTS or Range.ACCEPTS can't convert strings to numbers before testing them. [21:25] *** ChoHag joined [21:31] They know their own type... [21:37] Maybe infix:(Real, Any) should do numeric comparison and infix:(Any, Real) should do string comparison. IOW, do different things depending on the type of the first operand. [21:37] they way they are now, both do string comparison, regardless of the order of the operands [21:38] *the way [21:38] But ~~ doesn't use cmp, does it? [21:39] iiuc, in this case it does [21:41] The documentation says they first coerce the arguments to numeric, then do numeric comparisson. If they just call cmp between the operands, that should be pointed out, I think. [21:42] Then what cmp does is another question, currently it prefers string comparisson as was pointed above. Is it supposed to be a transitive operator? [21:46] do you mean transitive or symmetric? :) [21:46] transitive too [21:47] ¦ doc: d0fbecd26c | (Ben Davies)++ | doc/Language/js-nutshell.pod6 [21:47] ¦ doc: Fix some redundancy in JS nutshell bitwise operators section [21:47] ¦ doc: review: https://github.com/perl6/doc/commit/d0fbecd26c [21:47] Link: https://doc.perl6.org/language/js-nutshell [21:47] hmm, dunno [21:48] is there a negation/toggle operator for Order values? More->Less, Less->More, Same->Same ? [21:49] m: say -More [21:49] rakudo-moar 847d3d60b: OUTPUT: «-1␤» [21:49] Yes, negate it [21:50] Oh, already answered [21:51] ok, works, but lost the enum value [21:51] *type [21:56] m: say Order(-More) [21:56] rakudo-moar 847d3d60b: OUTPUT: «Less␤» [21:58] right :) [21:59] so, I guess I can say that 'cmp' is symmetric in the sense that "A cmp B" is equivalent to "OrderNegation(B cmp A)" [22:00] if it did different types of comparison depending on the type of the first operand, the above property wouldn't hold true anymore [22:45] *** Sgeo joined [22:48] *** Sgeo_ joined [22:51] *** Sgeo left [23:02] *** margeas joined [23:04] *** markong joined [23:07] *** margeas left [23:09] *** margeas joined [23:10] *** markong left [23:11] *** markong joined [23:13] *** margeas left [23:16] *** bwisti joined [23:19] *** stmuk_ joined [23:29] *** margeas joined [23:30] *** markong left [23:34] *** ChoHag left [23:35] *** ryn1x joined [23:37] *** go|dfish joined [23:42] *** n0tjack joined [23:50] *** n0tjack left [23:56] *** wamba left