»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:07 dct left, klapperl left 00:10 Rawriful left 00:11 dct joined, perlpilot left 00:12 AlexDaniel` left 00:13 unclechu left, mack[m] left, tadzik left, Garland_g[m] left, ilmari[m] left, Matthew[m] left, mienaikage left, CIAvash[m] left 00:14 klapperl joined, wictory[m] left 00:15 evalable6 left, evalable6 joined, reportable6 left, squashable6 left, releasable6 left, johnnymacs left 00:16 bisectable6 left
AlexDaniel .tell Zoffix I don't use twitter, but occasionally I read your feed. It's great, I love it. Very positive and fun, please keep it going ♥ 00:23
yoleaux AlexDaniel: I'll pass your message to Zoffix.
00:27 statisfiable6 left, greppable6 left, bloatable6 left, coverable6 left, reportable6 joined, greppable6 joined, squashable6 joined, statisfiable6 joined, ChanServ sets mode: +v statisfiable6, bloatable6 joined, ChanServ sets mode: +v bloatable6, coverable6 joined 00:39 mcmillhj left, brrt left 00:41 MasterDuke joined 00:44 mienaikage joined 00:51 mcmillhj joined, cdg_ left 00:52 cdg joined, skids joined 00:56 mcmillhj left 00:59 mcmillhj joined 01:04 mcmillhj left 01:05 shinobi-cl joined 01:08 aborazmeh joined, aborazmeh left, aborazmeh joined, dct left 01:12 leont left 01:13 bisectable6 joined, releasable6 joined 01:15 markong left, mcmillhj joined 01:21 mcmillhj left 01:24 tadzik joined, CIAvash[m] joined, unclechu joined, mack[m] joined, Matthew[m] joined, wictory[m] joined, ilmari[m] joined, Garland_g[m] joined, AlexDaniel` joined 01:31 mcmillhj joined 01:36 mcmillhj left 01:55 Wenjie1 joined 01:56 aborazmeh left 02:03 aindilis left 02:05 MasterDuke_ joined, MasterDuke left 02:06 Zoffix joined 02:08 MasterDuke_ is now known as MasterDuke 02:10 Actualeyes joined
Zoffix Man, I'm surprised my postfix:<++> optimization actually comes out 25% slower. I'm binding to a temp local var and rewriting the op to prefix:<++>: temp.perl6.party/pre.html 02:10
At worst, I expected it to be equal. 02:11
And here are the Int candidates my bench is hitting. The postfix one defines a lexical var (I'm guessing gets lowered to local) github.com/rakudo/rakudo/blob/052a...#L212-L222 02:12
Wonder why it's slower
Geth whateverable: 79b158edf1 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
New bot: Notable

Resolves #285.
Some usage examples are shown on the wiki:
  github.com/perl6/whateverable/wiki/Notable
02:17
02:18 notable6 joined
MasterDuke Zoffix: does --profile show anything interesting? or a perf profile? 02:18
AlexDaniel weekly: New bot: Notable github.com/perl6/whateverable/wiki/Notable 02:19
notable6 AlexDaniel, Noted!
AlexDaniel welcome our new bot :) 02:20
not sure if that's going to be super useful, but let's see how it goes
notable6: weekly
notable6 AlexDaniel, 1 note: 2018-02-07T02:19:47Z <AlexDaniel>: New bot: Notable github.com/perl6/whateverable/wiki/Notable
quotable6 AlexDaniel, OK, working on it! This may take up to three minutes (4506639 messages to process)
AlexDaniel … quotable… you idiot 02:21
geekosaur heh
Zoffix notable6: what do you do?
notable6 Zoffix, Noted!
Zoffix notable6: what do you do?
notable6 Zoffix, Noted!
02:21 quotable6 left
Zoffix notable6: what 02:21
notable6 Zoffix, 2 notes: 2018-02-07T02:21:32Z <Zoffix>: do you do? ; 2018-02-07T02:21:35Z <Zoffix>: do you do?
02:21 quotable6 joined
Zoffix mmhhh 02:21
AlexDaniel :D
notable6: wiki 02:22
notable6 AlexDaniel, github.com/perl6/whateverable/wiki/Notable
AlexDaniel ↑ some examples there
Zoffix MasterDuke: not really. Though for some reason there are 10000029 calls to infix:<+> in my slower version and 10000019 calls to infix:<+> in the faster version.... why it isn't the same or 10000000 calls... I dunno 02:25
m: my $i = 1; my $z; { for ^10000_000 { $z = 1 + $i++ }; say now - ENTER now } 02:26
camelia 2.1192100
Zoffix m: my $i = 1; my $z; { for ^10000_000 { $z = 1 + ++$i }; say now - ENTER now }
camelia 2.50181834
Zoffix Even without my optimization business prefix ++ somehow ends up being slower than postfix. dafuq? 02:27
Geth whateverable/master: 4 commits pushed by (Aleks-Daniel Jakimenko-Aleksejev)++ 02:29
whateverable: e000fa2b51 | (Aleks-Daniel Jakimenko-Aleksejev)++ | services/whateverable-all.service
Autorun notable along with other bots
02:31
02:33 mcmillhj joined
Zoffix gonna comment it out for now then 02:33
02:35 saramaebee joined
MasterDuke m: my $i = 1; my $z; { for ^10000_000 { ++$i; $z = 1 + $i }; say now - ENTER now } 02:37
camelia 3.9372170
02:37 mcmillhj left
MasterDuke m: my $i = 1; my $z; { for ^10000_000 { $i++; $z = 1 + $i }; say now - ENTER now } 02:37
camelia 3.4911480
MasterDuke and why is ^^^ even slower? 02:38
AlexDaniel m: say <4 8 15 16>
camelia (4 8 15 16)
AlexDaniel m: put <4 8 15 16>
camelia 4 8 15 16
AlexDaniel saramaebee: ↑
saramaebee THANKS
that makes my life so much easier 02:39
Zoffix saw no question...
Zoffix guesses AlexDaniel is a mind reader...
ZofBot: it's only logical!
ZofBot Zoffix, But, Joe, you mustn't stand in the way of her marrying the man she's in love with
AlexDaniel Zoffix: I am a pm reader :D
saramaebee in PMs ;)
AlexDaniel no evals in pms so had to move here :) 02:40
AlexDaniel wishes he was a mind writer
saramaebee on the bright side, you've forced me to learn about regex, which is something ive been putting off for months now 02:41
Zoffix MasterDuke: damn yeah :( And my "optimization" makes it 30% slower even in void context 02:42
AlexDaniel saramaebee: forced is a strong word :)
saramaebee :P
for me to figure out what the hell was going on, i had to. otherwise there's no way i'd be able to use it 02:43
MasterDuke Zoffix: just looked at a profile, { $i++; $z = 1 + $i } has an extra 10000000 sink calls
02:43 mcmillhj joined
Zoffix Filed as R#1491 02:43
synopsebot R#1491 [open]: github.com/rakudo/rakudo/issues/1491 [perf][weird] Non-void $i++ is somehow 13% faster than ++$i
Zoffix MasterDuke: and yet it comes out faster? 02:44
MasterDuke no, it's slower
Zoffix Above it's faster
The one I was measuring has same amount of sink calls in both versions; 38 02:45
MasterDuke ? 3.9s for prefix in void vs 2.5 for prefix not in void
m: my $i = 1; my $z; { for ^10000_000 { ++$i; $z = 1 + $i }; say now - ENTER now } 02:46
camelia 3.7436773
MasterDuke m: my $i = 1; my $z; { for ^10000_000 { $z = 1 + ++$i }; say now - ENTER now }
Zoffix Ah. I was talking about $++ vs ++$
camelia 2.4679179
MasterDuke right, that's the same. postfix in void is faster than prefix in void
02:46 ilbot3 left
Zoffix s: 42, 'sink', \() 02:47
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/052a.../Mu.pm#L13
Zoffix Wonder how to make those calls not be calls at all 02:48
02:48 mcmillhj left
MasterDuke can the static optimizer see that a call has no body and just remove it? 02:52
Zoffix As far as I know, it can't look at method calls at all. 02:53
I could mix in a different Mu.sink at runtime and if it removed the call, the code becomes broken
02:53 ilmari[m] left
shinobi-cl i'm about to upload a perl6 module, it is a bidimensional array, spreadsheet like, if anyone wants to make a small review or give some advice.. so i can make it more useful for perl6 users.... github.com/shinobi/Data-StaticTable/wiki/How-To 02:54
02:54 mienaikage left, wictory[m] left, Matthew[m] left 02:55 Garland_g[m] left, CIAvash[m] left, AlexDaniel` left, mack[m] left, tadzik left, unclechu left
Zoffix shinobi-cl: META.info file isn't needed. It's an old pre-first-stable-language-release format 02:55
02:55 shinobi-cl left, shinobi-cl joined
Zoffix shinobi-cl: also, you have source-url as `git://github.com/shinobi/Data-StaticTable.git` on systems without git it won't be installable. It can be better to set it to github.com/shinobi/Data-StaticTable.git instead 02:56
02:57 bisectable6 left, releasable6 left, releasable6 joined, bisectable6 joined, evalable6 left 02:58 ilbot3 joined, ChanServ sets mode: +v ilbot3, quotable6 left, MasterDuke left 02:59 mcmillhj joined 03:00 MasterDuke joined 03:04 mcmillhj left 03:14 MasterDuke left 03:16 jeromelanteri joined 03:19 MasterDuke joined 03:25 xtreak joined 03:27 Zoffix left 03:29 mcmillhj joined 03:30 xtreak left 03:32 cdg left, ufobat_ joined 03:35 ufobat left 03:55 quotable6 joined, ChanServ sets mode: +v quotable6 04:03 Actualeyes left 04:12 evalable6 joined 04:16 blumsicle joined 04:26 AlexDaniel left 04:29 mcmillhj left 04:35 epony left 04:38 Cabanossi left, Cabanossi joined 04:42 mcmillhj joined 04:43 MasterDuke left 04:46 mcmillhj left 04:50 xtreak joined 04:52 skids left 05:15 sacomo left 05:31 blumsicle left, blumsicle joined 05:35 phogg left 05:38 wamba joined 05:39 Actualeyes joined 05:40 AlexDaniel` joined 05:42 phogg joined, phogg left, phogg joined, espadrine_ left 05:49 Matthew[m] joined 05:50 curan joined
ZzZombo m: my Int:D @a;for <1 2 3> {@a.tail.=new($_)};say @a 05:53
camelia Cannot modify an immutable Str (Nil)
in block <unit> at <tmp> line 1
ZzZombo m: my Int:D @a;for <1 2 3> {@a[+@a].=new($_)};say @a 05:54
camelia You cannot create an instance of this type (Int:D)
in block <unit> at <tmp> line 1
ZzZombo ??
m: my Int @a;for <1 2 3> {@a[+@a].=new($_)};say @a 05:55
camelia [1 2 3]
05:56 Garland_g[m] joined, ufobat_ left
ZzZombo m: class C {has $.a};my C @a;for <1 2 3> -> $a {@a[+@a].=new(:$a)};say @a 05:57
camelia [C.new(a => IntStr.new(1, "1")) C.new(a => IntStr.new(2, "2")) C.new(a => IntStr.new(3, "3"))]
ZzZombo What, why the `IntStr`s? 05:58
06:03 khw left
ZzZombo m: class A {class B {say PARENT}} 06:07
camelia Nil
ZzZombo m: class A {our $a=1;class B {say $PARENT::a}}
camelia (Any)
ZzZombo m: class A {our $a=1;class B {say $OUTER::a}}
camelia 1
ZzZombo hm
m: class A {our $a=1;class B {say OUTER}} 06:08
camelia (OUTER)
06:08 unclechu joined
ZzZombo m: class A {has $.a;class B {say OUTER.^methods}} 06:09
camelia No such method 'methods' for invocant of type 'Perl6::Metamodel::ModuleHOW'
in block at <tmp> line 1
in block <unit> at <tmp> line 1
ZzZombo m: class A {has $.a;class B {say PARENT.^methods}}
camelia (new Numeric Str sink AT-POS AT-KEY BIND-POS BIND-KEY ASSIGN-POS ASSIGN-KEY STORE push append unshift prepend FALLBACK ords chrs chop chomp iterator Set SetHash Bag BagHash Mix MixHash gist)
ZzZombo m: class A {has $.a;class B {say PARENT.WHAT}} 06:10
camelia Nil
ZzZombo m: class A {has $.a;class B {say PARENT}}
camelia Nil
ZzZombo m: class A {has $.a;class B {say PARENT.HOW}}
camelia Perl6::Metamodel::ClassHOW.new
ZzZombo m: class A {has $.a;class B {say PARENT.methods}}
camelia Nil
ZzZombo ah derp
I get it
m: class A {has $.a;class B {}};say A::B::PARENT 06:11
camelia Could not find symbol '&PARENT'
in block <unit> at <tmp> line 1
06:14 mack[m] joined 06:16 troys left 06:20 CIAvash[m] joined 06:22 xtreak_ joined, xtreak left, mienaikage joined 06:23 tadzik joined
Xliff <ZzZombo> m: my Int:D @a;for <1 2 3> {@a[+@a].=new($_)};say @a 06:23
ZzZombo: Because < > coerces contents to Str. 06:24
<ZzZombo> m: my Int:D @a;for (1, 2, 3) {@a[+@a].=new($_)};say @a
m: my Int:D @a;for (1, 2, 3) {@a[+@a].=new($_)};say @a
camelia You cannot create an instance of this type (Int:D)
in block <unit> at <tmp> line 1
Xliff m: my Int @a;for (1, 2, 3) {@a[+@a].=new($_)};say @a
camelia [1 2 3]
06:25 ilmari[m] joined
Xliff m: class C {has $.a};my C @a;for (1, 2, 3) -> $a {@a[+@a].=new(:$a)};say @a 06:25
camelia [C.new(a => 1) C.new(a => 2) C.new(a => 3)]
06:25 wictory[m] joined 06:40 xtreak_ left 06:41 xtreak joined 06:48 domidumont joined 06:50 eliasr left
ecocode mmm... say so 4 == (1,2,3,4).any is cool 06:51
Is there a way to do this : 06:52
p6: say so (1,2) == ((2,3),(4,3),(1,2)).any
camelia True 06:53
ecocode p6: say so (1,2) == ((2,3),(4,3),(1,3)).any
camelia True
ecocode hmmm... always returns True
can this be done ?
06:55 domidumont left, domidumont joined 07:00 saramaebee left
moritz ecocode: == is numeric comparison, and (1, 2) == (2, 3) compares two lists numerically 07:04
which means, compares them by the number of elements
m: say (1, 2) eqv (1, 2)
camelia True
moritz m: say (1, 2) eqv (1, 3)
camelia False
moritz m: say (1, 2) eqv ((1, 2), (3, 4)).any 07:05
camelia True
False
moritz m: say so (1, 2) eqv ((1, 2), (3, 4)).any
camelia True
moritz m: say so (1, 2) eqv ((1, 5), (3, 4)).any
camelia False
moritz ecocode: ^^ this seems to do what you want
07:08 domidumont left 07:10 xtreak left, xtreak joined 07:12 shinobi-cl left, xtreak left, xtreak_ joined
ecocode yeah ! 07:17
awesome stuff
07:26 blumsicle left 07:27 blumsicle joined 07:29 darutoko joined 07:30 domidumont joined 07:36 rindolf joined 07:39 abraxxa joined
lookatme m: say (1, 3) == (3, 4) 07:44
camelia True
lookatme m: say (1, 3) eqv (3, 4)
camelia False
lookatme m: say (1, 3) eq (3, 4)
camelia False
07:55 lowbro joined, lowbro left, lowbro joined 08:03 someuser joined 08:13 konsolebox left 08:15 konsolebox joined
lookatme How do I forward declared a class which inside a module ? 08:18
ZzZombo How can I distinguish two multi candidates based on a values of named parameter? Like one variant should be called for `True` values, the other for `False`. 08:19
lookatme m: class Foo::Bar { }; module Foo { class Bar { } };
camelia 5===SORRY!5=== Error while compiling <tmp>
Redeclaration of symbol 'Bar'
at <tmp>:1
------> 3s Foo::Bar { }; module Foo { class Bar7⏏5 { } };
expecting any of:
generic role
ZzZombo m: class C {...}
camelia The following packages were stubbed but not defined:
C
lookatme m: class Foo::Bar { ... }; module Foo { class Bar { } };
camelia ( no output )
lookatme m: class Foo::Block { ... }; module Foo { class Block { } }; 08:20
camelia 5===SORRY!5=== Error while compiling <tmp>
Redeclaration of symbol 'Block'
at <tmp>:1
------> 3lock { ... }; module Foo { class Block7⏏5 { } };
expecting any of:
generic role
lookatme :)
m: multi sub f(:$abc where :!so) { say "False"; } multi sub f(:$abc where :so) { say "False"; }; f 08:22
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3sub f(:$abc where :!so) { say "False"; }7⏏5 multi sub f(:$abc where :so) { say "Fa
expecting any of:
lookatme m: multi sub f(:$abc where :!so) { say "False"; }; multi sub f(:$abc where :so) { say "False"; }; f
camelia False
lookatme m: multi sub f(:$abc where :!so) { say "False"; }; multi sub f(:$abc where :so) { say "False"; }; f(:abc)
camelia False
ZzZombo m: class C {...};class C{}
camelia ( no output )
lookatme m: multi sub f(:$abc where :!so) { say "False"; }; multi sub f(:$abc where :so) { say "True"; }; f(:abc) 08:23
camelia True
08:26 Pilu joined, Pilu_ joined
ZzZombo m: multi x(:a where !!1){1};multi x(:a where !1){0};say x :a 08:28
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3multi x(:7⏏5a where !!1){1};multi x(:a where !1){0};
ZzZombo m: multi x(:$a where !!1){1};multi x(:$a where !1){0};say x :a
camelia 1
08:37 konsolebox left 08:39 konsolebox joined 08:40 xtreak_ left 08:41 xtreak joined, Wenjie1 left 08:42 someuser left 08:45 xtreak left 09:00 scimon joined, ufobat joined
ecocode awesome: 09:02
p6: say so (4,3,5).sort eqv (5,3,4).sort
camelia True
09:02 wamba left 09:05 leont joined 09:10 konsolebox left, konsolebox joined 09:14 zakharyas joined 09:21 dakkar joined 09:24 konsolebox left 09:26 konsolebox joined
ZzZombo m: say ?<a b d c> [>>] <a b c d> 09:30
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in bracketed infix; couldn't find final ']' (corresponding starter was at line 1)
at <tmp>:1
------> 3say ?<a b d c> [>>7⏏5] <a b c d>
expecting any of:
ZzZombo m: say ?<a b d c> [>] <a b c d>
camelia False
09:31 xtreak joined 09:46 Lynx_ joined 09:51 TEttinger left 10:02 wamba joined 10:08 leont left 10:10 Actualeyes left 10:32 Zoffix joined
ZzZombo m: multi x(True :$a){1};multi x(False :$a){0};say x :a 10:34
camelia Potential difficulties:
Literal values in signatures are smartmatched against and smartmatch with `True` will always succeed. Use the `where` clause instead.
at <tmp>:1
------> 3multi x(True7⏏5 :$a){1};multi x(False :$a){0};say …
ZzZombo m: multi x(:$a where ?*){1};multi x(:$a where !?*){0};say x :a
camelia 1
ZzZombo m: multi x(:$a where ?*){1};multi x(:$a where !?*){0};say x :a<1> 10:35
camelia 1
ZzZombo m: multi x(Bool:D :$a where ?*){1};multi x(Bool:D :$a where !?*){0};say x :a<1>
camelia Cannot resolve caller x(:a(1)); none of these signatures match:
(Bool:D :$a where { ... })
(Bool:D :$a where { ... })
in block <unit> at <tmp> line 1
ZzZombo m: multi x(Bool:D :$a where ?*){1};multi x(Bool:D :$a where !?*){0};say x :a(!0)
camelia 1
jnthn :a and :!a are a => True and a => False respectively 10:36
Also, ! boolifies, so where !* is sufficient
10:36 wamba left
Zoffix ZzZombo: Int:D is a DefiniteHOW object, hence the error you were getting. I think it can be made to DWIMM. I opened R#1493 10:38
synopsebot R#1493 [open]: github.com/rakudo/rakudo/issues/1493 .= call on DefiniteHOW tries to create an instance of DefiniteHOW
Zoffix ZzZombo: as for IntStr, it's from the `< ... >` angle brackets. They create allomorphs for anything that looks like numbers. You can hyper it like `<42 5>».Numeric` to force Numeric portion only and I think there was a shorter way to do that too 10:39
jnthn m: my Int:D $a; say $a.^name
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable definition of type Int:D requires an initializer
at <tmp>:1
------> 3my Int:D $a7⏏5; say $a.^name
expecting any of:
constraint
jnthn grr :) 10:40
m: my Int:D $a = Nil; say $a.^name
camelia Type check failed in assignment to $a; expected type Int:D cannot be itself (perhaps Nil was assigned to a :D which had no default?)
in block <unit> at <tmp> line 1
Zoffix m: my Int:D $a = 42; say $a.^name
camelia Int
jnthn Yeah but
That doesn't tell you what was in there in the first place :P
The point I was going to try and make was that the type constraint of a Scalar and its default value don't need to be the same
Zoffix Ah 10:41
jnthn So an Int:D decl should probably make the constraint be Int:D and the default value be Int
Because the latter is what is used for the .= call
This is the same mechanism by which every Scalar without a type has a type constraint of Mu, but a default value of Any
10:45 stmuk_ joined 10:46 stmuk left 10:53 aindilis joined 10:57 zakharyas left 11:02 someuser joined 11:04 Alikzus left
Zoffix m: my Int:D @a; say @a[^10]; say @a[10] .= new: 42 11:05
camelia ((Int:D) (Int:D) (Int:D) (Int:D) (Int:D) (Int:D) (Int:D) (Int:D) (Int:D) (Int:D))
You cannot create an instance of this type (Int:D)
in block <unit> at <tmp> line 1
Zoffix would these be plain Ints? 11:06
11:07 Alikzus joined 11:09 domidumont left
tyil Zoffix: is there a way to ignore other nicks/hostmasks in IRC::Client yet? There's another bot in my channel, and I'd like my bot to ignore it 11:12
I can add an issue for it if not
Zoffix tyil: it's job for a plugin IMO. Here's how I do it in ZofBot: github.com/zoffixznet/perl6-ZofBot...reList.pm6 11:13
This portion in particular: github.com/zoffixznet/perl6-ZofBot...pm6#L7-L15 11:14
An early plugin that matches messages from Ignored users with empty action body so the messages just get consumed and never get to any other plugins
tyil oh, that's pretty neat tbh 11:15
thanks
jnthn Zoffix: Yes, I'd expect so 11:20
Zoffix: With luck it'll fall out of the same fix for Scalar, since the Mu/Any distinction applies to Array/Hash too 11:21
11:21 zakharyas joined
Zoffix There were different places to stick the fix in for Array/Hash 11:22
jnthn ah, ok. Maybe time for some factoring out? 11:23
Zoffix I stuck a "is a definite how? then use .^base_type" over here: github.com/rakudo/rakudo/blob/mast....nqp#L1733 and for hashes it goes here: github.com/rakudo/rakudo/blob/mast....nqp#L1692 and for arrays here: github.com/rakudo/rakudo/blob/mast....nqp#L1625 11:24
seeing some failing spectests, so I guess that ain't the right fix :) 11:25
Gotta go now, but will try again in the evening
This was the patch I tried: gist.github.com/zoffixznet/e92154b...6f54cebb87
11:37 lowbro left 11:39 Zoffix left
timotimo m: .perl.say for +«<42 5> 11:42
camelia 42
5
timotimo m: .perl.say for <42 5>
camelia IntStr.new(42, "42")
IntStr.new(5, "5")
timotimo that's probably the shorter way zoffix was remembering
11:42 markong joined 11:57 wamba joined 11:58 zakharyas left 11:59 MasterDuke joined 12:04 zakharyas joined 12:05 aindilis left, aindilis` joined 12:09 zakharyas left, zakharyas joined 12:14 Alikzus left 12:15 cpage joined 12:17 saramaebee joined 12:24 shinobi-cl joined 12:30 gregf_ joined 12:32 cdg joined 12:34 xtreak left 12:36 mcmillhj joined 12:37 cdg left, konsolebox left
ZzZombo Regarding `:D` constraint, I'm quite surprised there are spec tests that are actually designed this way. Makes little sense to me. 12:38
12:39 konsolebox joined 12:45 wamba left 12:52 konsolebox left 12:54 konsolebox joined 12:55 domidumont joined 12:59 domidumont left 13:00 domidumont joined, eliasr joined 13:06 shinobi-cl left, wamba joined 13:12 mcmillhj left 13:25 blumsicle left 13:29 ChoHag joined
Geth doc: c0c7922e76 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/grammars.pod6
make actions a type object per the doc explanation
13:48
synopsebot Link: doc.perl6.org/language/grammars
13:55 SqrtNegInf joined, SqrtNegInf left 14:04 Zoffix joined
Zoffix ZzZombo: well, it's how they say: hindsight's 20/20 14:04
14:09 sena_kun joined 14:10 mcmillhj joined 14:11 cdg joined, xtreak joined 14:12 cdg left, cdg joined, cdg left 14:13 cdg joined 14:16 mcmillhj left
El_Che jnthn: does cro have a built-in log middleware or is it bake-your-own? 14:17
14:19 mcmillhj joined 14:20 colomon left, cdg_ joined, colomon joined 14:23 mcmillhj left 14:24 cdg left 14:25 Zoffix left 14:28 pmurias joined
ZzZombo m: my Str $a is default('') where {state $c=0;if $c {$_~~Str:D} else {$c=True}};$a=2 14:29
camelia Type check failed in assignment to $a; expected <anon> but got Int (2)
in block <unit> at <tmp> line 1
ZzZombo m: my Str $a is default('') where {state $c=0;if $c {$_~~Str:D} else {$c=True}};$a=''
camelia ( no output )
ZzZombo m: my Str $a is default('') where {state $c=0;if $c {$_ ne ''} else {$c=True}};$a=''
camelia 5===SORRY!5=== Error while compiling <tmp>
Type check failed in assignment to $a; expected <anon> but got Str ("")
at <tmp>:1
14:30
ZzZombo m: my Str $a is default('') where {state $c=0;if $c {$_ ne ''} else {$c=True}};$a='1'
camelia 5===SORRY!5=== Error while compiling <tmp>
Type check failed in assignment to $a; expected <anon> but got Str ("")
at <tmp>:1
ZzZombo m: my Str $a is default('') where {say state $c=0;if $c {$_ ne ''} else {$c=True}};$a='1'
camelia 0
5===SORRY!5=== Error while compiling <tmp>
Type check failed in assignment to $a; expected <anon> but got Str ("")
at <tmp>:1
True
14:35 mcmillhj joined 14:40 mcmillhj left 14:44 saramaebee left 14:46 wamba left 14:51 mcmillhj joined 14:54 Alikzus joined 14:56 mcmillhj left 14:58 mcmillhj joined 14:59 curan left 15:03 wamba joined 15:07 mcmillhj left 15:11 ufobat left 15:12 ufobat joined 15:18 AlexDaniel joined, mcmillhj joined
Geth doc: 4e28117206 | (Zoffix Znet)++ | doc/Language/grammars.pod6
Documnet <sym> speshul token

Closes #1676
15:22
synopsebot Link: doc.perl6.org/language/grammars
15:24 mcmillhj left, mcmillhj joined
ZzZombo m: my Str $a is default('') where {say $_,state $c=0;if $c {$_ ne ''} else {$c=True}};$a='1' 15:29
camelia 0
5===SORRY!5=== Error while compiling <tmp>
Type check failed in assignment to $a; expected <anon> but got Str ("")
at <tmp>:1
True
15:29 mcmillhj left
ZzZombo m: my Str $a is default('') where {say($_,state $c=0);if $c {$_ ne ''} else {$c=True}};$a='1' 15:30
camelia 0
5===SORRY!5=== Error while compiling <tmp>
Type check failed in assignment to $a; expected <anon> but got Str ("")
at <tmp>:1
True
ZzZombo wtf
m: my Str $a is default('') where {.say;say state $c=0;if $c {$_ ne ''} else {$c=True}};$a='1' 15:31
camelia
5===SORRY!5=== Error while compiling <tmp>
Type check failed in assignment to $a; expected <anon> but got Str ("")
at <tmp>:1
0

True
15:31 skids joined
ZzZombo m: my Str $a is default('') where {.say;say state $c=0;do if $c {$_ ne ''} else {$c=True}};$a='1' 15:32
camelia
5===SORRY!5=== Error while compiling <tmp>
Type check failed in assignment to $a; expected <anon> but got Str ("")
at <tmp>:1
0

True
ZzZombo m: my Str $a is default('') where {state $c=0;say "V: $_,C=$c";do if $c {$_ ne ''} else {$c=True}};$a='1' 15:34
camelia V: ,C=0
5===SORRY!5=== Error while compiling <tmp>
Type check failed in assignment to $a; expected <anon> but got Str ("")
at <tmp>:1
V: ,C=True
15:38 Zoffix joined
Zoffix ZzZombo: note that `where` clauses come with a caveat that side-effects are not supported. If you try to have them (like `state` variables), you get to keep all the pieces. 15:38
15:40 mcmillhj joined
Zoffix There are also some bugs with `state` vars: RT#131542 RT#130257 RT#129817 RT#102994 15:41
synopsebot RT#131542 [new]: rt.perl.org/Ticket/Display.html?id=131542 [BUG] `state` variables unset if multi candidate uses named params
RT#130257 [new]: rt.perl.org/Ticket/Display.html?id=130257 [BUG] state variable not initialized in some multi subs
RT#129817 [new]: rt.perl.org/Ticket/Display.html?id=129817 (De)serialization of state variables is not implemented.
RT#102994 [open]: rt.perl.org/Ticket/Display.html?id=102994 [BUG] State variables are never initialized if the first call of the containing block does not reach them
ZzZombo I want some kind of a value like Nil but the one that will not violate the defined constraint, actually. What I was doing was rather to mess around. 15:44
15:45 mcmillhj left
Zoffix m: my $true-nil := Nil.Mu::new; say $true-nil ~~ Mu:D; my $foo is default(42) = 100; $foo = $true-nil; say $foo 15:46
camelia True
42
ZzZombo So I could say `has Str:D $!name=<the value>` and if the user doesn't supply it, an attempt to do anything but the most basic things like calling `.Bool` on it will cause an exception.
And then, I'd like to allow this value being set only once, but that's optional. 15:47
I see that can't be done easily.
Zoffix m: class Foo { has Any $.name is default(Failure.new: "no good") where Str:D|Failure; method z { $!name.uc } }.new(:name<Zoffix>).z.say 15:49
camelia ZOFFIX
Zoffix m: class Foo { has Any $.name is default(Failure.new: "no good") where Str:D|Failure; method z { $!name.uc } }.new().z.say 15:50
camelia ===SORRY!===
no good
Zoffix m: class Foo { my class Bar is Mu { method FALLBACK (|) { die "no good" } }; has Mu $.name where Str:D|Bar = Bar; method z { $!name.uc } }.new(:name<zoffix>).z.say 15:52
camelia ZOFFIX
Zoffix m: class Foo { my class Bar is Mu { method FALLBACK (|) { die "no good" } }; has Mu $.name where Str:D|Bar = Bar; method z { $!name.uc } }.new().z.say
camelia no good
in method FALLBACK at <tmp> line 1
in method z at <tmp> line 1
in block <unit> at <tmp> line 1
ZzZombo the bug with junctions and `is default` was already fixed in perl6 camelia uses? 15:53
Zoffix Dunno, what was the bug?
ZzZombo where it would crash?
15:53 domidumont left, domidumont joined
Zoffix m: class { has $.z is default(1) where 1|2 }.new.z.say 15:54
camelia 1
Zoffix R#1465 and yeah it's fixed now
synopsebot R#1465 [closed]: github.com/rakudo/rakudo/issues/1465 `where` clause in attributes doesn't get thunked right when `is default` is used
Zoffix c: 2018.01 class { has $.z is default(1) where 1|2 }.new.z.say
committable6 Zoffix, ¦2018.01: «04===SORRY!04=== Error while compiling /tmp/3WxipbNQbh␤Cannot invoke this object (REPR: Null; VMNull)␤at /tmp/3WxipbNQbh:1␤ «exit code = 1»»
Zoffix c: 2018.01 class { has $.z is default(1) where {$_ ~~ 1|2} }.new.z.say 15:55
committable6 Zoffix, ¦2018.01: «1␤»
Zoffix ^ and you can use this workaround on older compilers ^
15:57 mcmillhj joined
Geth doc: 7b27d94731 | (Zoffix Znet)++ | doc/Type/Signature.pod6
Move side-effects in where clauses higher up

  - So it's more visible
  - Also mention code may run more times than strictly needed
15:57
synopsebot Link: doc.perl6.org/type/Signature
Zoffix & 15:58
15:58 Zoffix left 16:02 mcmillhj left, mcmillhj joined 16:05 natrys joined, natrys is now known as ImranKhan, domidumont left 16:08 mcmillhj left, troys joined
jnthn El_Che: There's a simple built-in one (the one that's set up in a `cro stub`'d HTTP application) 16:08
tyil .tell zoffix not sure if I mentioned this to you already, but IRC::Client::Plugin::UrlTitle install correctly again, and the scriptkitties/perl6:latest docker container's zef should Just Work as well now 16:11
yoleaux tyil: I'll pass your message to zoffix.
El_Che jnthn: I did that, but it seems I missed it. I'll have a look 16:12
(seems to have created 2 classes, Routes and Services)
16:17 khw joined 16:18 mcmillhj joined
jnthn To be fair, I'm guessing that the react/redux template (if you used it) also does it, but didn't actually check 16:19
16:27 markong left 16:28 markong joined
El_Che no, I used the https one, failed to get ssl running and switch to the http template and worry about ssl later 16:32
:)
train
bbl
16:40 wamba left 16:54 cdg joined
pmurias hmm, any ideas how to translate a Perl 6 regexes that matches a literal to a JS one efficently? 16:56
when emitting code for let's say /'foo'/ I can't just treat it as /foo/ on the js side because I have to avoid composing characters 16:57
16:58 cdg_ left 16:59 cdg left 17:01 cdg joined 17:02 cdg left, aindilis` left, cdg joined 17:03 cdg_ joined, aindilis` joined 17:06 cdg left 17:07 ChoHag left 17:13 someuser left 17:14 nebuchadnezzar left 17:16 wamba joined 17:23 scimon left, khisanth_ left 17:28 aindilis` left 17:37 khisanth_ joined 17:38 dakkar left 17:45 MC8 joined 17:46 ImranKhan left 17:47 nebuchadnezzar joined 17:48 scott_ joined 17:50 mcmillhj left
Geth doc: 517692317e | (Will "Coke" Coleda)++ | xt/words.pws
learn new word
17:50
17:51 domidumont joined 18:02 mcmillhj joined 18:05 zakharyas left 18:06 zakharyas joined 18:07 mcmillhj left 18:18 mcmillhj joined 18:23 mcmillhj left 18:27 xtreak left, darutoko left 18:33 zakharyas left 18:34 mcmillhj joined
mienaikage Is it possible to create a relative symlink with the .symlink method? I can't seem to find a way to get CWD out of it. 18:35
Well, not without specifying something else starting with / at least
18:36 Zoffix joined
Zoffix mienaikage: no, it absolutes both paths currently. You could open an Issue to request that feature to be available: github.com/rakudo/rakudo/issues/new 18:37
mienaikage Gotcha, thanks. I may do that once I get home! 18:39
Zoffix m: with '/tmp/2018-02-07'.IO.mkdir { .add("bar").mkdir.add("meow").spurt: "abc"; &*chdir(.add("foo").mkdir); use nqp; nqp::symlink("../bar/meow", "z"); "z".IO.slurp.say } 18:40
camelia Failed to symlink file: file already exists
in block <unit> at <tmp> line 1
Zoffix m: with '/tmp/2018-02-07'.IO.mkdir { .add("bar").mkdir.add("meow").spurt: "abc"; &*chdir(.add("foo").mkdir); use nqp; "../bar/meow".IO.unlink; nqp::symlink("../bar/meow", "z"); "z".IO.slurp.say }
camelia Failed to symlink file: file already exists
in block <unit> at <tmp> line 1
18:41 mcmillhj left
Zoffix well, it worked the first time I did it :) 18:41
m: with '/tmp/2018-02-07'.IO.mkdir { .add("bar").mkdir.add("meow").spurt: "abc"; &*chdir(.add("foo").mkdir); use nqp; "../bar/meow".IO.unlink; nqp::symlink("../bar/meow", "z"); "z".IO.slurp.say }
camelia Failed to symlink file: file already exists
in block <unit> at <tmp> line 1
Zoffix m: with '/tmp/2018-02-07'.IO.mkdir { .add("bar").mkdir.add("meow").spurt: "abc"; &*chdir(.add("foo").mkdir); use nqp; "z".IO.unlink; nqp::symlink("../bar/meow", "z"); "z".IO.slurp.say }
camelia abc
Zoffix so it should be failry easy to add it. 18:42
:o I mean fairly
mienaikage: I opened it as R#1497 18:45
synopsebot R#1497 [open]: github.com/rakudo/rakudo/issues/1497 [LHF] Make it possible for IO::Path.symlink to make relative links
18:48 someuser joined
TimToady in the meantime, there's always NativeCall 18:48
though arguably that's more antisocial than nqp :) 18:49
Zoffix :)
18:51 mcmillhj joined 18:53 xenotrope left 18:55 xenotrope joined
Zoffix maybe it ain't that LHF... looks like nqp::symlink makes the relative symlink relative to &*chdir, but .relative on IO::Path would be relative to $*CWD 18:55
TimToady heads out to chop down trees on the back .04 18:56
18:56 mcmillhj left 18:59 eliasr left 19:01 mcmillhj joined
[Coke] settles in for the great storm. 19:02
19:06 mcmillhj left 19:08 mcmillhj joined 19:12 comborico1611 joined 19:13 mcmillhj left 19:14 mcmillhj joined 19:19 mcmillhj left 19:20 setty1 joined 19:23 someuser left 19:25 cdg joined 19:29 cdg_ left 19:30 wamba left, mcmillhj joined, cdg left, wamba joined 19:35 mcmillhj left 19:37 Noob6969 joined 19:42 Noob6969 left 19:46 mcmillhj joined 19:50 mcmillhj left 20:02 mcmillhj joined 20:05 leont joined 20:06 zeddy_k joined 20:07 mcmillhj left 20:09 TEttinger joined 20:15 domidumont left 20:18 mcmillhj joined, zakharyas joined 20:21 vike left 20:24 mcmillhj left 20:31 vike joined 20:36 cdg joined, cdg left, cdg joined
tbrowder hi #perl6 20:37
i'm having problems with a grammar for what i think is a fairly common type of input data file: key/data pairs with comments, blank lines, and empty data fields allowed. i just filed doc GH issue #1759 with an example of the type of input i'm talking about. 20:40
the current example in docs.perl6.org/language/grammars.pod6 is almost the desired format, but it doesn't have the looser format i described in the issue. 20:42
20:43 someuser joined 20:47 mcmillhj joined 20:49 evalable6 left, evalable6 joined 20:52 mcmillhj left 20:53 squashable6 left 20:54 squashable6 joined 21:01 f3ew left 21:02 f3ew joined 21:03 mcmillhj joined 21:11 mcmillhj left 21:12 Zoffix left 21:17 mcmillhj joined 21:22 mcmillhj left 21:26 Manifest0 joined 21:28 mcmillhj joined 21:30 Manifest0 left 21:33 mcmillhj left 21:36 TEttinger left 21:39 mcmillhj joined 21:44 mcmillhj left 21:50 mcmillhj joined 21:53 Manifest0 joined 21:54 mcmillhj left 21:57 sena_kun left 22:01 mcmillhj joined 22:08 mcmillhj left
tbrowder i va 22:09
i can put my prog in a gist if anyone is willing to assist fixing it. 22:10
Geth whateverable: 99c81ceadf | (Aleks-Daniel Jakimenko-Aleksejev)++ | 4 files
Better handling of config files

This way git wouldn't want you to commit it by default.
Related issue: #122
22:14 MasterDuke left
Voldenet tbrowder: I can help you, but I'm not very fluent with grammars 22:16
this works ix.io/Frv 22:18
22:18 setty1 left
Voldenet oh, return unless $match<pair>; is redundant 22:19
tbrowder Voldenet: thanks so much. i will try it and see what i did wrong. 22:20
22:20 MasterDuke joined
Voldenet thoguh I'm unsure if that's the best solution, negative lookaheads don't look like a good idea 22:21
tbrowder n 22:22
22:22 someuser left, mcmillhj joined
tbrowder ok, but a working solution is a start! 22:22
Voldenet :)
I'm not sure how to express "this token can contain spaces but shouldn't end with them" 22:23
but parser can't do that without going to the end of spaces space and validating that there's nothing ahead
tbrowder then we can optimize!
Voldenet oh, and it can be made better further, the value-identifier could contain = character 22:24
tbrowder i’ll be back later...thanks again! (also have to go take a look at moritz’s book) 22:26
22:27 mcmillhj left 22:28 rindolf left 22:32 zakharyas left 22:42 mcmillhj joined 22:47 mcmillhj left
Geth doc/coke/build: 7e008c3570 | (Will "Coke" Coleda)++ | Makefile
clean precompiled directory
22:49
22:50 softmoth joined 22:51 espadrine_ joined 22:57 mcmillhj joined 23:01 mcmillhj left 23:03 wamba left
Geth doc: 2389c706b9 | (Will "Coke" Coleda)++ | util/missing-types.p6
Track filename change from years ago
23:06
23:08 mcmillhj joined 23:10 mniip left 23:13 cdg left, mniip joined, cdg joined 23:15 mcmillhj left 23:17 pmurias left 23:23 travis-ci joined
travis-ci Doc build passed. Will "Coke" Coleda 'clean precompiled directory' 23:23
travis-ci.org/perl6/doc/builds/338746801 github.com/perl6/doc/commit/7e008c357018
23:23 travis-ci left, zeddy_k left 23:25 softmoth left, softmoth joined 23:27 cdg left 23:32 hythm left
tbrowder Voldenet: i've been doing something stupid all along. i'll explain when i fix it. 23:32
23:40 traxex2 left 23:45 hythm joined 23:49 cdg joined
buggable New CPAN upload: Math-Curves-0.0.1.tar.gz by SAMGWISE cpan.metacpan.org/authors/id/S/SA/...0.1.tar.gz 23:52
23:53 comborico1611 left 23:59 Pilu left, Pilu_ left