This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:37 Heptite left 01:44 teatwo left 02:11 teatime left, teatime joined 02:53 teatwo joined 02:56 teatime left 08:01 samebchase left 08:30 ab5tract left 09:01 snonux left 09:26 snonux joined 11:21 MasterDuke left
guifa xt is one convention. I've been categorizing my types of tests in some of my modules. t/ for installation tests, t-perf/ for internal performance tests that aren't testing accuracy, etc 13:11
Anton Antonov @guifa I started using “xt/” more extensively after watching your presentation in the Perl&Raku conference in Texas. (I think.) 13:32
I forgot or missed “t-perf”. 13:33
Basically, for the module “WWW::OpenAI” all tests are in “xt/” — not “t/” — because it is too presumptions to think that users should spent money on running tests. 13:34
guifa I read xt as "exten[ded|sive] tests", so basically an entire roast suite 13:39
Using t-perf, etc, is just my own personal convention. Automated suites should ignore them since they're only expecting t or xt 13:41
14:15 habere-et-disper joined 14:18 teatwo left 14:19 teatwo joined 14:40 habere-et-disper left 15:23 Heptite joined
Anton Antonov 👍 16:18
16:24 deadmarshal_ left 16:37 snonux left, deadmarshal_ joined 16:59 habere-et-disper joined 17:31 habere-et-disper left 17:42 snonux joined 18:31 MasterDuke joined 19:13 habere-et-disper joined 19:19 deoac joined 19:20 habere-et-disper left
deoac I am creating a module, with a proper META6.json file.  Yet, $?DISTRIBUTION is not defined?  Why would that be? 20:22
Nemokosch hm, in a rakumod file? 20:41
deoac No, it's in the executable that uses the rakumod file.  The executable is in bin/ 21:35
Nemokosch I can imagine that doesn't know $?DISTRIBUTION 21:49
after all, $?DISTRIBUTION is a compile-time variable - and mere raku files don't get precompiled 21:53
deoac Ah, I see.  Thank you. 22:35
How would I specify a return value which is a Liist of two Rats? 22:36
Nemokosch in what sense? 22:40
deoac sub foo ( --> ???) { my \@retval = (1, 2); } 22:52
guifa subset TwoItemList of List where .elems == 2; sub foo (\x --> TwoItemList) { return x }; say foo (1,2); say foo (1,2,3); 23:02
m: subset TwoItemList of List where .elems == 2; sub foo (\x --> TwoItemList) { return x }; say foo (1,2); say foo (1,2,3);
camelia (1 2)
Type check failed for return value; expected TwoItemList but got List ((1, 2, 3))
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
guifa notice the first one works because (1,2) is a two item list, but (1,2,3) doesn't
deoac  Ah, the power of subsets.  Thank you. 23:07
23:07 Manifest0 left
guifa I believe the intention is for return types to eventually allow where clauses, but they are NYI 23:09
m: sub foo (-->Int where * > 1) { return 5 } 23:10
camelia ===SORRY!=== Error while compiling <tmp>
Cannot do non-typename cases of type_constraint yet
at <tmp>:1
------> sub foo (-->Int where * > 1⏏) { return 5 }