»ö« 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. |
|||
00:09
gabiruh left
00:19
buggable left,
buggable joined,
ChanServ sets mode: +v buggable
00:22
dj_goku left
00:44
fake_space_whale joined
00:51
gabiruh joined
|
|||
benjikun | zostay: You online rn? | 00:58 | |
01:17
stmuk joined
01:19
stmuk_ left
01:20
jameslenz joined
01:24
jameslenz left
01:33
markoong left
01:45
subroot joined
01:47
mcmillhj joined,
subr joined
01:49
subroot left
01:56
mcmillhj left
|
|||
zostay | benjikun: I am now. | 02:04 | |
02:12
fake_space_whale left
|
|||
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 | |||
02:14
Zoffix joined
|
|||
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 | |||
02:19
Zoffix left
02:21
Xliff left
02:22
Xliff joined
|
|||
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 | ||
02:34
subr left
02:35
subroot joined
|
|||
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' }); | |||
02:40
p6noob left
02:42
araraloren joined,
eliasr left
|
|||
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? | |||
03:07
jeromelanteri joined
|
|||
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 | |||
03:19
subroot left
03:20
jameslenz joined
03:21
Zoffix joined
|
|||
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 | |
03:23
stmuk_ joined
|
|||
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 | ||
03:24
jameslenz left
|
|||
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) | ||
03:25
stmuk left
03:26
Sgeo left
|
|||
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! | ||
03:28
Sgeo joined
|
|||
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 | |
03:40
spycrab0 left
|
|||
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 & | |||
03:46
Zoffix left
|
|||
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) | ||
03:57
wamba joined
|
|||
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) |
||
04:39
araraloren_ joined
|
|||
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 |
||
04:41
araraloren left
|
|||
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) | ||
05:13
Zoffix joined
|
|||
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/ | ||
05:20
jameslenz joined
|
|||
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 | |
05:25
jameslenz left
|
|||
Zoffix moves these to rakudo's suite | 05:25 | ||
05:25
Zoffix left
06:09
lizmat left
06:13
vike left
06:17
domidumont joined
06:23
domidumont left
06:24
domidumont joined
06:33
kybr joined
06:35
vike joined
06:38
konsolebox left
06:41
konsolebox joined
07:00
lizmat joined
07:19
Raybih joined
07:32
pecastro joined
07:42
kerframil left
07:51
parv joined
08:01
jameslenz joined
08:12
jameslenz left
08:27
wamba left
08:42
Khisanth left
08:47
BooK joined
08:48
robertle joined
08:50
sarna joined
|
|||
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 | ||
08:51
domidumont left
08:56
Khisanth joined
09:01
lizmat left
09:04
ufobat_ joined
|
|||
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 | |
09:41
sena_kun joined
09:47
Schepeers_ joined
09:50
Schepeers left
10:01
HaraldJoerg joined
10:11
lizmat joined
10:13
jameslenz joined
10:18
jameslenz left
10:19
Raybih left
10:23
domidumont joined
10:27
rindolf left
10:29
MasterDuke left
10:38
ufobat_ left
|
|||
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 | |||
11:04
wamba joined
|
|||
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 | ||
11:14
rindolf joined
|
|||
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 | |
11:26
markoong joined
|
|||
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 | |||
11:37
ExtraCrispy joined
|
|||
sarna | if I had to return them from Rust.. probably BigInts as strings | 11:37 | |
parv | sarna thanks. | 11:40 | |
11:49
parv left
11:59
MasterDuke joined
12:08
eliasr joined
12:11
aborazmeh joined,
aborazmeh left,
aborazmeh joined
12:13
jameslenz joined
12:18
jameslenz left
12:19
Some-body_ joined
12:20
DarthGandalf left,
Some-body_ is now known as DarthGandalf
12:38
vike left
12:48
araraloren_ left
13:01
leah2 left
13:04
leah2 joined
13:29
xtreak joined
13:53
Sgeo_ joined
13:54
ufobat_ joined
13:57
xinming_ is now known as xinming,
Sgeo left,
User__ joined
13:58
User__ left
13:59
w17t joined
14:04
aborazmeh left
|
|||
buggable | New CPAN upload: Readline-0.1.4.tar.gz by JGOFF modules.perl6.org/dist/Readline:cpan:JGOFF | 14:09 | |
14:10
sarna left
14:13
jameslenz joined,
subroot joined
14:15
rurban joined,
rurban left
14:17
jameslenz left
14:18
vike joined
14:20
diakopter joined
14:22
w17t left
14:23
w17t joined
14:25
zakharyas joined
14:27
subroot left
14:31
fake_space_whale joined
|
|||
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 | |
14:40
diakopter left
14:49
xtreak left
14:57
reportable6 left,
jeromelanteri left,
reportable6 joined,
ChanServ sets mode: +v reportable6
15:05
zakharyas left,
zakharyas joined
15:06
zakharyas left
15:07
zakharyas joined
|
|||
lizmat | www.quora.com/What-are-some-featur...-languages | 15:24 | |
moritz | grammars! | 15:26 | |
15:33
gabiruh left
|
|||
lizmat | weekly: www.quora.com/What-are-some-featur...-languages | 15:39 | |
notable6 | lizmat, Noted! | ||
15:41
salasrod joined
15:42
molaf joined
|
|||
masak | +1 on grammars | 15:50 | |
Juerd | Junctions, grammars, gradual typing, named arguments, ^5, too many to mention... | 15:52 | |
15:53
molaf left
|
|||
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 | |
16:04
zakharyas left
16:05
zakharyas joined
16:11
benjikun left
16:12
molaf joined
16:13
jameslenz joined
16:18
jameslenz left
16:19
gabiruh joined
16:22
uzl joined
16:28
uzl left
16:30
AlexDaniel left
16:33
AlexDaniel joined
16:50
ChoHag joined
17:07
zakharyas left
17:17
tzo joined
17:18
grumble1 joined,
grumble left,
zakharyas joined,
grumble1 is now known as grumbe,
grumbe is now known as grumble
17:20
x[LGWs4x4i]uG2N0 left
17:24
x[LGWs4x4i]uG2N0 joined
17:42
ChoHag left
17:48
fake_space_whale left
|
|||
buggable | New CPAN upload: Tuple-0.0.2.tar.gz by ELIZABETH modules.perl6.org/dist/Tuple:cpan:ELIZABETH | 17:49 | |
17:53
salasrod left
17:54
salasrod joined
|
|||
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 | |||
18:14
jameslenz joined
18:18
jameslenz left
|
|||
xinming | timotimo: Thanks, ^attributes thing is what I'm asking. | 18:29 | |
18:37
cpage left
18:38
andrzejku joined
|
|||
andrzejku | hi | 18:38 | |
18:38
cpage joined
18:39
cpage left,
spycrab0 joined
18:46
cpage joined
19:01
cognominal left
19:04
zakharyas left
19:05
domidumont left
19:09
tzo left
19:25
x[LGWs4x4i]uG2N0 left
19:27
cognominal joined,
cognominal left,
cognominal joined
19:29
rindolf left
19:30
x[LGWs4x4i]uG2N0 joined
19:37
rindolf joined
19:38
salasrod left
|
|||
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 | |
19:49
ufobat_ left
19:51
ufobat_ joined
19:54
Zoffix joined
|
|||
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 | ||
20:01
Zoffix left,
rindolf left
|
|||
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 | ||
20:14
jameslenz joined
20:15
stee3 joined
20:18
jameslenz left,
stee left
20:19
zakharyas joined
20:20
andrzejku left
20:23
andrzejku joined
20:24
w17t left
20:35
Sgeo__ joined
20:38
Sgeo_ left
|
|||
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 | ||
20:42
andrzejku left
20:45
zakharyas left
|
|||
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 | |
21:42
stmuk joined
21:44
stmuk_ left
21:51
kerframil joined
21:55
wamba left
22:06
robertle left
22:08
subroot joined
22:09
spycrab0 left
|
|||
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. | ||
22:14
HaraldJoerg left,
jameslenz joined
22:16
pecastro left
22:19
jameslenz left
22:33
Grrrr left
22:39
sena_kun left
23:02
Grrrr joined
23:09
subr joined
23:12
subroot left
23:35
devmikey joined
|
|||
Geth | DBIish: kjpye++ created pull request #124: Remove unnecessary "is required" from several definitions. |
23:44 | |
23:52
devmikey left
|
|||
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. |
|||
23:58
jeromelanteri joined
|