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