This channel is intended for people just starting with the Raku Programming Language ( Logs are available at
Set by lizmat on 8 June 2022.
00:38 Manifest0 left 02:13 tea3po joined 02:14 tea3po left, tea3po joined 02:17 teatwo left 02:50 Heptite left 03:58 tea3po left, tea3po joined 05:47 tea3po left 05:49 teatime joined 05:52 teatwo joined 05:54 teatime left 08:01 kjp left, kjp joined 08:45 ab5tract joined 09:22 habere-et-disper joined 09:34 ab5tract left, ab5tract joined 09:56 Manifest0 joined 10:12 habere-et-disper left 11:16 ab5tract left 11:39 Heptite joined 11:41 jaguart joined 11:50 Heptite left 12:23 human_blip joined 12:27 lucs_ joined 12:38 lucs left 12:40 human-blip left 12:56 jaguart left 13:38 habere-et-disper joined
habere-et-disper Is -Ofun in the docs somewhere (I couldn't find it). I understand the meaning to come from compiler optimization. Who coined it? 13:39
lucs I think Audrey Tang came up with that, possibly around the time when the Haskell implementation of the language began (2004 or something). 13:42
Audrey had two genius ideas, unheard of at the time as far as I can tell, when for that Haskell project: 13:45
First: you want to commit to the Git repo? No problem, we'll let you.Anyone could get a commit bit, no questions asked. 13:46
Second: you're not much of a coder? No problem, write tests to match the specification to the best of your understanding. 13:47
habere-et-disper Thanks lucs_ ! The more you know. :-) 13:49
lucs You're welcome, and keep having -Ofun 🙂
14:05 Heptite joined 14:14 tea3po joined 14:17 teatwo left 14:18 KOTP joined 15:15 deoac joined 16:27 habere-et-disper left
deoac How do I create a signature for `sub foo` which will be called by both `foo test` and `foo Test` 17:31
lizmat create a subtype, and use that in the signature 17:32
that's currently the only way that I know of
unless you meant "test" and "Test" as strings ?
deoac Yes, I meant them as Strings 17:34
lizmat m: sub a($a where *.lc eq 'test') { dd }; a 'test'; a 'TEST' 17:37
camelia sub a($a where { ... })
sub a($a where { ... })
deoac But your subset idea works great!  Thank you.
lizmat m: sub a($a where *.lc eq 'test' | 'Test') { dd }; a 'test'; a 'TEST'
camelia sub a($a where { ... })
sub a($a where { ... })
lizmat m: sub a($a where * eq 'test' | 'Test') { dd }; a 'test'; a 'TEST' 17:38
camelia sub a($a where { ... })
Constraint type check failed in binding to parameter '$a'; expected anonymous constraint to be met but got Str ("TEST")
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
deoac m: subset Test of Str where * ~~ /:i ^ test $/; sub a(Test) {dd}; a 'test'; a 'TEST' 17:41
camelia sub a(Test)
sub a(Test)
lizmat deoac: that's effectively the same as where *.lc eq 'test' 17:43
but if you find your version easier to read, by all means :-)
deoac Ah, very nice 17:44
18:54 habere-et-disper joined 19:49 tea3po left, teatwo joined 20:41 Heptite left 20:42 Heptite joined 21:00 teatwo left 21:02 teatime joined 22:17 habere-et-disper left
gfldex m: subset Ttest where 'test'|'Test'; sub foo(Ttest --> True) {}; say foo(<test Test>.all); 22:35
camelia all(True, True)
22:43 Heptite left