🦋 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.
AlexDani` lol I think datetime comparisons are wrong 02:15
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
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... :)
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++
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*
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
sarna TIL about rotor 10:37
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
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
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
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
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
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
melezhik I am contemplating about starting the one, but not sure if the place is already taken 15:26
I know Perl5 has CPANTesters
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
chloekek The cronjob is now in place. 16:44
stigo chloekek: that would be great :) 16:50
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
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
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
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
chloekek . 21:44
cpan-raku New module released to CPAN! Red (0.1.2) by 03FCO 21:49
cpan-raku New module released to CPAN! Red (0.1.3) by 03FCO 22:26