»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:13 scovit left 00:19 dct left 01:19 coverable6 left, evalable6 left, unicodable6 left, quotable6 left, benchable6 left, statisfiable6 left, bloatable6 left, undersightable6 left, squashable6 left, greppable6 left, notable6 left, shareable6 left, nativecallable6 left, bisectable6 left, reportable6 left, committable6 left, releasable6 left, coverable6 joined 01:20 evalable6 joined, ChanServ sets mode: +v evalable6, undersightable6 joined, p6bannerbot sets mode: +v coverable6, committable6 joined, ChanServ sets mode: +v committable6, p6bannerbot sets mode: +v evalable6, nativecallable6 joined, ChanServ sets mode: +v nativecallable6, shareable6 joined 01:21 quotable6 joined, p6bannerbot sets mode: +v undersightable6, p6bannerbot sets mode: +v committable6, p6bannerbot sets mode: +v nativecallable6
Geth doc: ce49b48af6 | cfa++ | 3 files
Fix a few enum and Metamodel::ClassHOW links.
01:21
01:21 p6bannerbot sets mode: +v shareable6, p6bannerbot sets mode: +v quotable6, benchable6 joined, ChanServ sets mode: +v benchable6 01:22 unicodable6 joined, ChanServ sets mode: +v unicodable6, bloatable6 joined, ChanServ sets mode: +v bloatable6, squashable6 joined, p6bannerbot sets mode: +v benchable6 01:23 p6bannerbot sets mode: +v unicodable6, p6bannerbot sets mode: +v bloatable6, notable6 joined, p6bannerbot sets mode: +v squashable6, bisectable6 joined, ChanServ sets mode: +v bisectable6 01:24 p6bannerbot sets mode: +v notable6, greppable6 joined, ChanServ sets mode: +v greppable6, releasable6 joined, reportable6 joined, ChanServ sets mode: +v reportable6, statisfiable6 joined, ChanServ sets mode: +v statisfiable6, p6bannerbot sets mode: +v bisectable6, p6bannerbot sets mode: +v greppable6 01:25 p6bannerbot sets mode: +v releasable6, p6bannerbot sets mode: +v reportable6, p6bannerbot sets mode: +v statisfiable6 01:26 sena_kun left 01:40 w_richard_w left 01:53 w_richard_w joined 01:54 p6bannerbot sets mode: +v w_richard_w
Geth doc: b9b03561ef | cfa++ | 2 files
Enumeration links, markup.
02:09
02:11 XieST joined, gabiruh joined 02:12 gabiruh left, p6bannerbot sets mode: +v XieST 02:14 XieST left 02:15 gabiruh joined 02:16 p6bannerbot sets mode: +v gabiruh, fbynite joined, fbynite left 02:20 gabiruh left
yoleaux Xliff_: Bug CStruct/Str binding issue 02:21
02:21 gabiruh joined 02:22 p6bannerbot sets mode: +v gabiruh 02:32 scovit joined 02:33 p6bannerbot sets mode: +v scovit 02:50 rindolf left 02:52 leont left 02:56 molaf left 02:59 lookatme_q joined 03:00 p6bannerbot sets mode: +v lookatme_q 03:08 molaf joined 03:09 p6bannerbot sets mode: +v molaf 03:18 w17t left 03:33 Kaiepi left 03:34 Kaiepi joined 03:35 p6bannerbot sets mode: +v Kaiepi 03:58 squashable6 left 04:03 squashable6 joined, p6bannerbot sets mode: +v squashable6 04:06 Ven`` left 04:12 vendethiel- left, kurahaupo left, kurahaupo_ joined, p6bannerbot sets mode: +v kurahaupo_ 04:34 Cabanossi left, Cabanoss- joined 04:35 p6bannerbot sets mode: +v Cabanoss- 04:47 hythm joined 04:48 p6bannerbot sets mode: +v hythm 05:00 guifa joined, p6bannerbot sets mode: +v guifa, khisanth_ left
guifa So for funsies I've been trying to implement Brainfuck using grammars and actions (and figured I might write a tutorial for it down the road). But I'm struggling on handling loops. 05:07
To capture the loops I'm using
05:08 hythm left
guifa token while { '[' ~ ']' (.*) } 05:10
But it never actually seems to match the rule, even though "[foo]" ~~ / '[' ~ ']' (.*) / matches just fine outside of grammars 05:11
Is there anything special going on that should prevent it from matching? 05:14
05:20 khisanth_ joined 05:21 p6bannerbot sets mode: +v khisanth_
Geth doc: b9359ea5da | (Richard Hainsworth)++ (committed using GitHub Web editor) | doc/Language/101-basics.pod6
Update 101-basics.pod6

There is no FormatCode F<>, change to C<>
05:26
synopsebot Link: doc.perl6.org/language/101-basics
05:31 w17t joined, p6bannerbot sets mode: +v w17t 05:36 khisanth_ left
guifa Well, I figured it out sort of. I don't know why the match doesn't work, but for a BF interpreter using the ~ to match loops is bad, because it'll run the action for the inner before it's determined that it needs to 05:48
05:50 curan joined, p6bannerbot sets mode: +v curan 06:00 Kaypie joined, Kaiepi left
Xliff_ m: $*VERSION.say 06:01
camelia Dynamic variable $*VERSION not found
in block <unit> at <tmp> line 1
Xliff_ m: $?VERSION.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$?VERSION' is not declared. Did you mean 'Version'?
at <tmp>:1
------> 3<BOL>7⏏5$?VERSION.say
06:01 p6bannerbot sets mode: +v Kaypie, khisanth_ joined 06:02 p6bannerbot sets mode: +v khisanth_
Xliff_ $*PERL.version.say 06:02
evalable6 v6.d
Xliff_ m: $*PERL.version.say 06:03
camelia v6.d
Xliff_ $*PERL.say 06:04
evalable6 Perl 6 (6.d)
Xliff_ $*VM.say
evalable6 moar (2018.12.13.g.473324.ee.3)
06:05 Kaypie left 06:06 Kaypie joined 06:07 p6bannerbot sets mode: +v Kaypie
Xliff_ m: $*COMPILER.say 06:09
camelia Dynamic variable $*COMPILER not found
in block <unit> at <tmp> line 1
Xliff_ $*PERL.compiler.say 06:10
evalable6 rakudo (2018.12.165.g.6.d.58.e.0.b.0.b)
Xliff_ Hmmm... wondfer why the compiler version isn't added to the output of $*PERL? 06:18
06:22 vrurg left
Geth doc: c380aa6bcc | (Richard Hainsworth)++ (committed using GitHub Web editor) | doc/Language/101-basics.pod6
Update 101-basics.pod6

No F<>
06:26
synopsebot Link: doc.perl6.org/language/101-basics
06:28 kurahaupo_ left
Geth doc: 5769c457b6 | (Richard Hainsworth)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
Update pod.pod6

Use R<> as Pod
06:43
synopsebot Link: doc.perl6.org/language/pod
07:04 cfa left, domidumont joined 07:05 p6bannerbot sets mode: +v domidumont 07:16 guifa left 07:43 abraxxa joined 07:44 p6bannerbot sets mode: +v abraxxa 07:47 molaf left 08:20 zakharyas joined, p6bannerbot sets mode: +v zakharyas 08:22 w_richard_w left 08:25 andrzejku joined 08:26 p6bannerbot sets mode: +v andrzejku 08:32 patrickb joined, jmerelo joined, p6bannerbot sets mode: +v patrickb 08:33 p6bannerbot sets mode: +v jmerelo
jmerelo Hi! 08:33
yoleaux 6 Jan 2019 19:50Z <AlexDaniel> jmerelo: I guess the winner should be announced? Or something…
jmerelo .tell AlexDaniel OK, I'll do that :-)
yoleaux jmerelo: I'll pass your message to AlexDaniel.
09:01 Radha joined, p6bannerbot sets mode: +v Radha
Radha What sort of questions can be asked here? 09:02
loops Radha, pretty much anything Perl 6 related. No guarantees on an answer tho :-) 09:04
Radha Thank you. If you can answer my only question: Among so many programming languages, what is special about perl 6? Being a perl 5 user long ago, I want to know what attracts me in perl 6. Please answer. 09:05
loops Radha, i'm still a newbie, so i'm not really in a position to answer, other than to say it's most of the things I love about Perl 5, plus a boatload of new, interesting, and powerful features on top. 09:06
jmerelo Radha: hi, and welcome. 09:07
Radha Hi loops and jmerelo :-)
jmerelo Radha: first, that's definitely the kind of question you can ask here. Thing is, answer might be too long and maybe too personal. At the end of the day, it will depend on what you're looking for in a language. 09:08
Xliff_ Radha: Perl6 allows you to write code in a manner close to how many people logically think.
It tries not to get in the way, but if one way doesn't work, another almost certainly will.
Many languages do not come even close to that kind of flexibility.
09:09 dakkar joined
jmerelo Radha: at the end of the day, a language is a layered thing. My personal answer is that Perl6 has one of the friendliest communities out there. So just give a try to your personal "hello world" in Perl6, and if you bump into trouble, come back here to get your questions answered 09:09
09:10 p6bannerbot sets mode: +v dakkar
Radha I have already done "hello world".....But I just wanted to know what things are there in perl 6, as Google search did not yield it. 09:11
Somewhere I read, perl 6 has concurrency, parallelism and one more thing.... 09:12
lookatme_q many things like OO, Grammar
Radha What else are there to encourage me?
jmerelo Radha: you might want to take a look at the StackOverflow tag description stackoverflow.com/tags/perl6/info
Radha: I would say it's also one of the most expressive, and thus compact, languages out there. You can get a lot done with very little code. But, as I said above, your mileage may vary. 09:13
Radha Okay. I will check the link of stackoverflow. 09:15
later. 09:16
Thank you jmerelo 09:17
jmerelo Radha: sure :-)
Radha :-)
Thank you Xliff_ :-) 09:22
09:22 kensanata joined, p6bannerbot sets mode: +v kensanata 09:24 Radha left 09:30 scovit left 09:47 scimon joined 09:48 p6bannerbot sets mode: +v scimon
AlexDaniel btw we have this list: docs.perl6.org/language/faq#Why_sh..._about_it? 09:59
yoleaux 08:33Z <jmerelo> AlexDaniel: OK, I'll do that :-)
Geth doc: finanalyst++ created pull request #2540:
start of test suite for rendered files
10:45
11:17 rindolf joined, p6bannerbot sets mode: +v rindolf 11:23 domidumont left
mornfall is it possible to cause a deadlock with react blocks, if i have no explicit synchronisation of any sort? 11:29
jnthn m: react { my $p = Promise.new; whenever $p { } } # deadlock 11:31
camelia (timeout)
jnthn You can certainly end up with stuff like that
mornfall can it get stuck even if there is a supply that has stuff in it? there's certainly a few that should be spewing stuff but the whole thing seems to get stuck randomly 11:32
jnthn Well, it handles one message at a time, so if you manage to make it block while handling one message, then it won't get any more 11:33
For example, doing an `await` while handling a message
11:34 robertle_ joined, p6bannerbot sets mode: +v robertle_ 11:36 Kaypie is now known as Kaiepi
Kaiepi hastebin.com/omagogecej.php 11:43
implicit return values saved me from a hellish amount of early returns
probably shouldn't be abusing them like this though
11:47 sena_kun joined 11:48 leont joined, p6bannerbot sets mode: +v sena_kun, p6bannerbot sets mode: +v leont
Xliff_ Kaiepi: Hangman implementation? :) 11:53
Kaiepi yep 11:54
it's a plugin for a chat bot which is why it's written kinda odd 11:55
daxim m: class Foo {}; class Bar {}; class Quux { has List[Foo|Bar] @.someattr; }; 11:56
camelia 5===SORRY!5=== Error while compiling <tmp>
An exception occurred while parameterizing List
at <tmp>:1
Exception details:
5===SORRY!5=== Error while compiling <tmp>
List cannot be parameterized
at <tmp>:1
------> 3s Bar {…
daxim m: class Foo {}; class Bar {}; class Quux { has Array[Foo|Bar] @.someattr; };
camelia 5===SORRY!5=== Error while compiling <tmp>
An exception occurred while parameterizing Array
at <tmp>:1
Exception details:
5===SORRY!5=== Error while compiling <tmp>
Can not parameterize Array with any(Foo, Bar)
at <tmp>:1
Kaiepi m: class Foo {}; class Bar {}; subset Baz of Mu where Foo | Bar; class Quux { has Array[Baz] @.someattr } 11:58
camelia ( no output )
Xliff_ m: class Foo {}; class Bar {}; subset Baz where Foo | Bar; class Quux { has Array[Baz] @.someattr } 11:59
camelia ( no output )
Xliff_ Don't need the "of Mu" there.
11:59 sena_kun left
Kaiepi when is it needed? i know stuff like this doesn't work without it 11:59
m: subset Foo where Int | Junction; my Foo $foo = 1 | 2 12:00
camelia Type check failed in assignment to $foo; expected Foo but got Junction (any(1, 2))
in block <unit> at <tmp> line 1
Xliff_ m: subset Foo of Mu where Int | Junction; my Foo = 1 | 2; 12:01
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed my
at <tmp>:1
------> 3t Foo of Mu where Int | Junction; my Foo7⏏5 = 1 | 2;
Kaiepi m: subset Foo of Mu where Int | Junction; my Foo $foo = 1 | 2
camelia ( no output )
Xliff_ Huh!
I guess in situations where you are using Internal types.
Kaiepi types that don't inherit from Any? 12:02
Xliff_ m: use NativeCall; Class A is repr('CStruct') { has unit32 $.a; }; class B is repr('CStruct') { has uint32 $.b }; subset AB where A | B; my AB $a = B.new;
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected block in infix position (missing statement control word before the expression?)
at <tmp>:1
------> 3e NativeCall; Class A is repr('CStruct')7⏏5 { has unit32 $.a; }; class B is repr('…
Xliff_ m: use NativeCall; class A is repr('CStruct') { has unit32 $.a; }; class B is repr('CStruct') { has uint32 $.b }; subset AB where A | B; my AB $a = B.new; 12:03
camelia 5===SORRY!5===
Type 'unit32' is not declared. Did you mean any of these?
uint32
int32

at <tmp>:1
------> 3 class A is repr('CStruct') { has unit327⏏5 $.a; }; class B is repr('CStruct') { ha
Malformed has
at <tmp>:1…
Xliff_ m: use NativeCall; class A is repr('CStruct') { has uint32 $.a; }; class B is repr('CStruct') { has uint32 $.b }; subset AB where A | B; my AB $a = B.new;
camelia ( no output )
Xliff_ Kaiepi: Yeah. That's an explanation.
But I thought all classes inherited from any. 12:04
Kaiepi m: say Int ~~ Any
camelia True
Kaiepi m: say Junction ~~ Any
camelia False
Kaiepi ah ha 12:05
Xliff_ ah ha, indeed!
m: class A {}; say A ~~ Any 12:06
camelia True
Kaiepi BOOTSTRAP.nqp explains it 12:07
Junction.HOW.add_parent(Junction, Mu);
Xliff_ Junctions == Perl6 superposition... or is that not complex enough? 12:14
12:18 zakharyas left 12:19 tobs` joined 12:20 p6bannerbot sets mode: +v tobs` 12:22 sena_kun joined, p6bannerbot sets mode: +v sena_kun
jmerelo Request for comments on a split of the documentation repository: github.com/perl6/doc/issues/2542 12:27
Kaiepi m: class CommandContext { method foo(--> Int) { 1 } }; my method command(--> Int) { self.foo }; say command(CommandContext.new) 12:32
camelia 1
Kaiepi huh that's actually really useful to be able to do
jmerelo i'm not really familiar enough with the docs repo to comment sorry 12:36
tobs` struct { ulong64 length; uchar buf[128] }; <-- are these embedded arrays supported in CStructs or do I have to `has uint8 buf1; has uint8 buf2; ...` (or open a ticket)? 12:38
12:41 domidumont joined
jmerelo Kaiepi: no problem. Thanks anyway. 12:41
12:41 p6bannerbot sets mode: +v domidumont 12:43 jmerelo left
Kaiepi m: my Promise $p .= new; $p.break: X::AdHoc.new; my method expose-private-member(--> Int) { $!result }; say expose-private-member($p).WHAT 12:43
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot understand $!result in this context
at <tmp>:1
------> 3xpose-private-member(--> Int) { $!result7⏏5 }; say expose-private-member($p).WHAT
12:44 domidumont left
Kaiepi damn 12:44
13:00 domidumont joined, p6bannerbot sets mode: +v domidumont
jnthn As if we'd make encapsulation breakage that easy... :P 13:20
What're you wanting to do? .cause will get the exception a Promise was broken with
Kaiepi i was just experimenting 13:23
masak Kaiepi: the reason it doesn't work is that $!result is a lexical binding, so it *cannot work* outside of the class with that private field 13:31
which, fun fact, means that (unlike Java) you can't get `protected` semantics in Perl 6, because things are either visible, or they're not
moritz++ has a fun blog post somewhere about how arbitrary `protected` is
I'd maybe frame it nowadays as being a symptom of the less savory parts of depending on inheritance in one's design 13:32
daxim m: class Foo { has Int $.bar is required = $!quux[0]; has Array $.quux is required; }; Foo.new(quux => [5,6,7,8]); 13:37
camelia The attribute '$!bar' is required, but you did not provide a value for it.
in block <unit> at <tmp> line 1
daxim why ignore the default?
masak, also <steve-yegge.blogspot.com/2010/07/w...a.html> 13:39
jnthn `is required` means it needs to be provided; probably it's worth a warning if mixing it with a default. 13:41
Since the default is never reached 13:42
Xliff_ Is there a FALLBACK equivalent for the script-level? 13:43
daxim can I delay the check somehow? this makes porting 5/moose code a giant pain in the butt
13:43 w17t left
jnthn If you're providing a default, why do you need `is required` at all? 13:43
sjn o/ 13:44
jnthn If it's not provided the default will be taken
daxim good question!
sjn hello, #perl6 13:45
jnthn o/ sjn
Xliff_ \o sjn
tobs: Right now, it's best to use dummy values to replace embedded arrays. 13:46
m: sub FALLBACK { say "Hi!" }; f(1) 13:47
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
f used at line 1
Xliff_ m: method FALLBACK { say "Hi!" }; f(1)
camelia 5===SORRY!5===
Undeclared routine:
f used at line 1

Other potential difficulties:
Useless declaration of a has-scoped method in mainline (did you mean 'my method FALLBACK'?)
at <tmp>:1
------> 3method7⏏5 FALLBAC…
Xliff_ m: my method FALLBACK { say "Hi!" }; f(1)
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
f used at line 1
Xliff_ m: class A { method FALLBACK { say "Hi!" }; }; A.new.foo 13:48
camelia Too many positionals passed; expected 1 argument but got 2
in method FALLBACK at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff_ m: class A { method FALLBACK { say "Hi!" }; }; A.new.foo()
13:48 leont left
camelia Too many positionals passed; expected 1 argument but got 2
in method FALLBACK at <tmp> line 1
in block <unit> at <tmp> line 1
13:48
Xliff_ m: class A { method FALLBACK ($name, |c) { say "Hi!" }; }; A.new.foo() 13:49
camelia Hi!
13:52 eseyman left 13:53 zakharyas joined, eseyman joined, p6bannerbot sets mode: +v zakharyas 13:54 p6bannerbot sets mode: +v eseyman 14:00 leont joined 14:01 p6bannerbot sets mode: +v leont 14:05 kurahaupo joined, p6bannerbot sets mode: +v kurahaupo 14:06 gabiruh left, gabiruh joined 14:07 p6bannerbot sets mode: +v gabiruh 14:20 brrt joined, p6bannerbot sets mode: +v brrt 14:22 reach_satori left 14:46 harrison joined 14:47 p6bannerbot sets mode: +v harrison 15:02 curan left 15:17 squashable6 left 15:19 harrison left 15:21 squashable6 joined 15:22 p6bannerbot sets mode: +v squashable6
[Coke] doc xtest on windows has a memory allocation panic in examples compilation, and several Reading from filehandle failed: Permission denied 15:28
15:29 reach_satori joined 15:30 p6bannerbot sets mode: +v reach_satori
daxim m: for zip 0..*, ['A', 'B', 'C'] -> $idx, $str {} 15:30
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
daxim I'm looking for the equivalent of Python enumerate() or v5: while (my ($idx, $str) = each $aref->@*) {}
15:34 lookatme_q left
sena_kun m: for zip 0..*, ['A', 'B', 'C'] -> ($idx, $str) { say "$idx: $str" } 15:39
camelia 0: A
1: B
2: C
sena_kun to make it work
15:39 kurahaupo left
sena_kun m: for 0..* Z ['A', 'B', 'C'] -> ($idx, $str) { say "$idx: $str" } 15:39
camelia 0: A
1: B
2: C
sena_kun to make it a bit shorter 15:40
15:40 brrt left
sena_kun m: for 0..* Z <A B C> { say "$_[0]: $_.[1]" } 15:41
camelia 0: A
1: B
2: C
sena_kun you get the idea, I think. :)
daxim, ^?
jnthn m: for <A B C>.kv -> $idx, $str { say "$idx: $str" } 15:43
camelia 0: A
1: B
2: C
15:43 kurahaupo joined, brrt joined, p6bannerbot sets mode: +v kurahaupo 15:44 p6bannerbot sets mode: +v brrt 15:48 lookatme_q joined 15:49 p6bannerbot sets mode: +v lookatme_q 15:51 MorayJ joined 15:52 p6bannerbot sets mode: +v MorayJ 15:53 mowcat left, Peter_R joined, p6bannerbot sets mode: +v Peter_R
[Coke] doc issues on windows probably due to this: github.com/perl6/doc/blob/master/l.../Cache.pm6 - anyone see anyting particularly egregious for window? looks like it processes 8-10 files or so when it's used, but then eventually dies with permission denied 15:54
wonder if it's the .lock 15:57
15:58 brrt left
daxim thanks, sena_kun++ jnthn++ 16:00
[Coke] Looks like maybe it's the missing .close on the handle.
16:03 Kaiepi left 16:04 Kaiepi joined 16:05 p6bannerbot sets mode: +v Kaiepi, squashable6 left 16:09 squashable6 joined, ChanServ sets mode: +v squashable6
Geth doc: 0bfb92c643 | (Will Coleda)++ (committed using GitHub Web editor) | lib/Pod/Cache.pm6
Explicitly close the output file

Without this, windows complains about not having permission to write after processing some number of files.
16:09
16:09 p6bannerbot sets mode: +v squashable6 16:16 jmerelo joined 16:17 p6bannerbot sets mode: +v jmerelo
sjn Question: Is there a way to make a "match all" action for grammars? (eg. for tracing) 16:17
timotimo the parser will look for a method named the same as the rule/token/regex, so you can just use FALLBACK for that purpose 16:20
sjn hm 16:22
jmerelo sjn: and you can also use Grammar::Trace 16:23
sjn timotimo: wouldn't that just be run on the misses? 16:24
16:25 hankache joined
timotimo ah, indeed it would 16:25
however
you could just™ put your original action class into an attribute and delegate
16:25 p6bannerbot sets mode: +v hankache 16:26 Ven`` joined, p6bannerbot sets mode: +v Ven`` 16:27 domidumont left
sjn jmerelo: can't find it? :-| 16:28
jmerelo sjn: sorry, Grammar::Tracer: perl6advent.wordpress.com/2011/12/...rdebugger/ 16:29
El_Che Has someone already published Grammar::Nazi? 16:31
16:31 cfa joined, p6bannerbot sets mode: +v cfa
jmerelo El_Che: it's in the roadmap after Comma::Oxford 16:32
16:33 lizmat_ joined, p6bannerbot sets mode: +v lizmat_ 16:35 lizmat left
cfa 👋 16:35
16:35 lizmat_ is now known as lizmat
jmerelo This issue is open for comments, just in case you're interested: github.com/perl6/doc/issues/2542 16:40
16:52 zakharyas left 16:54 mowcat joined, tobs` left, mowcat left 17:02 zacts joined, p6bannerbot sets mode: +v zacts 17:04 zacts left 17:08 hankache left 17:09 domidumont joined 17:10 p6bannerbot sets mode: +v domidumont 17:19 patrickz joined 17:20 p6bannerbot sets mode: +v patrickz 17:22 patrickb left 17:25 scimon left 17:28 scimon joined, p6bannerbot sets mode: +v scimon 17:30 scimon left 17:33 kensanata left 17:39 dakkar left 17:40 robertle_ left
avuserow m: say "♳" .. "♹" 17:59
camelia "♳".."♹"
avuserow m: .say for "♳" .. "♹"
camelia





18:00 eliasr left
jmerelo m: say "♳".."♹" 18:11
camelia "♳".."♹"
jmerelo m: say Range("♳","♹")
camelia Cannot find method 'Range' on object of type List
in block <unit> at <tmp> line 1
jmerelo m: say '♳'..'♹'
camelia "♳".."♹"
jmerelo m: say ('♳'..'♹') 18:12
camelia "♳".."♹"
cfa m: eager "♳".."♹"
camelia ( no output )
cfa m: say eager "♳".."♹"
camelia (♳ ♴ ♵ ♶ ♷ ♸ ♹)
cfa is that what you're after? (or wrap with ().list)
jmerelo cfa++ right.
Geth doc: 4f39463e36 | (JJ Merelo)++ | doc/Language/modules.pod6
Improves META6.json documentation

Including `source-type` and clarifying the fact that `source-url` is compulsory if you want to publish the project in the ecosystem. Closes #2543
18:13
synopsebot Link: doc.perl6.org/language/modules
18:14 jme` left
cfa jmerelo: btw, in case it's not clear: #2538 is just if we opt for the Any paragraph---happy to close and go with your trap suggestion too 18:14
hence the pr not a commit
jmerelo cfa: I would say that since it affects many classes, in fact anything that subclasses Any, it would better go somewhere else... Coercion might affect also other kind of operations, too. Hence putting it into the traps page is better IMO 18:17
cfa: I appreciate you've done a PR so that we have the chance to discuss this. It would have probably not hurt if you had done the commit, anyway. 18:18
cfa ack 18:21
18:23 |oLa| left 18:24 random_yanek left 18:30 sauvin left, zakharyas joined 18:31 p6bannerbot sets mode: +v zakharyas
Xliff_ m: say "♳"…"♹" 18:34
camelia (♳ ♴ ♵ ♶ ♷ ♸ ♹)
Xliff_ Note use of … or ...
cfa, avuserow, jmerelo ^^ 18:35
avuserow nice thanks
Xliff_ m: say ("♳"…"♹").^name
camelia Seq
18:36 random_yanek joined 18:37 p6bannerbot sets mode: +v random_yanek 18:46 vrurg joined 18:47 p6bannerbot sets mode: +v vrurg
cfa Xliff_: neat 18:47
18:49 Brilpikk3wyn joined, p6bannerbot sets mode: +v Brilpikk3wyn 18:50 Brilpikk3wyn is now known as Pikk3wyn 18:56 vrurg left
AlexDaniel m: .say for "♳"…"♹" 18:56
camelia





18:58 zachk joined 18:59 p6bannerbot sets mode: +v zachk, Ven`` left 19:02 zakharyas left, vrurg joined 19:03 p6bannerbot sets mode: +v vrurg 19:06 zachk left, zachk joined, watson.freenode.net sets mode: +v zachk, p6bannerbot sets mode: +v zachk 19:07 vrurg left 19:08 kurahaupo left 19:14 kurahaupo joined, p6bannerbot sets mode: +v kurahaupo
Geth doc: 795cf175db | (JJ Merelo)++ | doc/Language/modules.pod6
Clarifies types of attributes and how to work with them.

This closes #2543, again. Feel free to reopen if there's anything left to address.
19:20
synopsebot Link: doc.perl6.org/language/modules
19:24 dct joined, p6bannerbot sets mode: +v dct 19:25 vrurg joined 19:26 p6bannerbot sets mode: +v vrurg
daxim m: class Foo { has Iterable[Int] @.bar; }; Foo.new(bar => (1,2,3).map(* + 1)) 19:27
camelia Type check failed in assignment to @!bar; expected Iterable[Int] but got Int (2)
in block <unit> at <tmp> line 1
jmerelo m: say (1,2,3).map(* + 1).^name
camelia Seq
jmerelo Hum. 19:28
m: class Foo { has Iterable[Int] @.bar; }; Foo.new(bar => $((1,2,3).map(* + 1)))
camelia Type check failed in assignment to @!bar; expected Iterable[Int] but got Seq ($((2, 3, 4).Seq))
in block <unit> at <tmp> line 1
jmerelo m: say (1,2,3).map(* + 1)<>.^name 19:29
camelia Seq
jmerelo m: class Foo { has Iterable[Int] @.bar; }; Foo.new(bar => (1,2,3).map(* + 1)<> )
camelia Type check failed in assignment to @!bar; expected Iterable[Int] but got Int (2)
in block <unit> at <tmp> line 1
jmerelo m: my Iterable[Int] @.bar = (1,2,3).map(* + 1); 19:30
camelia Potential difficulties:
Useless generation of accessor method in mainline
at <tmp>:1
------> 3my Iterable[Int] 7⏏5@.bar = (1,2,3).map(* + 1);
Type check failed in assignment to @.bar; expected Iterable[Int] but got Int (2)
jmerelo m: my Iterable[Int] .bar = (1,2,3).map(* + 1);
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed my
at <tmp>:1
------> 3my Iterable[Int]7⏏5 .bar = (1,2,3).map(* + 1);
jmerelo m: my Iterable[Int] $.bar = (1,2,3).map(* + 1);
camelia Potential difficulties:
Useless generation of accessor method in mainline
at <tmp>:1
------> 3my Iterable[Int] 7⏏5$.bar = (1,2,3).map(* + 1);
Type check failed in assignment to $.bar; expected Iterable[Int] but got Seq ($((2,…
jmerelo m: my Iterable[Int] @bar = (1,2,3).map(* + 1);
camelia Type check failed in assignment to @bar; expected Iterable[Int] but got Int (2)
in block <unit> at <tmp> line 1
jmerelo m: my Iterable[Int] $bar = (1,2,3).map(* + 1);
camelia Type check failed in assignment to $bar; expected Iterable[Int] but got Seq ($((2, 3, 4).Seq))
in block <unit> at <tmp> line 1
Kaiepi m: my $bar is Iterable[Int] = (1,2,3).map(* + 1) 19:31
camelia 5===SORRY!5=== Error while compiling <tmp>
Can't use unknown trait 'is ' in a variable declaration.
at <tmp>:1
------> 3my $bar is Iterable[Int]7⏏5 = (1,2,3).map(* + 1)
expecting any of:
TypeObject
default
Kaiepi m: my $bar is Iterable[Int]; $bar = (1,2,3).map(* + 1)
camelia 5===SORRY!5=== Error while compiling <tmp>
Can't use unknown trait 'is ' in a variable declaration.
at <tmp>:1
------> 3my $bar is Iterable[Int]7⏏5; $bar = (1,2,3).map(* + 1)
expecting any of:
TypeObject
defau…
Kaiepi oh that's for properties only? 19:32
m: class Foo { has $bar is Iterable[Int] }; Foo.new: bar => (1,2,3).map(* + 1)
camelia 5===SORRY!5=== Error while compiling <tmp>
Can't use unknown trait 'is ' in an attribute declaration.
at <tmp>:1
expecting any of:
rw
readonly
box_target
leading_docs
trailing_docs
jmerelo daxim: the problem might be that Iterable is a role. You can auto-pun variables to roles, but apparently not in this case, since you can't use a type for Seq
daxim, Kaiepi: I would say you can't auto-pun a Seq into a particular kind of Iterable. You might be able to auto-pun it in a generic Iterable. 19:33
m: my Iterable @bar = (1,2,3).map(* + 1);
camelia Type check failed in assignment to @bar; expected Iterable but got Int (2)
in block <unit> at <tmp> line 1
jmerelo m: my Iterable 4bar = (1,2,3).map(* + 1);
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed my
at <tmp>:1
------> 3my Iterable7⏏5 4bar = (1,2,3).map(* + 1);
jmerelo m: my Iterable $bar = (1,2,3).map(* + 1);
camelia ( no output )
jmerelo m: my Iterable $bar = (1,2,3).map(* + 1); .say for $bar 19:34
camelia (2 3 4)
jmerelo daxim: also @ is for Positionals. Before it's assigned, it's converted into a list, that is why it's taking only the first element. 19:35
daxim ok
19:40 Pikk3wyn left
SmokeMachine m: my @bar does Iterable = (1,2,3).map(* + 1); .say for @bar 19:41
camelia 2
3
4
jmerelo m: my @bar does Iterable[Int] = (1,2,3).map(* + 1); .say for @bar 19:42
camelia 5===SORRY!5=== Error while compiling <tmp>
No appropriate parametric role variant available for 'Iterable'
at <tmp>:1
jmerelo m: my $bar does Iterable[Int] = (1,2,3).map(* + 1); .say for $bar
camelia 5===SORRY!5=== Error while compiling <tmp>
No appropriate parametric role variant available for 'Iterable'
at <tmp>:1
lizmat Iterable can not be parameterized 19:43
SmokeMachine m: say Iterable[Int] 19:44
camelia (Iterable[Int])
lizmat it can ?
jmerelo lizmat: of course... I just assumed it could because that error didn't show up until now.
lizmat: doesn't look like it does: github.com/rakudo/rakudo/blob/mast...erable.pm6 19:45
m: say Any[Int]
camelia 5===SORRY!5=== Error while compiling <tmp>
Any cannot be parameterized
at <tmp>:1
------> 3say Any[Int]7⏏5<EOL>
lizmat that's what I was looking at
jmerelo m: say Iterator[Int]
camelia (Iterator[Int])
SmokeMachine m: say Iterable[Int].of # error
camelia No appropriate parametric role variant available for 'Iterable'
in block <unit> at <tmp> line 1
jmerelo So apparently you can fake-parametrize any role.
m: say Enumeration[Cool] 19:46
camelia (Enumeration[Cool])
SmokeMachine m: role R {}; say R[Int]
camelia (R[Int])
jmerelo he
lizmat m: role R { }; class A does R[Int] { } 19:48
camelia 5===SORRY!5=== Error while compiling <tmp>
No appropriate parametric role variant available for 'R'
at <tmp>:1
lizmat so I guess it doesn't throw until you actually try to do the role
Geth doc: de61a0a350 | (Will Coleda)++ (committed using GitHub Web editor) | lib/Pod/Cache.pm6
more robust close of output file

  b2gills++
19:49
SmokeMachine m: class C {method ^parameterize($, $a) {$a}}; say C[Int]
camelia (Int)
20:04 jme` joined 20:05 p6bannerbot sets mode: +v jme` 20:10 jmerelo left
SmokeMachine lizmat: a few days ago you have sent a link about someone writing a compiler in python... and you sad that would like to see that in perl6... 20:13
lizmat: I am studying something like that: github.com/FCO/bernalang 20:14
20:15 Myschkin joined, p6bannerbot sets mode: +v Myschkin
SmokeMachine lizmat: it's something like this: www.irccloud.com/pastebin/fz0XhcxN/ 20:15
AlexDaniel weekly: colabti.org/irclogger/irclogger_lo...01-07#l629 20:16
notable6 AlexDaniel, Noted!
lizmat AlexDaniel: ??
SmokeMachine: cool! 20:17
AlexDaniel lizmat: I mean that github.com/FCO/bernalang can be mentioned in the weekly
lizmat AlexDaniel: ack 20:18
SmokeMachine and that's why I was asking if someone was planning to create a wrapper to gccjit (gcc.gnu.org/onlinedocs/gcc-8.1.0/jit/) 20:24
Myschkin I'm having difficulties with Cro::HTTP::Client and the async features of perl6: First I (successfully) download a json file which contains a list of files and their descriptions (url,name...). I seems natural tu loop over that list and create a list of chained promises to await. Like so: my $promise = $client.get($url).then({ my Blob $body = .result.body-blob(); "/tmp".IO.add("$name").spurt: $body }) That doesn't work and fails with 20:44
My goal would be to download the files in parallel
AlexDaniel Myschkin: I think part of your first message was cut off, it ends with “That doesn't work and fails with” 20:46
sena_kun Myschkin, you probably want to look at gist.github.com/jnthn/b358ebfb6ea6...b9f62ba92b <- you just need to patch it to cut of "crawler" parts and fill in gaps.
Myschkin AlexDaniel: fails with "expected Blob but got Promise" 20:49
AlexDaniel maybe something like `my Blob $body = await .result.body-blob();` ? 20:50
pretty sure .body-blob() returns a promise too
sena_kun `body-blob` returns a Promise, yes. 20:52
Myschkin AlexDaniel: Thank you, that works :)
I had tried to chain another .then after the body-blob block, but that didnt't seem to work. but maybe I made some other mistake there 20:54
21:02 molaf joined, p6bannerbot sets mode: +v molaf 21:07 rindolf left
zachk is a range/list like (1..10) lazy in perl6? 21:13
yoleaux 6 Jan 2019 06:26Z <Xliff_> zachk: Atom also has plugins for Perl6 syntax highlighting. I find Atom + perl6-le + sublime column sorting + line sort makes for a great Perl6 editor
21:13 Myschkin left
AlexDaniel zachk: well, 1..99 (range object) is basically just two values 21:15
if you .list it, then yeah, you'd get a lazy list
zachk are all lists lazy? if i (1..10).map(%someFunc) is it lazy? 21:16
AlexDaniel not all, but many operations are lazy in Perl 6 21:17
in case of .map you'll get a Seq
zachk so laziness in perl6 only computes the result when output is required of the value? 21:18
AlexDaniel yes
easy to test, by the way
m: say (1..99999999999999999999999999999999999).map({$_ + 1})
camelia (2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 …
AlexDaniel ↑ clearly that was too fast and it didn't go all the way to 99999999999999999999999999999999999 :) 21:19
zachk: range object are also cool because rakudo will often cheat 21:20
m: say (1..99999999999999999999999999999999999)[*-10..∞].map({$_ + 1})
camelia (99999999999999999999999999999999991 99999999999999999999999999999999992 99999999999999999999999999999999993 99999999999999999999999999999999994 99999999999999999999999999999999995 99999999999999999999999999999999996 9999999999999999999999999999999999…
AlexDaniel m: say (1..99999999999999999999999999999999999).elems
camelia 99999999999999999999999999999999999
zachk it can do interval arithmetic sort of?
thats pretty clever
AlexDaniel it will cheat when you ask it to calculate the number of elements, and it does not seem to generate values internally if you don't need them 21:21
so indexing from the end is fine like in the example above
21:21 rindolf joined
zachk whats that [* ....] notation and can I type something other then the unicode infinite symbol for that symbol? 21:22
21:22 p6bannerbot sets mode: +v rindolf
AlexDaniel zachk: yes, * is ok too instead of ∞ 21:22
and Inf should work just as well 21:23
zachk whats that [] after the range do?
21:23 scovit joined
AlexDaniel just accessing elements by their index, similarly to what you can do with arrays 21:23
m: say <a b c d e f g>[5, 3]
camelia (f d)
AlexDaniel m: say <a b c d e f g>[3..5] 21:24
camelia (d e f)
AlexDaniel m: say <a b c d e f g>[3..*]
camelia (d e f g)
21:24 p6bannerbot sets mode: +v scovit
AlexDaniel m: say <a b c d e f g>[*-2..*] 21:24
camelia (f g)
AlexDaniel * basically ends up being the number of elements, so *-2 conveniently gives the index of the second element from the end 21:25
arguably this is more correct 21:26
m: say <a b c d e f g>[*-2..*-1]
camelia (f g)
AlexDaniel which is why I like Inf there, a bit less confusing :)
Xliff_ AlexDaniel: %-) 21:31
21:31 ExtraCrispy left
AlexDaniel Xliff_: ? :) 21:31
Xliff_ I yam wondering what drunkenly stupid thing I can say to you. 21:32
Or should I pass?
AlexDaniel say it xD
Xliff_ waits for the smoke...
Oh. Damn.
Now I am caught.
Xliff_ folds the pot.
AlexDaniel: OH! New graph at -- github.com/Xliff/p6-GtkPlus/blob/m...7-1430.svg 21:33
Latest rakudo still under the worst compile time results from 12/21/2018, although not as good as the results from 01/02/2019 21:34
AlexDaniel I demand builds on x axis and cumulative time for all modules on y! 21:35
Xliff_ :-O
PR's accepted! :)
AlexDaniel ✊✊✊ builds on x! time on y! builds on x! time on y! ✊✊✊ 21:36
Xliff_ ROFLMAO
Become my p6-GtkPlus coder flunky and I will do it!
21:38 domidumont left
patrickz I'm done for today and quite pleased with the results so far. 'night everyone! 21:39
21:43 ExtraCrispy joined, p6bannerbot sets mode: +v ExtraCrispy
AlexDaniel weekly: patrickz++ worked on making rakudo relocatable 21:44
notable6 AlexDaniel, Noted!
21:46 patrickz left
Xliff_ AlexDaniel: What does that mean? 21:49
AlexDaniel Xliff_: currently if you install rakudo somewhere you cannot move it to another path 21:50
well, you can, but it won't work :)
lizmat PSA: I'll probably won't be able to finish the P6W tonight, so it will be tomorrow around noon most likely 21:51
and yes, it's going to be a big one again 21:52
Xliff_ \o/ 22:00
AlexDaniel++
22:07 jme` left
[Coke] lizmat++ 22:10
Kaiepi Net::Telnet is almost ready for release! 22:12
i just need to add support for some more common extensions
22:13 melezhik joined, p6bannerbot sets mode: +v melezhik
melezhik Hi! How do I get soft symlink's target ? 22:13
symlink($target,$name); need to know the $target. $name.IO.something? 22:14
[Coke] IO::Path's resolve? 22:16
lizmat m: "foo".IO.resolve 22:17
camelia ( no output )
[Coke] m: dd "foo".IO.resolve
camelia IO::Path.new("/home/camelia/foo", :SPEC(IO::Spec::Unix), :CWD("/"))
melezhik Coke:, lizmat: thanks! .resolve does the trick! 22:19
[Coke] o/ 22:20
Xliff_ AlexDaniel: github.com/Xliff/p6-GtkPlus/blob/m...-1716b.svg -- You may have to download and view that one. 22:42
lizmat notable6: weekly 22:44
notable6 lizmat, 8 notes: gist.github.com/4561f921da17bcf8a8...609d9a047e
22:46 jme` joined, p6bannerbot sets mode: +v jme`
lizmat is tired and will continue on the P6W tomorrow 22:59
zachk is there a method to end a supply? 23:04
jnthn On the emitting side or the subscribing side? 23:05
(There's at least 3 different answers depending what exactly you're asking...) 23:06
zachk how would I kill the supply on the supplier side? 23:09
23:10 melezhik left
jnthn .done 23:12
Or if it's erroneous, .quit
.done is a successful/normal termination
23:15 jme` left 23:38 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
AlexDaniel Xliff_: still not cumulative time per build 23:44
23:56 w_richard_w joined 23:57 p6bannerbot sets mode: +v w_richard_w