[00:11] *** ToddAndMargo left [00:21] *** lucasb left [00:23] *** melezhik left [00:26] *** xinming left [00:26] *** xinming joined [00:31] *** MasterDuke left [00:38] *** xinming left [00:39] *** xinming joined [00:50] *** xinming left [00:51] *** xinming joined [00:55] Tirifto: one other potential way to do what you want to do (maybe) is to use ‘trusts’, that will allow a particular class access to the innards of another one, but not others. [01:52] *** Altai-man_ joined [01:54] *** sena_kun left [01:57] *** wildtrees left [02:08] *** ufobat__ joined [02:12] *** ufobat_ left [02:24] *** mahmudov left [02:34] *** xinming left [02:34] *** xinming joined [02:37] *** mahmudov joined [02:55] *** xinming left [02:56] *** xinming joined [03:02] *** Doc_Holliwood left [03:02] *** Doc_Holliwould left [03:04] *** mahmudov left [03:07] *** mahmudov joined [03:47] m: my $*A = 1; { $*A = 2; { $*A = 4; say $*A }; say $*A }; say $*A; [03:47] rakudo-moar 66cf6f811: OUTPUT: «4␤4␤4␤» [03:48] m: my $*A = 1; { my $*A = 2; { my $*A = 4; say $*A }; say $*A }; say $*A; [03:48] rakudo-moar 66cf6f811: OUTPUT: «4␤2␤1␤» [03:51] *** cpan-raku left [03:53] *** cpan-raku joined [03:53] *** cpan-raku left [03:53] *** cpan-raku joined [03:53] *** sena_kun joined [03:55] *** Altai-man_ left [03:58] *** Tirifto left [04:58] *** quotable6 left [04:58] *** nativecallable6 left [04:58] *** shareable6 left [04:58] *** evalable6 left [04:58] *** statisfiable6 left [04:58] *** bloatable6 left [04:58] *** notable6 left [04:58] *** committable6 left [04:58] *** reportable6 left [04:58] *** benchable6 left [04:58] *** tellable6 left [04:58] *** releasable6 left [04:58] *** greppable6 left [04:58] *** squashable6 left [04:58] *** sourceable6 left [04:58] *** coverable6 left [04:58] *** bisectable6 left [04:58] *** unicodable6 left [04:59] *** bisectable6 joined [04:59] *** greppable6 joined [04:59] *** tellable6 joined [04:59] *** bloatable6 joined [04:59] *** committable6 joined [04:59] *** unicodable6 joined [04:59] *** squashable6 joined [05:00] *** evalable6 joined [05:00] *** sourceable6 joined [05:00] *** quotable6 joined [05:00] *** releasable6 joined [05:00] *** nativecallable6 joined [05:00] *** statisfiable6 joined [05:01] *** benchable6 joined [05:01] *** shareable6 joined [05:01] *** notable6 joined [05:01] *** coverable6 joined [05:01] *** reportable6 joined [05:07] *** marcusr left [05:08] *** marcusr joined [05:10] *** toddandmargo joined [05:11] Does anyone know if Raku's NativeCall runs "LocalFree( )" after it finishes with buffers? Or do I need to do it myself? https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-localfree [05:13] *** mahmudov left [05:20] *** rindolf joined [05:52] *** Altai-man_ joined [05:55] *** sena_kun left [06:03] I am doing it anyway. It is not throwing an error.This may be a bug in NativeCall, resulting in a memory leak [06:06] *** toddandmargo left [06:19] *** jmerelo joined [06:47] m: my ($, @data) = ; $.perl.say; @data.perl.say; [06:47] rakudo-moar 66cf6f811: OUTPUT: «5===SORRY!5=== Error while compiling ␤Variable $.perl used where no 'self' is available␤at :1␤------> 3my ($, @data) = ; $.perl7⏏5.say; @data.perl.say;␤ expecting any of:␤ term␤» [06:47] In this case, How can we print the value of $ ? [06:48] I mean, how do we use the $ var, IIRC, It can be used in one-liners [06:48] *** Doc_Holliwood joined [06:48] *** Doc_Holliwould joined [06:48] m: my ($, @data) = ; @data.perl.say; [06:48] rakudo-moar 66cf6f811: OUTPUT: «["b", "c", "d"]␤» [06:48] xinming: In this situation the $ is a dummy variable. [06:48] In other words, you CAN'T print its value. It doesn't exist. [06:49] m: my ($, $, @data) = ; @data.perl.say; [06:49] rakudo-moar 66cf6f811: OUTPUT: «["c", "d"]␤» [06:49] Xliff: Ok, So, only anonymous use of $ can be used, right? [06:49] Yes. [06:49] m: ++$.say [06:49] rakudo-moar 66cf6f811: OUTPUT: «5===SORRY!5=== Error while compiling ␤Variable $.say used where no 'self' is available␤at :1␤------> 3++$.say7⏏5␤ expecting any of:␤ prefix␤» [06:49] m: $++.say [06:49] rakudo-moar 66cf6f811: OUTPUT: «0␤» [06:50] m: $++.say; $++.say [06:50] rakudo-moar 66cf6f811: OUTPUT: «0␤0␤» [06:50] m: for ^3 { $++.say } [06:50] rakudo-moar 66cf6f811: OUTPUT: «0␤1␤2␤» [06:51] m: (++$).say; $++.say [06:51] rakudo-moar 66cf6f811: OUTPUT: «1␤0␤» [06:51] my %data; %data{$header.split(',')} = $line.split(','); return %data; <--- How can we write this into a single hash? [06:51] It's actually trying to do some easy csv loading. [06:52] return %($header.split(',') xx $line.split(',') ) [06:52] Let me try again. [06:53] xinming: Isn't that what you are doing? [06:53] m: my @x = ; my @y = ; %( (@x Z @y).flat).perl.say; [06:53] rakudo-moar 66cf6f811: OUTPUT: «{:a("x"), :b("y"), :c("z")}␤» [06:53] m: my @x = ; my @y = ; %( (@x Z @y).flat).perl.say; [06:53] rakudo-moar 66cf6f811: OUTPUT: «{:a("x"), :b("y"), :c("z")}␤» [06:53] Xliff: This is what I try to do. :-) [06:54] I mean, merge that into a single statement [06:54] m: my @x = ; my @y = ; %( (@x Z @y).flat).perl.say; [06:54] rakudo-moar 66cf6f811: OUTPUT: «{:a("x"), :b("y")}␤» [06:55] xinming: my $contents = $file.IO; my %data; (%data{$contents.line[0].split(',')} = .split(',') for .lines.skip(1)).Hash [06:55] m: {}.WHAT [06:55] rakudo-moar 66cf6f811: ( no output ) [06:55] m: {}.WHAT.say [06:55] rakudo-moar 66cf6f811: OUTPUT: «(Hash)␤» [06:55] ¦ doc: cb80067556 | (JJ Merelo)++ | doc/Language/contexts.pod6 [06:55] ¦ doc: Specifies numeric conversion of whitespace #2632 [06:55] ¦ doc: review: https://github.com/Raku/doc/commit/cb80067556 [06:55] ¦ doc: d75b8f7565 | (JJ Merelo)++ | doc/Type/Any.pod6 [06:55] ¦ doc: Specifies behavior of non-int batch size in rotor #2632 [06:55] ¦ doc: review: https://github.com/Raku/doc/commit/d75b8f7565 [06:55] ¦ doc: 4b0d38d5ce | (JJ Merelo)++ | doc/Type/Any.pod6 [06:55] ¦ doc: Comments behavior on negative gaps #2632 [06:56] ¦ doc: review: https://github.com/Raku/doc/commit/4b0d38d5ce [06:56] xinming: That's buggy actually. [06:56] m: {foo => 'bar'}.WHAT.say [06:56] rakudo-moar 66cf6f811: OUTPUT: «(Hash)␤» [06:56] m: {foo => 'bar'}.perl.say [06:56] rakudo-moar 66cf6f811: OUTPUT: «{:foo("bar")}␤» [06:56] xinming: sub readCSV($file) { my $contents = $file.IO; my %data; %data{$contents.line[0].split(',')} = .split(',') for .lines.skip(1); %data; } [06:57] Aand... that's still buggy. [06:57] m: my @x = ; my @y = ; %( (@x Z @y).flat).perl.say; [06:57] rakudo-moar 66cf6f811: OUTPUT: «{:a("x"), :b("y"), :c("z")}␤» [06:57] m: my @x = ; my @y = ; %( @x Z=> @y).perl.say; [06:57] rakudo-moar 66cf6f811: OUTPUT: «{:a("x"), :b("y")}␤» [06:57] How can we force @x to be enumated in Zip operator? [06:58] m: .keys.say [06:58] rakudo-moar 66cf6f811: OUTPUT: «(0 1 2)␤» [06:59] hm [06:59] m: my @a = ; say zip @a.keys, @a [06:59] rakudo-moar 66cf6f811: OUTPUT: «((0 a) (1 b) (2 c))␤» [06:59] xinming: sub readCSV($file) { my $contents = $file.IO; my @header = $contents.lines[0].split(','); (@header Z=> $contents.lines.skip(1).split('. [06:59] m: my @x = ; my @y = ; %( @x.keys.map({ @x[$_] => @y[$_] }) ).perl.say; [06:59] rakudo-moar 66cf6f811: OUTPUT: «{:a("x"), :b("y"), :c(Any)}␤» [06:59] xinming: sub readCSV($file) { my $contents = $file.IO; my @header = $contents.lines[0].split(','); (@header Z=> $contents.lines.skip(1).split(',') } [06:59] Is there a way to do this shorter? [07:00] xinming: like that? [07:00] m: my @x = ; my @y = ; %( @x.keys.map({ @x[$_] => @y[$_] }) ).perl.say; [07:00] rakudo-moar 66cf6f811: OUTPUT: «{:a("x"), :b("y"), :c(Any)}␤» [07:00] no-n: Yea, but the @x.keys.map ... thing is too long. [07:00] Is there a shorter way. :-) [07:00] zip @x.keys, @x [07:01] xinming: sub readCSV($file) { my $contents = $file.IO; my @header = $contents.lines[0].split(','); @data.push: %( (@header Z=> .split(',').flat ) for $contents.lines} [07:01] And you need the return value, so... [07:01] Xliff: Thanks for your example, Actually, I use gather/take to implement that. [07:01] xinming: sub readCSV($file) { my $contents = $file.IO; my @header = $contents.lines[0].split(','); @data.push: %( (@header Z=> .split(',').flat ) for $contents.lines; @data} [07:01] xinming: TIMTWOTDI [07:01] I just return a single row. with my @x = gather { ... take %( @header Z=> @line) } [07:01] yea [07:01] *** kensanata joined [07:01] no-n: Could you give an exmaple for that? [07:02] xinming: goog luck! [07:02] m: my @x = ; for @x.keys, @x -> ($k, $v) { .say "$k: $v" } # xinming [07:02] rakudo-moar 66cf6f811: OUTPUT: «5===SORRY!5=== Error while compiling ␤Two terms in a row␤at :1␤------> 3b c>; for @x.keys, @x -> ($k, $v) { .say7⏏5 "$k: $v" } # xinming␤ expecting any of:␤ infix␤ infix stopper␤ statement end…» [07:02] no-n: No, Not this. [07:02] hm [07:03] m: my @x = ; my @y = ; %( @x Z=> @y).perl.say; <--- This one shouldn't have for loop. [07:03] rakudo-moar 66cf6f811: OUTPUT: «5===SORRY!5=== Error while compiling ␤Unable to parse expression in quote words; couldn't find final '>' (corresponding starter was at line 1)␤at :1␤------> 3 <--- This one shouldn't have for loop.7⏏5␤ expecting an…» [07:05] m: my @x = ; for (zip @x.keys, @x) -> ($k, $v) { say "$k => $v" } #ooops [07:05] rakudo-moar 66cf6f811: OUTPUT: «0 => a␤1 => b␤2 => c␤» [07:06] Stil have for. [07:07] If I wish to use for, I wouldn't ask this question, It's all for shorter and shorter statement [07:08] New module released to CPAN! OLE::Storage_Lite (0.0.1) by 03JGOFF [07:15] *** holyghost left [07:16] *** stoned75 left [07:19] *** ufobat__ is now known as ufobat [07:19] *** wamba joined [07:20] *** jmerelo left [07:28] m: my @x = ; my @y = ; %( @x Z=> @y).perl.say; [07:28] rakudo-moar 66cf6f811: OUTPUT: «{:a("x"), :b("y")}␤» [07:29] m: my @x = ; my @y = ; my $h = %( @x Z=> @y).perl.say; $h.^name.say [07:29] rakudo-moar 66cf6f811: OUTPUT: «{:a("x"), :b("y")}␤Bool␤» [07:29] m: my @x = ; my @y = ; my $h = %( @x Z=> @y); $h.perl.say; $h.^name.say [07:29] rakudo-moar 66cf6f811: OUTPUT: «${:a("x"), :b("y")}␤Hash␤» [07:31] m: say .kv [07:31] rakudo-moar 66cf6f811: OUTPUT: «(0 a 1 b 2 c)␤» [07:34] Xliff: I’ve answered your comment... [07:39] m: my @x = ; my @y = ; %( @x Z=> @y).perl.say; [07:39] rakudo-moar 66cf6f811: OUTPUT: «{:a("x"), :b("y")}␤» [07:39] SmokeMachine: In this example, How can we also force the length of @x for the resulting hash? [07:40] *** domidumont joined [07:46] m: my @x = ; my @y = ;  %( @x Z=> @y.pairs).perl.say # xinming something like this? [07:46] rakudo-moar 66cf6f811: OUTPUT: «{:a(0 => "x"), :b(1 => "y")}␤» [07:53] *** sena_kun joined [07:55] *** Altai-man_ left [07:55] SmokeMachine: Nope [07:55] m: my @x = ; my @y = ; %( @x.keys.map({ @x[$_] => @y[$_] }) ).perl.say; [07:55] rakudo-moar 66cf6f811: OUTPUT: «{:a("x"), :b("y"), :c(Any)}␤» [08:02] *** xinming left [08:04] *** kensanata left [08:04] *** xinming joined [08:19] *** xinming left [08:20] *** xinming joined [08:24] p6: class Foobar {}; my $A = [Foobar.new, Foobar.new]; my $L = (Foobar.new, Foobar.new); multi sub someop(Iterable[Foobar] $f) {}; someop($A); someop($L); [08:24] rakudo-moar 66cf6f811: OUTPUT: «Cannot resolve caller someop(Array:D); none of these signatures match:␤ (Iterable[Foobar] $f)␤ in block at line 1␤␤» [08:24] how do you write a type constraint where all elems of an iterable are instances of the same class? [08:35] daxim: you don't, because iterables aren't usually fully reified at the time of type checks, so you cannot check all the elements at type check time [08:36] weekly: https://github.com/drforr/raku-OLE-Storage_Lite [08:36] lizmat, Noted! (weekly) [09:04] *** wamba left [09:13] *** Doc_Holliwood left [09:13] *** Doc_Holliwould left [09:26] *** kensanata joined [09:31] ¦ ecosystem: ec65603d34 | 0racle++ (committed using GitHub Web editor) | META.list [09:31] ¦ ecosystem: Remove File::Stat and Point. They're on CPAN. [09:31] ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/ec65603d34 [09:35] *** lgtaube left [09:43] *** kensanata left [09:52] *** Altai-man_ joined [09:54] *** kensanata joined [09:55] *** sena_kun left [10:29] New module released to CPAN! Desktop::Notify (1.0.0) by 03FRITH [10:46] *** scovit joined [10:56] *** Doc_Holliwood joined [10:56] *** Doc_Holliwould joined [11:00] *** Guest38485 left [11:03] *** wamba joined [11:05] *** kensanata left [11:07] *** domidumont left [11:23] *** Doc_Holliwould left [11:23] *** Doc_Holliwould joined [11:35] m: my @h; my @n; @n.push: @h; @h = ; @n.push: @(@h); @n.perl.say; [11:35] rakudo-moar 66cf6f811: OUTPUT: «[["a", "b", "c"], ["a", "b", "c"]]␤» [11:35] m: my @h; my @n; @n.push: @h; @h = ; @n.push: [@h]; @n.perl.say; [11:35] rakudo-moar 66cf6f811: OUTPUT: «[["a", "b", "c"], ["a", "b", "c"]]␤» [11:35] m: my @h; my @n; @n.push: @h; @h = ; @n.push: @h,; @n.perl.say; [11:35] rakudo-moar 66cf6f811: OUTPUT: «[["a", "b", "c"], ["a", "b", "c"]]␤» [11:36] m: my @h = ; my @n; @n.push: @(@h); @h = ; @n.push: @(@h); @n.perl.say [11:36] rakudo-moar 66cf6f811: OUTPUT: «[["x", "y", "z"], ["x", "y", "z"]]␤» [11:36] my @h = ; my @n; @n.push: [@h]; @h = ; @n.push: @(@h); @n.perl.say; [11:36] xinming, rakudo-moar 66cf6f811: OUTPUT: «[["a", "b", "c"], ["x", "y", "z"]]␤» [11:37] Anyone here can explain the semantic about this for me please? the diff between @(@h) and [@h] [11:37] before, I thought that @(@h) is the same as [@h]; But it's definitely wrong in this case. [11:37] As I thought that @() is an array constructor which is like %() does [11:37] @(@h) means @h.list, but it already is listy, so it's just the identity function [11:38] Ok, Thanks, I thought that @() is the same as %() :-) [11:38] [@h] iterates @h (per single argument rule) and creates an new array with the values produced by the iteration [11:38] It is [11:38] %(%h) is also the identity function [11:39] It's just that you probably usually pass something that is not hashish. [11:39] So, If we want to copy the content, and push it, We should call something like @a[] ? [11:39] You should probably just call append :) [11:39] Ok, :-) [11:39] But yes, you can do the zen slice too. [11:39] But append will be more efficient [11:44] *** kensanata joined [11:53] *** sena_kun joined [11:55] *** Altai-man_ left [11:57] *** AlexDaniel joined [11:57] *** AlexDaniel left [11:57] *** AlexDaniel joined [12:12] *** veesh_ joined [12:13] *** veesh left [12:14] *** veesh_ is now known as veesh [12:27] *** Doc_Holliwould left [12:27] *** Doc_Holliwood left [12:33] *** wamba left [12:33] *** wamba joined [12:44] *** Guest78373 joined [12:46] *** titsuki left [12:57] *** Tirifto joined [13:03] *** wamba left [13:09] *** wamba joined [13:09] *** Doc_Holliwould joined [13:09] *** Doc_Holliwood joined [13:17] *** lgtaube joined [13:21] *** domidumont joined [13:35] Thanks for the tip, guifa! I'll see if I could make that work for me… [13:43] p6: class A {has Str $.msg is rw;} class B {has A $!a; method speak () {$!a.msg.say}} my $a = A.new(msg => “Boo!”); my $b = B.new(a => $a); $b.speak(); [13:43] rakudo-moar 66cf6f811: OUTPUT: «5===SORRY!5=== Error while compiling ␤Strange text after block (missing semicolon or comma?)␤at :1␤------> 3class A {has Str $.msg is rw;}7⏏5 class B {has A $!a; method speak () {␤ expecting any of:␤ infix␤ …» [13:46] p6: class A {has Str $.msg is rw;}; class B {has A $!a; method speak () {$!a.msg.say}}; my $a = A.new(msg => “Boo!”); my $b = B.new(a => $a); $b.speak(); [13:46] rakudo-moar 66cf6f811: OUTPUT: «Cannot look up attributes in a A type object␤ in method msg at line 1␤ in method speak at line 1␤ in block at line 1␤␤» [13:48] Tirifto, your attribute must be public for automagically generated constructor to initialize that [13:48] m: class A {has Str $.msg is rw;}; class B {has A $.a; method speak () {$!a.msg.say}}; my $a = A.new(msg => “Boo!”); my $b = B.new(a => $a); $b.speak(); [13:48] rakudo-moar 66cf6f811: OUTPUT: «Boo!␤» [13:49] otherwise you need to provide implementation of `BUILD` submethod... [13:49] m: class A {has Str $.msg is rw;}; class B {has A $!a; submethod BUILD(:$a) { $!a = $a }; method speak () {$!a.msg.say}}; my $a = A.new(msg => “Boo!”); my $b = B.new(a => $a); $b.speak(); [13:49] rakudo-moar 66cf6f811: OUTPUT: «Boo!␤» [13:49] Tirifto, ^ [13:52] sena_kun: I have experimented with the twigil, but I don't understand why it matters. I thought an attribute would always be accessible from within its object, and that the only thing the ‘.’ twigil would do is generate an accessor method, which should have no effect on referencing the attribute directly via ‘$!’. Apparently I'm missing something here? :/ [13:52] *** Altai-man_ joined [13:54] *** sena_kun left [13:55] *** mensvaga left [13:55] *** mensvaga joined [13:59] Tirifto: The . doesn't just generate an accessor, it also means that attribute can be initialized using the default object construction mechanism. [14:00] (It also controls whether it's included in the .raku dump output, and also the default destructuring) [14:01] *** kensanata left [14:03] jnthn: Since I'm giving B.new an object which has already been constructed ($a) in the example above, what exactly does the class need to construct when assigning $a to $b’s $!a? [14:05] m: class C { has $.a }; say C.new(a => 42).a [14:05] rakudo-moar 66cf6f811: OUTPUT: «42␤» [14:05] m: class C { has $!a }; say C.new(a => 42).a [14:05] rakudo-moar 66cf6f811: OUTPUT: «No such method 'a' for invocant of type 'C'␤ in block at line 1␤␤» [14:05] hah, of course :) [14:05] m: class C { has $.a; method m() { say $!a } }; say C.new(a => 42).m [14:05] rakudo-moar 66cf6f811: OUTPUT: «42␤True␤» [14:05] m: class C { has $!a; method m() { say $!a } }; say C.new(a => 42).m [14:05] rakudo-moar 66cf6f811: OUTPUT: «(Any)␤True␤» [14:05] That's what I wanted to show. [14:06] It won't initialize $!a from a named constructor argument `a` in the second case [14:07] So the point is that when it's declared with `$!a` is *isn't* assigning $a to $b's $!a [14:08] Huh! I see. [14:10] This means that whenever you have a `has $!foo` in a class, then you know you can refactor it by only considering the code in the class body. [14:11] *** mensvaga left [14:18] ¦ please-turn-off-the-autowatch-feature: ac33fbf818 | (Aleks-Daniel Jakimenko-Aleksejev)++ | README.md [14:18] ¦ please-turn-off-the-autowatch-feature: Add some text, should be good enough [14:18] ¦ please-turn-off-the-autowatch-feature: review: https://github.com/Raku/please-turn-off-the-autowatch-feature/commit/ac33fbf818 [14:26] *** veb40 joined [14:28] *** bla joined [14:30] *** bla left [14:31] *** scovit left [14:33] *** kensanata joined [14:35] *** veb40 left [14:42] Thank you, jnthn; I’ve come to some level of understanding now. :-) [14:48] *** MasterDuke joined [15:10] m: say "Hello", "world", "!"; [15:10] rakudo-moar 66cf6f811: OUTPUT: «Helloworld!␤» [15:10] m: say log 32, 2; [15:10] rakudo-moar 66cf6f811: OUTPUT: «5␤» [15:11] m: log 32, 2; [15:11] rakudo-moar 66cf6f811: OUTPUT: «WARNINGS for :␤Useless use of "log 32, 2" in expression "log 32, 2" in sink context (line 1)␤» [15:14] Kind of weird. I was getting "Two terms in a row\n------> log⏏ 32, 2" for the same expression in the REPL. Probably I was inserting some non-visible character?! [15:16] the repl has a bunch of known problems, maybe you just found a new one? [15:16] *** aluaces left [15:20] *** wamba left [15:29] *** kensanata left [15:30] *** wamba joined [15:42] Yeah, that's probable. [15:42] <[Coke]> works fine here. is it reproducible on a fresh run of the REPL for you? If so, what version of perl6 are you using? [15:49] ¦ rakudo.org: 26dd1dac1b | (Daniel Mita)++ (committed using GitHub Web editor) | templates/people.html.ep [15:49] ¦ rakudo.org: Replace broken hugtastic link [15:49] ¦ rakudo.org: review: https://github.com/perl6/rakudo.org/commit/26dd1dac1b [15:52] (Works fine here, too, for what it’s worth.) [15:55] *** sena_kun joined [15:55] *** Altai-man_ left [16:01] *** kktt007 joined [16:10] <[Coke]> ugh, -7ºC here today [16:12] *** Doc_Holliwould left [16:12] *** Doc_Holliwood left [16:18] *** kktt007 left [16:18] *** kktt007 joined [16:19] *** kktt007 left [16:19] *** kktt007 joined [16:20] *** veesh_ joined [16:21] *** veesh left [16:21] *** veesh_ is now known as veesh [16:22] *** kktt007 left [16:22] *** kktt007 joined [16:26] [Coke]: Have you got a sweater? [16:29] +13ºC here [16:29] which is a local record [16:29] too bad it was really rainy and overcast as well [16:30] Min or max record? :o [16:31] <[Coke]> Tirifto: I was out in shorts earlier today, guess I shouldn't complain. [16:31] <[Coke]> Wearing a coat in my house atm, though. [16:31] *** domidumont left [16:33] Tirifto: max [16:34] *** melezhik joined [16:35] New module released to CPAN! Gnome::GObject (0.15.8) by 03MARTIMM [16:43] *** kktt007 left [16:45] *** kktt007 joined [16:47] Well, on the bright side, you get the opportunity to use a coat and an umbrella respectively, both of which are pretty cool articles! [16:48] New module released to CPAN! Gnome::Gtk3 (0.21.1.2) by 03MARTIMM [16:49] *** lucasb joined [16:51] And it looks like I can make a wrapper object to selectively block write access to a certain object’s attributes by adding that object as an attribute which handles whatever, and then overriding its read accessors with my custom ones, whereafter the default write accessors no longer appear to work on it. [16:55] (Although I don't know how the default write accessor is implemented, given that just setting a custom read accessor can invalidate it; might be missing something still.) [16:55] Tirifto: you only need to make sure the return value of the original accessor is decontainerized [16:57] ¦ problem-solving: AlexDaniel assigned to JJ Issue SEO for the keyword "rakulang" seems poor https://github.com/Raku/problem-solving/issues/147 [17:00] m: class A { has $.a is rw = 42 }; role B { method a() { callsame<> } }; my $a := A.new; my $b := $a but B; dd $b.a = 666 # Tirifto [17:00] rakudo-moar 66cf6f811: OUTPUT: «Cannot modify an immutable Int (42)␤ in block at line 1␤␤» [17:03] *** Doc_Holliwould joined [17:03] *** Doc_Holliwood joined [17:04] lizmat: Thanks for the example; I'll need to sit on that for a while. xP [17:04] the <> is the decontainerization [17:04] *** wamba left [17:05] *** wildtrees joined [17:06] *** wildtrees left [17:06] *** wildtrees joined [17:08] *** jmerelo joined [17:08] *** AlexDaniel left [17:09] *** wildtrees left [17:09] *** aluaces joined [17:10] *** wildtrees joined [17:12] ddd [17:12] *** kktt007 left [17:13] lizmat: Not sure you need to decont since method a is not marked `is rw` nor `is raw`, so it will strip the container anyway :) [17:14] m: class A { has $.a is rw = 42 }; role B { method a() { callsame } }; my $a := A.new; my $b := $a but B; dd $b.a = 666 # Tirifto [17:14] rakudo-moar 66cf6f811: OUTPUT: «Cannot modify an immutable Int (42)␤ in block at line 1␤␤» [17:14] he [17:14] TIL [17:18] or rather, TIR (Today I Realized :-) [17:22] *** guifa2 joined [17:30] *** aluaces left [17:32] *** kensanata joined [17:37] Hi [17:37] Is there any way to map a number to an unicode character? That number is computed or in a variable [17:38] I'm trying this, but it does not work, probably for a good reason [17:38] m: say "\c[{ 0x25A1 + 2 } ]" [17:38] rakudo-moar 66cf6f811: OUTPUT: «5===SORRY!5=== Error while compiling ␤Unrecognized \c character␤at :1␤------> 3say "\c[7⏏5{ 0x25A1 + 2 } ]"␤ expecting any of:␤ argument list␤ double quotes␤ term␤» [17:39] chr()? [17:39] Grinnz: oh yes [17:39] Sorry [17:39] m: say char( 0x25A1 + 2 ) [17:39] rakudo-moar 66cf6f811: OUTPUT: «5===SORRY!5=== Error while compiling ␤Undeclared routine:␤ char used at line 1. Did you mean 'chars', 'chr'?␤␤» [17:39] m: say chr( 0x25A1 + 2 ) [17:39] rakudo-moar 66cf6f811: OUTPUT: «▣␤» [17:39] I mean, really [17:39] *** chloekek joined [17:40] * jmerelo smacks head and goes back to work [17:40] thanks Grinnz! [17:45] Coke: It's working fine here too. I guess I somehow inserted a nonvisible character 😅�😅�. I'm using Rakudo 2019.11. [17:49] hi, #raku people [17:49] 2020-01-03T08:14:17Z #raku tbrowder raku-advent.blog is cool. [17:50] Hi, tbrowder ! [17:50] we now have doman raku-advent.blog for our own [17:50] jmerelo: hi [17:51] tbrowder: great! [17:52] i'm on holland-america's ms zuiderdam tied up at costa maya with internet access till this afternoon [17:52] Have a great trip [17:52] For the time it's not working, but I guess DNS will catch up in a while. [17:52] *** Altai-man_ joined [17:52] you can take the new domain and get it all set up? [17:53] jj, i just claimed it so it may be a while [17:55] *** wamba joined [17:55] *** sena_kun left [17:56] anyone interested in number bases check out my module Number::More [17:58] *** jmerelo left [18:01] i'm reworking it into a new, improved module Number::Rebase with up to base 91. one advantage of base 91 is to have a UUID in 20 characters of ASCII (good for RDBMS unique keys) [18:09] *** Tirifto left [18:21] *** AlexDaniel joined [18:22] *** AlexDaniel left [18:22] *** AlexDaniel joined [18:31] *** aluaces joined [18:43] *** domidumont joined [18:57] *** AlexDaniel left [19:03] *** wamba left [19:04] *** wamba joined [19:09] *** rywo joined [19:12] if class attributes are $!foo and $.foo what is $foo in a class? a static field? [19:16] as in `class foo{ my $whatisthis }` [19:16] in contrast to `class foo{ has $!pravate }` [19:25] it's just a variable that's lexical to the class body [19:25] (also, you need a space between the class name and the {) [19:28] *** sauvin left [19:31] is it unique to each instance of the class? [19:37] *** vividsnow joined [19:37] no [19:38] *** daxim left [19:43] *** daxim joined [19:50] *** daxim left [19:53] ah ok. thanks. [19:53] *** sena_kun joined [19:55] *** daxim joined [19:55] *** Altai-man_ left [19:58] *** domidumont left [20:00] *** guifa2 left [20:03] *** patrickb joined [20:11] *** daxim left [20:19] *** vividsnow left [20:23] *** mahmudov joined [20:23] *** kensanata left [20:27] *** daxim joined [20:29] *** lucasb left [20:30] *** mahtob joined [20:31] *** mahtob left [20:31] *** mahtob joined [20:32] *** mahtob left [20:34] *** mahmudov left [20:43] *** mahmudov joined [20:51] *** MasterDuke left [20:58] *** guifa2 joined [21:01] *** stoned75 joined [21:04] *** guifa2 left [21:05] *** chloekek left [21:15] *** vividsnow joined [21:22] *** cpan-raku left [21:24] *** cpan-raku joined [21:24] *** cpan-raku left [21:24] *** cpan-raku joined [21:25] *** guifa2 joined [21:35] *** mahmudov left [21:39] ¦ doc: 670d0af874 | (Stoned Elipot)++ | doc/Language/io.pod6 [21:39] ¦ doc: Fix link to unlink routine [21:39] ¦ doc: review: https://github.com/Raku/doc/commit/670d0af874 [21:45] *** vividsnow1 joined [21:47] *** vividsnow left [21:47] *** vividsnow1 is now known as vividsnow [21:49] *** melezhik left [21:52] *** Altai-man_ joined [21:55] *** sena_kun left [21:55] *** vividsnow left [21:56] *** vividsnow joined [22:06] *** vividsnow left [22:06] *** vividsnow joined [22:12] *** mahmudov joined [22:21] *** rywo left [22:26] New module released to CPAN! OLE::Storage_Lite (0.0.2) by 03JGOFF [22:31] *** mahmudov left [22:33] *** wamba left [22:34] *** Tirifto joined [22:48] *** vividsnow left [23:10] *** rindolf left [23:28] *** Tirifto left [23:34] *** xinming left [23:50] *** mahmudov joined [23:53] *** sena_kun joined [23:55] *** Altai-man_ left