»ö« 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 Zoffix on 25 May 2018.
benjikun zostay: You online rn? 00:58
zostay benjikun: I am now. 02:04
benjikun zostay: I'm attempting to use DOM::Tiny to parse this XML file: view-source:www.sec.gov/Archives/edgar/data/24...180331.xml 02:13
but `$dom.find('dei:DocumentFiscalYearFocus')` returns nothing
benjikun Is there a reason why you can't have colons in the tag name zostay? 02:15
Or is something else happening
Zoffix .tell jnthn just an FYI: I created the concept of spec APPENDICES that contain optional tests impls can optionally follow (e.g. overflow exceptions when raising an int to a specific huge power): more info in readme: github.com/perl6/roast/tree/master...appendices 02:16
yoleaux Zoffix: I'll pass your message to jnthn.
Zoffix .tell TimToady just an FYI: I created the concept of spec APPENDICES that contain optional tests impls can optionally follow (e.g. overflow exceptions when raising an int to a specific huge power): more info in readme: github.com/perl6/roast/tree/master...appendices
yoleaux Zoffix: I'll pass your message to TimToady.
Zoffix benjikun: at least in Mojo::DOM that DOM::Tiny emulates, you need to specify the namespace separately 02:18
benjikun: see responses on this post: www.reddit.com/r/perl/comments/8je...om_please/ 02:19
Presumablly they'll apply to DOM::Tiny too
zostay yes, it has something to do with the namespace handling... i'm trying to come up with the correct incantation for you 02:22
i've been really busy today and haven't messed with this in a bit so the delay is mostly context switching 02:23
benjikun zostay: Do you put the namespace in square brackets?
Ah, it's alright, no need to rush 02:24
oh, zostay, I just omitted using the namespace entirely and it works fine 02:30
zostay Yes, that will work. I confess that I haven't work with namespaces in DOM::Tiny very much. 02:33
There are tests for them in the (massive) test suite I ported from Mojo::DOM58, but there might be room for improvement here.
Even if it's not a feature of Mojo::DOM58, it feels like your .find() ought to have worked because XML is allowed to work with colons without namespace support at the very least.
Whether its feasible to make that change or not, I don't really know at the mo' 02:34
zostay about the best I can come up with matching your original intention is: 02:38
$dom.find('DocumentFiscalPeriodFocus').grep({ .namespace eq 'xbrl.sec.gov/dei/2014-01-31' });
SmokeMachine Hi, can someone help me please? 02:48
Im writing a module
and this is working: github.com/FCO/EventSource/blob/ma...st/test.p6 02:49
but when I remove the Assinatura class from the `test.p6` file and add a file for it, it gives me this error: 02:50
www.irccloud.com/pastebin/8XPSBN7T/
the error is here: github.com/FCO/EventSource/blob/ma...rce.pm6#L6 02:51
the callsame can't be executed... 02:52
if I try to print the `$r` inside of the wrap, it gives the same error...
this is what isn't working: github.com/FCO/EventSource/blob/no...natura.pm6 02:57
with `no precompilation` on EventSource, it works... 03:02
is it a bug? 03:03
or what am i doing wrong?
TimToady I don't suppose you had a clock regression at some point that might cause it to think something doesn't need recompiling? 03:07
yoleaux 02:16Z <Zoffix> TimToady: just an FYI: I created the concept of spec APPENDICES that contain optional tests impls can optionally follow (e.g. overflow exceptions when raising an int to a specific huge power): more info in readme: github.com/perl6/roast/tree/master...appendices
02:20Z <Zoffix> TimToady: I mean raising Int, not int github.com/perl6/roast/blob/master...overflow.t
Zoffix SmokeMachine: it's a known bug: R#127112 03:21
There are half-a-dozen other issues with .wrap (various tickets on fail.rakudo.party/ )
RT#127112
synopsebot RT#127112 [open]: rt.perl.org/Ticket/Display.html?id=127112 .wrap doesn't work for routines declared in roles
Zoffix SmokeMachine: what's your perl6 version? 03:23
SmokeMachine Zoffix: This is Rakudo version 2018.06-148-gf830bf344 built on MoarVM version 2018.06-141-gcae4731e2 03:24
Zoffix m: say $*PERL.compiler.version
camelia v2018.06.183.gecbf.44.fb.5
Zoffix SmokeMachine: you could try with the last release, if you want. There are some varts on HEAD with invokish stuff, like R#2072 03:25
synopsebot R#2072 [open]: github.com/rakudo/rakudo/issues/2072 [⚠ blocker ⚠] Can't build on 32-bit Debian: Cannot invoke this object (REPR: P6opaque; QAST::Block)
Zoffix SmokeMachine: I see that unlike the case in RT#127112 you're not sticking a wrapped thing into the precomped version but rather just exporting a trait that wraps 03:26
synopsebot RT#127112 [open]: rt.perl.org/Ticket/Display.html?id=127112 .wrap doesn't work for routines declared in roles
SmokeMachine Zoffix: Ill try! thanks!
Zoffix SmokeMachine: what is `self` meant to be in that method you're wrapping with? 03:28
m: 42.^lookup('abs').wrap: my method (|) { dd self }; 42.abs 03:29
camelia 42
Zoffix ah, k, nm
SmokeMachine Zoffix: The obj who does the EventSource role...
s/who/that/ 03:30
Zoffix: still doesn't work with the last version... :( 03:32
Zoffix SmokeMachine: what if you move that trait out of the role? 03:33
In my test, if I dump the `self`, it gets the role's typeobject instead of the self of the method itself
SmokeMachine Zoffix: that was the original version, but Ill try
Zoffix And if I move it out, it's crashing with "Too few positionals passed; expected at least 1 arguments but got only 0" with just the .wrap call but I've no idea what its problem is 03:34
ah, I wrapped with a method, but applied it to a sub, nm
SmokeMachine Zoffix: same problem...
ill leave it outside the role... 03:35
Zoffix m: sub foo {}; &foo.wrap: -> | {}; foo 42 03:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling foo(Int) will never work with declared signature ()
at <tmp>:1
------> 3sub foo {}; &foo.wrap: -> | {}; 7⏏5foo 42
Zoffix m: use soft; sub foo {}; &foo.wrap: -> | {}; foo 42
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling foo(Int) will never work with declared signature ()
at <tmp>:1
------> 3e soft; sub foo {}; &foo.wrap: -> | {}; 7⏏5foo 42
Zoffix I expect this to not wrap stuff...
I mean to not complain about signature
m: use soft; sub foo {}; BEGIN &foo.wrap: -> | {}; foo 42
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling foo(Int) will never work with declared signature ()
at <tmp>:1
------> 3; sub foo {}; BEGIN &foo.wrap: -> | {}; 7⏏5foo 42
Zoffix Ah, I think it just prevents constant folding but the check for never work needs to also be placed under soft check 03:38
Zoffix R#2074 03:41
synopsebot R#2074 [open]: github.com/rakudo/rakudo/issues/2074 [QAST][medium difficulty] erroneous "will never work" sig error on wrapped sub
Zoffix SmokeMachine: FWIW, can't repro the problem in my small test case on HEAD-ish commit: gist.github.com/zoffixznet/c3e7d8c...23e158d972 03:45
SmokeMachine: I think you haveta pass `self` to callsame when wrapping like that with a standalone method 03:46
Your version doesn't
Might be the problem that's causing that error
Zoffix &
SmokeMachine .tell Zoffix same for me... but if I split `z.p6` into 2 different files it gives me the same error as my code... www.irccloud.com/pastebin/rJL2Gsbu/ 03:52
yoleaux SmokeMachine: I'll pass your message to Zoffix.
SmokeMachine m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: { bla } }; sub qqq($a) is bla{say $a} {}; qqq 42 # should it do that? in my mind it should or print 42 or break saying that $a doesn't exist... 03:57
camelia (Mu)
SmokeMachine m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: { bla } }; sub qqq($a) is bla{callsame; say $a} {}; qqq 42 # but why this works?! 04:06
camelia (Mu)
SmokeMachine m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: { callsame; bla } }; sub qqq($a) is bla{say $a} {13}; qqq 42 04:07
camelia 42
SmokeMachine this ^^
araraloren m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: bla; }; sub qqq($a) is bla{say $a} {}; qqq 42; 04:19
camelia (Mu)
5===SORRY!5=== Error while compiling <tmp>
Type check failed in binding to parameter '&wrapper'; expected Callable but got Bool (Bool::True)
at <tmp>:1
araraloren m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: &bla; }; sub qqq($a) is bla(-> {say $a}) {}; qqq 42; 04:20
camelia Too many positionals passed; expected 0 arguments but got 1
in block <unit> at <tmp> line 1
araraloren m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: &bla; }; sub qqq($a) is bla {say $a} {}; qqq 42;
camelia 5===SORRY!5=== Error while compiling <tmp>
Can't use unknown trait 'is bla' in a sub declaration.
at <tmp>:1
expecting any of:
rw raw hidden-from-backtrace hidden-from-USAGE pure default
DEPRECATED inlinable nodal pre…
araraloren m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: &bla; }; sub qqq($a) is bla{say $a} {}; qqq 42;
camelia (Mu)
SmokeMachine is `$a` only being populated when the "real" `qqq`runs? 04:22
multi trait_mod:<is>(Routine $r, :&bla!) { my &q = $r.clone; $r.wrap: -> |c { q |c; bla }; }; sub qqq($a) is bla{say $a} {}; qqq 42; 04:26
evalable6 42
araraloren m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: { bla($^a) }; }; sub qqq($a) is bla{say $^a} {}; qqq 42;
camelia 42
araraloren m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: { bla($^a) }; }; sub qqq($a) is bla{say $a} {}; qqq 42; 04:27
camelia (Mu)
SmokeMachine multi trait_mod:<is>(Routine $r, :&bla!) { my &q = $r.clone; $r.wrap: -> |c { q "not what I was expecting..."; bla }; }; sub qqq($a) is bla{say $a} {}; qqq 42; 04:28
araraloren not sure what's time of $a populated
evalable6 not what I was expecting...
SmokeMachine araraloren: I think it's populated when the original (or it's clone) runs... 04:29
multi trait_mod:<is>(Routine $r, :&bla!) { our &q = $r.clone; $r.wrap: -> |c { bla }; }; sub qqq($a) is bla{q "blablabla"; say $a} {}; qqq 42; 04:30
araraloren m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: { bla($^a) }; }; sub qqq($a where { say "check {$^a}"; True }) is bla{say $a} {}; qqq 42;
camelia 5===SORRY!5=== Error while compiling <tmp>
Placeholder variable $^a may not be used here because the surrounding block takes no signature
at <tmp>:1
------> 3; }; sub qqq($a where { say "check {$^a}7⏏5"; True }) is bla{say $a} {}; qqq 4…
araraloren m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: { bla($^a) }; }; sub qqq($a where { say "check ", $^a; True }) is bla{say $a} {}; qqq 42;
camelia (Mu)
SmokeMachine had I break evalable6 ? 04:31
m: multi trait_mod:<is>(Routine $r, :&bla!) { our &q = $r.clone; $r.wrap: -> |c { bla }; }; sub qqq($a) is bla{q "blablabla"; say $a} {}; qqq 42;
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
q used at line 1
araraloren haha
SmokeMachine m: my &q; multi trait_mod:<is>(Routine $r, :&bla!) { &q = $r.clone; $r.wrap: -> |c { bla }; }; sub qqq($a) is bla{q "blablabla"; say $a} {}; qqq 42;
camelia (Mu)
araraloren the &bla not running ? 04:32
SmokeMachine araraloren: `&bla` is running... the `say` is inside `&bla` 04:33
araraloren oh, it's q :)
SmokeMachine m: my &q; multi trait_mod:<is>(Routine $r, :&bla!) { &q = $r.clone; $r.wrap: -> |c { bla }; }; sub qqq($a) is bla{q "blablabla"; say "inside bla: $a"} {}; qqq 42;
camelia Cannot call method 'Stringy' on a null object
in block <unit> at <tmp> line 1
SmokeMachine m: my &q; multi trait_mod:<is>(Routine $r, :&bla!) { &q = $r.clone; $r.wrap: -> |c { bla }; }; sub qqq($a) is bla{q "blablabla"; say "inside bla: {$a}"} {}; qqq 42;
camelia Cannot call method 'Stringy' on a null object
in block <unit> at <tmp> line 1
SmokeMachine m: my &q; multi trait_mod:<is>(Routine $r, :&bla!) { &q = $r.clone; $r.wrap: -> |c { bla }; }; sub qqq($a) is bla{q "blablabla"; say "inside bla: ", $a} {}; qqq 42;
camelia inside bla: (Mu)
SmokeMachine m: my &q; multi trait_mod:<is>(Routine $r, :&bla!) { &q = $r.clone; $r.wrap: -> |c { bla }; }; sub qqq($a) is bla{say "q: ", q "blablabla"; say "inside bla: ", $a} {$a}; qqq 42; 04:34
camelia q: blablabla
inside bla: (Mu)
araraloren m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: { bla($^a) }; }; sub qqq($a where { say "in check ", $^a; True }) is bla{say $a} {}; qqq 42; 04:35
camelia (Mu)
araraloren m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: { bla($^a) }; }; sub qqq($a where { say "in check ", $^a; True }) {}; qqq 42;
camelia in check 42
araraloren seems like the is bla break the where sentence
m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: { bla($^a) }; }; sub qqq($a where { say "in check ", $^a; True }) is bla{say $^a} {}; qqq 42; 04:36
camelia 42
SmokeMachine m: my &q; multi trait_mod:<is>(Routine $r, :&bla!) { say "q: ", &r.clone.("blablabla"); $r.wrap: -> |c { bla }; }; sub qqq($a) is bla{say "inside bla: ", $a} {$a}; qqq 42;
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot find method 'Nil' on object of type Str
at <tmp>:1
SmokeMachine araraloren: I think you are right 04:37
m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: -> $x where {say "in qqq check ", $^a; True} { bla }; }; sub qqq($a where { say "in bla check ", $^a; True }) is bla{say $^a} {}; qqq 42; 04:38
camelia in qqq check 42
Too few positionals passed; expected 1 argument but got 0
in block <unit> at <tmp> line 1
SmokeMachine m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: -> $x where {say "in wrap check ", $^a; True} { bla }; }; sub qqq($a where { say "in bla check ", $^a; True }) is bla{say $^a} {}; qqq 42;
camelia in wrap check 42
Too few positionals passed; expected 1 argument but got 0
in block <unit> at <tmp> line 1
SmokeMachine m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: -> $x where {say "in wrap check ", $^a; True} { bla }; }; sub qqq($a where { say "in bla check ", $^a; True }) is bla{say $a} {}; qqq 42;
camelia in wrap check 42
(Mu)
araraloren_ that's maybe releated to where $a is Mu :) maybe haha 04:39
SmokeMachine m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: -> $x where {say "in wrap check ", $_; True} { bla }; }; sub qqq($a where { say "in bla check ", $_; True }) is bla{say $a} {}; qqq 42;
camelia in wrap check 42
(Mu)
SmokeMachine araraloren_: but it's not using the $a... 04:40
araraloren_ yeah
SmokeMachine m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: -> $x where {say "in wrap check ", $_; True} { callsame; bla }; }; sub qqq($a where { say "in bla check ", $_; True }) is bla{say $a} {}; qqq 42;
camelia in wrap check 42
in bla check 42
42
araraloren_ like they dropped the $a :)
SmokeMachine this one is using $a...
wrong name... 04:41
m: multi trait_mod:<is>(Routine $r, :&bla!) { $r.wrap: -> $x where {say "in wrap check ", $_; True} { callsame; bla }; }; sub qqq($a where { say "in qqq check ", $_; True }) is bla{say $a} {}; qqq 42;
camelia in wrap check 42
in qqq check 42
42
SmokeMachine so, it populates $a when qqq runs... 04:42
araraloren_ m: sub qqq($a where { say "in qqq check", $_; True }) { sub bla { say } }
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun
at <tmp>:1…
SmokeMachine m: multi trait_mod:<is>(Routine $r, :&bla!) { my &q = $r.clone; $r.wrap: -> $x where {say "in wrap check ", $_; True} { q $x; bla }; }; sub qqq($a where { say "in qqq check ", $_; True }) is bla{say $a} {}; qqq 42; 04:43
camelia in wrap check 42
in qqq check 42
42
SmokeMachine m: sub qqq($a where { say "in qqq check", $_; True }) { sub bla { .say } }
camelia ( no output )
SmokeMachine m: sub qqq($a where { say "in qqq check", $_; True }) { sub bla { .say }.(42) } 04:44
camelia ( no output )
SmokeMachine m: sub qqq($a where { say "in qqq check", $_; True }) { sub bla { .say }.($a) } qqq 42
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3 $_; True }) { sub bla { .say }.($a) }7⏏5 qqq 42
expecting any of:
infix
infix stopper
SmokeMachine m: sub bla {}.() 04:45
camelia ( no output )
SmokeMachine m: sub bla {say 42}.()
camelia 42
araraloren_ m: sub qqq($a where { say "in qqqc", $_; True }) { sub bla { say "in bla", $a; }; once &?ROUTINE.wrap: -> $x where { say "in wrapc", $_; True; } { bla }; }; qqq 42;
camelia in qqqc42
No such method 'wrap' for invocant of type 'Code'. Did you mean any of these?
Map
grep
map

in sub qqq at <tmp> line 1
in block <unit> at <tmp> line 1
SmokeMachine m: sub bla {.say}.(42)
camelia Too many positionals passed; expected 0 arguments but got 1
in sub bla at <tmp> line 1
in block <unit> at <tmp> line 1
SmokeMachine m: sub bla {$^a.say}.(42) 04:46
camelia 42
SmokeMachine m: sub bla { .say }; bla 42 04:47
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling bla(Int) will never work with declared signature ()
at <tmp>:1
------> 3sub bla { .say }; 7⏏5bla 42
SmokeMachine m: sub bla { .say }; ^10 .map: &bla
camelia Too many positionals passed; expected 0 arguments but got 1
in sub bla at <tmp> line 1
in block <unit> at <tmp> line 1
SmokeMachine Ill go to sleep...
araraloren_: have a good night 04:48
araraloren_ m: sub qqq($a where { say "in qqqc", $_; True }) { sub bla { say "in bla", $a; }; once { &?ROUTINE.wrap( -> $x where { say "in wrapc", $_; True; } { bla }); }; }; qqq 42;
camelia in qqqc42
araraloren_ SmokeMachine :) Here is day, good night
m: sub qqq($a where { say "in qqqc", $_; True }) { sub bla { say "in bla", $a; }; once { &?ROUTINE.wrap( -> $x where { say "in wrapc", $_; True; } { bla }); }; }; qqq 42; qqq 42;
camelia in qqqc42
in wrapc42
in bla42
SmokeMachine its 1:48 am here... :) 04:49
araraloren_ oh, you need go to sleep :)
Hmm, I think the trait `is` is something cause they not capture the $a, or it capture the wrong value 04:50
SmokeMachine m: say class :: {multi method a(1) {1}; multi method a(1) {2}}.new.*a: 1 05:02
camelia (1)
SmokeMachine Shouldn’t it be (1, 2)?
m: class A {multi method a(1) {1}}; class B is A {multi method a(1) {2}}.new.*a: 1 05:04
camelia ( no output )
SmokeMachine m: class A {multi method a(1) {1}}; say class B is A {multi method a(1) {2}}.new.*a: 1 05:05
camelia (2 1)
Zoffix SmokeMachine: no, all these method call variations walk the MRO, not the individual candidates 05:14
yoleaux 03:52Z <SmokeMachine> Zoffix: same for me... but if I split `z.p6` into 2 different files it gives me the same error as my code... www.irccloud.com/pastebin/rJL2Gsbu/
Zoffix m: 42.classify: * 05:22
camelia Doesn't make sense to classify with itself
in block <unit> at <tmp> line 1
Zoffix This is actually a proptest. 05:23
Probably another usecase for the spec APPENDICES stuff.
'cause there was even a call for making `*` on classify do stuff R#1281 05:24
synopsebot R#1281 [closed]: github.com/rakudo/rakudo/issues/1281 Argless default for .classify()
Zoffix dunno how much sense it makes to spec "this doesn't do anything useful" IMO 05:25
Zoffix moves these to rakudo's suite 05:25
sarna o/ 08:50
seems like we can generate Dash docs from HTML github.com/technosophos/dashing/bl.../README.md
so we can just take docs.perl6.org and shove them into this thing 08:51
buggable New CPAN upload: Image-Libexif-0.0.1.tar.gz by FRITH cpan.metacpan.org/authors/id/F/FR/...0.1.tar.gz 09:09
sarna hey, I have a weird problem with native call 11:01
I'm calling Rust. what exactly? fibonacci, of course
the weird issue is, even though the return type is u64, in perl fib(93) prints a negative number 11:02
fib(94) is an overflow and panic from Rust
lizmat does fib(93) fit in *63* bits ? 11:04
there is an outstanding issue with native unsigned 64 bit int, that if the 64th bit is set, it becomes negative 11:05
m: my uint64 $a = 2**63-1; dd $a; ++$a; dd $a 11:06
camelia 9223372036854775807
-9223372036854775808
lizmat sarna: perhaps that is what is happening ?
xq yeah 11:07
fib 93 wont fit into 63 bit
sarna lizmat: oh yeah, thank you
isn't this issue-worthy? 11:10
lizmat there is an issue for it already afaik 11:14
probably in old RT land :-(
sarna news.perlfoundation.org/2018/04/gra...fixin.html 11:16
hope it's gonna work out 11:22
parv what would be the solution for a number not fitting in 64 bits: use 65+ bits? 11:25
parv ... also would there not be a point after which perl6 just throws hands up and return overflow result or error? 11:27
lizmat sarna: sadly it did not: blogs.perl.org/users/zoffix_znet/20...grant.html 11:32
sarna lizmat: :( 11:36
parv: perl6's Int is arbitrarily sized, ie it grows as much as you want it to
sarna if I had to return them from Rust.. probably BigInts as strings 11:37
parv sarna thanks. 11:40
buggable New CPAN upload: Readline-0.1.4.tar.gz by JGOFF modules.perl6.org/dist/Readline:cpan:JGOFF 14:09
buggable New CPAN upload: Tuple-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz 14:39
lizmat www.quora.com/What-are-some-featur...-languages 15:24
moritz grammars! 15:26
lizmat weekly: www.quora.com/What-are-some-featur...-languages 15:39
notable6 lizmat, Noted!
masak +1 on grammars 15:50
Juerd Junctions, grammars, gradual typing, named arguments, ^5, too many to mention... 15:52
Juerd I really like the simple syntax improvements for common use cases, such as ^5 and %% 15:53
Summertime I know its not just a perl6 thing, but the Cool plus type coercion based on operator (not on the params of the operator a la js) is nice 15:58
buggable New CPAN upload: Tuple-0.0.2.tar.gz by ELIZABETH modules.perl6.org/dist/Tuple:cpan:ELIZABETH 17:49
xinming what is the right way to do something like for qw(a b c d) -> $name { self!$name = $/{$name} } ? 18:11
I got we can't do this in private method
timotimo if the attributes are public and "is rw", you can use self."$name"() = $/{$name} 18:12
otherwise i think you will have to go via self.^attributes
xinming timotimo: Thanks, ^attributes thing is what I'm asking. 18:29
andrzejku hi 18:38
xinming eval: class A { has ($.x is rw, $.y is rw); submethod BUILD () { self.y() = "abc" } }; A.new; 19:39
evalable6 (exit code 1) Cannot modify an immutable Any ((Any))
in submethod BUILD at /tmp/XP_rFhJjau line 1
in block <unit> at /tmp/XP_rFhJjau line 1
xinming Is this a bug? :-)
eval: class A { has ($.x is rw); submethod BUILD () { self.y() = "abc" } }; A.new;
evalable6 (exit code 1) No such method 'y' for invocant of type 'A'. Did you mean 'x'?
in submethod BUILD at /tmp/alVEeq5xtq line 1
in block <unit> at /tmp/alVEeq5xtq line 1
xinming This version worked fine. 19:40
eval: class A { has ($.x is rw); submethod BUILD () { self.x() = "abc" } }; A.new;
evalable6 (exit code 1) Cannot modify an immutable Any ((Any))
in submethod BUILD at /tmp/9t5he__9sY line 1
in block <unit> at /tmp/9t5he__9sY line 1
xinming strange... I made it work once.
MasterDuke xinming: this is not my area of expertise, but you usually don't want/need BUILD. most use cases should use TWEAK instead 19:43
Zoffix xinming: you need to use a `has` for each attribute. Don't put parens there 19:54
m: class A { has $.x is rw; has $.y is rw; submethod BUILD () { self.y = 42 } }; A.new.y.say
camelia 42
Zoffix (there = around `has` stuff)
m: class A { has ($.x is rw, $.y is rw); submethod BUILD () { dd self.y } }; A.new.y.say 19:55
camelia Any
(Any)
Zoffix Don't know what it's parsing as, but it's not picking up the `is rw` trait when you write it that way
m: class A { has $.x is rw; has $.y is rw; submethod BUILD () { dd self.y } }; A.new.y.say
camelia Any $!y = Any
(Any)
Zoffix Filed as R#2078 20:00
synopsebot R#2078 [open]: github.com/rakudo/rakudo/issues/2078 [@LARRY][LTA] LTA behaviour when using parens around `has` stuff
xinming MasterDuke: Ok, THanks, I don't know there is a TWEAK submethod, my knowledge is abit outdated. 20:03
ZofBot: Thanks, got it. I thought it is the same as my 20:04
Geth doc: 8fe5c51cc3 | (Zoffix Znet)++ | doc/Type/Proc.pod6
[v6.d REVIEW] Fix up Proc.command

It returns an immutable List, not a mutable Array
Rakudo fix up: github.com/rakudo/rakudo/commit/925c113433 Propspec fix up: github.com/perl6/roast/commit/d66c1a3349
20:10
synopsebot Link: doc.perl6.org/type/Proc
buggable New CPAN upload: Tuple-0.0.3.tar.gz by ELIZABETH modules.perl6.org/dist/Tuple:cpan:ELIZABETH 20:39
Geth doc: a1f0ae3e58 | (Elizabeth Mattijsen)++ | doc/Type/Any.pod6
Be more specific about Any.Hash|hash

  - make clear that .hash returns *something* Associative
  - point to .Hash / .Map if you want mutable / immutable
  - fix obviously wrong example
synopsebot Link: doc.perl6.org/type/Any
xinming eval: class A { has $!x; has $!y is required; }; A.new(:x(3), :y(4)) 20:50
evalable6 (exit code 1) The attribute '$!y' is required, but you did not provide a value for it.
in submethod BUILDALL at /tmp/zWjc00mitC line 1
in block <unit> at /tmp/zWjc00mitC line 1
xinming hmm 20:51
eval: class A { has $!x; has $y is required; }; A.new(:x(3), :y(4))
evalable6 (exit code 1) The attribute '$!y' is required, but you did not provide a value for it.
in submethod BUILDALL at /tmp/9vrj8lhSWt line 1
in block <unit> at /tmp/9vrj8lhSWt line 1
xinming the required attributes not working ATM?
lizmat has $.y instead of has $y 20:52
xinming eval: class A { has $!x; has $.y is required; }; A.new(:x(3), :y(4))
evalable6
xinming eval: class A { has $!x; has $!y is required; }; A.new(:x(3), :y(4))
evalable6 (exit code 1) The attribute '$!y' is required, but you did not provide a value for it.
in submethod BUILDALL at /tmp/aBjj6Ug1y_ line 1
in block <unit> at /tmp/aBjj6Ug1y_ line 1
lizmat I guess it should warn/die about using "is required" on a private attribute 20:53
xinming lizmat: Yea, that'll be good. :-)
I'll read doc before the end of the month.
each time I try perl6, I feel that how such a powerful language human can design and implement. :-) 20:55
lizmat xinming: thank you for keeping trying and asking questions :-) 20:56
xinming: github.com/rakudo/rakudo/commit/1ad34320e0 21:20
buggable New CPAN upload: P6Repl-Helper-0.0.3.tar.gz by KJK modules.perl6.org/dist/P6Repl::Helper:cpan:KJK 21:39
Geth doc: tbrowder++ created pull request #2177:
Phase2
22:09
tbrowder_ .ask AlexDaniel please see my doc PR #2177 which implements Phase 2 of my proposed Language doc handling 22:13
yoleaux tbrowder_: I'll pass your message to AlexDaniel.
Geth DBIish: kjpye++ created pull request #124:
Remove unnecessary "is required" from several definitions.
23:44
Geth DBIish: 399447b0ac | (Kevin Pye)++ | 6 files
Remove unnecessary "is required" from several definitions.

This was causing problems with current rakudo HEAD which disallows such a condition on private attributes.
23:56
DBIish: 21d0190174 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 6 files
Merge pull request #124 from kjpye/issue123

Remove unnecessary "is required" from several definitions.