🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:21 wamba left
cj okay. I've got the latest perl6. 00:23
$ perl6 --version
This is Rakudo version 2019.07.1 built on MoarVM version 2019.07.1
[DBIish] # Connect failed with error Cannot locate symbol 'mysql_init' in native library ''
still erroring out
00:53 wildtrees left 01:34 Kaiepi left 01:35 Kaiepi joined
vrurg cj: if you're still around... Looks like it can't find libmysqlclient 01:38
tyil according to github.com/perl6/advent/issues/16 I have to ask someone with access to the advent calendar to grant me access so I can schedule my advent articles on there 01:49
01:54 rbt joined 02:54 evalable6 left, unicodable6 left, bloatable6 left, reportable6 left, squashable6 left, tellable6 left, coverable6 left, shareable6 left, greppable6 left, nativecallable6 left, committable6 left, notable6 left, benchable6 left, statisfiable6 left, releasable6 left, quotable6 left 02:55 squashable6 joined, nativecallable6 joined, coverable6 joined, evalable6 joined 02:56 reportable6 joined, quotable6 joined, notable6 joined, greppable6 joined, unicodable6 joined 02:57 releasable6 joined, benchable6 joined, bloatable6 joined, statisfiable6 joined, shareable6 joined, tellable6 joined 02:58 committable6 joined 03:18 hythm joined 04:18 coverable6 left, shareable6 left, releasable6 left, notable6 left, unicodable6 left, committable6 left, nativecallable6 left, greppable6 left, quotable6 left, benchable6 left, statisfiable6 left, squashable6 left, reportable6 left, bloatable6 left, unicodable6 joined, benchable6 joined, nativecallable6 joined, statisfiable6 joined 04:19 notable6 joined, coverable6 joined, reportable6 joined, greppable6 joined 04:20 quotable6 joined, shareable6 joined, committable6 joined, bloatable6 joined, releasable6 joined 04:21 squashable6 joined
ZzZombo m: for ^4 { say ++$_ } 04:33
camelia Cannot resolve caller prefix:<++>(Int:D); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)
(Int:D $a is rw --> Int:D)

The following do not match for other reasons:
(Bool $a is rw)
(M…
ZzZombo m: for ^4 -> $_ is rw{ say ++$_ } 04:34
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed parameter
at <tmp>:1
------> 3for ^4 -> $_ is rw{ say ++$_ }7⏏5<EOL>
expecting any of:
constraint
ZzZombo m: for ^4 -> $_ is rw { say ++$_ }
camelia Parameter '$_' expected a writable container, but got Int value
in block <unit> at <tmp> line 1
ZzZombo m: for my $a -> $_ is rw { say ++$_ } 04:35
camelia 1
ZzZombo m: for my $a -> $_ { say ++$_ }
camelia Cannot resolve caller prefix:<++>(Any:U); the following candidates
match the type but require mutable arguments:
(Mu:U $a is rw)

The following do not match for other reasons:
(Bool $a is rw)
(Int:D $a is rw --> Int:D)
(M…
Xliff_ m: for ^4 -> $_ is raw { say ++$_ } 04:36
camelia Cannot resolve caller prefix:<++>(Int:D); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)
(Int:D $a is rw --> Int:D)

The following do not match for other reasons:
(Bool $a is rw)
(M…
Xliff_ m: for ^4 { say ++$ }
camelia 1
2
3
4
Xliff_ ^^ ZzZombo ?
m: for ^4 { say $++ }
camelia 0
1
2
3
Xliff_ m: for ^4 { say ++1 } 04:37
camelia Cannot resolve caller prefix:<++>(Int:D); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)
(Int:D $a is rw --> Int:D)

The following do not match for other reasons:
(Bool $a is rw)
(M…
04:44 rbt left 04:48 jaldhar joined
hythm How can I add array type in signature? 05:14
tellable6 2019-11-14T22:54:43Z #raku <lizmat> hythm maybe the Tuple module is what you need ?
hythm m: multi s ( Int @a ) { say 'Int' }; multi s ( Str @a ) { say 'Str' }; my @a = 1, 2; s @a
camelia Cannot resolve caller s(Array:D); none of these signatures match:
(Int @a)
(Str @a)
in block <unit> at <tmp> line 1
Xliff_ Hmmm... 05:15
m: multi s ( @a where *.all ~~ Int) { say 'Int' }; multi s ( @a where *.all ~~ Str) { say 'Str' }; my @a = 1, 2; s @a
camelia Cannot resolve caller s([1 2]); none of these signatures match:
(@a where { ... })
(@a where { ... })
in block <unit> at <tmp> line 1
Xliff_ m: multi s ( @a where *.all ~~ Int) { say 'Int' }; multi s ( @a where *.all ~~ Str) { say 'Str' }; my @a = (1, 2); s @a
camelia Cannot resolve caller s([1 2]); none of these signatures match:
(@a where { ... })
(@a where { ... })
in block <unit> at <tmp> line 1
Xliff_ m: multi s ( @a where { .all ~~ Int }) { say 'Int' }; multi s ( @a where *.all ~~ Str) { say 'Str' }; my @a = (1, 2); s @a 05:16
camelia Int
Xliff_ m: multi s ( @a where { .all ~~ Int }) { say 'Int' }; multi s ( @a where { .all ~~ Str }) { say 'Str' }; my @a = (1, 2); s (1, 2); s (<a b>)
camelia Int
Str
Xliff_ hythm ^^
hythm Thanks Xliff, that worked :) 05:17
Xliff_ yw :)
05:18 xinming left 05:22 xinming joined
ZzZombo m: multi s ( Int @a ) { say 'Int' }; multi s ( Str @a ) { say 'Str' }; my Int @a = 1, 2; s @a 05:57
camelia Int
ZzZombo Xliff_ ^^ 05:58
m: multi s ( Int @a ) { say 'Int' }; multi s ( Str @a ) { say 'Str' }; my Int:D @a = 1, 2; s @a
camelia Int
Xliff_ Ah. Forget you can do without the where if you type the array. 06:00
ZzZombo m: say ^10.pick ~~ * %% 2 | 0 | *.is-prime 06:01
camelia Potential difficulties:
Precedence of ^ is looser than method call; please parenthesize
at <tmp>:1
------> 3say ^107⏏5.pick ~~ * %% 2 | 0 | *.is-prime
Too few positionals passed; expected 2 arguments but got 1
in block <u…
ZzZombo m: say (^10).pick ~~ * %% 2 | 0 | *.is-prime
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
Xliff_ ZzZombo: But mine has the benefit of using literals, even if it is slower.
s (1, 2); s (<a b>)
m: say ^10.pick ~~ (* %% 2 | 0 | *.is-prime) 06:02
camelia Potential difficulties:
Precedence of ^ is looser than method call; please parenthesize
at <tmp>:1
------> 3say ^107⏏5.pick ~~ (* %% 2 | 0 | *.is-prime)
Too few positionals passed; expected 2 arguments but got 1
in block …
Xliff_ m: say (^10).pick ~~ (* %% 2 | 0 | *.is-prime)
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
Xliff_ m: say (^10).pick ~~ do { $_ %% 2 | 0 | .is-prime }
camelia True
Xliff_ m: say (^10).pick ~~ { $_ %% 2 | 0 | .is-prime }
camelia any(False, 0, True)
Xliff_ m: say (^10).pick ~~ { $_ %% 2 | 0 | .is-prime }
camelia any(True, 0, True)
Xliff_ m: say (^10).pick ~~ { $_ %% 2 | 0 | .is-prime }
camelia any(True, 0, False)
Xliff_ m: say (^10).pick ~~ { $_ %% 2 | 0 | .is-prime }
camelia any(False, 0, True)
Xliff_ m: say (^10).pick ~~ { $_ %% 2 | 0 | .is-prime }
camelia any(False, 0, False)
Xliff_ m: say (^10).pick ~~ { $_ %% 2 | 0 | .is-prime }
camelia any(False, 0, False)
Xliff_ m: say (^10).pick ~~ do { .say; $_ %% 2 | 0 | .is-prime } 06:03
camelia 6
True
Xliff_ m: say (^10).pick ~~ do { .say; $_ %% 2 | 0 | .is-prime }
camelia 7
True
Xliff_ m: say (^10).pick ~~ do { .say; $_ %% 2 | 0 | .is-prime }
camelia 3
True
Xliff_ m: say (^10).pick ~~ do { .say; $_ %% 2 | 0 | .is-prime }
camelia 2
True
Xliff_ m: say (^10).pick ~~ do { .say; $_ %% 2 | 0 | .is-prime }
camelia 5
True
Xliff_ m: say (^10).pick ~~ do { .say; $_ %% 2 | 0 | .is-prime }
camelia 5
True
Xliff_ m: say (^10).pick ~~ do { .say; $_ %% 2 | 0 | .is-prime }
camelia 9
False
ZzZombo How's it parsed in the failing case?
Xliff_ \o/
ZzZombo: Which failing case? 06:04
ZzZombo The one what doesn't compile?
Xliff_ Oh. As a block with two whatevers, so it needs two arguments.
If you want * to repeat itself, it can't be WhateverCode 06:05
ZzZombo Huh, well, okay.
I'd think `|` breaks that in parts.
Xliff_ * %% 2 | 0 | *.is-prime
Two asterisks, so two arguments necessary
ZzZombo You don't need `do` there, do you? 06:06
m: say (^10).pick ~~ { .say; $_ %% 2 | 0 | .is-prime }
camelia 9
any(False, 0, False)
Xliff_ Yeah. That returns a proper junction, so that one is better. 06:07
say 0 ~~ { .say; $_ %% 2 | 0 | .is-prime }
evalable6 0
any(True, 0, False)
Xliff_ say 0 ~~ { .say; $_ %% 2 | .so | .is-prime } 06:08
evalable6 0
any(True, False, False)
Xliff_ say 0 ~~ { .say; $_ %% 2 | 0 | .is-prime }
evalable6 0
any(True, 0, False)
Xliff_ You don't need the 0, either. Will never match.
ZzZombo m: say 0 ~~ 0
camelia True
ZzZombo m: say 0 ~~ any 0 06:09
camelia True
Xliff_ m: say 0 ~~ { 1 | 0 }
camelia any(1, 0)
Xliff_ ^^ Always true
m: say 0 ~~ (1 | 0 )
camelia True
Xliff_ m: say 2 ~~ (1 | 0 )
camelia False
Xliff_ m: say 2 ~~ ( 1 | 0 )
camelia False 06:10
Xliff_ m: say 1 ~~ ( 1 | 0 )
camelia True
Xliff_ That's better.
m: say 1 ~~ ( $_ %% 2 | 0 )
camelia False
Xliff_ m: say 2 ~~ ( $_ %% 2 | 0 )
camelia True
Xliff_ m: say 0 ~~ ( $_ %% 2 | 0 )
camelia True
ZzZombo m: say (^10).pick ~~ (* %% 2) | 0 | .is-prime
camelia any(True, 0, False)
Xliff_ m: say 0 ~~ ( $_ %% 3 | 0 )
camelia True
Xliff_ m: say 0 ~~ ( ($_ + 1) %% 3 | 0 )
camelia True
ZzZombo m: say (^10).pick ~~ (* %% 2) | 0 | .is-prime 06:11
camelia any(True, 0, False)
Xliff_ m: say 0 ~~ ($_ + 1) %% 3 | 0 )
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3say 0 ~~ ($_ + 1) %% 3 | 0 7⏏5)
Xliff_ m: say 0 ~~ ($_ + 1) %% 3 | 0
camelia True
Xliff_ m: say 0 ~~ $_ %% 3 | 0
camelia True
Xliff_ m: say (0, 5) ~~ $_ %% 3 | 0
camelia False
Xliff_ Hrmph. I never use 0 or 1 in junctions precisely due to this ambiguity 06:12
ZzZombo m: say (^10).pick ~~ $_ %% 2 | 0 | .is-prime
camelia True
ZzZombo m: say (^10).pick ~~ (* %% 2) | 0 | .is-prime
camelia any(True, 0, False)
ZzZombo WTF
Xliff_ Heh. 06:13
OK. Good night!
ZzZombo GN
m: say (^10).pick ~~ (* %% 2) | 2 - 2 | .is-prime 06:14
camelia any(True, 0, True)
06:14 wamba joined
ZzZombo m: say (^10).pick ~~ (* %% 2) | 0 | *.is-prime 06:14
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
Xliff_ *sigh* -- my $dayjob has gone from Raku to PHP... *sob*
06:16 ZzZombo left, jaldhar left 06:17 jaldhar joined, ZzZombo joined
ZzZombo m: my $a;for $a, 1 { .VAR.say } 06:24
camelia (Any)
1
ZzZombo m: my $a;for $a, 1 { .VAR.WHAT.say }
camelia (Scalar)
(Int)
06:25 jaldhar_ joined, sacomo left
Xliff_ m: my $a;for $a, 1 { .VAR.name.say } 06:26
camelia $a
No such method 'name' for invocant of type 'Int'. Did you mean any of these?
base
none
note
take

in block <unit> at <tmp> line 1
06:26 jaldhar_ left
Xliff_ m: my $a;for $a, 1 { say .VAR.^can('name').elems ?? .VAR.name !! .VAR } 06:26
camelia $a
1
06:27 jaldhar_ joined 06:28 jaldhar left 06:39 sacomo joined 06:40 jaldhar_ left 06:41 jaldhar_ joined
stoned75 :w 06:42
06:42 jaldhar_ left 06:43 jaldhar_ joined 07:03 rindolf joined
rindolf hi all! is there going to be a redirect? 07:04
07:05 wamba left 07:07 sacomo left 07:12 jaldhar_ left 07:13 jaldhar_ joined 07:30 hythm left 07:49 stoned75 left 08:00 ZzZombo left 08:01 ZzZombo joined, ZzZombo left, ZzZombo joined 08:04 ZzZombo left 08:05 ZzZombo joined, ZzZombo_ joined 08:10 ZzZombo left, ZzZombo_ is now known as ZzZombo 08:16 jaldhar_ left 08:17 jaldhar_ joined 08:18 jaldhar_ left 08:19 jaldhar_ joined 08:24 wamba joined 08:32 wamba left, xinming_ joined 08:35 xinming left 08:46 wamba joined 08:47 sena_kun joined 08:48 jaldhar_ left 08:49 jaldhar_ joined 09:04 sarna left 09:08 Altai-man_ joined 09:10 sena_kun left
AlexDaniel rindolf: redirect for what exactly? 09:10
rindolf AlexDaniel: from #perl6 to #raku 09:12
AlexDaniel I think there will be a bot soon to help people get off the channel 09:16
09:17 wamba left
SmokeMachine m: say (^10).pick %% (2 | 0 | .is-prime) 09:38
camelia No such method 'is-prime' for invocant of type 'Any'
in block <unit> at <tmp> line 1
09:56 jaldhar_ left 09:57 jaldhar_ joined 09:58 jaldhar_ left 09:59 jaldhar_ joined 10:02 jaldhar_ left 10:03 jaldhar_ joined 10:04 jaldhar_ left 10:05 jaldhar_ joined 10:14 jaldhar_ left 10:15 jaldhar_ joined
rindolf AlexDaniel: ah 10:32
10:37 robertle joined 11:04 jaldhar_ left 11:05 jaldhar_ joined 11:06 jaldhar_ left 11:07 jaldhar_ joined 11:10 sena_kun joined 11:11 Altai-man_ left 11:12 jaldhar_ left 11:13 jaldhar_ joined
tbrowder .tell jmerelo shooting for 19 nov for advent gist or else give my slot (swap ok) to someone else if not acceptable 11:14
tellable6 tbrowder, I'll pass your message to jmerelo
11:14 jaldhar_ left 11:15 jaldhar_ joined 11:18 jaldhar_ left 11:19 jaldhar_ joined 11:22 rindolf left, jaldhar_ left 11:23 jaldhar_ joined 11:36 stanleytam joined 11:38 stanleytam left 12:34 bazzaar joined
bazzaar m: multi s (Str @) {'Str'}; multi s (Int @) {'Int'}; my @a = 1, 2; my @b = <a b>; s @a; s @b; 12:42
camelia Cannot resolve caller s(Array:D); none of these signatures match:
(Str @)
(Int @)
in block <unit> at <tmp> line 1
bazzaar .... lost in a sea of multi's :-) 12:50
12:55 lucasb joined
moritz ... all alike :D 12:55
13:08 Altai-man_ joined 13:11 sena_kun left 13:32 jaldhar_ left 13:33 jaldhar_ joined
ZzZombo m: role StrIdx { also does Positional;method AT-POS($i) is rw { self.substr-rw($i, 1) }; };my $s = 'asd' does StrIdx;say $s[0];$s[0] = 'b';say $s 13:44
camelia a
Cannot modify an immutable Str+{StrIdx} (asd)
in block <unit> at <tmp> line 1
ZzZombo Why? 13:45
bazzaar m: multi m_x ( Str @ ) {'Str'}; multi m_x ( Int @ ) {'Int'}; my Str:D @b = <a b>; my Int:D @c = 1, 2; say m_x @b|@c 13:49
camelia any(Str, Int)
14:08 jaldhar_ left 14:09 jaldhar_ joined 14:11 jjjj] joined 14:13 jjjj] left 14:28 jaldhar_ left 14:29 jaldhar_ joined 14:32 jaldhar_ left 14:33 jaldhar_ joined
tyil according to github.com/perl6/advent/issues/16 I have to ask someone with access to the advent calendar to grant me access so I can schedule my advent articles on there 14:35
is someone with such privileges around?
14:42 jaldhar_ left 14:43 jaldhar_ joined 14:46 jaldhar_ left 14:47 jaldhar_ joined 14:48 jaldhar_ left 14:49 jaldhar_ joined 15:00 jaldhar_ left 15:01 jaldhar_ joined 15:04 jaldhar_ left 15:05 jaldhar_ joined 15:08 mid_laptop joined 15:09 sena_kun joined
bazzaar m: multi m_x ( @ where {.all ~~ Str}) {'Str'}; multi m_x ( @ where {.all ~~ Int}) {'Int'}; my @b = <a b>; my @c = 1, 2; my @z = 1, "text"; say m_x @b|@c; say m_x @z 15:09
camelia any(Str, Int)
Cannot resolve caller m_x([1 text]); none of these signatures match:
(@ where { ... })
(@ where { ... })
in block <unit> at <tmp> line 1
15:10 Altai-man_ left 15:16 bazzaar left 15:17 bazzaar joined 15:53 mid_laptop left, mid_laptop joined
tyil sergot: your Encode module is still using META.info, but there's been a PR to change this to META6.json, which is the current recommended name for this file, can this PR be merged? 16:46
17:00 wildtrees joined 17:08 Altai-man_ joined, cpan-raku left 17:10 sena_kun left, chloekek_ joined 17:15 cpan-raku joined, cpan-raku left, cpan-raku joined 17:28 jaldhar_ left 17:29 jaldhar_ joined 18:07 stoned75 joined, wildtrees left 18:38 frayoyo joined
frayoyo hello 18:38
Altai-man_ frayoyo, hi! 18:40
19:09 sena_kun joined 19:10 Altai-man_ left 19:44 xinming_ left 19:45 xinming_ joined 20:30 jaldhar_ left 20:31 jaldhar_ joined 21:08 Altai-man_ joined 21:10 sena_kun left 21:37 frayoyo left 21:48 wildtrees joined 22:10 jaldhar_ left 22:11 jaldhar_ joined 22:16 jaldhar_ left 22:17 jaldhar_ joined 22:20 jaldhar_ left 22:21 jaldhar_ joined 22:27 dogbert17 joined 22:31 Altai-man_ left 22:59 bazzaar left 23:16 jaldhar_ left 23:17 jaldhar_ joined 23:18 jaldhar_ left 23:19 jaldhar_ joined 23:20 jaldhar_ left 23:21 jaldhar_ joined 23:41 chloekek_ left 23:58 jaldhar_ left 23:59 jaldhar_ joined