»ö« 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.
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.
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
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!
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?
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
Zoffix gonna comment it out for now then 02:33
MasterDuke m: my $i = 1; my $z; { for ^10000_000 { ++$i; $z = 1 + $i }; say now - ENTER now } 02:37
camelia 3.9372170
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
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
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
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
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
Zoffix shinobi-cl: META.info file isn't needed. It's an old pre-first-stable-language-release format 02:55
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
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]
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
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)
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
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]
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)]
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 ?
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
ecocode yeah ! 07:17
awesome stuff
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
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
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
ecocode awesome: 09:02
p6: say so (4,3,5).sort eqv (5,3,4).sort
camelia True
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
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
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
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
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
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
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
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
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
Zoffix ZzZombo: well, it's how they say: hindsight's 20/20 14:04
El_Che jnthn: does cro have a built-in log middleware or is it bake-your-own? 14:17
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
Geth doc: 4e28117206 | (Zoffix Znet)++ | doc/Language/grammars.pod6
Documnet <sym> speshul token

Closes #1676
15:22
synopsebot Link: doc.perl6.org/language/grammars
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
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
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
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
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
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?
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 ^
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
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)
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
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
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
Geth doc: 517692317e | (Will "Coke" Coleda)++ | xt/words.pws
learn new word
17:50
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
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
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
TimToady in the meantime, there's always NativeCall 18:48
though arguably that's more antisocial than nqp :) 18:49
Zoffix :)
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
[Coke] settles in for the great storm. 19:02
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
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
Voldenet tbrowder: I can help you, but I'm not very fluent with grammars 22:16
this works ix.io/Frv 22:18
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
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
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
Geth doc/coke/build: 7e008c3570 | (Will "Coke" Coleda)++ | Makefile
clean precompiled directory
22:49
Geth doc: 2389c706b9 | (Will "Coke" Coleda)++ | util/missing-types.p6
Track filename change from years ago
23:06
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
tbrowder Voldenet: i've been doing something stupid all along. i'll explain when i fix it. 23:32
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