»ö« 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.
Geth doc: ce49b48af6 | cfa++ | 3 files
Fix a few enum and Metamodel::ClassHOW links.
01:21
Geth doc: b9b03561ef | cfa++ | 2 files
Enumeration links, markup.
02:09
yoleaux Xliff_: Bug CStruct/Str binding issue 02:21
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
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
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
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
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
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)
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
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
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
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.
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.
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
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
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
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
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
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.
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
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
jmerelo Kaiepi: no problem. Thanks anyway. 12:41
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
Kaiepi damn 12:44
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
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()
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!
[Coke] doc xtest on windows has a memory allocation panic in examples compilation, and several Reading from filehandle failed: Permission denied 15:28
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->@*) {}
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
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
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
[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
daxim thanks, sena_kun++ jnthn++ 16:00
[Coke] Looks like maybe it's the missing .close on the handle.
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
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
timotimo ah, indeed it would 16:25
however
you could just™ put your original action class into an attribute and delegate
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
jmerelo El_Che: it's in the roadmap after Comma::Oxford 16:32
cfa 👋 16:35
jmerelo This issue is open for comments, just in case you're interested: github.com/perl6/doc/issues/2542 16:40
avuserow m: say "♳" .. "♹" 17:59
camelia "♳".."♹"
avuserow m: .say for "♳" .. "♹"
camelia





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
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
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
cfa Xliff_: neat 18:47
AlexDaniel m: .say for "♳"…"♹" 18:56
camelia





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
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
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)
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
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
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
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
zachk whats that [* ....] notation and can I type something other then the unicode infinite symbol for that symbol? 21:22
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?
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)
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
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!
patrickz I'm done for today and quite pleased with the results so far. 'night everyone! 21:39
AlexDaniel weekly: patrickz++ worked on making rakudo relocatable 21:44
notable6 AlexDaniel, Noted!
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++
[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
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
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
jnthn .done 23:12
Or if it's erroneous, .quit
.done is a successful/normal termination
AlexDaniel Xliff_: still not cumulative time per build 23:44