🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
Geth_ doc: Kaiepi++ created pull request #3099:
Document Metamodel::Stashing
00:22
doc: Kaiepi++ created pull request #3100:
Correct how you would imitate static fields in the class tutorial
01:08
Xliff m: class A { has $a is rw = 4; }; role B { submethod TWEAK { self.a = 42 }; }; my $a = A.new; $a.a; $a does B; $a.a 01:48
camelia Potential difficulties:
useless use of 'is rw' on $!a
at <tmp>:1
------> 3class A { has $a 7⏏5is rw = 4; }; role B { submethod TWEAK {
No such method 'a' for invocant of type 'A'
in block <unit> at <tmp> line 1
tellable6 2019-11-24T22:34:16Z #raku-dev <vrurg> Xliff: $*QSIGIL is coming from Perl6::QGrammar. Simply put, it's often tested to see if we're in a quotation context.
Xliff m: class A { has $.a is rw = 4; }; role B { submethod TWEAK { self.a = 42 }; }; my $a = A.new; $a.a; $a does B; $a.a 01:49
camelia ( no output )
Xliff m: class A { has $.a is rw = 4; }; role B { submethod TWEAK { self.a = 42 }; }; my $a = A.new; $a.a.say; $a does B; $a.a.say
camelia 4
42
Kaiepi m: role Foo[::T] { }; sub foo(Foo[::T] $) { T }; say foo Foo[Int] 02:44
camelia 5===SORRY!5=== Error while compiling <tmp>
No such symbol 'T'
at <tmp>:1
------> 3role Foo[::T] { }; sub foo(Foo[::T7⏏5] $) { T }; say foo Foo[Int]
Kaiepi how do you deal with higher kinded generics in raku?
Xliff m: my ($one, $two, $three) = (1, 2); 03:12
camelia ( no output )
Xliff What are the rules on when to use ::T as in "role A[::T]"? When do you need to use it? 03:36
m: role Foo[::T] { }; sub foo(Foo[\T] $) { T }; say foo Foo[Int] 03:39
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
T used at line 1
Xliff m: role Foo[::T] { }; sub foo(Foo[::T] $) { T }; say foo Foo[Int] 03:40
camelia 5===SORRY!5=== Error while compiling <tmp>
No such symbol 'T'
at <tmp>:1
------> 3role Foo[::T] { }; sub foo(Foo[::T7⏏5] $) { T }; say foo Foo[Int]
Xliff m: role Foo[::T] { }; sub foo($) { $^a.^of }; say foo Foo[Int]
camelia 5===SORRY!5=== Error while compiling <tmp>
Placeholder variable '$^a' cannot override existing signature
at <tmp>:1
------> 3role Foo[::T] { }; sub7⏏5 foo($) { $^a.^of }; say foo Foo[Int]
Xliff m: role Foo[::T] { }; sub foo(\a) {a.^of }; say foo Foo[Int]
camelia No such method 'of' for invocant of type 'Perl6::Metamodel::CurriedRoleHOW'
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: role Foo[::T] { }; sub foo(\a) { a.of }; say foo Foo[Int]
camelia No such method 'of' for invocant of type 'Foo[Int]'
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi there's syntax for this, but i'm not sure if it does what i hope it would: 03:44
Xliff Yeah. Bugging me now, too. 03:45
Kaiepi m: role Foo[::T] { }; sub foo(::T Foo[T] $) { T }; say foo Foo[Int]
camelia Cannot find method 'ACCEPTS' on object of type T
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi ah, i forgot Metamodel::CurriedRoleHOW doesn't know how to deal with that
when i made it so it did the signature binder complained about an inconsistent bind result, so i wasn't sure how to proceed from there
Xliff Ah. Well, I'm just curious as to how and when the "::T" for is used, and it is not documented. 03:47
Kaiepi m: sub foo(::T $) { T }; say foo 1 03:48
camelia (Int)
Kaiepi it makes a lexical named T that gets filled out with the type of whatever you give it afaik
only problem is you can't do this: 03:49
m: sub foo(::T $ --> T) { }; say foo 1
camelia Nil
Kaiepi m: sub foo(::T $ --> T) { T }; say foo 1
camelia Died with X::TypeCheck::Return
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff sub foo(::A $a, ::B $b, ::C $c) { (A.^name, B.^name, C.^name).say }; foo(1, 'a', 3.145)
evalable6 (Int Str Rat)
Xliff Oh my.
Kaiepi if this doesn't work i think the return type thing is a bug: 03:50
m: role Foo[::T] { method parameter(--> T) { T } }; say Foo[Int].parameter
camelia Died with X::TypeCheck::Return
in method parameter at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: sub foo(::T $a --> T) { $a }; say foo 1 03:51
camelia Died with X::TypeCheck::Return
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: sub foo(::T $a --> T) { $a }; say foo("a")
camelia Died with X::TypeCheck::Return
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff Kaiepi: In my uninformed opinion, I think you might be right. 03:52
ZzZombo It's documented, it's type capture.
Xliff ZzZombo: Where, pls?
ZzZombo Search "type capture"? 03:53
Kaiepi fun fact: type parameters are signatures so you can give types named parameters 04:00
Xliff sub d(::T Numeric $x, ::U $y) { (T, u)».^name.say }; d(4, 5e0);
m: sub d(::T Numeric $x, ::U $y) { (T, u)».^name.say }; d(4, 5e0);
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
u used at line 1
Kaiepi m: role WithConfig[:%config] { method config(--> Positional:D) { %config } }; my %config = :1a, :2b, :3c; say Foo[:%config].config
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Foo used at line 1
Xliff m: sub d(::T Numeric $x, ::U $y) { (T, U)».^name.say }; d(4, 5e0); 04:01
camelia List
Kaiepi m: role WithConfig[:%config] { method config(--> Positional:D) { %config } }; my %config = :1a, :2b, :3c; say WithConfig[:%config].config
camelia Type check failed for return value; expected Positional:D but got Hash (${:a(1), :b(2), :c(3)})
in method config at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: role WithConfig[:%config] { method config(--> Hash:D) { %config } }; my %config = :1a, :2b, :3c; say WithConfig[:%config].config
camelia {a => 1, b => 2, c => 3}
Xliff m: sub d(::T Numeric $x, ::U $y) { ( .^name.say for (T, U) }; d(4, 5e0);
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in parenthesized expression; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3c $x, ::U $y) { ( .^name.say for (T, U) 7⏏5}; d(4, 5e0…
Xliff m: sub d(::T Numeric $x, ::U $y) { .^name.say for (T, U) }; d(4, 5e0);
camelia T
U
Xliff m: sub d(::T Numeric $x, ::U $y) { T.^name.say; U.^name.say }; d(4, 5e0);
camelia Int
Num
Kaiepi wait, Associative is the container for hashes, not Positional 04:02
m: role WithConfig[:%config] { method config(--> Associative:D) { %config } }; my %config = :1a, :2b, :3c; say WithConfig[:%config].config
camelia {a => 1, b => 2, c => 3}
Kaiepi m: use nqp; role Foo[:$bar] { }; class Bar does Foo[bar => "a"] { }; say +nqp::typeparameters(Bar.^roles[0]) - 1 04:04
camelia 0
Kaiepi you won't be able to get them from instances of that role, though
Kaiepi wait, that uses a Metamodel::ConcreteRoleHOW, not a Metamodel::CurriedRoleHOW, maybe you can 04:08
m: use nqp; role Foo[:$bar] { }; class Bar does Foo[bar => "a"] { }; say nqp::typeparameters(Bar.^roles[0])
camelia ({bar => a})
Kaiepi yeah i was misreading what Metamodel::ParametricRoleHOW.specialize and .specialize_with do 04:09
Xliff Ah. I had a fight with those when fixing an issue with Method::Also... which still probably isn't fixed and will cause either me or lizmat to fix it again, when it is. 04:13
lizmat Xliff: did I miss something> 08:42
?
El_Che morning 08:49
Xliff lizmat: No. 08:52
lizmat ok, *phew* :-)
Xliff :) 08:53
I did tho: sleep.
:(
lizmat :-( 08:58
tadzik zostay: hey, zostay.com/archive/2019/11/24/ster...endar.html looks great; is there an RSS feed? 09:00
SmokeMachine m: say [:.nude] given 3.14 11:16
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus statement
at <tmp>:1
------> 3say [:7⏏5.nude] given 3.14
expecting any of:
colon pair
Geth_ ¦ doc: JJ unassigned from coke Issue Infix + doesn't show up in documentation github.com/Raku/doc/issues/48 11:39
¦ doc: JJ unassigned from zoffixznet Issue search box added dynamically. github.com/Raku/doc/issues/149
¦ doc: JJ unassigned from moritz Issue split docs still mention :all that was removed github.com/Raku/doc/issues/375
¦ doc: JJ unassigned from zoffixznet Issue IO::Handle "replace" deprecated method ins with kv github.com/Raku/doc/issues/401
¦ doc: JJ unassigned from niner Issue FAQ entry “what is precompilation?” github.com/Raku/doc/issues/446
¦ doc: JJ unassigned from coke Issue Explain labels in this issue tracker github.com/Raku/doc/issues/651
¦ doc: JJ unassigned from coke Issue Remove all mentions of Parcel github.com/Raku/doc/issues/237
¦ doc: JJ unassigned from antoniogamiz Issue Re-organise exception types documentation github.com/Raku/doc/issues/516
¦ doc: JJ unassigned from antoniogamiz Issue Cache generated documentation github.com/Raku/doc/issues/717
¦ doc: JJ unassigned from coke Issue Section on $! Sigils should link to the section on object#Attributes github.com/Raku/doc/issues/967
¦ doc: JJ unassigned from coke Issue pragma nqp is not documented github.com/Raku/doc/issues/796
¦ doc: JJ unassigned from coke Issue The example of uninames method doesn't call uninames github.com/Raku/doc/issues/1019
¦ doc: JJ unassigned from zoffixznet Issue highlight-code-blocks has unused optional named parameter github.com/Raku/doc/issues/1130
¦ doc: JJ unassigned from hankache Issue pod.pod6 fails xtest github.com/Raku/doc/issues/1237
¦ doc: JJ unassigned from tbrowder Issue failing test xt/examples-compilation.t doc/Type/Str.pod6 github.com/Raku/doc/issues/1238
¦ doc: JJ unassigned from samcv Issue perl6 htmlify.p6 --no-proc-async - dies github.com/Raku/doc/issues/1152
¦ doc: JJ unassigned from zoffixznet Issue doc/Type/IO/Path.pod6 - fails example compilation github.com/Raku/doc/issues/1322
¦ doc: JJ unassigned from zoffixznet Issue xt/aspell.t failure github.com/Raku/doc/issues/1321
¦ doc: JJ unassigned from zoffixznet Issue 'make run' broken github.com/Raku/doc/issues/1332
¦ doc: JJ unassigned from samcv Issue perl6 xt/aspell.t doc/Type/Str.pod6 # failure github.com/Raku/doc/issues/1359
¦ doc: JJ unassigned from zoffixznet Issue spelling errors github.com/Raku/doc/issues/1349
¦ doc: JJ unassigned from zoffixznet Issue Spelling error in doc/Type/Proc/Async.pod6 github.com/Raku/doc/issues/1354
¦ doc: JJ unassigned from timo Issue docs.perl6.org/type/PseudoStash is 404 github.com/Raku/doc/issues/1341
¦ doc: JJ unassigned from coke Issue say vs put github.com/Raku/doc/issues/1441
¦ doc: JJ unassigned from zoffixznet Issue duplicate word in doc/Type/Failure.pod6 github.com/Raku/doc/issues/1371
¦ doc: JJ unassigned from dogbert17 Issue example failure in doc/Type/Parameter.pod6 github.com/Raku/doc/issues/1406
¦ doc: JJ unassigned from TisonKun Issue .+ and .* are inaccurate github.com/Raku/doc/issues/1421
¦ doc: JJ unassigned from zoffixznet Issue perl6 xt/aspell.t doc/Language/5to6-perlvar.pod6 - failure github.com/Raku/doc/issues/1360
¦ doc: JJ unassigned from antoniogamiz Issue Make link checker work locally; make it a test github.com/Raku/doc/issues/1433
¦ doc: JJ unassigned from Altai-man Issue List.squish supports “with” parameter, but it is not documented github.com/Raku/doc/issues/1490
¦ doc: JJ unassigned from coke Issue minmax actually returns a Range github.com/Raku/doc/issues/1455
¦ doc: JJ unassigned from samcv Issue Bad installation instructions github.com/Raku/doc/issues/1457
¦ doc: JJ unassigned from coke Issue Class::Date example shows incorrect result github.com/Raku/doc/issues/1463
¦ doc: JJ unassigned from rafaelschipiura Issue Examples for sprintf use OUTPUT instead of RESULT github.com/Raku/doc/issues/1521
¦ doc: JJ unassigned from samcv Issue Document utf8 type github.com/Raku/doc/issues/1516
¦ doc: JJ unassigned from antoniogamiz Issue Linking to pragmas github.com/Raku/doc/issues/1488
¦ doc: JJ unassigned from coke Issue Wrong return type for Any.categorize and Any.classify github.com/Raku/doc/issues/1604
¦ doc: JJ unassigned from Xliff Issue How to use AutoHotKey (unicode_entry) github.com/Raku/doc/issues/1532
¦ doc: JJ unassigned from coke Issue any operator | messes up the table github.com/Raku/doc/issues/1764
¦ doc: JJ unassigned from zoffixznet Issue substr documentation lacking github.com/Raku/doc/issues/1911
¦ doc: JJ unassigned from fluca1978 Issue <?{<SOMETHING CONDITION>}>and <!{<SOMETHING CONDITION>}> (regex) are not documented github.com/Raku/doc/issues/1757
¦ doc: JJ unassigned from fluca1978 Issue The pod section of the docs should mention how to access pod via $= github.com/Raku/doc/issues/1907
¦ doc: JJ unassigned from bduggan Issue Deadlink for Metamodel::EnumHOW class in the the Meta-Object Protocol Page github.com/Raku/doc/issues/1642
¦ doc: JJ unassigned from coke Issue Unclear or incorrect example of "default" exception CATCHer github.com/Raku/doc/issues/1792
¦ doc: JJ unassigned from zoffixznet Issue Broken stand-alone image links github.com/Raku/doc/issues/1995
¦ doc: JJ unassigned from Tyil Issue Spin off Perl6::Documentable github.com/Raku/doc/issues/1937
¦ doc: JJ unassigned from fluca1978 Issue remove merged branches github.com/Raku/doc/issues/2118
¦ doc: JJ unassigned from tbrowder Issue Broken links to 'Language' pages via search github.com/Raku/doc/issues/2190
¦ doc: JJ unassigned from tbrowder Issue Perl 6 in a nutshell missing github.com/Raku/doc/issues/2196
¦ doc: JJ unassigned from dogbert17 Issue Spin off Perl6::Documentable github.com/Raku/doc/issues/1937
¦ doc: JJ unassigned from MorayJ Issue The documentation on ==> should get to the point faster github.com/Raku/doc/issues/2316
¦ doc: JJ unassigned from timo Issue IO::Socket::Async and listening to a system-defined (unspecified) port github.com/Raku/doc/issues/2207
¦ doc: JJ unassigned from Kaiepi Issue Use always non-breaking space when talking about Perl 6 and Pod 6 github.com/Raku/doc/issues/1989
¦ doc: JJ unassigned from antoniogamiz Issue Spin off Per6::Type and Perl6::TypeGraph github.com/Raku/doc/issues/2573
¦ doc: JJ unassigned from noisegul Issue `p6doc IO::Path` on windows github.com/Raku/doc/issues/2534
¦ doc: JJ unassigned from fluca1978 Issue Spin off Perl6::Documentable github.com/Raku/doc/issues/1937
¦ doc: JJ unassigned from MorayJ Issue TODOs in typesystem github.com/Raku/doc/issues/2232
¦ doc: JJ unassigned from antoniogamiz Issue Spin off Perl6::Documentable github.com/Raku/doc/issues/1937
¦ doc: JJ unassigned from ronaldxs Issue remove merged branches github.com/Raku/doc/issues/2118
¦ doc: JJ unassigned from antoniogamiz Issue Indexes that include % do not work github.com/Raku/doc/issues/2527
¦ doc: JJ unassigned from taboege Issue Comment "method ^foo" syntax github.com/Raku/doc/issues/2856
¦ doc: JJ unassigned from taboege Issue Too many :skip-tests github.com/Raku/doc/issues/2738
¦ doc: JJ unassigned from noisegul Issue "p6doc -f exit" doesn't work github.com/Raku/doc/issues/2532
¦ doc: JJ unassigned from taboege Issue Create a test to ensure there are no accidental Camelia invocations in examples github.com/Raku/doc/issues/2695
¦ doc: JJ unassigned from antoniogamiz Issue Document Range.new and revise other methods in Range. github.com/Raku/doc/issues/2739
Geth_ ¦ doc: JJ unassigned from antoniogamiz Issue type-graph.txt: what is it good for? github.com/Raku/doc/issues/2584 11:39
¦ doc: JJ unassigned from antoniogamiz Issue Inconsistent index escaping github.com/Raku/doc/issues/2535
¦ doc: JJ unassigned from antoniogamiz Issue Test documentable github.com/Raku/doc/issues/2972
AlexDaniel hello? 11:40
tyil hi
AlexDani` did… did someone just transfer the whole doc repo without discussing it first? 11:43
not a smart move I have to say
but now we know that all assignments will be gone unless the assigned person is in the new org
CIAvash tadzik: probably zostay.com/feed/category/advent-2019/rss.xml ? 11:45
AlexDani` tyil: you can let geth rejoin 11:45
I just wanted the spam to stop
tyil AlexDani`: ack
AlexDaniel did… did someone just transfer the whole doc repo without discussing it first? 11:48
not a smart move I have to say
but now we know that all assignments will be gone unless the assigned person is in the new org
AlexDaniel hmm got my messages doubled 11:52
weird
tadzik CIAvash: that's it, thanks :) I haven't found it in the source anywhere 12:03
CIAvash tadzik: it was in the category page 12:40
tadzik CIAvash: aha, indeed 12:41
[Coke]_ . 14:11
[Coke] . 14:11
Juerd lizmat: The weekly no longer has the latest post directly on the front page, is that by design? 14:14
lizmat yes, it is 14:16
I think
:-)
I guess you want to put rakudoweekly.blog/blog-feed/ in your bookmarks
Juerd If I used bookmarks I would :) 14:17
lizmat I tweet and post the actual weekly's URL on channel
Juerd Oh, I have no trouble finding it :) 14:18
lizmat ok :-) *phew*
Juerd It's just that I go to the .blog/ url, and sometimes get distracted before clicking blog feed :)
Which is fine because I have an entire week :)
Just wanted to know whether this was a bug or a feature, turns out it's a feature 14:19
lizmat yeah, it's part of the style I chose 14:20
lizmat because I wanted to have the option of adding more generic pages in the future 14:20
Kaiepi greppable6, EXPORTHOW::DECLARE 16:04
greppable6 Kaiepi, Found nothing!
Kaiepi greppable6, EXPORTHOW
greppable6 Kaiepi, 20 lines, 11 modules: gist.github.com/fe9f3bf537a89da129...8e917273ee
zostay tadzik: Yes, the one CIAvash mentioned above, though I just added it to the blog and it might not work well, so if you have problems with it, let me know and I'll fix it: zostay.com/feed/category/advent-2019/rss.xml 16:13
Geth ¦ problem-solving: AlexDaniel assigned to jnthn Issue Release manager for Rakudo 2019.12 and onward github.com/perl6/problem-solving/issues/132 16:37
cpan-raku New module released to CPAN! LibXML (0.2.0) by 03WARRINGD 17:41
lizmat and another Rakudo Weekly News hits the Net: rakudoweekly.blog/2019/11/25/2019-...-again-or/ 19:02
Xliff m: my \a-i = 0; say a-i + 1 20:16
camelia 1
Xliff m: my \a-1 = 0; say a-1 + 1
camelia 5===SORRY!5=== Error while compiling <tmp>
Term definition requires an initializer
at <tmp>:1
------> 3my \a7⏏5-1 = 0; say a-1 + 1
Xliff m: my \a-a1 = 0; say a-a1 + 1
camelia 1
Xliff m: my \a_1 = 0; say a_1 + 1 20:17
camelia 1
Xliff .seen sergot 21:01
tellable6 Xliff, I saw sergot 2019-01-24T14:32:08Z in #perl6: <sergot> oh, Mar and May...
Xliff What exit code does raku return when die is invoked? 21:22
El_Che it looks like 1 21:23
Xliff El_Che: How are you checking that?
El_Che perl -e 'die' ; echo $? 21:24
perl6 -e 'die' ; echo $?
Xliff Hrm. Was using &&
El_Che && only executes if success
funy enough perl (5) does return 255 21:25
Grinnz (which is 0 in bash)
Altai-man_ .oO ( can I use funny images in advent article ) 21:26
Xliff OK. So I want to get the error code of a qx[]... do I need Proc::Async? 21:28
Grinnz El_Che: it actually exits with the value of $! if it's set to something, $? if it's set by a DESTROY or END, and 255 otherwise 21:29
because of the use of $! it's a little unreliable 21:30
the only guarantee is it won't be zero 21:31
(unless something sets $? to 0... but then that's your own fault :P) 21:32
Xliff Actually... CAN you get an error code from a qx[]'d command? $! isn't set
Grinnz $! is for errno, not exit codes
Xliff So what is exit code? 21:33
Grinnz if it's the same as perl 5, $?
Xliff Unsupported use of $? variable; in Perl 6 please use $! for handling child errors also
Grinnz interesting
Xliff Yes. It is.
Grinnz those are two quite distinct cases :| 21:34
i guess that raku is further from the syscalls to set $!?
Xliff Hrm. I might need shell
discord6 <Vendethiel> Oh wow, advent calendar filled already 23:31
<Vendethiel> That’s good news
sena_kun Ven, if you want to take a spot... ;) 23:39
ugh, my complete is wrong
Vendethiel, ^