[00:09] *** hungryd61 left [00:13] *** hungrydonkey joined [00:39] *** MilkmanDan left [00:49] *** JRaspass left [00:49] *** cpan-raku left [00:50] *** cpan-raku joined [00:50] *** cpan-raku left [00:50] *** cpan-raku joined [00:51] *** sena_kun joined [00:53] *** Altai-man left [01:09] *** Tirifto left [01:11] *** MilkmanDan joined [01:27] *** MilkmanDan left [02:00] *** MilkmanDan joined [02:34] *** Cabanossi left [02:43] *** Cabanossi joined [02:47] *** MilkmanDan left [02:49] *** MilkmanDan joined [02:55] *** sena_kun left [02:56] ¦ advent: 47c574da12 | (Vadim Belman)++ | 20th/articles/rfc265.md [02:56] ¦ advent: Add RFC 265 [02:56] ¦ advent: review: https://github.com/Raku/advent/commit/47c574da12 [02:57] .seen jmerelo [02:57] vrurg, I saw jmerelo 2020-08-16T17:00:18Z in #raku: lizmat I think I'm going to disable that. It never works... [03:25] *** ensamvarg left [03:25] *** ensamvarg joined [03:26] *** DarthGandalf left [03:27] *** unclechu left [03:27] *** AlexDaniel` left [03:27] *** DarthGandalf joined [03:28] *** MasterDuke left [03:28] *** matiaslina left [03:29] *** CIAvash left [03:29] *** Nasrudin left [03:30] *** dataangel left [03:31] *** mowotter joined [03:33] *** CIAvash joined [03:33] *** mowcat left [03:38] *** cusion joined [03:40] *** AlexDaniel` joined [03:40] *** unclechu joined [03:40] *** matiaslina joined [03:40] *** Nasrudin joined [03:40] *** mowotter left [03:44] *** cusion left [03:59] *** xinming left [04:01] *** xinming joined [04:44] *** Black_Ribbon left [04:45] *** Black_Ribbon joined [04:48] *** rockxloose left [04:48] *** xelxebar left [04:48] *** tejr left [04:51] *** xelxebar joined [04:51] *** rockxloose joined [04:53] *** tejr joined [04:57] *** hungrydonkey left [04:58] *** hungrydonkey joined [05:33] *** sjm_uk left [05:45] *** cpan-raku left [05:46] *** cpan-raku joined [05:46] *** cpan-raku left [05:46] *** cpan-raku joined [05:46] *** bocaneri joined [05:48] *** bocaneri is now known as Sauvin [05:51] *** hungryd16 joined [05:51] *** hungrydonkey left [05:55] *** sjm_uk joined [05:59] *** xelxebar left [05:59] *** tejr left [05:59] *** rockxloose left [05:59] *** terminatorul left [06:03] *** xelxebar joined [06:05] *** tejr joined [06:05] *** rockxloose joined [06:06] *** dolmen joined [06:12] *** rindolf joined [06:12] *** skids left [06:32] *** hungryd16 left [06:32] *** hungrydonkey joined [06:34] *** hungrydonkey left [06:34] *** hungryd6 joined [06:47] *** dolmen left [06:47] *** MasterDuke joined [06:53] *** stoned75 joined [06:59] *** patrickb joined [07:13] ¦ ecosystem/master: 4 commits pushed by (Jack Kuan)++, (Juan Julián Merelo Guervós)++ [07:13] ¦ ecosystem/master: 0075757d7d | Add my Shell::DSL module to the list [07:13] ¦ ecosystem/master: 0e4e267e65 | Add my fork of the Fcntl module [07:13] ¦ ecosystem/master: 66ce04b06c | Remove Fcntl from the PR [07:13] ¦ ecosystem/master: c72d1191b7 | Merge pull request #524 from kjkuan/patch-1 [07:13] ¦ ecosystem/master: review: https://github.com/Raku/ecosystem/compare/4508ed1ec928...c72d1191b72f [07:22] *** Sgeo left [07:33] *** jdv79 left [07:33] *** jdv79 joined [07:34] *** hungrydonkey joined [07:34] *** hungryd6 left [07:38] Hello [07:49] *** dakkar joined [07:56] *** leont joined [08:07] *** MasterDuke left [08:11] m: say "a b c\td e f\ng h i".words [08:11] rakudo-moar 2db92e04f: OUTPUT: «(a b c d e f g h i)␤» [08:12] *** AlexDaniel` left [08:12] *** unclechu left [08:12] *** CIAvash left [08:12] *** matiaslina left [08:12] *** Nasrudin left [08:18] *** CIAvash joined [08:20] *** sno left [08:22] *** patrickb left [08:25] *** unclechu joined [08:25] *** AlexDaniel` joined [08:25] *** matiaslina joined [08:25] *** Nasrudin joined [08:32] *** finanalyst joined [08:35] *** sena_kun joined [08:51] *** Altai-man joined [08:52] *** sno joined [08:54] *** sena_kun left [09:00] is there a way of finding the attributes a method uses on its body? [09:01] or only with RakuAST? [09:24] do you think if Perl7 come it will eliminate Raku? [09:27] nah [09:27] not enough cool stuff in it :P [09:36] perl7 still needs to solve all the problems that perl 5 has [09:37] * [ptc] agrees with tadzik [09:38] too easy to mix binary data and text; no good concurrency story; no function signatures; weak built-in OO etc. [09:45] *** mniip left [09:58] *** Black_Ribbon left [10:58] *** benchable6 left [10:58] *** quotable6 left [10:58] *** greppable6 left [10:58] *** coverable6 left [10:58] *** statisfiable6 left [10:58] *** reportable6 left [10:58] *** releasable6 left [10:58] *** bloatable6 left [10:58] *** unicodable6 left [10:58] *** bisectable6 left [10:58] *** linkable6 left [10:58] *** squashable6 left [10:58] *** committable6 left [10:58] *** shareable6 left [10:58] *** tellable6 left [10:58] *** sourceable6 left [10:58] *** evalable6 left [10:58] *** nativecallable6 left [10:58] *** notable6 left [10:58] *** releasable6 joined [10:59] *** coverable6 joined [10:59] *** sourceable6 joined [10:59] *** bisectable6 joined [10:59] *** benchable6 joined [10:59] *** greppable6 joined [10:59] *** quotable6 joined [11:00] *** unicodable6 joined [11:00] *** statisfiable6 joined [11:00] *** tellable6 joined [11:00] *** linkable6 joined [11:01] *** committable6 joined [11:01] *** nativecallable6 joined [11:01] *** squashable6 joined [11:01] *** evalable6 joined [11:01] *** notable6 joined [11:01] *** bloatable6 joined [11:01] *** reportable6 joined [11:01] *** shareable6 joined [11:14] *** sno left [11:24] *** AlexDaniel left [11:25] *** mniip joined [11:34] *** finanalyst left [11:37] *** stoned75 left [11:43] *** sno joined [11:56] *** justsomeguy joined [12:04] *** stoned75 joined [12:05] *** finanalyst joined [12:13] *** justsomeguy left [12:22] *** hungrydonkey left [12:22] *** hungrydonkey joined [12:44] <[Coke]> is there a way in comma to check for a newer version? [12:46] [Coke], you mean plugin or standalone? [12:46] <[Coke]> the "complete" edition [12:47] <[Coke]> "comma CP" [12:47] Well, there is complete edition as a plugin for other jetbrains IDE and as an standalone IDE. [12:47] <[Coke]> standalone [12:48] But anyway, for the plugin I don't think there are ropes at all for it, and standalone Comma warns you there is a new version, or at least it should, yes. [12:48] <[Coke]> ah, check is always on? ok. [12:48] *** pmurias joined [12:48] * [Coke] wonders if it is worth fighting to see if cro works on mac yet. :| [12:48] Yeah. [12:49] andrzejku: Perl doing great would be awesome for Raku [12:49] Well, no idea about cro. :S [12:51] andrzejku: it's not very likely that it's possible to incrementally evolve Perl (the language) into something as cool as Raku [12:52] and the real question is, IMHO: since Perl 7 wants to be backwards incompatible with Perl 5, will there be a fork, and Perl 5 continued to be maintained? [12:52] *** sena_kun joined [12:52] if so: I'd like to suggest that Perl 7 gets a new name, ideally not starting with "Perl" :-) [12:52] been there, done that [12:53] moritz: talked with mst (on #perl) and he was hoping the backward incompatibility will be stopped [12:53] *** Altai-man left [12:54] anyway aren't major versions supposed to be a bit incompatible nowadays? [12:54] yes, and everybody struggles with that [12:55] <[Coke]> I am definitely interested to see how the p5 community deals with these questions 20 years after the last time we tried this. [12:56] there were reports in October of 2018 that 62% of websites on the Internet were still using PHP5, even though it was scheduled to EOL at end of 2018 [12:56] *** angelds joined [12:56] <[Coke]> I suspect they have an idea of certain things to avoid. [12:56] hard to find more up-to-date numbers, but it seems that php5 -> php7 wasn't such a huge success in terms of adoption [12:56] python2 -> python3 ... do I need to say more? [12:56] I really like Rust's "edition" approach (which actually shares a fair bit with how we use `use` with our letter versions) [12:57] moritz: aren't a lot of website unmaintained tho? [12:58] namely, that Rust keeps binary compatibility but can have backwards-incompatable syntax changes [12:58] pmurias: that's part of the problem [12:59] <[Coke]> read an article about the 5/7 switch where the author was concerned that if there wasn't a 'use v7' required, there would be problems with users trying to run 7 code in a 5 and getting unexpected results, which certainly sounded familiar. [12:59] (which doesn't let you change *everything* but lets you change a lot. It's basically what we'd have had if the plans to have a p5 mode had panned out) [12:59] *** epony left [13:00] *** zacts joined [13:00] coke: Yeah, I kind of think Racket had the right idea, by requiring all programs to start with `#lang Racket`. They can *always* change that [13:00] s/coke/[Coke]/ [13:00] *** epony joined [13:01] <[Coke]> I'm only [Coke] because someone took coke - no worries. :) [13:01] codesections: LOLCODE does even better, all programs start with "HAI 1.2" or so and such declare their version number [13:01] language version number, even [13:02] *** zacts left [13:02] moritz: Somehow, I feel like we'd have better luck with the pitch "we should all learn from Racket" than with "we should all learn from LOLCODE" :D [13:03] https://en.wikipedia.org/wiki/LOLCODE#Example_2 these examples always make me chuckle, and remind me of pmichaud++'s awesome talk where he gave rakudo (then perl6 on parrot) a LOLCODE backend :D [13:04] For some reason, it reminds me of emojicode (which, now that I think about it, would be pretty trivial to implement in Raku) https://www.emojicode.org/ [13:06] <[Coke]> the lolcode looks really familiar and I wonder if I have commits in that repo [13:07] *** angelds left [13:08] moritz: I'm legitimately jealous of the error handling in the Example 2 you linked. Handling errors like that (instead of with exceptions) is probably the biggest thing I miss when writing Raku [13:10] time for LOLRAKU! :D [13:11] * moritz is a bit jealous of python's "with" contextualizer [13:11] I wouldn't be surprised if Damian has already implemented it as a vim plugin or something :P [13:12] LOLRAKU - slogan: «-o LOLs» [13:12] tadzik: how are think with Warsaw.pm? [13:12] * moritz likes it [13:12] pmurias: ded [13:12] not just because of the pandemic either [13:13] tadzik: I don't understand how he can spend all day writing Raku and still find the inner willpower to drop back to Vimscript. Now *there's* a tough language to love! [13:13] the pandemic doesn't seem to be going anywhere soon :( [13:16] * pmurias would attend a meeting but doesn't do anything Perl/Raku related anymore [13:18] I don't do much either. I think most Warsaw.pm member's don't [13:18] *** raku-bridge left [13:18] *** raku-bridge joined [13:18] *** raku-bridge left [13:18] *** raku-bridge joined [13:19] NY.pm has fizzled as well [13:20] i think the last time we had regular meetings might have been 3 or 4 years ago [13:23] tadzik: this likely doesn't help the groups existence :( [13:23] pmurias: indeed:( [13:24] <[Coke]> Albany.pm is long gone. :| [13:28] Have any of y'all gone to that SF online meetup? [13:28] *** pmurias left [13:29] * moritz has been to some Germany.pm meetings [13:49] *** finanalyst left [14:12] *** sarna joined [14:13] hey, I want all the arguments to MAIN to be required - is there an easy way for that? [14:13] apart from a chain of `unless $foo.defined` [14:15] ! [14:15] how does one exclaim nothing... [14:15] m: sub f(:$named!) { say $named }; f [14:15] rakudo-moar 2db92e04f: OUTPUT: «Required named parameter 'named' not passed␤ in sub f at line 1␤ in block at line 1␤␤» [14:16] sarna ^^^ [14:16] sarna: look at signatures and stuff in the docs? [14:16] codesections: thanks! [14:16] jdv79: I searched for "required", nothing came up :( [14:18] hmm, i guess it doesn't surface well - https://docs.raku.org/type/Signature#Optional_and_mandatory_arguments [14:20] should've searched for "mandatory" :v [14:22] :) [14:35] *** AlexDaniel joined [14:35] *** AlexDaniel left [14:35] *** AlexDaniel joined [14:38] *** sarna left [14:40] *** lustlife joined [14:40] *** lustlife left [15:04] *** MilkmanDan left [15:04] *** MilkmanDan joined [15:15] *** Sgeo joined [15:19] This confuses me: [15:19] m: { POST { when ?True { False }}; 'foo'} [15:19] rakudo-moar 2db92e04f: OUTPUT: «WARNINGS for :␤Useless use of constant string "foo" in sink context (line 1)␤» [15:19] m: say { POST { when ?True { False }}; 'foo'} [15:19] rakudo-moar 2db92e04f: OUTPUT: «-> ;; $_? is raw = OUTER::<$_> { #`(Block|62789032) ... }␤» [15:19] grr [15:19] m: say { POST { when ?True { False }}; 'foo'}() [15:19] rakudo-moar 2db92e04f: OUTPUT: «foo␤» [15:20] *** skids joined [15:20] Why doesn't ^^^^ error? The POST condition is violated. Does `when` just not work with POST? Removing the (always true) `when` gets the error I wanted [15:21] m: say { POST { False }; 'foo'}() [15:21] rakudo-moar 2db92e04f: OUTPUT: «Postcondition '{ False }' failed␤ in block at line 1␤ in block at line 1␤␤» [15:38] *** finanalyst joined [15:55] *** terminatorul joined [15:56] *** MasterDuke joined [15:56] m: say do { POST { say "«$_»" }; 'foo' } [15:56] rakudo-moar 2db92e04f: OUTPUT: ««foo»␤foo␤» [15:56] Hello [15:57] m: say do { POST { when "foo" { say "yay" } default { say "nay" } }; 'foo' } [15:57] rakudo-moar 2db92e04f: OUTPUT: «5===SORRY!5=== Error while compiling ␤Strange text after block (missing semicolon or comma?)␤at :1␤------> 3say do { POST { when "foo" { say "yay" }7⏏5 default { say "nay" } }; 'foo' }␤» [15:57] m: say do { POST { when "foo" { say "yay" }; default { say "nay" } }; 'foo' } [15:57] rakudo-moar 2db92e04f: OUTPUT: «yay␤foo␤» [15:57] it seems that when works as intended [15:58] tobs: I think I actually figured that issue out, sort of: the `when` blocks in POST work as I expected, but only if you add an extra `{}` [15:58] I'd say your use of `when $bool-literal` doesn't do what you think [15:58] No, that's not it. Look: [15:59] m: say do { POST { when "foo" { say "yay"; False }; default { say "nay" } }; 'foo' } [15:59] rakudo-moar 2db92e04f: OUTPUT: «yay␤foo␤» [16:00] See, even though «yay» prints, the POST condition doesn't fail [16:00] m: say do { POST {{ when "foo" { say "yay"; False }; default { say "nay" } }}; 'foo' } [16:00] rakudo-moar 2db92e04f: OUTPUT: «yay␤Postcondition '{{ when "foo" { say "yay"; False }; default { say "nay" } }}' failed␤ in block at line 1␤ in block at line 1␤␤» [16:01] But, with the extra block inside the POST, it works [16:01] Which I *think* is a bug (POST not treating itself as a block for when purposes). Do you agree? [16:04] grmbl, it's certainly not nice. Normally a when block returns its last expression but something else (yes, probably POST) fails to pass that on. [16:04] I say as a complete layman [16:08] Is there a way for me to `use SQL-Linux` on Linux, and `use SQL-Windows` on Windows (and `SQL-Mac` on Mac), in the same file ? And end up using the same symbols, but from the right module ? [16:09] codesections: do you know `rakudo --target=ast`? If you want to get exposed to some internals and have some time to decipher the output, you could take a look at that. [16:12] terminatorul: the runtime version of `use` is called `require`. Determine the module name at runtime and then require the correct one. See https://docs.raku.org/language/modules#require [16:14] *** gnufr33dom left [16:16] except I don't know how to do the importing of symbols that use does, after require [16:25] terminatorul: there is a module on modules.raku.org. Named 'if' or something like this. [16:26] Yep, it's 'if': https://github.com/FROGGS/p6-if [16:27] tobs: The right implementation of system dependency should use a proxy-module. In this case one doesn't need to import symbols, it'd be ok to re-export them from, say, sub EXPORT. [16:28] Just don't forget to return a Map instance from EXPORT, not a Hash. [16:36] *** dakkar left [16:40] *** stoned75 left [16:42] *** stoned75 joined [16:46] *** melezhik joined [16:48] .tell dwarring: I've added "patch" for LibXSLT - https://github.com/melezhik/RakuDist/commit/3ee8d26b90ed6ffd2e189fe31a39c2b8c95cb192 , now it successfully tests on RakuDist - http://rakudist.raku.org/sparky/report/debian/655 [16:48] melezhik, I'll pass your message to dwarring [16:49] I am not sure if dwarring: is in raku/irc, but just noticed that someone tried to test LibXSLT on RkDist, so I assume it could be him :-))) [16:51] *** Altai-man joined [16:53] *** sena_kun left [17:14] *** Noisytoot joined [17:16] Thank you guys ! Can I find more about the proxy-module use ? [17:23] *** stoned75 left [17:27] *** stoned75 joined [17:31] terminatorul: proxy module is my term for a module which acts as a proxy for other modules. I.e. in your case it'd be SQL which would then load SQL::Linux or SQL::Windows and re-export their symbols. [17:32] Is there no way to have the specific module resolved at compile time please ? [17:32] greppable6: sub EXPORT [17:32] vrurg, 94 lines, 72 modules: https://gist.github.com/bec056f337ac012c65216ed096f88036 [17:33] terminatorul: see link to 'if' module above. [17:37] m: role R[::T] is T {}; R[Int] # should this work? [17:37] rakudo-moar 2db92e04f: OUTPUT: «5===SORRY!5=== Error while compiling ␤T does not support inheritance, so R cannot inherit from it␤at :1␤» [17:52] *** Black_Ribbon joined [18:05] *** melezhik left [18:09] *** MilkmanDan left [18:09] *** MilkmanDan joined [18:12] ¦ ecosystem: fooist++ created pull request #526: remove duplicate from META.list [18:12] ¦ ecosystem: review: https://github.com/Raku/ecosystem/pull/526 [18:22] *** Sauvin left [18:34] m: constant $a = constant $b = 42; say $a; say $b; [18:34] rakudo-moar 2db92e04f: OUTPUT: «5===SORRY!5=== Error while compiling ␤Variable '$b' is not declared␤at :1␤------> 3tant $a = constant $b = 42; say $a; say 7⏏5$b;␤» [18:35] apparently chained assignment doesn't work with constants ^^^^ :( [18:35] (Not a big deal, but a slight inconsistency/paper cut) [18:44] *** guifa` joined [19:02] *** ChoppedBacon left [19:09] *** ChoppedBacon joined [19:29] codesections: did my answer on SO make sense? [19:31] *** MilkmanDan left [19:31] guifa`: I _think_ so (and I just marked it as accepted) [19:31] I'd like to come back to it when I understand the internals a bit more/we have RakuAST [19:32] you said: «If your conditions are complex things like .is-prime and * %% 2, or even non-deterministic (smartmatching against a mutable object), it will either be difficult or impossible to know for sure.» [19:32] I don't _think_ that's right – or, at least, it seems like almost anything is Any [19:32] so the compiler could give up and make you handle all of Any [19:33] (in practice, that would mean requiring a `default {...}` case [19:33] ) [19:37] What I mean is if the comparison value is subject to change [19:37] perhaps [19:37] when Foo.status { ... } [19:37] I can't imagine why you would do it in that way, but if you do, the .status will vary [19:38] And might be different each time the given block is run [19:38] but the point of checking for exhaustive matching is that you've handled all possible values allowed by the return type constraint on Foo.status [19:39] (which, if not specified would be Any) [19:39] Unless it returns a Mu ;-) [19:40] well, fine :) but a `default` case would still handle that – it would just force you to have one, with the compiler there to remind you [19:41] (and, when you *have* constrained the return type of Foo.status, exhaustive pattern matching could be much more useful [19:41] I'd just use a default { die "WTF code needs fix kthxbye" } and save myself the trouble personally ;-) [19:41] * guifa` actually uses that in one of his parses lol [19:42] Like, maybe Foo.status returns a subset of Int that corrisponds to HTTP status codes that your code handles [19:42] *** sjm_uk left [19:42] If you add a new code to the subset, you have to remember to add it to the given/when construct [19:43] You could probably create a special when clause, and feed it some type of information about what to expect [19:43] and, if you forget and the status code is rare, you can end up with "WTF code needs fix kthxbye" errors in production :) [19:44] Yeah, that's kind of what I was thinking re: RakuAST. Or maybe it'd be a special type of `given` block? [19:44] err yeah, I meant givne block [19:44] so maybe [19:44] given-all $value, $range-description { … } [19:45] Hmm, I still think it'd be possible to do without the $range-description [19:46] and just have it be based on $value.WHAT [19:48] You'd want the range to describe needing all positive ints, all reals, etc. Subsets aren't very introspectable [19:49] «Subsets aren't very introspectable» is that a forever thing, or a NYI thing? [19:52] Subset constraints can include code of arbitrary complexity so... inasmuch as code can be introspected :-) [19:53] consider subset Positive of Int where * > 0 [19:55] There's (a) currently no way (that I know) to grab the constraint (beyond being an Int), but (b) if you could, it's a WhateverCode, so you'd need to pull that through, piece together how it works and… complicated lol [19:57] Perhaps I am under-thinking this (or ignoring huge performance issues), but why couldn't you just store the constraint as a string? [19:57] I mean you could [19:57] But what if the constraint is [19:58] where { $^i > 0 && $^i mod 8 < 4 && ($^i ** 3 - 1).is-prime } [20:00] :m subset Ugly where { $^i > 0 && $^i mod 8 < 4 && ($^i ** 3 - 1).is-prime }; my Ugly $a = -1 [20:00] m: subset Ugly where { $^i > 0 && $^i mod 8 < 4 && ($^i ** 3 - 1).is-prime }; my Ugly $a = -1 [20:00] rakudo-moar 2db92e04f: OUTPUT: «Type check failed in assignment to $a; expected Ugly but got Int (-1)␤ in block at line 1␤␤» [20:01] I'd rather that message be «Type check failed in assignment to $a; expected an Ugly where { $^i > 0 && $^i mod 8 < 4 && ($^i ** 3 - 1).is-prime } but got an Int (-1) [20:01] » [20:01] *** stoned75 left [20:01] Now *that* is one thing that where the error is LTA [20:02] The current one, or the one I suggested :D [20:02] The current error message [20:03] Yeah, that's all I meant by storing it as a string – which I know is just a minimum level of introspectability, but at least is something [20:08] *** Cabanossi left [20:13] *** stoned75 joined [20:15] *** Cabanossi joined [20:19] *** MilkmanDan joined [20:38] *** reach_satori_ left [20:47] Anything recommendedfor raku tidying, raku coverage, or counting lines of raku? [20:47] I recall that there's a convention for declaring a multi with Bool flag that changes its behavior, but I can't find a concise way to declare it [20:49] something where the callsite usage is, e.g., `greet('tom') # OUTPUT «Hi, Tom»` and `greet('tom', :loud) # OUTPUT: «HI TOM!»` [20:49] rir: there's the MVM_COVERAGE_LOG=foo.log env variable to get a coverage report. there's https://modules.raku.org/dist/Perl6::Tidy:cpan:JGOFF for tidying, but i've never used it [20:50] *** finanalyst left [20:50] But the only way that's occurring to me to declare that is with a signature like `multi greet($name, Bool :$loud where .so) {...}`, which seems far more verbose than what I recall seeing. What's the cleaner way to do it? [20:51] rir: I'm not familiar with anything, though I've also been currious [20:52] *** rindolf left [20:52] *** sena_kun joined [20:53] *** MilkmanDan left [20:53] *** Altai-man left [20:55] MasterDuke: Thanks, MVM_COVERAGE_LOG sounds promising. I got no joy from Perl6::Tidy. Or Perl6::Parser which seems, by docs, a precursor to a tidier. [20:55] codesections ^ [20:57] rir: iirc, you want to do something like foo.%d.log so multiple processes don't stomp all over each other. maybe it's %p? and Perl6::(Tidy|Parser) have suffered from the loss of drforr, but hopefully somebody can step up and adopt them [21:01] *** stoned75 left [21:02] codesections: maybe you saw `multi sub greet($name, :$loud!) { … }` but this candidate triggers when a loud named argument is mentioned, even if you pass `named => False`. The where clause using *.so is the only option I know at least. [21:02] *`loud => False` [21:03] *** terminatorul left [21:04] rir: re: counting lines of Raku – the two lines-of-code counters I tend to use (tokei and loccount) both count Raku lines of code but – frustratingly - neither detect Raku properly based on file extension. It'd be an easy PR for either project, though [21:05] tobs: Thanks, I bet that was what I saw [21:05] You could probably avoid the Bool bit by just doing :$loud! where True [21:06] I suppose a `subset Adverb of Bool where *.so; sub greet ($name, Adverb :$loud) { … }` could make it less noisy [21:06] tobs++ [21:06] Re coverage: Comma has some coverage support for tests I believe, but I haven't used it yet [21:06] guifa`: and it couldn't be `where True` because smartmatching [21:07] *** kensanata joined [21:07] I forgot about Boolean smartmatching being a bit unintuitive [21:07] and if the subset is called Adverb it should be :$loudly, of course :) [21:07] yeah, but at least the errors are clear [21:07] tobs++ [21:08] *** MilkmanDan joined [21:10] codesections: Thanks. I will check those out. 2 out of 3--line counter and coverage logger. Great! [21:12] tobs: guifa: Oooh, I know, I'll just add `Bool % where *.values.so` as a constraint to the proto signature, and then be able to use :$loud! or similar in the multis [21:13] (that'll break if I add other named parameters, but that's fine) [21:18] *** Mawile joined [21:22] *** squashable6 left [21:22] *** squashable6 joined [21:26] *** guifa` left [21:26] guifa`: Thanks, I'll look at Comma. I've been mired in 'too much to learn' and forgot all about it. [21:26] rir, I'll pass your message to guifa` [21:27] *** Mawile is now known as Archenoth [21:31] *** finanalyst joined [22:02] *** finanalyst left [22:03] *** kensanata left [22:23] *** mowcat joined [22:42] m: role A[::T] {has T $.a; method a(-->T) {$!a}}; A[Int].new(a => 1).a [22:42] rakudo-moar 2db92e04f: OUTPUT: «Type check failed for return value; expected T but got Int (1)␤ in method a at line 1␤ in block at line 1␤␤» [22:42] Why does ^^^ die? [22:42] *** zostay left [22:42] *** kawaii left [22:43] *** mithaldu_ left [22:43] *** peteretep left [22:43] *** Grinnz left [22:43] *** spycrab0 left [22:43] It looks like it's declaring the attribute $a to be of type T, and then asking for it back and guarenteeing that it's still of type T. But it's not a T anymore, somehow? [22:44] I think it's being wrapped in a Scalar, but I'm not sure why/how – and, oddly, adding `<>` to the method doesn't seem to help [22:47] This adds to my confusion here: [22:47] m: role A[::T] {has T $.a; method a() {dd $!a.VAR.WHAT; $!a}}; dd A[Int].new(a => 1).a.VAR.WHAT [22:47] rakudo-moar 2db92e04f: OUTPUT: «Scalar␤Int␤» [22:48] *** spycrab0 joined [22:48] It looks like $!a is a Scalar right _before_ it's returned, a Scalar _when_ it's returned (which is what caused the error before), but an Int as soon as it has been returned. [22:48] Is there some sort of auto-scalarization/de-scalarization going on here that I don't know about? [22:51] *** Grinnz joined [22:51] *** peteretep joined [22:54] *** mithaldu_ joined [22:54] *** kawaii joined [22:56] Oh, wait, I just read camelia's error message and now I understand (in partial defense, I get a different msg in my local REPL). [22:56] *** zostay joined [22:56] It's just that the T := Int binding doesn't last long enough for the return value check. I get it. [22:59] *** epony left [23:03] *** epony joined [23:12] *** aborazmeh joined [23:12] *** aborazmeh left [23:12] *** aborazmeh joined [23:14] *** MilkmanDan left [23:16] *** MilkmanDan joined [23:18] *** squashable6 left [23:19] *** squashable6 joined [23:19] *** squashable6 left [23:21] *** squashable6 joined [23:22] *** MilkmanDan left [23:27] <[Coke]> m: role A[::T] {has T $.a; method a(-->T) {$!a}}; A[Rat].new(a => 1).a [23:27] rakudo-moar 2db92e04f: OUTPUT: «Type check failed in assignment to $!a; expected Rat but got Int (1)␤ in block at line 1␤␤» [23:30] *** MasterDuke left [23:35] *** MilkmanDan joined [23:56] m: role A[::T] {has T $.a; method a(-->T) {$!a}}; A[Rat].new(a => 1/1).a [23:56] rakudo-moar 2db92e04f: OUTPUT: «Type check failed for return value; expected T but got Rat (1.0)␤ in method a at line 1␤ in block at line 1␤␤» [23:57] (related: Why do I get the much less helpful error msg «Died with X::TypeCheck::Return» when I run that code locally? Odd)