🦋 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:00 stoned75 left 00:05 stoned75 joined 00:09 stoned75 left 00:41 sena_kun left 00:56 sena_kun joined 01:04 Tirifto left 01:08 Gennadiy joined 01:09 Gennadiy left 01:50 ZzZombo_ joined 01:53 ZzZombo left, ZzZombo_ is now known as ZzZombo 02:05 wildtrees left, Merfont left 02:06 Merfont joined 02:07 xkr47 left 02:08 cpan-raku left 02:09 cpan-raku joined, cpan-raku left, cpan-raku joined
AlexDani` lol I think datetime comparisons are wrong 02:15
02:15 AlexDani` is now known as AlexDaniel, AlexDaniel left, AlexDaniel joined
AlexDaniel let's see… 02:15
ah, actually they're correct! 02:16
nevermind! :)
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my $val = 0; for self.comb { $val += %positions{$_} * $base ** self.elems - $++ }; $val }; }; 02:37
camelia ( no output )
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my $val = 0; for self.comb { $val += %positions{$_} * $base ** self.elems - $++ }; $val }; }; my $a = "AA" but StrVal; $a.Int.say
camelia 51
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my $val = 0; for self.comb { $val += %positions{$_} * $base ** self.elems - $++ - 1}; $val }; }; my $a = "AA" but StrVal; $a.Int.say 02:38
camelia 49
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my $val = 0; for self.comb { $val += %positions{$_} * $base ** (self.elems - $++)}; $val }; }; my $a = "AA" but StrVal; $a.Int.say
camelia 27
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my $val = 0; for self.comb { $val += %positions{$_} * $base ** (self.elems - $++)}; $val }; }; my $a = "CD" but StrVal; $a.Int.say
camelia 82
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my $val = 0; for self.comb { $val += %positions{$_} * $base ** (self.elems - $++)}; $val }; }; my $a = "ZAE" but StrVal; $a.Int.say 02:39
camelia 677.192308
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my $val = 0; for self.comb { $val += %positions{$_} * $base ** (self.elems - $++)}; $val }; }; my $a = "ZA" but StrVal; $a.Int.say
camelia 677
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my $val = 0; for self.comb { $val += %positions{$_} * $base ** (self.elems - $++)}; $val }; }; my $a = "ZAA" but StrVal; $a.Int.say
camelia 677.038462
Xliff WTF?
m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = 0 xx 2; for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos++)}; $val }; }; my $a = "ZAA" but StrVal; $a.Int.say 02:40
camelia 677.038462
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = 0 xx 2; for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos++)}; $val }; }; my $a = "AE" but StrVal; $a.Int.say
camelia 31 02:41
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = 0 xx 2; for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos++)}; $val }; }; my $a = "Z" but StrVal; $a.Int.say
camelia 676
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = 0 xx 2; for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos++)}; $val }; }; my $a = "Z" but StrVal; $a.Int.say
camelia 676
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = 0 xx 2; for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos++)}; $val }; }; my $a = "X" but StrVal; $a.Int.say
02:41 sena_kun left
camelia 624 02:41
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos+)}; $val }; }; my $a = "X" but StrVal; $a.Int.say 02:42
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing required term after infix
at <tmp>:1
------> 3tions{$_} * $base ** (self.elems - $pos+7⏏5)}; $val }; }; my $a = "X" but StrVal; $
expecting any of:
prefix
ter…
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos)}; $val }; }; my $a = "X" but StrVal; $a.Int.say
camelia 24
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos)}; $val }; }; my $a = "ZAX" but StrVal; $a.Int.say
camelia 51
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos)}; $val }; }; my $a = "ZA" but StrVal; $a.Int.say
camelia 27
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos)}; $val }; }; my $a = "ZAA" but StrVal; $a.Int.say
camelia 28
Xliff "ZAA".comb.gist.say
evalable6 (Z A A)
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos++) }; $val }; }; my $a = "ZAA" but StrVal; $a.Int.say 02:44
camelia 26.039941
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos); $pos++ }; $val }; }; my $a = "ZAA" but StrVal; $a.Int.say 02:45
camelia 26.039941
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); for self.comb { $val += %positions{$_} * $base ** (self.elems - $pos); $pos++; say "$pos"; say self.elems }; $val }; }; my $a = "ZAA" but StrVal; $a.Int.say 02:46
camelia 2
1
3
1
4
1
26.039941
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val, $len) = (1, 0, self.elems); for self.comb { $val += %positions{$_} * $base ** ($len - $pos); $pos++; say "$pos"; say $len }; $val }; }; my $a = "ZAA" but StrVal; $a.Int.say 02:47
camelia 2
1
3
1
4
1
26.039941
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val, $len) = (1, 0, self.chars); for self.comb { $val += %positions{$_} * $base ** ($len - $pos); $pos++; say "$pos"; say $len }; $val }; }; my $a = "ZAA" but StrVal; $a.Int.say 02:48
camelia 2
3
3
3
4
3
17603
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val, $len) = (1, 0, self.chars); for self.comb { $val += %positions{$_} * $base ** ($len - $pos++); $val }; }; my $a = "ZAA" but StrVal; $a.Int.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3 }; my $a = "ZAA" but StrVal; $a.Int.say7⏏5<EOL>
expecting any of:
statement end
statement modifier
statement modifier loo…
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val, $len) = (1, 0, self.chars); for self.comb { $val += %positions{$_} * $base ** ($len - $pos++); }; $val }; }; my $a = "ZAA" but StrVal; $a.Int.say
camelia 17603
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); for self.comb { $val += %positions{$_} * $base ** (self.chars - $pos++); }; $val }; }; my $a = "ZAA" but StrVal; $a.Int.say 02:49
camelia 17603
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); $val += %positions{$_} * $base ** (self.chars - $pos++) for self.comb }; my $a = "ZAA" but StrVal; $a.Int.say 02:50
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3 }; my $a = "ZAA" but StrVal; $a.Int.say7⏏5<EOL>
expecting any of:
statement end
statement modifier
statement modifier loo…
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); $val += %positions{$_} * $base ** (self.chars - $pos++) for self.comb }; }; my $a = "ZAA" but StrVal; $a.Int.say
camelia Nil
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); $val += %positions{$_} * $base ** (self.chars - $pos++) for self.comb }; $val }; my $a = "ZAA" but StrVal; $a.Int.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$val' is not declared. Did you mean '&val'?
at <tmp>:1
------> 3 (self.chars - $pos++) for self.comb }; 7⏏5$val }; my $a = "ZAA" but StrVal; $a.Int
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); $val += %positions{$_} * $base ** (self.chars - $pos++) for self.comb; $val }; my $a = "ZAA" but StrVal; $a.Int.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3 }; my $a = "ZAA" but StrVal; $a.Int.say7⏏5<EOL>
expecting any of:
statement end
statement modifier
statement modifier loo…
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); $val += %positions{$_} * $base ** (self.chars - $pos++) for self.comb; $val }; }; my $a = "ZAA" but StrVal; $a.Int.say 02:51
camelia 17603
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); $val += %positions{$_} * $base ** (self.chars - $pos++) for self.comb }; }; my $a = "ZAA" but StrVal; $a.Int.say
camelia Nil
Xliff m: role StrVal { my %positions = (do gather take $_ => ($++ + 1) for 'A'...'Z'); my $base = 26; method Int { my ($pos, $val) = (1, 0); $val += %positions{$_} * $base ** (self.chars - $pos++) for self.comb; $val; }; }; my $a = "ZAA" but StrVal; $a.Int.say
camelia 17603
Xliff One of these days I'm going to learn to stop abusing camelia in this way... :)
02:57 sena_kun joined 03:11 AlexDani` joined 03:12 AlexDaniel left 04:35 evalable6 left 04:37 evalable6 joined 04:40 sena_kun left 04:57 Voldenet left, sena_kun joined 05:03 Voldenet joined, Voldenet left, Voldenet joined 05:09 squashable6 left 05:11 squashable6 joined 05:38 RobRaku joined 05:44 xinming left 05:47 xinming joined 05:53 squashable6 left 05:55 squashable6 joined 06:07 RobRaku left 06:09 RobRaku joined
lizmat Xliff: you *can* /privmsg camelia as well 06:36
Xliff I know that.
lizmat I know :-) I was just reinforcing your last remark :-) 06:38
Xliff Ah! lizmat++
06:41 sauvin joined 06:42 sena_kun left 06:57 sena_kun joined 07:19 ZzZombo left 07:26 squashable6 left 07:29 squashable6 joined 07:36 xinming left 07:37 xinming joined 07:46 RobRaku left 07:49 squashable6 left 07:50 squashable6 joined 08:16 gabiruh_ joined 08:18 gabiruh left 08:28 wamba joined 08:34 rindolf joined
sarna m: class Foo { method new(@arr) { self.bless(:@arr) } } ; my $foo = Foo.new([1;2;3]); dd $foo; 08:38
camelia Foo $foo = Foo.new
sarna *nevermind*
08:42 sena_kun left 08:44 jmerelo joined 08:56 xinming left 08:57 xinming joined 08:58 sena_kun joined 09:13 stoned75 joined
sarna m: class Foo { has Int @.arr ; method say-arr { dd @!arr } }; my $foo = Foo.new(arr => [1;2;3]) ; $foo.say-arr 09:14
camelia Array[Int] @!arr = Array[Int].new(1, 2, 3)
sarna m: class Foo { has Int @!arr ; method say-arr { dd @!arr } }; my $foo = Foo.new(arr => [1;2;3]) ; $foo.say-arr
camelia Array[Int] @!arr = Array[Int].new()
sarna why is it so?
(I only changed arr to be private)
moritz sarna: you cannot initialize private attributes from the outside (because they are private) 09:17
sarna moritz: how's that outside? it's inside the class, at least that's how I understand it 09:36
oh! it's right in the docs 09:45
> Private attributes really are private. This means that bless is not allowed to bind things to &!callback and @!dependencies directly.
silly me :D
lizmat I was looking at: news.ycombinator.com/item?id=21919502 09:47
and realized that could be a Raku one-liner: print "." for lines.rotor( 1 => 999 ) 09:48
09:59 xkr47 joined
sarna TIL about rotor 10:37
10:41 sena_kun left 10:55 sena_kun joined
moritz sarna: (late, I know) .new can be called from the outside, so it doesn't matter where you call it from 11:05
sarna moritz: yeah, the docs explain it quite well :) should've read them first 11:08
11:31 AlexDani` is now known as AlexDaniel, AlexDaniel left, AlexDaniel joined
AlexDaniel lizmat: interesting 11:32
lizmat: you can also print $_ instead of the dot to show what's happening
lizmat the op wanted a dot 11:33
AlexDaniel well, sorta
when un-tarring a big source tree I'd personally prefer to see which directory it is in right now 11:34
but yeah
11:35 jmerelo left 11:46 stoned75_ joined 12:19 stoned75 left 12:20 stoned75_ left 12:41 sena_kun left 12:55 sena_kun joined 13:02 kensanata joined 14:07 dakkar joined
dakkar today I'm getting confused by list context, of all things 14:09
p6: my %x; %x{'a'}=qw[a b c]; dd my @b = %x{'a'}; 14:10
camelia Array @b = [("a", "b", "c"),]
dakkar I thought that assigning to a @-sigiled variable would cause the RHS to be evaluated in list context 14:11
my %x; %x{'a'}=qw[a b c]; my (@b,) = %x{'a'}; dd @b;
evalable6 Array @b = ["a", "b", "c"]
dakkar making the LHS more obviously "listy" does what I mean 14:13
14:13 chloekek joined
dakkar I couldn't find where, in the docs, says that it's supposed to work like that 14:13
I should look at roast, while I'm at it 14:14
14:14 wamba left
dakkar hmm. If I rewrite it as: 14:17
p6: my $x; $x=qw[a b c]; my (@b) = $x; dd @b;
camelia Array @b = ["a", "b", "c"]
dakkar the issue looks clearer to me
I may have to adjust my expectations
14:31 kensanata left 14:41 sena_kun left, dakkar left 14:57 sena_kun joined 15:24 melezhik joined
melezhik happy new year to everyone! 15:24
does raku have a testing service allow module authors run tests against different rakudo versions / os distros? 15:25
15:26 stoned75 joined
melezhik I am contemplating about starting the one, but not sure if the place is already taken 15:26
I know Perl5 has CPANTesters
15:29 johnjohn101 joined 15:35 melezhik left 15:41 stoned75 left 15:42 stoned75 joined 15:47 veesh_ joined 15:48 veesh left, veesh_ is now known as veesh
chloekek stigo: If you want I could make an endpoint that exposes all the data in a machine-readable format (instead of HTML) 15:51
I also still have to set up a cronjob to refill the database with new packages periodically. 15:52
All the code is there, it just needs to be invoked every hour or so. :P
16:01 Merfont left 16:02 RobRaku joined 16:42 sena_kun left
chloekek The cronjob is now in place. 16:44
stigo chloekek: that would be great :) 16:50
16:52 jmerelo joined
AlexDaniel melezhik: we don't have that. We have Blin that can bisect rakudo to figure out when some module started failing 16:55
tellable6 AlexDaniel, I'll pass your message to melezhik
16:59 sena_kun joined 17:00 mahmudov joined 17:02 mahmudov left 17:03 mahmudov joined 17:04 melezhik joined 17:10 RobRaku left
melezhik AlexDaniel: We could use Sparrowdo to run Raku modules installations and zef tests against docker images with various os distros/rakudos 17:21
tellable6 2019-12-31T16:55:10Z #raku <AlexDaniel> melezhik: we don't have that. We have Blin that can bisect rakudo to figure out when some module started failing
jmerelo Hey 17:22
Happy new year, everyone!
melezhik I have already tested this approach for my tasks and it works well, there is Sparrow6 DSL is written for such a tasks also Sparky could be use at least for the beginning as an UI/reporter as 17:23
lizmat did I miss a few hours? Or is jmerelo in Japan / Australia? :-)
AlexDaniel melezhik: I don't know enough about sparrowdo :)
but yeah of course it will be useful 17:24
jmerelo Well, some people in Twitter are already posting happy new year selfies now, so it must be new year somewhere 17:25
melezhik AlexDaniel: this post is quite old, but could give your a glimpse - dev.to/melezhik/backing-your-own-c...docker-3ap
jmerelo plus I'm not gonna be in IRC by midnight, or in a few hours, when I'll start cooking.
lizmat locally, people wish each other a "good slide" into the new year, and then wish them a Happy New Year after midnight.
lizmat wishes jmerelo a good slide :-) 17:26
melezhik also you could take a look at sparrowdo docs as well - github.com/melezhik/sparrowdo
jmerelo lizmat: you too!
melezhik AlexDaniel: I could build a working prototype really quick, but just need some feedback if Raku people really need such a service 17:27
AlexDaniel melezhik: well, to me it's currently unclear which problem you want to solve exactly 17:29
lizmat melezhik: I would love to see something like CPAN-testers for Raku modules :-)
AlexDaniel melezhik: and I don't mean there's no problem, there are meany :) just which one 17:30
many*
melezhik: for example, do you want to create something that module authors will run 17:33
melezhik: or do you want to create something for modules.raku.org/ so that we run it and get status for all modules
melezhik AlexDaniel: Raku modules authors want to know how theirs modules installed on different os/rakudos. So they be aware of distro/os specific bugs 17:41
it could be standalone service that run installation of modules on different distros ( docker images ) and report any error during install / unit tests 17:42
AlexDaniel: does it make a sense?
Also some modules would require integration / environment tests -this is another story also related to this matter, so for example some modules need external libraries install 17:44
such an integration testing could also be achieved through the mentioned approach
AlexDaniel melezhik: yeah, it makes sense and it sounds extremely useful 17:51
melezhik AlexDaniel: thanks! 17:53
18:06 xinming left, xinming joined
melezhik AlexDaniel: lizmat: I'll try to run working prototype in 1-2 weeks, so everyone could take it for a spin, staring from that we could discuss details and improvements, what do you think? 18:09
AlexDaniel melezhik: great, we'll also need to somehow make sure it gets used by people 18:14
chloekek You also need to test on BSDs and NTs so Docker may not be the best solution. 18:20
melezhik AlexDaniel: this is why I want to have some example/prototype so users could see how it works in action 18:22
chloekek Also worth noting that when packages get absorbed into Nixpkgs (cc stigo) then they will run on CI automatically, (but only on NixOS and with one version of Rakudo).
melezhik chloekek: yeah. if we have a spare ssh hosts with target os not supported by docker the we could run sparrowdo over ssh to do a job 18:23
and then just get report back 18:24
chloekek Cool.
melezhik github.com/melezhik/sparrowdo#spar...o-workflow
18:37 RobRaku joined 18:40 melezhik left 18:41 Manifest0 left, sena_kun left 18:42 Manifest0 joined 18:57 sena_kun joined, Doc_Holliwood left 19:01 jmerelo left 19:02 chloekek left 19:04 cpan-raku left 19:05 cpan-raku joined, cpan-raku left, cpan-raku joined
adisbladis As a nixpkgs maintainer: We're not going to make rakudo packages release blockers for nixpkgs. 19:17
Also not sure we'll build them all on our CI infra unless they are dependend upon by some program people want to use 19:18
Another side note: We run the same CI/build infra for MacOS too. 19:19
19:44 maggotbrain left 19:50 wamba joined 19:53 wildtrees joined 19:56 maggotbrain joined 20:12 squashable6 left 20:14 squashable6 joined 20:22 squashable6 left, squashable6 joined 20:42 sena_kun left 20:58 sena_kun joined 21:22 rindolf left 21:29 RobRaku left 21:38 mahmudov left 21:40 mahmudov joined 21:42 mahmudov left 21:44 mahmudov joined, chloekek joined
chloekek . 21:44
21:48 mahmudov left
cpan-raku New module released to CPAN! Red (0.1.2) by 03FCO 21:49
21:50 mahmudov joined 22:24 enix4 joined
cpan-raku New module released to CPAN! Red (0.1.3) by 03FCO 22:26
22:34 enix4 left 22:36 enix4 joined 22:37 enix4 left 22:42 wamba left, sena_kun left 22:56 sena_kun joined 23:22 AlexDaniel left 23:24 AlexDaniel joined, AlexDaniel left, AlexDaniel joined 23:38 squashable6 left 23:39 squashable6 joined