»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋 Set by Zoffix on 25 July 2018. |
|||
00:00
telex left
00:02
telex joined
00:03
p9s``` joined
00:08
p9s``` left
00:33
wildtrees left
00:42
p9s``` joined
00:48
p9s``` left
|
|||
vrurg | Who remembers in which section of docs.perl6.org FQN method call is described? /me is stuck... | 01:04 | |
01:13
reach_satori_ joined
01:14
molaf left
01:15
p9s``` joined,
satori__ left
|
|||
softmoth | vrurg, maybe docs.perl6.org/language/modules#require ? | 01:17 | |
vrurg | softmoth: No. I need the section about self.Parent::method() | 01:18 | |
timotimo | i see two matches in the source | 01:19 | |
language/objects.pod6 has Steerable::steer and language/operators.pod6 has Foo.Bar::baz | |||
01:20
p9s``` left
|
|||
timotimo | also, X::Method::InvalidQualifier has an example of it, and the Metamodel/MROBasedMethodDispatch doc also mentions that syntax | 01:20 | |
01:21
sftp left,
sftp joined
01:26
snarkyboojum_ left,
molaf joined,
snarkyboojum_ joined,
ufobat_ left
01:27
ufobat_ joined,
llfourn_ left
01:28
llfourn joined
01:30
sftp left,
cpan-p6 left
|
|||
Xliff | Hmmm... I don't like that write-up with role Bull-Like and role Steerable. | 01:30 | |
It's missing a step. | |||
01:30
agentzh left,
abraxxa left
01:31
jjatria left,
agentzh joined,
agentzh left,
agentzh joined,
TimToady joined,
sftp joined,
jjatria joined
01:32
cibs joined
01:39
snarkyboojum_ left
|
|||
vrurg | timotimo: thanks! | 01:40 | |
Ok, I wanted to make sure I miss nothing. | 01:42 | ||
m: role R[::T] { method foo { } }; class C does R[Int] { method foo { self.R[Int]::foo } }; C.new.foo | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Confused at <tmp>:1 ------> 3 does R[Int] { method foo { self.R[Int]:7⏏5:foo } }; C.new.foo expecting any of: colon pair |
||
Xliff | m: role R[::T] { method foo { } }; class C does R[Int] { method foo { self.R::foo } }; C.new.foo | 01:43 | |
camelia | No concretization found for R in method foo at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff | m: role R[] { method foo { } }; class C does R[Int] { method foo { self.R::foo } }; C.new.foo | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> No appropriate parametric role variant available for 'R' at <tmp>:1 |
||
Xliff | m: role R { method foo { } }; class C does R[Int] { method foo { self.R::foo } }; C.new.foo | 01:44 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> No appropriate parametric role variant available for 'R' at <tmp>:1 |
||
Xliff | m: role R { method foo { } }; class C does R { method foo { self.R::foo } }; C.new.foo | ||
camelia | ( no output ) | ||
Xliff | m: role R[::T] { method foo { } }; class C does R[Int] { method foo { self.R::foo } }; C.new.foo | ||
camelia | No concretization found for R in method foo at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff | vrurg: That looks like a parsing misstep. | ||
m: role R[::T] { method foo { } }; class C does R[Int] { method foo { self.R[Int]::foo } }; C.new.foo | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Confused at <tmp>:1 ------> 3 does R[Int] { method foo { self.R[Int]:7⏏5:foo } }; C.new.foo expecting any of: colon pair |
||
vrurg | Xliff: no way. Besides, self.R::foo is totally incorrect. Imagine class C does R[Int] does R[Str] { }. | 01:45 | |
Xliff: you're right. I was just checking if it worth a ticket and nothing is missed. | |||
Xliff | vrurg: In that situation you WILL have conflicting roles. | ||
vrurg | Xliff: no, I won't. | 01:46 | |
Xliff | Yes. You will. | ||
vrurg | role R[::T] { method foo { } }; class C does R[Int] does R[Str] { method foo { } }; C.new.foo | ||
m: role R[::T] { method foo { } }; class C does R[Int] does R[Str] { method foo { } }; C.new.foo | |||
camelia | ( no output ) | ||
vrurg | ^ Xliff | ||
The point is that R[Int] and R[Str] are different type objects. | 01:47 | ||
Xliff | O I C | ||
Still, the parser will balk if you try to specify a role-with-parameter in the self.Parent::method format. | 01:48 | ||
You should probably send that to problem-solving. | |||
vrurg is not sure wether it's a bug or a new feature. ;) | 01:50 | ||
But you're probably right. I was is doubt about this, but now I'm pushed toward problem-solving... | 01:51 | ||
01:53
p9s``` joined
|
|||
Xliff | vrurg: I think what you are trying is something no one thought of. | 01:54 | |
Which is why the parser doesn't handle it. | |||
Geth_ | ¦ problem-solving: vrurg assigned to jnthn Issue FQN method call needs support for parameterized roles. github.com/perl6/problem-solving/issues/110 | 01:55 | |
Xliff | Still.... expect questions asking: "Why?" | ||
vrurg | Simple. Because parameterized roles can have methods of the same name we one would need to specify which one he is interested in. | 01:56 | |
Xliff | Actually, the write-up you did does the job quite well! :) | ||
Actually, I stand corrected. | 01:57 | ||
In that example, don't you duplicate $!a? | |||
vrurg | Xliff: actually, yes, I do. | ||
Xliff | I don't think Perl6 will like that... ;) | ||
vrurg is too tired after one of the craziest days of the last weeks... | 01:58 | ||
Xliff: though I have fixed today `role R { has $.a; }; role R1 does R { }; role R2 does R2 { }; class C does R1 does R2 { }` – this one is valid. | |||
I have simplified the example. Common role was redundant in first place. | 02:00 | ||
02:00
p9s``` left
|
|||
Xliff | OK. I see. | 02:02 | |
My problem with such examples (and I just submitted a bug to docs about this). | 02:03 | ||
Why do you have R1 and R2, but do NOTHING with R2? | |||
It might help if you show how they are to be used together. | |||
vrurg: Sorry you had a crazy day. Good crazy or bad crazy.... | 02:05 | ||
... or just crazy? | |||
vrurg | Xliff: I think anyone can find a scenario where both are needed. | ||
A bit of everything. So, just crazy maybe? ;) | |||
Xliff | vrurg: OK, if you say so. However, I suspect it's one of the first questions that will be asked. | 02:06 | |
Hopefully tomorrow will be more sane. | |||
vrurg | In either case I'm a step close to complete R#3199 and this is good for sure. | ||
synopsebot | R#3199 [open]: github.com/rakudo/rakudo/pull/3199 [WIP][roles] [WIP] Implement perl6/problem-solving#103 | ||
Xliff | Ah! That's good. | 02:07 | |
Maybe you could check something for me. | |||
vrurg: Do you think this is a Method::Also issue or a rakudo one? | |||
github.com/lizmat/Method-Also/issues/1 | 02:08 | ||
02:08
p9s``` joined
|
|||
vrurg | Xliff: at the first glance I suspect Method::Also. Did you try it without the trait? | 02:10 | |
Xliff | Yesh. The first two examples basically ignore the trait. | ||
vrurg | Ah, right.. Sure, 90% for Method::Also, 10% for rakudo. | 02:11 | |
Xliff | Uh. Hold on thar, pardnah | 02:12 | |
vrurg | Looks like the trait doesn't install proto for multi methods. Let me see if add_method is supposed to do it implicitly. But I'd rather say it should not. | ||
02:14
softmoth left
|
|||
Xliff | vrurg: See update. | 02:15 | |
vrurg | Xliff: Nah, wrong. You alias the proto. Try introspecting my-method and see if candidates are there. | ||
Xliff | Not for roles, but they are for class. | ||
See updated bug | |||
According to lizmat, aliasing the proto is the expected mechanism. | 02:16 | ||
vrurg | Right. Role makes things different. When it's applied to a class you get two new protos on the class. But then I don't remember the details of the order in which things happen. Looks like candidates are not installed on my-method. | 02:18 | |
Xliff | Right, but if it works for class, then wouldn't it NOT working for roles make it internal? | ||
vrurg | As I said, try to introspect my-method on the class. | 02:19 | |
Xliff | OK. One sec. | ||
02:22
Actualeyes joined
|
|||
Xliff | .say for D.^find_method('my-method').candidates --> (my_method, my_method) | 02:22 | |
vrurg | I don't currently see what could go wrong because same proto-method object is just getting installed under a different name. All candidates are installed on that object and thus should be available. This is how it works with class. But for the role it looks like protos are cloned early, before candidates are installed. But this must not happen as role is already composed by the time it is applied to the class. | ||
Xliff | .say for B.^find_method('my-method').candidates --> () | 02:24 | |
^^ Role | |||
02:24
Cabanossi left
|
|||
Xliff | .say for B.^find_method('my_method').candidates --> (my_method, my_method) | 02:26 | |
^^ Role, non-alias | |||
So maybe Method::Also isn't doing enough? | |||
vrurg | Looks like it's Method::Also, after all. It's using add_method on proto, but for multis things are a bit more complicated. | 02:27 | |
Xliff | Aha! | ||
vrurg | Xliff: I think you're right. | ||
Xliff | Thanks! | ||
Yeah. I'm doing that all over GTK, so I kinda want this to work. | |||
What extra would need to be done for a role? | |||
If I can figure that out, I can submit a PR. | |||
I think the big difference is that it's ClassHOW vs ParametricRoleHOW. | 02:28 | ||
Adding the alias to the proto will work for ClassHOW. | 02:29 | ||
vrurg | Maybe it would be enough to use add_multi_method but I'm not sure if this would work if only applied to the proto. Needs testing. | ||
Xliff | OK. Well this is stuff that I can share with lizmat. | 02:30 | |
vrurg | Xliff: if you want to find out more, look in Perl6/Metamodel/MultiMethodContainer.nqp and Perl6/Metamodel/RoleToRoleApplier.nqp | ||
Xliff | Ooh. I missed MultiMethodContainer | ||
vrurg++: Thanks! | |||
vrurg | my pleasure! | 02:31 | |
It was good timing because this is exactly the area where I currently wandering. ;) | 02:32 | ||
Xliff | Weirdly enough... I was too. | ||
02:32
Doc_Holliwood joined
02:37
Cabanossi joined
02:46
p9s``` left,
p9s``` joined
03:08
p9s``` left
03:21
p9s``` joined
04:02
Doc_Holliwood left
04:07
p9s``` left,
p9s``` joined
04:19
p9s``` left
04:20
p9s``` joined,
wamba joined
04:34
jmerelo joined
04:36
wamba left
04:49
ponbiki joined
04:52
wamba joined
|
|||
Xliff | m: use NativeCall; class MockOperation is repr<CStruct> { has uint32 $.requested; has uint32 $.done }; my $m = MockOperation.new; say nativecast(Pointer, $m) | 04:58 | |
camelia | NativeCall::Types::Pointer<0x4281660> | ||
05:15
robertle left
05:34
sauvin joined
05:35
sauvin left
05:39
discoD left
05:41
domidumont joined
05:53
domidumont left
06:04
kini is now known as fs,
fs left,
fs joined
06:07
fs is now known as kini,
kini left,
kini joined
06:25
ravenousmoose joined
06:30
xinming left,
kensanata joined,
xinming joined
06:39
jmerelo left
06:44
wamba left
06:45
wamba joined
06:54
domidumont joined
06:55
ravenousmoose left
06:56
ravenousmoose joined
07:09
sena_kun joined,
HarmtH joined
07:14
Kaffe left
07:17
wamba left
07:22
kensanata left
07:26
p9s``` left
07:36
abraxxa joined
07:39
ravenous_ joined
07:41
ravenousmoose left
07:45
agentzh left
07:47
agentzh joined
07:58
p9s``` joined
08:02
wamba joined
08:04
p9s``` left
08:17
Cabanossi left
08:21
Cabanossi joined
08:28
Doc_Holliwood joined
08:36
p9s``` joined,
Sgeo_ joined
|
|||
Xliff | m: say $?*A | 08:38 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of $? variable; in Perl 6 please use $! for handling child errors also at <tmp>:1 ------> 3say $?7⏏5*A |
||
Xliff | m: say ?$*A | ||
camelia | False | ||
Xliff | m: sub bb { say $*A; }; sub aa { my $*A = 4; bb; }; say ?$*A; aa; | 08:39 | |
camelia | False 4 |
||
Xliff | m: sub bb { say ?$*A; }; sub aa { my $*A = 4; bb; }; say ?$*A; aa; | ||
camelia | False True |
||
Xliff | m: sub bb { say $*A if ?$*A; }; sub aa { my $*A = 4; bb; }; say ?$*A; aa; | 08:40 | |
camelia | False 4 |
||
08:40
Sgeo left
|
|||
Xliff | m: say "aaa" ~~ / (.) {} ($0)+ /; | 08:50 | |
camelia | Nil | ||
Xliff | m: say "aaa" ~~ / (.) {} :my $c = $0; ($c)+ /; | 08:51 | |
camelia | 「aaa」 0 => 「a」 1 => 「a」 1 => 「a」 |
||
Xliff | m: say "aba" ~~ / (.) {} :my $c = $0; ($c)+ /; | ||
camelia | Nil | ||
Xliff | m: say "bbbbbb" ~~ / (.) {} :my $c = $0; ($c)+ /; | ||
camelia | 「bbbbbb」 0 => 「b」 1 => 「b」 1 => 「b」 1 => 「b」 1 => 「b」 1 => 「b」 |
||
Xliff | m: say "aaa" ~~ / (.) {} ($0)+ /; | 08:54 | |
camelia | Nil | ||
08:54
ufobat__ joined
|
|||
Xliff | m: say "aaa" ~~ / (.) {} $0+ /; | 08:54 | |
camelia | 「aaa」 0 => 「a」 |
||
Xliff | m: say "aaa" ~~ / (.) {} $0 /; | ||
camelia | 「aa」 0 => 「a」 |
||
Xliff | m: say "aaa" ~~ / (.) {} ($0)+ /; | ||
camelia | Nil | ||
Xliff | m: say "bbbbbb" ~~ / (.) {} :my $c = $0; ($c)+ /; | ||
camelia | 「bbbbbb」 0 => 「b」 1 => 「b」 1 => 「b」 1 => 「b」 1 => 「b」 1 => 「b」 |
||
Xliff | m: "bbbbbb" ~~ / (.) {} :my $c = $0; ($c)+ /; $c.say | 08:55 | |
camelia | 「b」 | ||
Xliff | m: "bbbbbb" ~~ / (.) {} :my $c = $0; ($c)+ /; $c.perl.say | ||
camelia | Match.new(hash => Map.new(()), from => 0, list => (), orig => "bbbbbb", pos => 1, made => Any) | 08:56 | |
08:57
ufobat_ left
09:01
ravenous_ left
09:04
ravenousmoose joined,
xinming_ joined
09:06
Black_Ribbon left
09:07
xinming left
09:08
pecastro joined
09:11
p9s``` left,
Doc_Holliwood left
|
|||
Xliff | m: "_transfer_full_" ~~ / '_' <[\w _]>+ '_'/; say $0 | 09:19 | |
camelia | Nil | ||
Xliff | m: "_transfer_full_" ~~ / '_' <[\w _]>+? '_'/; say $0 | ||
camelia | Nil | ||
Xliff | m: "_transfer_full_" ~~ / '_' <[a..z _]>+? '_'/; say $0 | ||
camelia | Nil | ||
Xliff | m: "_transfer_full_" ~~ / '_' ~ '_' (\w+) /; say $0 | 09:20 | |
camelia | 「transfer_full」 | ||
Xliff | m: "_transfer_full_" ~~ / '_' ~ '_' (\w+) /; say $/.perl | ||
camelia | Match.new(from => 0, orig => "_transfer_full_", pos => 15, list => (Match.new(list => (), hash => Map.new(()), made => Any, from => 1, pos => 14, orig => "_transfer_full_"),), made => Any, hash => Map.new(())) | ||
Xliff | m: "_transfer_full_" ~~ / '_' ~ '_' (\w+) /; say $0.perl | ||
camelia | Match.new(list => (), orig => "_transfer_full_", pos => 14, from => 1, hash => Map.new(()), made => Any) | ||
Xliff | m: "_transfer_full_" ~~ / '_' ~ '_' (\w+) /; say $0.gist | ||
camelia | 「transfer_full」 | ||
Xliff | m: "_transfer_full_" ~~ / '_' (\w+) '_' /; say $0 | 09:21 | |
camelia | 「transfer_full」 | ||
Xliff | m: "_transfer_full_" ~~ / '_' (\w+) /; say $0 | ||
camelia | 「transfer_full_」 | ||
09:32
ravenousmoose left
09:34
ravenousmoose joined
09:35
Doc_Holliwood joined
09:37
pat_js joined
09:38
p9s``` joined
09:44
p9s``` left
09:59
reach_satori_ left
10:06
aborazmeh joined,
aborazmeh left,
aborazmeh joined
10:15
p9s``` joined
10:18
softmoth joined
10:21
p9s``` left
10:27
domidumont left
10:38
Voldenet left
10:41
Voldenet joined,
Voldenet left,
Voldenet joined
10:49
reach_satori_ joined
10:50
p9s``` joined
10:51
isBEKaml joined
10:56
p9s``` left
10:58
Sgeo__ joined
11:01
Sgeo_ left
11:04
dogbert17 joined
11:11
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
|
|||
Xliff | m: 0x4488.Str.say | 11:16 | |
camelia | 17544 | ||
Xliff | m: 17544.fmt('%x').say | ||
camelia | 4488 | ||
Xliff | m: use experimental; my $x = 17544.fmt('%x'); my $b = Blob.new($x.comb(2).map( *.Int )); $b.say | 11:18 | |
camelia | Blob:0x<2C 58> | ||
11:18
aborazmeh left
|
|||
Xliff | m: use experimental; my $x = 17544.fmt('%x'); my $b = Blob.new($x.comb(2)); $b.say | 11:18 | |
camelia | Type check failed in initializing element #0 to Blob; expected uint8 but got Str ("44") in block <unit> at <tmp> line 1 |
||
Xliff | m: use experimental; my $x = 17544.fmt('%x'); $x.comb(2).say | ||
camelia | (44 88) | ||
Xliff | m: use experimental; my $x = 17544.fmt('%x'); my $b = Blob.new( $x.comb(2).map( "0x{$_}".Int ) ); $b.say | 11:19 | |
camelia | Use of uninitialized value $_ of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at <tmp> line 1 Cannot map a Seq using 'Failure.new(exception => X::Str::Nu… |
||
Xliff | m: use experimental; my $x = 17544.fmt('%x'); my $b = Blob.new( $x.comb(2).map({ "0x{$_}".Int }) ); $b.say | ||
camelia | Blob:0x<44 88> | ||
Xliff | m: use experimental; my $x = 17544.fmt('%x'); my $b = Blob.new( $x.comb(2).reverse.map({ "0x{$_}".Int }) ); $b.say | 11:20 | |
camelia | Blob:0x<88 44> | ||
Xliff | m: use experimental; my $x = 17544.fmt('%x'); my $b = Blob.new( $x.comb(2).reverse.map({ "0x{$_}".Int }) ); $b.say; $b.read-int32.say | ||
camelia | Blob:0x<88 44> Too few positionals passed; expected 2 or 3 arguments but got 1 in block <unit> at <tmp> line 1 |
||
Xliff | m: use experimental; my $x = 17544.fmt('%x'); my $b = Blob.new( $x.comb(2).reverse.map({ "0x{$_}".Int }) ); $b.say; $b.read-int32(0).say | 11:21 | |
camelia | Blob:0x<88 44> MVMArray: read_buf out of bounds offset 0 start 0 elems 2 count 4 in block <unit> at <tmp> line 1 |
||
Xliff | m: use experimental; my $x = 17544.fmt('%x'); my $b = Blob.new( $x.comb(2).reverse.map({ "0x{$_}".Int }) ); $b.say; $b.read-int16(0).say | ||
camelia | Blob:0x<88 44> 17544 |
||
Xliff | m: use experimental; my $x = 17544.fmt('%x'); my $b = Blob.new( $x.comb(2).reverse.map({ "0x{$_}".Int }) ); $b.say; $b.read-int16(0, BigEndian).say | 11:22 | |
camelia | Blob:0x<88 44> -30652 |
||
Xliff | m: use experimental; my $x = 17544.fmt('%x'); my $b = Blob.new( $x.comb(2).reverse.map({ "0x{$_}".Int }) ); $b.say; $b.read-uint16(0, BigEndian).say | ||
camelia | Blob:0x<88 44> 34884 |
||
11:22
MilkmanDan left
11:23
p9s``` joined
11:24
MilkmanDan joined
|
|||
Xliff | Does perl6 provide an easier way to swap endian-ness of an Integer? | 11:24 | |
timotimo | why would you use read-int but not write-int? | 11:26 | |
Xliff | Is there a write-int?! | ||
timotimo | of course | ||
Xliff | docs.perl6.org/type/Blob#method_read-uint32 ?!?? | ||
timotimo | i'm still wishing for write-* on Buf:U | ||
well, yeah, blobs are immutable | 11:27 | ||
lizmat | on Buf:U ?? | ||
timotimo | yes | ||
lizmat | that should auto-vivify ? | ||
timotimo | it'd allocate a new buf, write to it, then return the object | ||
docs.perl6.org/type/Buf#method_write-uint8 - xliff | |||
Xliff | m: my $b = Blob.new.write-int(0x88884444).read-int(0, LittleEndian).say | ||
camelia | No such method 'write-int' for invocant of type 'Blob' in block <unit> at <tmp> line 1 |
||
Xliff | m: my $b = Blob.new.write-int(0x88884444).read-uint32(0, LittleEndian).say | 11:28 | |
camelia | No such method 'write-int' for invocant of type 'Blob' in block <unit> at <tmp> line 1 |
||
timotimo | Buf! | ||
Xliff | m: my $b = Bug.new.write-uint32(0x88884444).read-uint32(0, LittleEndian).say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared name: Bug used at line 1. Did you mean 'Bag', 'Buf'? |
||
lizmat | it could work for Blob:U as well | ||
Xliff | m: my $b = Buf.new.write-uint32(0x88884444).read-uint32(0, LittleEndian).say | ||
11:28
p9s``` left
|
|||
camelia | Too few positionals passed; expected 3 or 4 arguments but got 2 in block <unit> at <tmp> line 1 |
11:28 | |
timotimo | that's true! | ||
lizmat | as long as its :U | ||
Xliff | m: my $b = Buf.new.write-uint32(0, 0x88884444).read-uint32(0, LittleEndian).say | ||
camelia | Nil | ||
timotimo | Xliff: write-uint32 doesn't return self | ||
Xliff | m: my $b = Buf.new.write-uint32(0, 0x88884444); $b.read-uint32(0, LittleEndian).say | ||
camelia | No such method 'read-uint32' for invocant of type 'Any' in block <unit> at <tmp> line 1 |
||
timotimo | m: (my $b = Buf.new).write-uint32(0, 0x88884444); $b.read-uint32(0, LittleEndian).say | ||
camelia | 2290631748 | ||
Xliff | m: my $b = Buf.new; $b.write-uint32(0, 0x88884444); $b.read-uint32(0, LittleEndian).say | ||
camelia | 2290631748 | ||
Xliff | !sleep... wheee! | 11:29 | |
m: 0x44448888.say | |||
camelia | 1145342088 | ||
Xliff | m: my $b = Buf.new; $b.write-uint32(0, 0x88884444); $b.read-uint32(0, BigEndian).say | ||
camelia | 1145342088 | ||
timotimo | m: my $b = Buf.new; $b.write-uint32(0, 0x88884444); $b.read-uint32(0, BigEndian).base(16).say | ||
camelia | 44448888 | ||
Xliff | OK. So now I have my answer. timotimo++ | 11:30 | |
Trying to simplify this: github.com/GNOME/glib/blob/master/...t-stream.c | |||
11:31
wamba left
|
|||
lizmat | so I wonder, why don't the write-* methods return self ? | 11:31 | |
Xliff | lizmat++ | ||
lizmat | looking at them now, it seems that having both -> Nil *and* "is raw" feel weiird | ||
.oO( what was I thinking ) |
|||
timotimo | :) | 11:32 | |
Xliff | lizmat: I'm looking at github.com/lizmat/Method-Also/issues/1. If you have some time, could you comment on it? Thanks. | ||
lizmat commented, but not with anything useful | 11:33 | ||
Xliff | heh | 11:34 | |
lizmat: Weekend is good! Thanks! | |||
11:35
p9s``` joined
|
|||
Kaiepi | i thought there weren't write-* methods as well, did they get added after the read-* ones or st? | 11:35 | |
timotimo | no, at the same time | ||
i think? | 11:36 | ||
not more than a week or two apart in any case | |||
Kaiepi | " Introducing buf8/blob8.read-(u)bits/write-(u)bits" | ||
ig not | 11:37 | ||
11:43
domidumont joined
|
|||
Xliff | m: my $b; say ?$b | 11:44 | |
camelia | False | ||
Xliff | m: my $b; say ?$b; $b = 2; say ?$b | ||
camelia | False True |
||
AlexDaniel | squashable6: status | 11:46 | |
squashable6 | AlexDaniel, 🍕🍕 SQUASHathon is in progress! The end of the event in 2 days and ≈0 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
AlexDaniel | hold on | ||
squashable6: status | 11:47 | ||
squashable6 | AlexDaniel, ⚠🍕 Next SQUASHathon in 6 days and ≈16 hours (2019-10-12 UTC-12⌁UTC+20). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
AlexDaniel | ok that's better | ||
still looking for ideas for this squashathon! | |||
and also for someone to take care of it :) | |||
11:51
isBEKaml left
11:59
abraxxa left
12:01
pat_js left
12:04
pat_js joined
12:17
Cabanossi left
12:18
Cabanossi joined
12:22
gabiruh_ joined
12:25
gabiruh left,
Xliff left
12:26
scimon joined
12:31
lucasb joined
|
|||
lizmat | timotimo Kaiepi looks like massive test breakage if write-int* methods return self | 12:37 | |
timotimo | huh, that's interesting, i wouldn't expect that | 12:38 | |
lizmat | so either we let only the :U versions return the Buf/Blob | ||
or we change the spectest | |||
12:39
Guest93 left,
Guest93 joined,
Guest93 left
12:41
softmoth left
|
|||
Kaiepi | which tests break lizmat? | 12:45 | |
timotimo | i hope no tests will ever break lizmat | ||
12:45
softmoth joined
|
|||
lizmat | Kaiepi: all the tests that check for Nil :-) | 12:49 | |
12:50
Guest93 joined
12:53
camelCaser left
12:55
camelCaser joined
12:56
pat_js left,
pat_js joined
|
|||
timotimo | whyyy :) | 12:56 | |
12:59
camelCaser left
13:04
Sgeo_ joined
13:07
Sgeo__ left
13:08
gabiruh_ left,
gabiruh joined
13:09
ravenousmoose left
13:10
ravenousmoose joined
13:17
ufobat__ left
13:21
ravenousmoose left
13:28
scimon_ joined
13:31
scimon left
13:32
ravenousmoose joined
13:34
AlexDaniel left,
AlexDaniel joined,
AlexDaniel left,
AlexDaniel joined
13:35
Kaiepi left
|
|||
lizmat | weekly: news.perlfoundation.org/post/grants...2019_votes | 13:37 | |
notable6 | lizmat, Noted! (weekly) | ||
lizmat | timotimo: because I wrote thorough tests :-) | ||
timotimo | i wonder if there's something to be said for having a bit less rigid tests every now and then | 13:38 | |
13:43
camelCaser joined
13:44
Sgeo joined
13:47
Sgeo_ left
|
|||
lizmat | timotimo: I don't agree: it just means more potential fallout when code is depending on untested behaviour, should we change that behaviour | 13:48 | |
timotimo | mhh | 13:49 | |
lizmat | s/code/code out there/ | ||
13:52
ravenous_ joined
13:53
ravenousmoose left
14:01
stux|RC left
14:02
agentzh left
14:04
agentzh joined,
wamba joined
14:05
ravenous_ left
14:08
ravenousmoose joined
14:11
p9s``` left
14:15
stux|RC joined
14:44
ravenous_ joined,
ravenousmoose left
14:48
p9s``` joined
14:53
p9s``` left
14:56
ravenous_ left
14:57
ravenousmoose joined
14:58
softmoth left
15:01
softmoth joined
15:04
silug joined,
domidumont left
|
|||
lizmat | timotimo: otoh, write-int* is post 6.d, so I guess it's ok to change the tests | 15:21 | |
15:23
p9s``` joined
15:29
p9s``` left
15:35
Kaiepi joined
15:41
Doc_Holliwood left
15:44
Doc_Holliwood joined
15:45
reach_satori_ left
15:51
sno left,
pat_js left
15:52
sno joined
15:54
aindilis left
15:55
aindilis` joined
15:56
p9s``` joined
15:58
aindilis` left
15:59
aindilis joined
|
|||
timotimo | <3 | 15:59 | |
15:59
scimon_ left
16:00
ravenousmoose left
|
|||
timotimo | there's this thing going around on twitter with "first language, had difficulties, most used, totally hate, most loved, for beginners", each one with a number, 1 through 6 | 16:01 | |
since "most loved" comes before "6. for beginners", i get all the tweets with "most loved: perl" in my "perl 6" search column | |||
16:02
p9s``` left,
ravenousmoose joined
16:12
aindilis left
16:15
ravenousmoose left
16:16
ravenousmoose joined
16:23
Xliff joined,
MilkmanDan left
16:25
MilkmanDan joined
16:27
p9s``` joined
|
|||
lizmat | timotimo: yeah :-) | 16:28 | |
16:33
p9s``` left
16:44
jmerelo joined
17:01
Sgeo_ joined
17:02
p9s``` joined
17:04
Sgeo left,
robertle joined
17:09
p9s``` left
|
|||
uzl[m] | AlexDaniel: I think providing a P6 version for opendatastructures.org/ would be a great idea for | 17:19 | |
a squashathon (or possible multiple of them). It could help putting P6 out there, especially given | |||
that this textbook might be used in college courses. | |||
17:21
p9s``` joined
17:26
p9s``` left
17:27
ravenousmoose left,
ravenousmoose joined
17:31
wamba left
|
|||
AlexDaniel | uzl[m]: interesting! | 17:32 | |
uzl[m]: someone needs to organize that though | |||
jmerelo | uzl[m]: Um, not another book, please. We need a lot of help in the documentation. Let's try and get a good documentation first. | 17:37 | |
uzl[m] | jmerelo: Totally. All efforts should go to improve the documentation first. It's less of "do this now" and more of a "possible squashaton in the no-so distant future as long as it doesn't conflict with more important issues". ;-) | 17:41 | |
So was there a book-related squashaton before? | |||
AlexDaniel | no, but there were grants | 17:45 | |
jmerelo | uzl[m]: Some time ago. I would really wish some to happen again. | 17:48 | |
uzl[m]: ah, OK, not book-related. More documentation related. | |||
17:49
domidumont joined
17:56
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
jmerelo | BTW, does anyone know how Andrew Shitov's book is doing? | 18:00 | |
Sorry, course. | |||
18:00
aindilis joined
18:01
p9s``` joined
18:07
p9s``` left
|
|||
AlexDaniel | jmerelo: no clue, but I guess we'll hear about it in grant progress reports | 18:10 | |
jmerelo | I just saw finanalyst's request was rejected. | 18:20 | |
AlexDaniel: I don't think the PR in the documentation is the way to go. I will open an issue to discuss that, although my plans have been exposed in several places already. | 18:33 | ||
AlexDaniel | jmerelo: it's a fine PR, I think it makes sense to do that first and then do more dramatic changes later | 18:39 | |
18:41
p9s``` joined
|
|||
jmerelo | AlexDaniel: it's not in the big picture, it's not in the details. "Rakudo Raku" does not make sense, for instance. Using raku fencing in markdown (like ```raku) does not either. Also just changing stuff in master will not cut it. | 18:46 | |
AlexDaniel | jmerelo: yeah, just Rakudo is fine | 18:47 | |
jmerelo | AlexDaniel: preparing an issue right now to discuss that. Anyway, the general idea can be used... But once we get the details hammered out in an issue. | ||
AlexDaniel | Rakudo Raku, hahahaha | ||
18:48
p9s``` left
|
|||
jmerelo | AlexDaniel: OK, here goes the issue github.com/perl6/doc/issues/3046 | 18:51 | |
18:53
aborazmeh left
18:54
wokurka joined
18:56
domidumont left
|
|||
tbrowder | raku raku sounds like a phrase out of a limbo song | 19:00 | |
jmerelo: progress bogged down on Documentable, but at least my Build.pm6 is doing what i want it to do. | 19:01 | ||
19:02
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
aborazmeh left
|
|||
jmerelo | tbrowder: we're working down there in the basement, trying to iron out problems with Pod::to::Cached and what might be eventually called Document::Cache | 19:03 | |
tbrowder: I don't know if you have seen this github.com/perl6/Pod-To-Cached/issues/11 | |||
tbrowder: also, Antonio is minus his computer now. And I have started classes, so I get bogged now preparing them, tutoring students... | 19:04 | ||
19:04
Black_Ribbon joined
|
|||
lizmat | twitter.com/melezhik2/status/11801...8736169987 #rakulang | 19:09 | |
AlexDaniel | it's not early btw | 19:10 | |
we haven't renamed to raku but we have raku alias | |||
I mean, yet | |||
lizmat | from the PR: "When using social media that use hash-tags, users are suggested to use the `#rakulang` hash-tag" | 19:11 | |
lizmat is not on Twitter | |||
19:13
aborazmeh joined,
aborazmeh left,
aborazmeh joined
19:16
p9s``` joined
19:19
sena_kun left
19:22
aborazmeh left,
p9s``` left
19:26
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
aborazmeh left
19:29
aborazmeh joined,
aborazmeh left,
aborazmeh joined
19:30
aborazmeh left
19:33
aborazmeh joined,
aborazmeh left,
aborazmeh joined
19:36
cpan-p6 left,
jmerelo left,
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
19:43
Sgeo_ left
19:47
Actualeyes left
|
|||
guifa | Okay, here comes another “What’s the best practice for something no one has really done yet” question from guifa :-) | 19:48 | |
I’m going to make an Intl::Date class, subclassing regular Date | |||
19:49
p9s``` joined
|
|||
guifa | Idea being I’d like it to be compatible with anything else that takes a Date. | 19:49 | |
19:50
aborazmeh left
|
|||
guifa | If someone passes a Intl::Date::Hebrew, for instance, though, should .day .month .year, etc, pass the Gregorian or the Hebrew number? | 19:51 | |
19:51
cinch__ is now known as cinch
|
|||
lizmat | guifa: I think you've answered your own question with: "I’d like it to be compatible with anything else that takes a Date" | 19:52 | |
guifa | lizmat: I was secretly hoping there was a “If in a Date container, use X method, if in an Intl::Date container, use Y method” :-) | ||
lizmat | well, if you're subclassing Date, you *can* supply your own .day, .month, .year etc methods | 19:53 | |
guifa meant more like, my Date $d = Intl::Date.new(…); $d.day = 23; BUT my Intl::Date $d = Intl::Date.new(…); $d.day = 4 | 19:54 | ||
But I’m guessing variablse have no way of knowing anything about their container (plus I can see this causing no end of confusion) | 19:55 | ||
lizmat | then you're misunderstanding what "my Foo $a" means | ||
19:55
p9s``` left
|
|||
lizmat | that just means that a type check will be done when assigning | 19:55 | |
and if Intl::Date is a subclass of Date, then my Date $d = Intl::Date.new(...) will just work without any additional semantics | 19:56 | ||
guifa | So suppose the next question is … is compatibility with Date something folks would see as important? (Beyond simple coercion, which is a given) | 19:58 | |
MasterDuke | well, i guess you could try using greppable6 and seeing if a lot of current modules use Dates. if so, transparent compatibility with them might be desired | 19:59 | |
lizmat | guifa: also: modules.perl6.org/dist/Date::Calen...an:JFORGET | 20:01 | |
and: modules.perl6.org/dist/Date::Calen...an:JFORGET | |||
perhaps coordination with Jean Forget would be helpful :-) | 20:02 | ||
El_Che | One of the nicest thing about the (mini) web frameworks in Go is that their interfaces are compatible with the http interface in core. Everything you do is familiar and the structs/datatypes are compatible, so you can pass request, responses around and so on. I think that people would appreciate a similar mindset in p6 as well | ||
lizmat | El_Che: have you looked at Cro? | 20:03 | |
El_Che | lizmat: I don't mean the web frameworks as such (Cro is nice), it's about the Date transparency | ||
20:03
mensvaga left
|
|||
El_Che | an "add-on" instead of different thing altogther to be learnt | 20:04 | |
lizmat: agreeing with you, actually | |||
guifa | lizmat: I saw those. The Hebrew one has been helpful for doing some of the coding. I’m just really want the Intl:: stuff to work as intuitively as possible so people actually use them. But what’s intuitive for me may not be for others so I wanted to check (in particular in this case, where I see very valid reasons to subclass Date, or to keep Intl::Date its own thing). I might toss the question on the FB page too and see what people | 20:11 | |
there before deciding | |||
lizmat | sounds like a plan :-) | 20:12 | |
20:18
agentzh left
20:20
ravenousmoose left,
agentzh joined
20:21
p9s``` joined
20:24
leah2 left
20:27
p9s``` left
20:37
wamba joined
|
|||
Kaiepi | none of the equality operators that exist currently allow you to type check stuff more strictly than ~~ by using the generic checks HOWs use while ignoring the ACCEPTS method, right? | 20:38 | |
if it doesn't exist i wanna make a library for it, but i'd rather not add another equality operator unless there isn't a way to do it already | 20:39 | ||
20:39
softmoth left
|
|||
lizmat | Kaiepi: not sure what you're getting at ? | 20:39 | |
20:39
leah2 joined
20:40
softmoth joined
|
|||
Kaiepi | m: 1.^type_check: 1 | 2 | 3 | 20:44 | |
camelia | ( no output ) | ||
Kaiepi | m: say 1.^type_check: 1 | 2 | 3 | ||
camelia | 0 | ||
Kaiepi | m: say 1.ACCEPTS: 1 | 2 | 3 | ||
camelia | any(True, False, False) | ||
Kaiepi | basically i want something that type checks using the literal type | ||
but works with parents and roles | |||
Any.ACCEPTS was the closest i could find to what i want in rakudo but that's not an operator | 20:46 | ||
lizmat | so "say 1.ACCEPTS: 1 | 2 | 3" should be any(True,True,True) ? | ||
Kaiepi | it shouldn't say 1 and 1 | 2 | 3 are equal because Int is not Junction | 20:47 | |
lizmat | I'm not following, sorry | 20:50 | |
Kaiepi | Int and Junction are unrelated at the type level, so in this case they shouldn't be considered equal | 20:54 | |
but Int and Int should, and Int and UInt should since UInt is a subset of Int | 20:55 | ||
lizmat | but they aren't considered equal? | 20:57 | |
Int and Junction? | |||
1.ACCEPTS: 1 | 2 | 3 returns a Junction | |||
20:58
p9s``` joined
|
|||
Kaiepi | ik, but Int does not inherit or do Junction | 20:59 | |
lizmat | indeed... | 21:00 | |
Junctions aren't even Any | |||
which is what makes them work, btw | |||
21:04
p9s``` left
|
|||
Kaiepi | lemme think of a better example, junction isn't a very good type to use to show what i mean | 21:09 | |
21:26
krychu joined
|
|||
AlexDaniel | yes, it's a raku bus stop :P github.com/AlexDaniel | 21:29 |
|