»ö« 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.
geekosaur resol, you only need 64 bit client libs. the server can be either 00:01
timotimo ah, that's right. especially if you're going over a tcp socket 00:04
BenGoldberg timotimo, What confuses me is that they're evaluated at compiletime AND at runtime. One or the other makes sense, but not BOTH.
timotimo might be running it to see what the value it spits out is to resolve multi candidates 00:05
ugexe i figured it was just a dont-do-side-effects-in-pure thing 00:06
timotimo yeah, well, if you put side-effects into a function marked as pure, you'll get what you deserve :) 00:09
Zoffix timotimo: but why does it run it twice?
timotimo *shrug*, put a stacktrace in it and that should help clarify 00:11
timotimo i see it called from World.nqp twice first - which i assume is our compile-in-context method - and then twice in the optimizer 00:33
interestingly the backtrace looks different the first vs second time 00:34
gist.github.com/timo/4362dd24968e7...fb7e295309
reino4477 does perl6 have something like function attribute? [my_attribute(var1="something")] method my_method123() { ...} ? 02:11
araraloren reino4477, Perl 6 have a trait feature, does that help ? 02:15
reino4477 maybe 02:16
llfourn m: class A { has &.foo; }; A.new(foo => -> { say "hello world" }); A.foo() 02:18
camelia Cannot look up attributes in a A type object
in block <unit> at <tmp> line 1
llfourn m: class A { has &.foo; }; my $a = A.new(foo => -> { say "hello world" }); $a.foo; # oops
camelia ( no output )
llfourn m: class A { has &.foo; }; my $a = A.new(foo => -> { say "hello world" }); $a.foo(); # oops
camelia ( no output )
llfourn m: class A { has &.foo; }; my $a = A.new(foo => -> { say "hello world" }); $a.foo()(); # oops
camelia hello world
llfourn reino4477: something like that? 02:19
reino4477 not like that 02:20
reino4477 msdn.microsoft.com/en-us/library/a...s.71).aspx 02:21
doc.rust-lang.org/reference/attributes.html
llfourn reino4477: ah, yeah you can use traits as araraloren suggested. 02:22
docs.perl6.org/type/Sub#index-entr...larator%29
reino4477 ok, thx 02:23
llfourn what you do is you make a 'multi trait_mod:<is>(Routine:D, :$mytrait!) { ... }'
llfourn and then apply roles to the routine in the body 02:24
llfourn so like trait_mod:<is>(Routine:D $r, :$mytrait!) { $r does MyRole } 02:25
llfourn sub foo is mytrait { ... }; 02:26
reino4477 can I have 2 keys mapping to the same value in a dictionary? I mean, something like %("key1|key2" => value123) 02:53
AlexDaniel m: my %h = foo => 42; %h<x> := %h<foo>; %h<foo> = 60; say %h<x> 02:55
camelia 60
AlexDaniel why does this even work? :o
geekosaur because a hash has a scalar container in it for each key. so do arrays 02:56
AlexDaniel yeah but huh… didn't really expect := to DWIM here
geekosaur I expect it was kept because you can do similar tricks in perl 5 02:56
AlexDaniel well, TIL 02:58
llfourn m: my %h; my $a := %h<foo>; $a = "win"; say %h # I use this kind of thing often. 02:59
camelia {foo => win}
llfourn It's one of my favourite features 03:00
AlexDaniel that's very cool
AlexDaniel heh, here's an interesting dirty trick 03:09
let's say you bind several keys to some value that is not yet defined… like this: 03:10
m: my %h; %h<a> := %h<x>; %h<b> := %h<x>; %h<c> := %h<x>; dd %h
camelia Hash %h = {:a(Any), :b(Any), :c(Any)}
AlexDaniel now let's try to use one of them:
m: my %h; %h<a> := %h<x>; %h<b> := %h<x>; %h<c> := %h<x>; %h<c> = 42; dd %h
camelia Hash %h = {:a(Any), :b(Any), :c(42), :x(42)}
AlexDaniel interesting! ‘x’ was added! OK
now let's try this: 03:11
m: my %h; %h<a> := %h<x>; %h<b> := %h<x>; %h<c> := %h<x>; %h<c> = 42; %h<a> = 90; dd %h
camelia Hash %h = {:a(90), :b(Any), :c(42), :x(90)}
AlexDaniel but changing c no longer affects anything:
m: my %h; %h<a> := %h<x>; %h<b> := %h<x>; %h<c> := %h<x>; %h<c> = 42; %h<a> = 90; %h<c> = -5; dd %h
camelia Hash %h = {:a(90), :b(Any), :c(-5), :x(90)}
llfourn I'm a little confused by that 03:13
m: my %h; %h<a> := %h<x>; %h<b> := %h<x>; %h<c> := %h<x>; %h<c> = 42;
camelia ( no output )
llfourn m: my %h; %h<a> := %h<x>; %h<b> := %h<x>; %h<c> := %h<x>; %h<c> = 42; say %h;
camelia {a => (Any), b => (Any), c => 42, x => 42}
geekosaur at a guess, autovivification doesn't play well with it 03:14
llfourn that's unexpected to me. I thought they would all be 42. %h<x> is the only autovivified container and all the others are just aliases to it.
geekosaur it looks to me like since the "x" slot doesn't exist yet, a and b get new containers and only an actual assignment that affects the "x" key creates a true container 03:15
m: my %h; %h<a> := %h<x>; %h<b> := %h<x>; %h<x> = 0; %h<c> := %h<x>; %h<c> = 42; say %h; 03:16
camelia {a => (Any), b => (Any), c => 42, x => 42}
AlexDaniel geekosaur: yeah, that's how it seems to work
geekosaur m: my %h; %h<a> := %h<x>; %h<x> = 0; %h<b> := %h<x>; %h<c> := %h<x>; %h<c> = 42; say %h;
camelia {a => (Any), b => 42, c => 42, x => 42}
geekosaur I shpould say permanent instead of true 03:17
llfourn m: my %h; %h<a> := %h<x>; say $h 03:18
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$h' is not declared. Did you mean '%h'?
at <tmp>:1
------> 3my %h; %h<a> := %h<x>; say 7⏏5$h
llfourn m: my %h; %h<a> := %h<x>; say %h
camelia {a => (Any)}
llfourn ohhh, the LHS is the one that is autovivified
so each := creates a new container rather than just aliasing an existing one like I thought.
llfourn m: my %h; %h<x> = 1; %h<a> := %h<x>; say %h 03:19
camelia {a => 1, x => 1}
llfourn Not sure if that was intended for some reason or just an implementation detail 03:20
AlexDaniel well, the implementation feels a bit buggy 03:21
it's also DIHWIDT, so maybe not a big deal 03:22
for example
m: my %h; %h<a> := %h<b>; %h<b> = 42; dd %h
camelia Hash %h = {:a(Any), :b(42)}
geekosaur I could see it being (onstrued as) a feature: a way to 'dissociate' a binding
*construed
AlexDaniel so let's say you've been using <b> freely, and everything looks fine
now you set <a> at some point
m: my %h; %h<a> := %h<b>; %h<b> = 42; %h<a> = 90; dd %h 03:23
camelia Hash %h = {:a(90), :b(90)}
AlexDaniel whoops!
llfourn that's what I expect to happen though?
AlexDaniel llfourn: are you sure about this? :) 03:23
llfourn yes
the containers are aliases of each other 03:24
you do something to one value it will appear at its alias at the other key
AlexDaniel llfourn: but it doesn't?
m: my %h; %h<a> := %h<b>; %h<b> = 42; dd %h
camelia Hash %h = {:a(Any), :b(42)}
llfourn huh?
AlexDaniel I mean, here? ↑
geekosaur that's the initialization/autovivify your target before aliasing it thing 03:25
llfourn hmmm yep that's not what I expected
llfourn it's because the LHS is the container that gets vivified 03:25
so both statements create a new container
and I think that's a bit backwards 03:26
AlexDaniel m: my %h = c => -5; %h<a> := %h<b>; %h<b> := %h<c>; %h<b> = 40; %h<a> = 50; dd %h 03:29
camelia Hash %h = {:a(50), :b(50), :c(40)}
AlexDaniel this is a bad case of DIHWIDT :)
llfourn hmm tbh I'm not sure. Maybe it's right and I just need to clear my head a bit. 03:33
AlexDaniel I wonder if this is a bug: 03:41
m: my %m := Map.new(<a X b Y>); say %m.perl
camelia Map.new((:a("X"),:b("Y")))
AlexDaniel m: my %m := Map.new(‘a’, ‘X’, ‘b’, ‘Y’); say %m.perl
camelia Map.new((:a("X"),:b("Y")))
AlexDaniel they are not exactly the same
m: my %m := Map.new(<a X b Y>); %m<a> = 42; say %m.perl 03:42
camelia Map.new((:a(42),:b("Y")))
AlexDaniel m: my %m := Map.new(‘a’, ‘X’, ‘b’, ‘Y’); %m<a> = 42; say %m.perl
camelia Cannot modify an immutable Str (X)
in block <unit> at <tmp> line 1
llfourn yep that looks like a bug to me 03:43
AlexDaniel which is also interesting because: 03:44
c: 2015.12,2016.06 my %m := Map.new(‘a’, ‘X’, ‘b’, ‘Y’); %m<a> = 42; say %m.perl
llfourn looks like the second one is creating an array somewhere
committable6 AlexDaniel, ¦2015.12,2016.06: «Map.new((:a(42),:b("Y")))»
llfourn Map def shouldn't containerize 03:45
BenGoldberg m: say Map.new(‘a’, ‘X’, ‘b’, ‘Y’).perl ~^ Map.new(<a X b Y>).perl; 03:55
camelia ␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀
BenGoldberg m: say (Map.new(‘a’, ‘X’, ‘b’, ‘Y’).perl ~^ Map.new(<a X b Y>).perl).trans("\x00", "", :g); 03:56
camelia Only Pair objects are allowed as arguments to Str.trans, got Str
in block <unit> at <tmp> line 1
BenGoldberg m: say (Map.new(‘a’, ‘X’, ‘b’, ‘Y’).perl ~^ Map.new(<a X b Y>).perl).subst("\x00", "", :g);
camelia
BenGoldberg m: my $a = Map.new(‘a’, ‘X’, ‘b’, ‘Y’); my $b = Map.new(<a X b Y>); try {$a<a>=42}; try{$b<a>=42}; say ($a.perl ~^ $b.perl).subst("\x00", "", :g); 03:57
camelia 5===SORRY!5=== Error while compiling <tmp>
Whitespace required after keyword 'try'
at <tmp>:1
------> 3 Map.new(<a X b Y>); try {$a<a>=42}; try7⏏5{$b<a>=42}; say ($a.perl ~^ $b.perl).sub
BenGoldberg m: my $a = Map.new(‘a’, ‘X’, ‘b’, ‘Y’); my $b = Map.new(<a X b Y>); try {$a<a>=42}; try {$b<a>=42}; say ($a.perl ~^ $b.perl).subst("\x00", "", :g); 03:58
camelia jXJ
{{)
AlexDaniel
.oO( … why are you xoring your .perl strings? )
BenGoldberg As a way to spot roughly how many letters of difference there are. 03:59
kybr "foo bar".ords returns a Seq for me. was there a time in perl6's history when it returned something different? like a List or an Array? 04:13
geekosaur c: all say "foo bar".ords.WHAT 04:15
committable6 geekosaur, gist.github.com/88b9b6e215cc81c38b...8053319487 04:16
geekosaur changed in 2015.09. GLR, I think
kybr whoa. c is a nice bot. thanks. 04:18
geekosaur full name is committable6
and yes, its handy for that kind of thing
you can also feed it specific commit hashes etc. to check
kybr c: all say List.bytes 04:20
committable6 kybr, gist.github.com/bf449d2646f08113dd...9b74bc41fa 04:20
kybr hmm. List never had a bytes method... i'm looking at github.com/avuserow/perl6-binary-structured . it is broken for me and i think it's because of a change in perl6 and i'm sleuthing. 04:23
geekosaur I think you missed the conversion to Buf? 04:25
kybr it hasn't had a real commit in 9 months. also, is there a good way of binary packing and unpacking perl6 objects? 04:25
geekosaur I don't think there is a canonical one yet 04:26
kybr but, yeah, i (aka the synopsis example) was missing a conversion to Buf. thanks! 04:28
geekosaur hm, I did a search for ".bytes" in the readme and it was wrapped in a Buf.new(...) 04:29
POD might have been out of date, I guess 04:31
samcv hmm think i'll bump nqp/moarvm so the emoji fix gets in. that's important enough yes? or something 04:32
samcv isn't sure
i think probably a good idea. though it's not urgent could just wait for it to be bumped by other things. moar was already bumped yesterday 04:33
though 100% Emoji v4 showing 1 char is kind of nice :)
kybr geekosaur: i'm changing the README now
Triplefox trying out perl for the first time: i am writing a script to setup a project(copy some source files) and thought it would be a fun entry point 05:17
araraloren m: my $module = "IO::Socket::SSL"; say try require ::($module); 05:35
camelia Nil
araraloren m: my $module = "JSON::Tiny"; say try require ::($module);
camelia Nil
araraloren m: my $module = "Zef"; say try require ::($module); 05:43
camelia Nil
kybr c: all my class Foo is Int {}; my $foo = Foo.new(4); say $foo.WHAT; 05:44
committable6 kybr, gist.github.com/f1e6d26b0251d66d0b...0c59f81c04
araraloren Is there a robot can test require command ?
Triplefox success, my first script - not really done but it does something gist.github.com/triplefox/eba29cc7...43fe6b727e 06:04
samcv nice just got a 13% speedup slurping a big unicode laden document 06:20
if we have a 32bit string stored haystack and an 8 bit needle, we change the needle into 32 bit and that greatly speeds the search
should speed up string indexing as well 06:21
araraloren I found the class can't export to symbol table if you don't mark it `is export` when use dynamic name lookup. 06:24
CQ any utf8 experts here who'd be interested in helping golf a perl5 bug? 07:47
Juerd Although 6 is between 5 and 8, I wonder why you're asking that here :) 07:51
CQ Juerd: because on p6weekly.wordpress.com/ there are always updates to how character encoding is improved, so I figured someone may be curious enough to help. 07:52
ab5tract samcv++ 10:23
yoleaux 8 Jul 2017 14:38Z <lizmat> ab5tract: do we agree that [(^)] $a, $b, $c is the same as ($a (^) $b) (^) $c ?
8 Jul 2017 18:18Z <lizmat> ab5tract: github.com/rakudo/rakudo/commit/05c255c14b
ab5tract no. it is not the same 10:24
I carefully designed that code with all of it's corner cases
And is Mixy caught by Baggy now? 10:25
.tell lizmat on second thought, yes, that is the same. I needed to look deeper than just the diff to see how your implementation works 10:27
yoleaux ab5tract: I'll pass your message to lizmat.
ab5tract .tell lizmat assuming that the behavior of ($a (^) $b) returns the distance between the values and not some sort of coerced-to-Set tthingy 10:29
yoleaux ab5tract: I'll pass your message to lizmat.
ab5tract .tell lizmat I'm still not clear on how your code addresses Mixes (which are stickier than Bags) 10:32
yoleaux ab5tract: I'll pass your message to lizmat.
ab5tract .tell lizmat and yes definitely from a logic standpoint, [(^)] $a, $b, $c should be equivalent to ($a (^) $b) (^) $c . and for bags and mixes it is non-transitive and the order of @p can and will drastically change your outpu 10:40
yoleaux ab5tract: I'll pass your message to lizmat.
masak greetings #perl6 on this fair Sunday 12:12
masak is curious what people think of github.com/masak/007/issues/236
ab5tract: what you just messaged to lizmat, it's been up for discussion before 12:14
ab5tract: I think the conclusion was "reduction cancels out short-circuiting"
(but I might misremember)
m: say True ^ True 12:16
camelia one(True, True)
masak m: say so True ^ True 12:17
camelia False
masak m: say so True ^ True ^ True
camelia False
masak m: say so False ^ False
camelia False
masak tries to remember how to cause it to return the third value
m: say so [^]()
camelia False
masak hm. maybe it doesn't anymore. 12:18
oh! I'm using `^`, not `^^`!
m: say True ^^ True
camelia Nil
masak well, that was rather easier :P 12:19
m: say True ^^ True ^^ True
camelia Nil
masak m: say True ^^ True ^^ { say "side effect" }()
camelia Nil
masak about 007's #236, I do feel a twinge of bad conscience there. if macros had been further along, we wouldn't have needed to come up with `with` 12:21
jnthn masak: Given how much I've used with/without/orwith, I'm not sure "definitely if" would be rightly huffmanized, not to mention it reads a bit awkward :) 12:36
A more powerful generalization would be to be able to identify which expression in a conditional/loop statement is the one you want to take as the parameter 12:37
Then it'd work for many more cases than "defined"
Zoffix .ask [Coke] what process did you use to review roast for inclusion to 6.c? 13:10
yoleaux Zoffix: I'll pass your message to [Coke].
Zoffix .ask [Coke] what's the status of bootstrapped docs website? I don't see a branch in repo. 13:17
yoleaux Zoffix: I'll pass your message to [Coke].
timotimo i've imagined in the past there could be syntax for "the whole expression shall return this please" and you could put it anywhere 13:29
my $foo = say ↻99; # $foo would now hold 99 instead of True 13:30
of course you can put a my in anything
Zoffix That would be cool.
I needed it several times and ended up using temp variables to store the return value 13:31
Geth 6.d-prep: 1ff3082a7d | (Zoffix Znet)++ | TODO/FEATURES.md
Move 6.d feature TODO here from mu
13:36
specs: 6f12b30660 | (Zoffix Znet)++ (committed using GitHub Web editor) | v6d.pod
Move doc
13:37
llfourn in spit I designed it so that 'if File<foo.txt>.exists { say $_ }' would make $_ File<foo.txt> 13:38
it ignores things returning a Bool (given that you never want $_ to be a Bool in a conditional)
Geth specs: c2d66a5cb7 | (Zoffix Znet)++ (committed using GitHub Web editor) | v6d.pod
Try to fix pod
llfourn and finds the first no Booly thing in the method chain 13:39
Zoffix What if File<foo.txt> is a Bool?
llfourn File<foo.txt> is a File 13:40
Zoffix Ah
llfourn File<foo.txt> read as File.new(path => "foo.txt")
it compiles to: 13:41
if test -e foo.txt; then
say foo.txt
fi
if foo.txt is not known at compile time it will assign to a temp variable
it occurred to me that this wouldn't be so easy in rakudo because you don't know method return types at compile time 13:42
Geth 6.d-prep: 760fc7739c | (Zoffix Znet)++ | TODO/FEATURES.md
Add time to implement
13:44
timotimo that's true. you'd have to pre-emptively store everything in temporary variables and do a run-time loop over the values 13:45
Zoffix .ask jnthn you mentioned there were still work to be done for non-blocking await. Would you include approximate time required to complete it it? github.com/perl6/6.d-prep/blob/mas...-implement
yoleaux Zoffix: I'll pass your message to jnthn.
Zoffix .ask moritz You're listed as stakeholder for :D on sigils. When can you start working on that? Would you include approximate time required to complete it it? github.com/perl6/6.d-prep/blob/mas...mplement-1 13:46
yoleaux Zoffix: I'll pass your message to moritz.
Zoffix .ask samcv You're listed as stakeholder for Formal Rules for Defining Matched Delimiters/Brackets. When can you start working on that? Would you include approximate time required to complete it it? github.com/perl6/6.d-prep/blob/mas...mplement-2
yoleaux Zoffix: I'll pass your message to samcv.
masak jnthn: ah; you mean a bit like <( )> from regexes, but for expression fragments? 13:56
huh. actually, that exact *syntax* could work!
masak brightens
masak jnthn: I turned your implicit suggestion into another macro idea issue ;) 14:01
llfourn if $myobj.<(property)>.subproperty { .... } # like this? 14:02
Zoffix Is anyone from India here? What's up with two dates for Diwali? Is one date vastly more popular? 14:02
I guess 19th is more popular, since it's more than India that celebrates it 14:05
llfourn I thought it lasted for a few days 14:06
llfourn well it did when I was there 14:06
Zoffix Yeah, it does. 14:06
buggable: 6.d 14:07
buggable Zoffix, I think 6.d Diwali will be released in about 14 weeks, 3 days, 9 hours, 52 minutes, and 16 seconds
Geth doc: 1f7702551b | (Jan-Olof Hendig)++ | doc/Type/Metamodel/C3MRO.pod6
One explanation is enough
14:42
pmurias hi 14:49
pmurias what are some awesome docs sites for other languages that features can be stolen (inspiration taken) from? 14:51
kybr doc.red-lang.org/en ? 14:53
llfourn hexdocs.pm/elixir/Kernel.html # elixir docs are pretty good 14:54
zengargoyle is pleased to not be alone in wanting to choose the thing that gets param'd in an expression. i feared it was just me not knowing the best way to DWIW. 14:56
timotimo i like the suggestion masak made with <( )> but that already is valid syntax for quotewords :| 14:57
m: say <( )>.perl 14:58
camelia ("(", ")")
timotimo and named subscripts
FROGGS o/ 15:32
travis-ci Doc build errored. Jan-Olof Hendig 'One explanation is enough' 15:33
travis-ci.org/perl6/doc/builds/251726742 github.com/perl6/doc/compare/eb8df...7702551b2e
buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0). 15:33
Geth 6.d-prep: adb328cdca | (Zoffix Znet)++ | 4 files
Write more TODO items
15:37
andrzejku hi 16:02
I splitted class into another file
X.pm6
in the same dir
and use X;
is not working
:<
Zoffix andrzejku: use lib <.>; 16:03
andrzejku thnks I miss it x) 16:04
lucs Aw man, "use lib <.>", so easy, never mind the complicated thing I used to do to get the same effect :-) 16:21
zengargoyle *yay* F1 ends in time for Grand Sumo! it's a good sunday morning. :) 16:29
Geth 6.d-prep: 3a580fc32a | (Zoffix Znet)++ | TODO/README.md
Reverse order of commits in link
16:30
[Coke] Zoffix: made some very small local progress on the bootstrap. the insanely slow build speed and failures on osx make it challenging; I now have a docker container I can do stuff in that make it more robust but now need to find time again to work on it. 16:31
Zoffix oops crappy link
[Coke]: there's make web-dev or something target that builds just a few pages of the actual docs, while building most of the website things 16:32
[Coke]: I was just asking cause I wanna added the language version thing to the site and was wondering whether I should wait for bootstrap version or just do it now
We already got jQuery, so I'll do it now; should be easy to swap to BS 16:33
[Coke] wonders why there is a separate repository for 6.d prep; ack did this with their versions as well, I don't understand the advantage to having multiple github repos to track multiple efforts for the same overall project.
Zoffix: (wait to add), no just do it 16:34
BenGoldberg I believe the purpose of having a separate 'prep' repo is so that if any people are working on new features which won't go out with the release, their changes (on the main branch) won't interfere with the new release branch. 16:37
Zoffix You guys are making it up. It's a separate repo because I can just say "put it in 6.d-prep repo" for anything that needs to be done for 6.d release without cloning megs of irrelevant stuff. 16:39
It doesn't cost anything.
well, guy 16:44
Geth 6.d-prep: 2a8ef48ce1 | (Zoffix Znet)++ | TODO/README.md
Revert "Reverse order of commits in link"

This reverts commit 3a580fc32addaa98336f3588f602c3a3cc141a3f. It doesn't reverse order
16:47
andrzejku how to do something like that 16:51
andrzejku my $a, $b = func; 16:51
Zoffix my ($a, $b) = func; 16:52
zengargoyle m: my ($a, $b) = Nil, 24; say $a, $b; 16:53
camelia (Any)24
andrzejku Zoffix thnks again
zengargoyle m: my ($a, $b) = 24 xx 2; say $a, $b; 16:54
camelia 2424
zengargoyle is there a way for func to be duplicated? 16:57
and only called once?
araraloren I remember this documented in design doc or ... 16:58
araraloren and when you want get array from a func, notice `my ($a, @b) := func` 16:59
night .
Zoffix zengargoyle: my $a = my $b = 24 16:59
zengargoyle yeah...
zengargoyle sorta mean a way to keep xx from calling func N times. 17:05
just call func once and then xx the value N times...
andrzejku hey one more time, question
BenGoldberg m: sub func { say 42; pi }; my ($a, $b) = once(func) xx 2;
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
once used at line 1. Did you mean 'one'?
BenGoldberg m: sub func { say 42; pi }; my ($a, $b) = once{ func } xx 2; 17:06
camelia 5===SORRY!5=== Error while compiling <tmp>
Whitespace required after keyword 'once'
at <tmp>:1
------> 3 func { say 42; pi }; my ($a, $b) = once7⏏5{ func } xx 2;
andrzejku can I call in derivered class method from role?
BenGoldberg m: sub func { say 42; pi }; my ($a, $b) = once { func } xx 2;
camelia ( no output )
andrzejku which it doeas?
BenGoldberg m: sub func { say 42; pi }; my ($a, $b) = once { func } xx 2; say $a, $b;
camelia (Mu)(Mu)
BenGoldberg m: sub func { say 42; pi }; my ($a, $b) = (ONCE { func }) xx 2; say $a, $b;
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
ONCE used at line 1
zengargoyle sub X { state $x=0; return $x++ }; say X(), X(); 17:07
m: sub X { state $x=0; return $x++ }; say X(), X();
camelia (X(Any))(X(Any))
zengargoyle m: sub X() { state $x=0; return $x++ }; say X(), X();
camelia (X(Any))(X(Any))
BenGoldberg m: role Foo { method bar { say 'in Foo.bar' } }; class Baz does Foo { method bar { say 'in Baz.bar'; self.Foo::bar() } }; Baz.bar; 17:08
camelia in Baz.bar
in
Foo.bar
»
BenGoldberg andrzejku, ^
BenGoldberg Much like in perl5, you can do method calls with fully qualified method names. 17:09
andrzejku and what about $!variable 17:11
can I inistiale it during construction of class
?
BenGoldberg Try it and see.
andrzejku because I cann't :D 17:12
Zoffix andrzejku: sure just give it a default value. If you want it to depend on some args given to .new, you'd need to set it in BUILD or TWEAK submethods or make your own .new method
zengargoyle m: sub Y() { $++ }; say Y(),Y(); 17:12
camelia 01
zengargoyle m: sub X() { $++ }; say X(),X();
camelia (X(Any))(X(Any))
zengargoyle guesses X is Exception base class.... 17:13
andrzejku Zoffix thnks :)
zengargoyle very confusing
Zoffix zengargoyle: namespace. Yeah. Which is why uppercase subs are a bad idea
m: sub X() { $++ }; say &X(), &X();
camelia 01
zengargoyle *nods*
BenGoldberg . o O (perl4!) 17:14
Zoffix similar ambiguity exists with constants
m: sub e { 42 }; say e
camelia 2.71828182845905
Zoffix m: sub e { 42 }; say e()
camelia 42
zengargoyle will file under the "don't do that"...
BenGoldberg m: class Foo { }; say Foo(); 17:15
camelia (Foo(Any))
Zoffix coercer
BenGoldberg Ahh.
m: class Foo { }; dd Foo(); 17:16
camelia Foo(Any)
BenGoldberg Where does the "(Any)" come from?
Zoffix Coercers default to Any if you don't specify a type 17:17
m: class Foo { }; dd Foo(Int);
camelia Foo(Int)
BenGoldberg m: class Foo { }; dd Foo(Str).WHAT; 17:19
camelia Foo(Str)
BenGoldberg m: class Foo { }; dd Foo(Str).defined;
camelia Bool::False
Zoffix m: class Foo { }; dd Foo(Str).HOW.^name 17:20
camelia "Perl6::Metamodel::CoercionHOW"
andrzejku Zoffix hey, when we do @arr.push(($a, $b)) the ouput is proper but if reference is gone 17:44
it doesn't look good
how to make push by value?
no by reference 17:45
Zoffix Depends on what's in $a and $b 17:47
andrzejku $a and $b are numbers 17:48
Zoffix m: my ($a, $b) = 1, 2; my @a; @a.push: ($a<>, $b<>); dd @a; $a++; dd @a 17:53
camelia Array @a = [(1, 2),]
Array @a = [(1, 2),]
Zoffix m: my ($a, $b) = 1, 2; my @a; @a.push: ($a, $b)»<>; dd @a; $a++; dd @a
camelia Array @a = [(1, 2),]
Array @a = [(1, 2),]
Zoffix m: my ($a, $b) = 1, 2; my @a; @a.push: [$a, $b]; dd @a; $a++; dd @a
camelia Array @a = [[1, 2],]
Array @a = [[1, 2],]
Voldenet m: my ($a, $b) = (1, 2); my @c; @c.push(\($a, $b)); $a++; say @c 17:55
camelia [\(2, 2)]
BenGoldberg m: my ($a, $b) = (1, 2); my @c; @c.push(\($a, $b)); $a++; @c[0].list[0]++; say @c; 17:56
camelia [\(3, 2)]
Voldenet m: my ($a, $b) = (1, 2); my @c; @c.push(\($a, $b)); $a++; .say for @(@c[0])
camelia 2
2
Voldenet I like how /pretty/ it is :> 17:57
BenGoldberg m: my ($a, $b) = (1, 2); my @c := (\($a, $b)).list; ++$a; say @c;
camelia (2 2)
BenGoldberg m: my ($a, $b) = (1, 2); my @c := \($a, $b).list; ++$a; say @c;
camelia (2 2)
BenGoldberg m: my ($a, $b) = (1, 2); my @c := \($a, $b).list; $a = @c; say @c; 17:58
camelia (\List_53265056 = (List_53265056 2))
BenGoldberg Extra prettyness, just as a self-referencial loop
andrzejku sorry was out 17:58
do you know how to push by value
Zoffix m: my ($a, $b) = 1, 2; my @a; @a.push: ($a, $b)»<>; dd @a; $a++; dd @a
camelia Array @a = [(1, 2),]
Array @a = [(1, 2),]
Zoffix andrzejku: do you actually want to push a list of two values instead of just two values? 17:59
m: my ($a, $b) = 1, 2; my @a; @a.append: $a, $b; dd @a; $a++; dd @a 18:00
camelia Array @a = [1, 2]
Array @a = [1, 2]
BenGoldberg m: my ($a, $b) = (1, 2); my @b; @b.push: ($a, $b).clone; dd @b; 18:01
camelia Array @b = [(1, 2),]
andrzejku m: my ($a, $b) = 1, 2; my @c; @c.push($a, $b); $b = 3; @c.push($b); dd $c; 18:02
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$c' is not declared. Did you mean '@c'?
at <tmp>:1
------> 3c.push($a, $b); $b = 3; @c.push($b); dd 7⏏5$c;
andrzejku m: my ($a, $b) = 1, 2; my @c; @c.push($a, $b); $b = 3; @c.push($b); dd @c;
camelia Array @c = [1, 2, 3]
andrzejku github.com/damaxi/InterestRate/blo...ntRole.pm6 18:08
andrzejku @month_remainings_interests lose values 18:08
:<
kybr where can i read about this syntax: has uint8 $!length is written(method {$!string.bytes}); ... i want to know about 'is wrtten(method...)' and 'is read(method...)'
geekosaur trait_mod:<is> 18:09
geekosaur the 'is written' and 'is read' are defined in that package you were looking at 18:11
kybr thanks. i guess i have to read about traits. 18:13
geekosaur here's the definition of 'is written': github.com/avuserow/perl6-binary-s...d.pm6#L198
andrzejku Zoffix it looks like bug there 18:15
kybr geekosaur: i see it. this package seems not quite complete enough for me to use and it would take days for me to complete the parts i need. i'm going back to pack/unpack. :/ 18:18
pmurias Zoffix: Do you have plans to replace our docs website? 18:19
Zoffix andrzejku: ok. Fix it 18:20
pmurias: does it need to be replaced?
andrzejku Zoffix I don't now how and why? 18:21
Geth doc: kybr++ created pull request #1415:
fixed then/than grammar issue
Zoffix andrzejku: that's when you learn how and why 18:22
kybr: I sent you an invite to perl6 org so you can merge that PR yourself. You can accept it on github.com/perl6/ 18:24
Zoffix deletes an invite to "tybr" from couple days ago :P
AlexDaniel XD 18:29
Geth doc: 5c3053ea9e | (karl yerkes)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
fixed then/than grammar issue

  writingexplained.org/then-vs-than-difference
18:32
doc: 286a196e13 | (karl yerkes)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
Merge pull request #1415 from kybr/master

fixed then/than grammar issue
Geth doc: 43cb891ad1 | (Will "Coke" Coleda)++ | doc/Language/traps.pod6
no trailing whitespace
18:54
doc: 8c8013eda0 | (Will "Coke" Coleda)++ | xt/space-after-comma.t
temporarily skip malformed utf8 file
doc: a97d0f5d38 | (Will "Coke" Coleda)++ | doc/Language/traps.pod6
make example code compile
19:04
doc: c3b411ffbd | (Will "Coke" Coleda)++ | 3 files
rephrase slightly (pass xt/aspell.t)
lizmat .
yoleaux 10:27Z <ab5tract> lizmat: on second thought, yes, that is the same. I needed to look deeper than just the diff to see how your implementation works
10:29Z <ab5tract> lizmat: assuming that the behavior of ($a (^) $b) returns the distance between the values and not some sort of coerced-to-Set tthingy
10:32Z <ab5tract> lizmat: I'm still not clear on how your code addresses Mixes (which are stickier than Bags)
10:40Z <ab5tract> lizmat: and yes definitely from a logic standpoint, [(^)] $a, $b, $c should be equivalent to ($a (^) $b) (^) $c . and for bags and mixes it is non-transitive and the order of @p can and will drastically change your outpu
lizmat ab5tract: and having thought about that since yesterday, I disagree :-) 19:05
[(^)] $a, $b, $c should be the same as [(^)] $b, $a, $c
pmurias Zoffix: it works, it's just not awesome 19:06
lizmat basically, I interprete (^) in setty context as the elements that are in only 1 set
this is how currently it is implemented for sets
pmurias Zoffix: I'm playing around with replacing it mostly as react.js learning exercise (so that rakudo.js can then be taught how to work together with react.js) 19:07
lizmat for baggies, I interprete it as "all the occurrences of elements that are in only 1 bag
m: dd <a b b>.Bag (^) <a b>.Bag 19:08
camelia ("b"=>1).Bag
lizmat m: dd <a b>.Bag (^) <a b b>.Bag
camelia ("b"=>1).Bag
lizmat note that the order doesn't matter
for [(^)] on more than 2 bags, I see an algorithm that would create a bag of all keys, and keep the lowest and highest number seen in a bag 19:09
Zoffix pmurias: I have no plans to replace it
lizmat oops, I mean, highest and second highest number ssen 19:10
then post-process the resulting bag why adapting the number of occurrences by subtracting the highest and second highest 19:12
same for Mixies
[Coke] m: say "\c[482,PENGUIN]" 19:13
camelia Ǣ🐧
Geth 6.d-prep: a7ea2fbe98 | (Zoffix Znet)++ | TODO/README.md
Add roast review instructions and commands
19:17
doc: 6fd16df0fe | (Will "Coke" Coleda)++ | doc/Language/unicode.pod6
Note multi-character example
19:18
6.d-prep: f4bc03d072 | (Zoffix Znet)++ | TODO/README.md
Fix link; atom--
travis-ci Doc build errored. karl yerkes 'Merge pull request #1415 from kybr/master 19:24
travis-ci.org/perl6/doc/builds/251772281 github.com/perl6/doc/compare/1f770...6a196e134e
buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0). 19:24
Geth doc: aebdce0020 | (Will "Coke" Coleda)++ | doc/Language/traps.pod6
Link types; Str not String

Clarify some wording
Fixesx #1300
19:40
travis-ci Doc build passed. Will "Coke" Coleda 'rephrase slightly (pass xt/aspell.t)' 19:41
travis-ci.org/perl6/doc/builds/251778537 github.com/perl6/doc/compare/8c801...b411ffbd7f
travis-ci Doc build errored. Will "Coke" Coleda 'temporarily skip malformed utf8 file' 19:45
travis-ci.org/perl6/doc/builds/251776687 github.com/perl6/doc/compare/286a1...8013eda005
buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0). 19:45
[Coke] Working with POD6 for the doc site is not fun. :| 20:00
moritz let's write markdown instead 20:04
Zoffix uses markdown with a special pre-processor on rakudo.party
``Int`` translates to docs.perl6.org/type/Int and ``foo`` or ``.foo`` translates to docs.perl6.org/routine/foo 20:05
travis-ci Doc build errored. Will "Coke" Coleda 'Note multi-character example' 20:08
travis-ci.org/perl6/doc/builds/251781681 github.com/perl6/doc/compare/c3b41...d16df0fe68
buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0). 20:08
Triplefox i set up a minimal windows PATH that only includes the perl6 install and zef fails due to no git or wget (good) with an infinite loop ping-ponging between two uris (bad?) 20:25
travis-ci Doc build errored. Will "Coke" Coleda 'Link types; Str not String 20:31
travis-ci.org/perl6/doc/builds/251785909 github.com/perl6/doc/compare/6fd16...bdce002015
buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0). 20:31
Zoffix Triplefox: probably 20:32
which two URIs?
Triplefox ecosystem-api.p6c.org/projects.json git://github.com/ugexe/Perl6-ecosystems.git 20:34
also i went back and ran it with my normal environment and it worked, and then used the failing one again and it didn't infinite loop
cached maybe? it just showed the errors and exited with 0 results 20:35
Zoffix shrugs 20:44
BenGoldberg m: role R {}; constant c = R[ R ]; 23:50
camelia ( no output )
BenGoldberg m: role R {}; constant c = R[ :() ];
camelia ===SORRY!===
QAST::Block with cuid 3 has not appeared