»ö« 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:04 rindolf left 00:07 sena_kun left 00:11 lucasb left 00:18 __jrjsmrtn__ left, _jrjsmrtn joined 00:26 natrys left 00:29 pamplemousse left 00:33 cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined
gdonald pastebin.com/zd30xK5v is "bar" available inside $b somewhere? 00:43
timotimo m: my Block $b = -> "bar" { say "baz" }; say $b.signature.parameters[0] 00:44
camelia No such method 'parameters' for invocant of type 'Signature'
in block <unit> at <tmp> line 1
timotimo m: my Block $b = -> "bar" { say "baz" }; say $b.signature.params[0] 00:45
camelia "bar"
timotimo m: my Block $b = -> "bar" { say "baz" }; say $b.signature.params[0].perl
camelia "bar"
timotimo m: my Block $b = -> "bar" { say "baz" }; say $b.signature.params[0].^name
camelia Parameter
timotimo m: my Block $b = -> "bar" { say "baz" }; say $b.signature.params[0].^methods
camelia (The 'ForeignCode' class is a Rakudo-specific
implementation detail and has no serviceable parts inside The 'ForeignCode' class is a Rakudo-specific
implementation detail and has no serviceable parts inside The 'ForeignCode' class is a Rakudo-spec…
timotimo haha
m: my Block $b = -> "bar" { say "baz" }; .name.say for $b.signature.params[0].^methods
camelia <anon>
<anon>
<anon>
<anon>
<anon>
<anon>
<anon>
<anon>
<anon>
BUILD
name
usage-name
sigil
twigil
modifier
constraint_list
constraints
type
coerce_type
named_names
named
positional
slurpy
optional
raw
timotimo m: my Block $b = -> "bar" { say "baz" }; .name.say for $b.signature.params[0].constraint_list[0] 00:46
camelia No such method 'name' for invocant of type 'Str'. Did you mean any of these?
none
note
take

in block <unit> at <tmp> line 1
timotimo er
m: my Block $b = -> "bar" { say "baz" }; .perl.say for $b.signature.params[0].constraint_list[0]
camelia "bar"
timotimo there you go, this gives you the "bar" you're looking for
gdonald: ^ 00:48
gdonald thank you 00:49
timotimo YW 00:53
00:55 aborazmeh joined, aborazmeh left, aborazmeh joined
mst where would I read for a full explanation of how the undef+Failure stuff works 01:10
timotimo i wonder if we have an advent calendar post that goes into every detail 01:11
other than that my guess is as good as yours as to where to find it
mst heh, fair
01:13 noisegul_ joined 01:16 noisegul left 01:23 Actualeyes joined 01:25 Actualeyes left 01:47 noisegul_ is now known as noisegul 01:58 molaf left 02:07 vrurg left 02:08 vrurg joined 02:10 molaf joined 02:17 vike left 02:33 aborazmeh left 02:37 pamplemousse joined 02:48 vike joined 02:53 redhands joined 03:18 Poohmaan left, Poohmaan joined, klapperl left 03:21 klapperl joined 03:35 AlexDaniel joined 03:44 pamplemousse left 03:48 van_zerro joined 03:49 abraxxa joined, pamplemousse joined, abraxxa left 03:50 abraxxa joined, kst joined, Actualeyes joined 03:54 abraxxa left 03:55 abraxxa joined 03:58 adu left 03:59 adu joined 04:05 kst left 04:08 van_zerro left, aeruder left 04:09 aeruder_ joined 04:18 [Sno] left 04:24 molaf left
Xliff Has there been any progress on this front? stackoverflow.com/questions/487722...ll-cstruct 04:49
04:56 pamplemousse left
Xliff Also, where is the discussion of 6.e occurring? 05:13
05:19 silug left
tadzik damn, Riga is stuffed :o 05:27
05:30 silug joined 05:35 sauvin joined 05:36 abraxxa left
Xliff Oh. THAT'S where everyone is. 05:47
I wish I was there.
Oh. Not til august. 05:48
06:09 Sgeo left, Sgeo joined
Xliff How would I upgrade all installed packages with zef? 06:24
"zef upgrade" just gives me usage info. 06:25
06:37 abraxxa joined 06:42 domidumont joined 06:45 redhands left, redhands joined 06:49 domidumont left 06:51 reach_satori left 06:58 patrickb joined 07:14 ChoHag left 07:16 domidumont joined 07:21 chloekek joined, reach_satori joined 07:24 nepugia joined
Xliff Can anyone tell me what I'm doing wrong, here: gist.github.com/Xliff/f19d33100a8c...65f33d15dc 07:38
07:44 antoniogamiz joined
antoniogamiz o/ 07:44
07:45 dakkar joined 07:50 Xliff_ joined, Actualeyes left 07:53 Xliff left 07:58 ravenousmoose joined 08:00 ravenousmoose_ left 08:01 zakharyas joined 08:09 redhands left
chloekek p6: my @xs; push @xs, 1; say @xs 08:17
camelia [1]
chloekek Xliff_: are you actually receiving anything on the socket? 08:20
08:24 nepugia left 08:29 AlexDaniel left, rindolf joined 08:34 Xliff_ is now known as Xliff
Xliff chloekek: I don't know. 08:34
The problem is that the socket needs to get a response from the client before it will send anything. 08:35
That should be done with this line:
await $conn.print: to-json(%handshake-obj, :!pretty);
chloekek That line does finish execution. 08:37
You could add .say to the body of the first whatever block and see if you receive anything.
Xliff Thanks.
08:38 Itaipu_ left, Itaipu joined
Xliff Nope. Getting nothing from the server. 08:39
chloekek Then that's why it reaches the timeout. :') 08:40
08:40 Itaipu_ joined 08:42 Itaipu left
chloekek Maybe you have to connect first and log afterwards. 08:50
antoniogamiz mmmm how can avoid to capture the t here => rule def1 {^\s*(T|t)'he' <name> <subkind>\s*$} 08:51
chloekek antoniogamiz: To avoid capture use [] instead of () 08:52
antoniogamiz oh, thanks :D
chloekek p6: say 'The' ~~ / (T|t)he /; 08:53
camelia 「The」
0 => 「T」
chloekek p6: say 'The' ~~ / [T|t]he /;
camelia 「The」
chloekek p6: say 'The' ~~ / <[Tt]>he /;
camelia 「The」
08:54 ccntrq joined
antoniogamiz goooood :D 08:55
chloekek p6: .list.say for 'The' «~~« (/(T|t)he/, /[T|t]he/, /<[Tt]>he/); 08:58
camelia (「T」)
()
()
chloekek p6: .list.say for 'The' «~~« (/(T|t)he/, /[T|t]he/, /(<[Tt]>)he/, /<[Tt]>he/); 08:59
camelia (「T」)
()
(「T」)
()
09:00 ravenousmoose left 09:01 ravenousmoose joined
chloekek Is Rakudo called so because it does Raku? 09:02
09:05 sena_kun joined 09:08 pat_js joined 09:10 reach_satori left
lizmat weekly: blogs.perl.org/users/damian_conway/...f-pie.html 09:12
notable6 lizmat, Noted! 09:13
09:28 cygx joined
cygx o/ 09:28
chloekek: the Rakudo name came first, cf en.wikipedia.org/wiki/Rakudo_Perl_6#Name 09:29
chloekek: the Raku alias is a more recent development, chosen by TimToady in response to repeated requests for renaming the language 09:30
chloekek Nice! 09:32
p6: say '駱駝道'.chars 09:36
camelia 3
09:42 antoniogamiz left 09:46 robertle joined
Xliff «~~« ?? 09:46
09:47 melezhik left
Xliff Geez! These hyper ops! 09:47
timotimo hyped for those hyper ops 09:48
09:51 aborazmeh joined, aborazmeh left, aborazmeh joined
daxim here's an opportunity for a shining v6 answer: do something every 10 seconds until external process is finished. should be a one liner. perlmonks.org/?node_id=11103281 09:53
cygx Xliff: that's nothing - I once used the 'fish operator' <<=><< 09:55
Xliff cygx: O_o 09:56
cygx m: say ('key' <<=><< (1,2,3)).perl
camelia (:key(1), :key(2), :key(3))
Xliff Ok. Now I'm able to read them.
09:56 antoniogamiz joined
Xliff aaand.. I'd be wrong. 09:56
09:56 Poohmaan left, Poohmaan joined
Xliff m: say ('key' «=>« 4...6).perl 09:57
camelia No such method 'pred' for invocant of type 'Pair'. Did you mean any of these?
grep
tree

in block <unit> at <tmp> line 1
Xliff m: say ('key' «=>« (4...6)).perl
camelia (:key(4), :key(5), :key(6))
antoniogamiz patrickb: I have seen in your proposed changes to p6doc something about :api in the META6 09:58
can you send me a link where that setting is described? 09:59
oh, are implicit returns faster than explicit returns? I did not know that :ooo 10:01
patrickb antoniogamiz: You probably got the wrong person. Which proposed changes are you refering to? 10:03
antoniogamiz agh, you are right, sorry
I wanted to refer to tyil 10:04
tyil hi
patrickb Ah, the other Patrick :-)
tyil that's me
10:04 Guest1109 left, mack[m] left
antoniogamiz yep, sorry for the confusion, I only typed patr and pressed tab 10:04
tyil: I wanted to ask you about :api setting in META6
tyil no worries :(
:) *
10:04 Seance[m] left, Garland_g[m] left
tyil it's a little used feature, let me grab a link to the docs 10:05
antoniogamiz I have seen you prefer to use that but none of the modules actually specify that part
tyil docs.perl6.org/language/modules#ind...META6.json this describes it as an optional field (because it is)
antoniogamiz oh it looks like we I need for Documentable when the new documentation system comes 10:06
tyil I hoped that comment would spark interest in more people to use an api field in the META6.json, as it makes semantic versioning possible (which, in my opinion, is the most sane versioning scheme we have)
antoniogamiz (which will not be compatible with 1.x.x)
tyil: thanks a lot for mentioning that in the proposed changes, I did not have any idea about it 10:07
tyil App::Assixt has been putting it in META6.jsons for months!
jk, it's not a common thing to see anywhere :p
10:08 TravisRt2botio[m left
tyil in general, I keep the value of the api field the same as the major release number 10:08
10:08 folex left, Matthew[m] left
antoniogamiz that makes sense 10:08
10:08 matiaslina left, rba[m] left
tyil since major release numbers get bumped when something backwards incompatible change is introduced in semantic versioning 10:08
10:08 unclechu left, Demos[m] left, EuAndreh[m] left 10:09 AlexDaniel` left, lance_w[m] left, sergiotarxz[m] left 10:10 irdr left 10:11 irdr joined 10:14 aborazmeh left 10:15 cygx left
chloekek p6: "foo:bar".perl.say 10:21
camelia "foo:bar"
chloekek p6: qw[foo:bar].perl.say
camelia "foo:bar"
chloekek p6: qqw[foo:bar].perl.say
camelia "foo:bar"
chloekek p6: qqww[foo:bar].perl.say
camelia ("foo", :bar)
chloekek p6: <<foo:bar>>.perl.say
camelia ("foo", :bar)
chloekek I was surprised that it would do this when there is no space before the colon. 10:22
10:22 mowcat joined 10:24 Itaipu joined 10:25 Itaipu_ left
Xliff How would you execute the following bash commands using Proc::Async? 10:32
echo "Hallo, sleeping for 120 seconds ..."; sleep 10
10:33 Itaipu left, Itaipu joined
Xliff my $a = Proc::Async.new: "bash", "-c", "echo \"Hallo, sleeping for 120 seconds ...\"; sleep 10" 10:35
It's the quoting... it;s always the quoting.
timotimo oh, you don't want to have the sleep in perl6 code 10:36
Xliff It's in bash 10:39
10:43 _jrjsmrtn left 10:46 AlexDaniel` joined 10:52 __jrjsmrtn__ joined 10:53 pat_js left, tune left
Xliff daxim: perlmonks.org/?node_id=11103288 10:55
daxim that's delicious 10:56
Xliff++ 10:57
10:57 Matthew[m] joined, lance_w[m] joined, EuAndreh[m] joined, rba[m] joined, Guest92358 joined, TravisRt2botio[m joined, sergiotarxz[m] joined 10:58 unclechu joined, mack[m] joined, Garland_g[m] joined, Demos[m] joined, matiaslina joined, folex joined, Seance[m] joined
daxim why does proc::async print to stdout instead of capturing the echo output in the `out` attribute (IO::Pipe type)? 10:58
the sync Proc counterpart does not print 10:59
Xliff Probably because I didn't spec that in the call.
timotimo you have to :out for that to happen
Xliff Yeah.
Hence my entreaty to read the Proc::Async page.
timotimo you expect far too much goodwill from perlmonks, i think 11:00
daxim adding `, :out` to the new: method call does not help, can you show me how it's done right?
jnthn Proc::Async doesn't take a :out; one subscribes to the stdout Supply 11:01
The very first example at doc.perl6.org/type/Proc::Async shows how to do it. 11:02
(I'm glad to see it uses a react block too :))
chloekek Why are ENV and cwd capitalized differently in Proc::Async.start?
11:02 TreyHarris left
timotimo ah, right 11:03
tadzik heh, good question...
daxim how do we combine supply with the code xliff posted? 11:04
Xliff very carefully. It stops being a one-liner, then.
daxim perhaps it's easier to make `shell` async somehow
Xliff For one thing, I'd like to postpone the scheduler until after the command has started. 11:05
I don't think I can do that in "whatever $a.start { }"
jnthn I'd probably have not used $*SCHEDULER directly, but instead Supply.interval(2, 1).tap: { say "in handler..." } 11:06
Xliff jnthn++
jnthn And then it's easy to move into to react block. And better still, stick a `done` in the whenever that handles process termination, and it will automatically turn off that timer too :) 11:07
Xliff Ooh!
jnthn lunch, bbl
Xliff That solves everything.
daxim can you amend the posted code? I want to learn
chloekek Is it ok to begin the signature for BUILD with ::?CLASS:D:? 11:08
Xliff I'll post another comment.
chloekek Afaik it doesn't make sense to call it on the type object.
11:14 TreyHarris joined 11:15 zakharyas left
Xliff daxim: perlmonks.org/?node_id=11103289 11:16
daxim didn't run the code, but I think $a at the top should be $proc 11:18
timotimo true 11:20
11:21 cpage left
Xliff Whoops! 11:21
Fixed. 11:22
11:24 cpage joined 11:26 Guest37021 joined 11:27 Poohman joined 11:29 Poohmaan left 11:30 rindolf left, matiaslina left 11:32 lance_w[m] left, EuAndreh[m] left 11:37 matiaslina joined, antoniogamiz left 11:38 EuAndreh[m] joined, lance_w[m] joined, rindolf joined 11:54 pat_js joined
chloekek p6: grammar A { token TOP { <bla> }; token bla { .* } }; A.bla 11:59
camelia Cannot look up attributes in a A type object
in regex bla at <tmp> line 1
in block <unit> at <tmp> line 1
chloekek p6: grammar A { token TOP { <bla> }; token bla { .* } }; A.new.bla.perl.say 12:00
camelia Match.new(list => (), hash => Map.new(()), orig => "", pos => 0, made => Any, from => 0)
12:42 cygx joined
cygx m: sub work($n) { sleep (0.01, 0.05, 0.1).pick; put "$n on {$*THREAD.id}" }; map &work, (^10).race(:1batch); put "-"; (^10).race(:1batch).map(&work) 12:42
camelia 0 on 1
1 on 1
2 on 1
3 on 1
4 on 1
5 on 1
6 on 1
7 on 1
8 on 1
9 on 1
-
1 on 6
2 on 6
4 on 6
0 on 4
3 on 7
6 on 8
5 on 6
9 on 8
7 on 4
8 on 7
cygx why is there no parallelism in case of sub map? 12:43
jnthn The sub forms consistently deal in lists, following the 1-arg rule (e.g. sub map(&code, +values)) 12:45
So `map` the sub is always sequential map. 12:46
12:47 zakharyas joined 12:49 sena_kun left, sena_kun joined
cygx thanks 12:50
another question: is there a way to set the batch size on a `race for`? 12:51
havint to write `race for @list.race(:batch(42)) {...}` seems sub-optimal...
*having
jnthn Yes, you do it like that; if you don't want to repeat the `race`, then just write `@list.race(:42batch).map: { ... }` 12:52
It's sub-optimal, but otoh the hope is that in the future, needing to set the batch manually would be a lot less common than it is today. 12:53
cygx perhaps a dynamic variable as default for the batch argument coult also work? 12:54
my $*BATCH = 4; race for ...
jnthn That's a bit too leaky 12:55
If anything, we might find a way to sneak in the colonpair to configure `race`, such as `race :batch(42) for ...`
Though not sure how wise that is 12:56
12:58 Voldenet left 13:03 Voldenet joined, Voldenet left, Voldenet joined 13:06 Black_Ribbon left 13:09 x[LGWs4x4i]uG2N0 joined 13:22 cygx left 13:25 pamplemousse joined 13:29 Altai-man_ joined 13:30 sena_kun left
Xliff R#3075 13:34
synopsebot R#3075 [open]: github.com/rakudo/rakudo/issues/3075 Conflicting use statement does not produce an error, but fails dynamic compilation.
Xliff Has anyone at least tried the replication steps?! 13:35
13:35 Altai-man_ left
vrurg Xliff: I wanted to have a look at it, but have no time for this. If nobody other helps, try pinging me next week, pls. 13:43
Xliff: BTW, did you try the code on, say, 2019.03? 13:45
chloekek p6: sub f { $^X + $^Y }; say f(1, 2) 13:51
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of $^X variable; in Perl 6 please use $*EXECUTABLE-NAME
at <tmp>:1
------> 3sub f { $^X7⏏5 + $^Y }; say f(1, 2)
chloekek Is it possible to disable this error and get a two-argument routine?
timotimo m: use isms; sub f { $^X + $^Y }; say f(1, 2) 13:54
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of $^X variable; in Perl 6 please use $*EXECUTABLE-NAME
at <tmp>:1
------> 3use isms; sub f { $^X7⏏5 + $^Y }; say f(1, 2)
timotimo m: use isms :P5; sub f { $^X + $^Y }; say f(1, 2)
camelia ===SORRY!===
This type cannot unbox to a native string: P6opaque, Pair
timotimo m: use isms <Perl5>; sub f { $^X + $^Y }; say f(1, 2)
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of $^X variable; in Perl 6 please use $*EXECUTABLE-NAME
at <tmp>:1
------> 3use isms <Perl5>; sub f { $^X7⏏5 + $^Y }; say f(1, 2)
timotimo how does isms
chloekek p6: use isms; sub f { $^X + $^Y }; say f(1, 2) 13:55
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of $^X variable; in Perl 6 please use $*EXECUTABLE-NAME
at <tmp>:1
------> 3use isms; sub f { $^X7⏏5 + $^Y }; say f(1, 2)
chloekek p6: no worries; sub f { $^X + $^Y }; say f(1, 2)
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of $^X variable; in Perl 6 please use $*EXECUTABLE-NAME
at <tmp>:1
------> 3no worries; sub f { $^X7⏏5 + $^Y }; say f(1, 2)
chloekek p6: sub f { $^Χ + $^Y }; say f(1, 2) 13:56
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of $^Y variable
at <tmp>:1
------> 3sub f { $^Χ + $^Y7⏏5 }; say f(1, 2)
chloekek p6: sub f { $^Χ + $^Υ }; say f(1, 2)
camelia 3
chloekek Ha, nice.
14:06 lucasb joined 14:07 molaf joined 14:09 antoniogamiz joined
Xliff vrurg: Yes. It was discovered in 2019.3 and it has continued through 2019.7 -- I didn't report it until 2019.7 as I hadn't yet broken it down into something as easy as what was reported. 14:10
14:15 gregf_ joined
vrurg Xliff: I wonder if you could be loosing an exception there. Try checking out if you're getting not real Nil but Failure. And if so – what exception does it wrap. 14:16
Xliff vrurg: I agree. I have tried endlessly to see what the exception is, but nothing is reported. 14:19
vrurg Xliff: if you remove try the outcome is the same?
Xliff Yes.
I will run it again to verify.
Hrm. 14:20
If I remove the try, it will not run because of the assignment.
14:21 pat_js left
vrurg Xliff: you could do require and then bind ::("Class") to the hash. Should be ok. 14:21
Xliff Hoping if there is an exception it will be visible. 14:22
It's running now. It will be a second. 14:23
Geth doc: 625f9a4a04 | Coke++ | doc/Language/regexes.pod6
brace vs. bracket
doc: a90982c9ae | Coke++ | xt/code.pws
new "words" from code sample
synopsebot Link: doc.perl6.org/language/regexes
Xliff vrurg: It's a Failure. 14:35
But there's nothing reported 14:36
If I run perl6 -e "use OffendingModule" then nothing is reported.
vrurg I.e. $failure.exception is empty??? That's weird. Ok, I'll try to remember to look at it. 14:37
Xliff There is a Failure.exception?
Let me see if I can get it.
vrurg docs.perl6.org/type/Failure 14:38
Xliff: I'll be away for ~1hr. 14:39
Xliff kay.
The failure exception is "No such symbol "OffendingModule" 14:40
vrurg: The failure exception is 'No such symbol "OffendingModule"'. I expect this is happening because 'require ::("OffendingModule")' hits something that is not being reported and the Failure comes from ::("OffendingModule") not being there because...it wasn't actually loaded. 14:41
14:41 molaf left 14:47 gregf_ left 15:06 ctilmes joined
antoniogamiz mm how can I clone an object in an assignment? 15:14
I mean, my $a = $b.clone;
or something alike
(this is a question about style => gist.github.com/antoniogamiz/8e9e8...34efa8ee7) 15:16
15:24 rindolf left 15:27 chloekek left
tyil I'm making an API to export metrics about the Perl 6 ecosystem for Prometheus (so I can make a Grafana dashboard out of it), and want to extract the role and two classes in this module (gitlab.com/tyil/perl6-app-cpan/blo...r.pm6#L13) to make exporting Prometheus-style metrics in other projects easier as well 15:30
however, how should I name the module that contains these Prometheus roles/classes?
15:33 antoniogamiz left 15:43 robertle left 15:45 patrickb left, Sgeo_ joined 15:47 Sgeo left 15:54 patrickb joined 15:55 discord6 left, discord6 joined, discord6 left, discord6 joined 15:59 discord6 left 16:00 discord6 joined 16:06 Sgeo__ joined 16:09 Sgeo_ left 16:20 domidumont left 16:24 Sgeo_ joined 16:26 ctilmes left 16:28 Sgeo__ left 16:32 dakkar left 16:38 wildtrees joined 16:39 SCHAPiE left
Xliff tyil: Hmmm.... it really boils down to what you want your names to declare. 16:41
If you want just a name, you could use Prometheus::Classes 16:42
16:43 SCHAPiE joined
Kaiepi m: class A is Int {}; say A.REPR 16:48
camelia P6opaque
Kaiepi m: class A is Int is repr('P6int') {}; say A.REPR 16:49
camelia P6int
Kaiepi m: class A is int {}; say A.REPR
camelia 5===SORRY!5=== Error while compiling <tmp>
int does not support inheritance, so A cannot inherit from it
at <tmp>:1
wildtrees so I can have parametrized roles but not parametrized classes? 16:51
Kaiepi you can make parametric classes if you use the MOP
wildtrees oh, is it hard? should be avoided?
lizmat wildtrees: a parameterized role puns to a class by itself
wildtrees yea I am gonna try that next
Kaiepi m: class Foo { method ^parameterize(Mu $, Mu \T) { self.^mixin: T; self.^set_name: 'Foo[' ~ T.^name ~ ']'; self } }; say Foo[Int].^name 16:52
camelia ===SORRY!===
Cannot find method 'specialize' on object of type Perl6::Metamodel::ClassHOW
Kaiepi m: class Foo { method ^parameterize(Mu \T) { self.^mixin: T; self.^set_name: 'Foo[' ~ T.^name ~ ']'; self } }; say Foo[Int].^name
camelia ===SORRY!===
Too many positionals passed; expected 2 arguments but got 3
Kaiepi m: class Foo { method ^parameterize(Mu \S, \T) { S.^mixin: T; S.^set_name: 'Foo[' ~ T.^name ~ ']'; S } }; say Foo[Int].^name 16:53
camelia ===SORRY!===
Cannot find method 'specialize' on object of type Perl6::Metamodel::ClassHOW
16:53 [Sno] joined
Kaiepi m: class Foo { method ^parameterize(Mu \S, \T) { S.^mixin: T; S } }; say Foo[Int] 16:53
camelia ===SORRY!===
Cannot find method 'specialize' on object of type Perl6::Metamodel::ClassHOW
Kaiepi hm
Xliff !!
Kaiepi i could've sworn that worked
lizmat m: role A[\answer] { method question() { answer } }; say A[42].new # wildtrees
camelia A[Int].new
Xliff Might have changed?
Kaiepi m: class Failable { method ^parameterize(Mu \S, Mu \T) { Metamodel::SubsetHOW.new: :name('Failable[' ~ T.^name ~ ']'), :refinee(T ~~ Junction ?? Mu !! Any), :refinement(T | Junction) } }; say Failable[Int] 16:55
camelia ===SORRY!===
Unexpected named argument 'name' passed
Kaiepi m: class Failable { method ^parameterize(Mu \S, Mu \T) { Metamodel::SubsetHOW.new: :refinee(T ~~ Junction ?? Mu !! Any), :refinement(T | Junction) } }; say Failable[Int]
camelia Perl6::Metamodel::SubsetHOW.new
Xliff m: role A-role[\answer] { method question() { answer } }; my $a = (class :: does A-Role[42] {}).new; # equivalent?
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'A-Role'. Did you mean 'A-role'?
at <tmp>:1
------> 3nswer } }; my $a = (class :: does A-Role7⏏5[42] {}).new; # equivalent?
Xliff m: role A-Role[\answer] { method question() { answer } }; my $a = (class :: does A-Role[42] {}).new; # equivalent?
camelia ( no output )
Xliff m: role A-Role[\answer] { method question() { answer } }; my $a = (class :: does A-Role[42] {}).new; $a.say; # equivalent?
camelia <anon|1>.new
Xliff Not as nicely outputted, tho
wildtrees can I parametrized roles over values of types, not just types? 16:56
Kaiepi m: class Foo { method ^parameterize(Mu \S, \T) { T.^mixin: S; T } }; say Foo[Int]
camelia ===SORRY!===
Cannot find method 'specialize' on object of type Perl6::Metamodel::ClassHOW+{<anon>}
Kaiepi m: class Foo { method ^parameterize(Mu \S, Mu \T --> Mu) { T.^mixin: S; T } }; say Foo[Int] 16:57
camelia ===SORRY!===
Cannot find method 'specialize' on object of type Perl6::Metamodel::ClassHOW+{<anon>}
Kaiepi m: class Foo { method ^parameterize(Mu $, Mu \T --> A) { self.^mixin: T; self } }; say Foo[Int]
camelia 5===SORRY!5=== Error while compiling <tmp>
Type 'A' is not declared
at <tmp>:1
------> 3{ method ^parameterize(Mu $, Mu \T --> A7⏏5) { self.^mixin: T; self } }; say Foo[In
Kaiepi m: class Foo { method ^parameterize(Mu $, Mu \T --> Mu) { self.^mixin: T; self } }; say Foo[Int]
camelia ===SORRY!===
Cannot find method 'specialize' on object of type Perl6::Metamodel::ClassHOW
Kaiepi m: class Foo { method parameterize(Mu $, Mu \T --> Mu) { self.^mixin: T; self } }; say Foo[Int] 16:58
camelia 5===SORRY!5=== Error while compiling <tmp>
Foo cannot be parameterized
at <tmp>:1
------> 3{ self.^mixin: T; self } }; say Foo[Int]7⏏5<EOL>
Kaiepi either i'm doing this wrong or something's broken because i know CArray does something like this
m: class Foo { method parameterize(Mu $, Mu \T --> Mu) { self.^mixin: T; self } }; say Foo[IO] 16:59
camelia 5===SORRY!5=== Error while compiling <tmp>
Foo cannot be parameterized
at <tmp>:1
------> 3 { self.^mixin: T; self } }; say Foo[IO]7⏏5<EOL>
Kaiepi m: class Foo { method ^parameterize(Mu $, Mu \T --> Mu) { self.^mixin: T; self } }; say Foo[IO]
camelia Perl6::Metamodel::ClassHOW+{<anon>}+{IO}.new
Kaiepi oh T needs to be a role for that to work
anyway yeah wildtrees, you just slap a ^parameterize method on it like this 17:00
first argument's irrelevant since it's always identical to self
jnthn But really...just write a role :)
And yes, you can pass the role values as well as types. 17:01
wildtrees how would I type the values? 17:02
oh its working, just not showing up when I say the role 17:04
er instance of the role
I am passing in 5 but it is coming out with say and .perl as [Int] 17:06
17:10 khisanth_ left
jnthn m: role R[Int $x] { method m { say $x } }; R[5].m 17:10
camelia 5
wildtrees m: role R[Int $x] {} ; say R[5].new.perl ; 17:13
camelia R[Int].new
wildtrees looking for something kind of like dependent type , or values as types in perl6 17:14
jnthn I think that's just about how it's being displayed rather than whether the value is being used.
wildtrees m: role R[Int $x] {} ; say R[5].new.WHAT ; 17:15
camelia (R[Int])
wildtrees hmmm comparing them using ~~ and .WHAT they seem different :) 17:17
17:20 redhands joined
Xliff "NativeLibs:ver<0.0.5+>" <- Is that how you specify version dependency in META6.json? 17:22
17:23 khisanth_ joined 17:26 AlexDaniel joined
AlexDaniel Xliff: Discussions about 6.e used to be here github.com/rakudo/rakudo/labels/6.e but all new tickets are expected here github.com/perl6/problem-solving/labels/6.e 17:26
yoleaux 07:18Z <patrickb> AlexDaniel: Those changes are fixes for the big spaces-in-path PRs. Those were not part of 2019.07. So as long as we don't want to get the spaces-in-path PRs into the point release as well we have to leave out those fixup PRs.
17:27 JackFly26 joined
AlexDaniel m: use v6.e.PREVIEW; say 42 17:27
camelia 42
AlexDaniel Xliff: ↑ v6.e.PREVIEW already works, though there's nothing new in it yet (I think)
JackFly26 So is that like beta perl6 17:28
yoleaux 4 Apr 2019 02:30Z <Xliff> JackFly26: What was the solution to the eval issue?
Xliff OK. No I just wanted to know where discussions so I could ask a question.
Hah!
JackFly26: o/
JackFly26 What eval issue 17:29
Xliff Dude...that was from back in April... I forgot!
JackFly26 With the parrotvm?
Xliff Maybe
I'd have to check the logs.
JackFly26 That's what I mostly used this for
AlexDaniel JackFly26: yes, it's for those who want to experiment with newest features that will be available in the next language release
JackFly26 Ok nice
Rn I'm just dropping in.
wildtrees can a role have more than one parameter? whats the syntax for that if so 17:30
JackFly26 I decided to try my lang with parser combinators first 17:31
lucasb wildtrees: role R[$x, $y] {...}
JackFly26 Instead of parrotvm tools
lucasb or role R[::T, ::U] {...}
Xliff github.com/perl6/problem-solving/issues/75 17:33
Geth ¦ problem-solving: AlexDaniel assigned to jnthn Issue Mechanism for Reusing Function Definitions in NativeCall github.com/perl6/problem-solving/issues/75 17:34
JackFly26 Would type aliases fix that problem? 17:35
AlexDaniel daxim: my $proc = Proc::Async.new: ‘sleep’, ‘15’; react { whenever Supply.interval(10) { say ‘So am I still waiting’ }; whenever $proc.stdout.lines { say “Got: $_” }; whenever $proc.start { say ‘Finished’; done } };
Xliff AlexDaniel: Already handled and posted. :)
You're answer is fairly close to what I ended up with. 17:36
I'm still new to react/whenever so...
AlexDaniel it's much more readable when written not in one line: gist.github.com/AlexDaniel/e18da4b...8c149c0115 :)
Xliff I know. 17:37
AlexDaniel Xliff: I see your answer now, yes. Nice
JackFly26 Nice your timestamp was 1337 17:38
17:38 Sgeo__ joined
JackFly26 Hola 17:38
Bienvenidos 17:39
Xliff Mine was :00 !! \o/
wildtrees m: role SizeAndType[::Type, Int $size] { has Type @.list is rw } ; say SizeAndType[Str, 10].new() ;
camelia No such method 'perl' for invocant of type 'Type'
in block <unit> at <tmp> line 1
wildtrees :(
JackFly26 Puedo hablar un pico español lol
Ok back to english 17:40
lucasb wildtrees: I think you hit a bug. one sec :)
m: role R[::Type] { has Type $.x }; dd R[Int].new 17:41
camelia No such method 'perl' for invocant of type 'Type'
in block <unit> at <tmp> line 1
lucasb m: role R[::Type] { has Type $.x = Type }; dd R[Int].new
camelia R[Int].new(x => Int)
AlexDaniel Xliff: so github.com/rakudo/rakudo/issues/3075 wasn't an issue before 2019.03? 17:42
lucasb IMO, both snippets should have evaluated to the same result
17:42 Sgeo_ left
lucasb since, they should be equivalent 17:42
IOW, the type passed as argument isn't properly captured by the parameter. Note I had to explicit initialize the attribute. 17:43
17:44 antoniogamiz joined
wildtrees oh 17:44
m: role SizeAndType[::Type, Int $size] { has Type @.list is rw } ; say SizeAndType[Str, 10].new(list => ["hello","world"]) ;
camelia No such method 'perl' for invocant of type 'Type'
in block <unit> at <tmp> line 1
wildtrees anyways, how could I enforce a check for the size of the list from the parametrized type? 17:45
antoniogamiz you could create a type
with subset and where
Xliff AlexDaniel: No. It WAS an issue before 2019.3
I just couldn't easily isolate it until after 2019.7 was released. 17:46
Is there a way I could download all of Bisectable so I could see if it ever was NOT a problem? I have a test script.
JackFly26 m: say Str 17:48
camelia (Str)
JackFly26 m: say Str.perl
camelia Str
JackFly26 m: say Str.WHAT 17:49
camelia (Str)
JackFly26 Oh
That's why
lucasb no, that's WHAT :D
timotimo m: say 42.WHY 17:50
camelia No documentation available for type 'Int'.
Perhaps it can be found at docs.perl6.org/type/Int
»
timotimo m: say "Life, the Universe and Everything.WHY
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in double quotes; couldn't find final '"' (corresponding starter was at line 1)
at <tmp>:1
------> 3y "Life, the Universe and Everything.WHY7⏏5<EOL>
expecting …
timotimo damn it
m: say "Life, the Universe and Everything".WHY
camelia 42
timotimo there it is
antoniogamiz weird x'd
timotimo WHY? 17:51
tadzik :>
AlexDaniel Xliff: yes, you can use Blin 17:52
Xliff: blin.p6 --old=2019.03.1 --new=HEAD --custom-script=useTestBug.p6 17:54
Xliff: you'd need to do `use lib ‘…………’` inside your test script
Xliff: oh, and the deps… 17:57
17:57 Black_Ribbon joined
Xliff What was in that use lib line again? 17:58
It looks like morse code over here.
So... I finally install Sake. 17:59
AlexDaniel Xliff: just whatever the path is to your lib
Xliff Full path spec?
AlexDaniel Xliff: as for Blin, you only need this: github.com/perl6/Blin
Xliff: yeah preferably
Xliff k
Is there a command to only check releases? 18:00
And what about the deps. Do I have to specify those in the Blin line? 18:01
AlexDaniel Xliff: yes, like this: ./bin/blin.p6 --old=2019.03.1 --new=HEAD --custom-script=useTestBug.p6 Base64 Base64::Native Config::INI Cro::Core Cro::HTTP::Client Cro::TLS Crypt::Random Data::Dump::Tree DateTime::Format DateTime::Parse Dependency::Sort Digest Digest::HMAC Digest::SHA256::Native File::Directory::Tree File::Find File::Temp File::Which HTTP::HPACK IO::Path::ChildSecure IO::Socket::Async::SSL JSON::Class JSON::Fast JSON::JWT
JSON::Marshal JSON::Name JSON::Unmarshal LibraryMake License::SPDX Log::Timeline META6 MIME::Base64 Method::Also OO::Monitors OpenSSL Shell::Command Term::termios Terminal::ANSIColor Terminal::Print Test::META Text::Table::Simple URI XML XML::Class if
Xliff kk 18:02
AlexDaniel here as a gist: gist.github.com/AlexDaniel/bc92de8...79c76c0d75
these are the actual dependencies your module has… :)
Xliff Thanks! :) 18:03
I knew those looked familiar.
antoniogamiz my $a = $b.clone 18:05
is like pass $b to a function using 'is copy`?
18:13 pamplemousse left
tobs m: sub f ($x is copy) { $x.o++ }; my $x = class { has $.o is rw }.new: :10o; f $x; dd $x 18:13
camelia <anon|1> $x = <anon|1>.new(o => 11)
tobs m: my $x = class { has $.o is rw }.new: :10o; my $b = $x.clone; $b.o++; dd $x
camelia <anon|1> $x = <anon|1>.new(o => 10)
tobs antoniogamiz: ^ no, .clone will make a shallow copy of the object whereas `is copy` will just pass the same object in a new container. 18:14
antoniogamiz mmm 18:16
good, thanks :D
18:16 chloekek joined, sauvin left 18:17 sauvin joined 18:19 cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined 18:20 zakharyas left, sauvin left 18:21 sauvin joined
Kaiepi m: role A { method a { say ::?CLASS.^name } }; class B does A {}; B.new.a 18:22
camelia B
AlexDaniel Xliff: any progress?
18:24 sauvin left, sauvin joined
Xliff blin is installed. 18:26
18:28 JackFly26 left, sauvin left
wildtrees whats the sigil, or how do I assignv values to a subset of Array[Str] lets say ? 18:28
18:31 pamplemousse joined, Possum left
Xliff o/ Madeleien! 18:32
18:33 Possum joined
Xliff AlexDaniel: Failed to open file /usr/local/home/cbwood/Projects/p6-Amazon-AWS-EC2/config-default.json 18:38
18:49 antoniogamiz left 18:50 JackFly26 joined
AlexDaniel m: my Array[Str] $x; $x.push(‘foo’, ‘bar’); say $x 18:51
camelia [foo bar]
AlexDaniel m: my Array[Str] $x; $x = Array[Str].new(‘foo’, ‘bar’); say $x 18:52
camelia [foo bar]
18:52 llfourn left
AlexDaniel wildtrees: ↑ like this 18:52
m: my @x := Array[Str].new(); @x.push(‘foo’, ‘bar’); say @x
camelia [foo bar]
AlexDaniel or like this
18:54 Black_Ribbon left 19:01 mowcat left
AlexDaniel Xliff: what about now? :) 19:02
oooh, Blin installed via zef… interesting!
Xliff Yeah. :)
AlexDaniel Xliff: here: github.com/perl6/Blin/blob/master/...fault.json 19:03
chloekek I love that I can put a has $.foo in a role, make a class that does the role, and then initialize foo with new, without writing my own constructor.
AlexDaniel just copy it into whatever directory it expects it to be in, no modifications needed
chloekek It's something I've always missed in other languages that feature inheritance.
19:03 JackFly26 left
Xliff AlexDaniel: Oh.... yeeeah. 19:04
I may need to put this off until I can do it on the raw metal.
On the VM, this is going to take FOREVER. 19:05
I guess I'll let it run for a while though. Will let you know what I find.
AlexDaniel Xliff: just let it run for a bit, it shouldn't take too long
Xliff: it will take exactly the same amount of time it takes to install these modules
unless something needs to be bisected
Xliff True. 19:06
Ooh! I like. Using different threads to install the modules in dep order?
AlexDaniel if so, then times 11 for that module :)
yes
Xliff Oh, god no!
I hope that doesn't happen.
AlexDaniel Xliff: ah, which --old commit did you choose? 19:07
Xliff The one you gave
AlexDaniel in my example it was 2019.03.1 but your script fails on that and we know that alread
y
so maybe ctrl+c it and give it something older
Xliff Pick one.
AlexDaniel let's try 2017.01 19:08
Xliff !!
OK
19:08 redhands left
AlexDaniel “it will take exactly the same amount of time it takes to install these modules” oh yeah, I guess faster given that it installs modules in parallel :) 19:09
unless that's already implemented in zef, I'm not sure?
Xliff /tmp/whateverable/rakudo-moar/dcf8c16d43adf168646fcf7e31758454a3fb026d is locked. Waiting...
/tmp/whateverable/rakudo-moar/dcf8c16d43adf168646fcf7e31758454a3fb026d is locked. Waiting... 19:10
Had to blow away /tmp/whateverable 19:11
AlexDaniel Xliff: that's OK I think 19:15
now that rakudo is relocatable, I should fix that…
19:19 mowcat joined, patrickb left, klapperl left
Xliff Now testing useTest.pl6 19:21
AlexDaniel Xliff: \o/
Xliff That took a while.
No regressions found. That means the output was the same, right? 19:22
Hmmm...
Rerunning with a miner change. 19:23
AlexDaniel Xliff: you can go into installed/ directory
Xliff *minor
AlexDaniel and see the output on both endpoints
Xliff crap. I restarted. Will the old results be there?
AlexDaniel Xliff: yes
Xliff Huh! 19:25
19:25 klapperl joined 19:26 MasterDuke joined
Xliff I only see log-new 19:27
AlexDaniel Xliff: sounds like it succeeded in on `new` 19:28
Xliff: what's in output/overview ?
Xliff useTest.pl6 – Unknown
Crap. What exit codes does it need?
AlexDaniel ah, *that* is overwritten :) 19:29
non-zero exit code or non-zero signal
Xliff Shit.
Will it compare output?
19:30 MasterDuke left
Xliff So non-zero for a problem and 0 for no problem? 19:30
AlexDaniel no, it won't compare output github.com/perl6/Blin/blob/dc94598...g.pm6#L468
yes, non-zero for a problem
also that's the wrong line!! :)
Xliff *sigh* 19:31
Rerunning again.
I had to make a slight change to script
Getting locked message again.
AlexDaniel Xliff: yeah, remove that directory if you get that 19:32
hmmm github.com/perl6/Blin/commit/6da7c...dd20bfR380
now that I look at it, maybe it does compare the output for custom scripts. But better give it a proper exit code to be sure
Xliff: if you learn to use that, I'll be able to retire :) 19:34
Xliff :P 19:35
We'll always draggs you backs in...
AlexDaniel I know
19:37 mowotter joined 19:39 Black_Ribbon joined, mowcat left 19:40 robertle joined
Xliff useTest.pl6 – AlwaysFail 19:45
So... long standing issue, if it is one.
19:45 pamplemousse left
Xliff I think it is a silent exception or something. 19:45
I think the only thing left is to start commenting things out of Amazon::AWS::Util until it works and see what causes the problem. 19:46
Even though every Action object in the project uses that module.
And they don't fail.
19:48 |Sno| joined 19:49 kaare_ left, kaare_ joined 19:51 [Sno] left
AlexDaniel Xliff: and you can see the right error in log-new and log-old? 19:52
if so, then success, that's a perfectly fine result :)
SmokeMachine is there a way to extend the EnumHOW and use it with a different keyword the same way we do with class? 19:58
I mean, with the enum syntax and not class syntax? 19:59
something like this: www.irccloud.com/pastebin/Odx4BqTl/ 20:02
20:12 patrickb joined 20:25 lucasb left
Xliff AlexDaniel: It's not a perfectly fine result for me. 20:29
#3075 is still an issue, because the code is failing and I don't know why.
Please read the entire description. 20:30
AlexDaniel Xliff: yeah but we tried to bisect it and looks like it's not a regression :)
Xliff Oh. Yeah. That.
Means no one found the bug yet.
AlexDaniel you're the first! Woohoo!
Xliff *snerk* OIC
20:36 robertle left 20:37 rindolf joined, |oLa| left 20:46 pamplemousse joined 20:52 mowotter left 21:03 chloekek left
cpan-p6 New module released to CPAN! PDF::ISO_32000 (0.0.6) by 03WARRINGD 21:21
21:29 Sgeo_ joined 21:30 redhands joined 21:32 Sgeo__ left
cpan-p6 New module released to CPAN! IO::Socket::Async::SSL (0.7.4) by 03JNTHN 21:56
22:04 patrickb left
Xliff jnthn: Just a version bump? 22:06
Ah! Last version release was in December.... nevermind. 22:07
jnthn Contains a fix for a race in .supports-alpn 22:11
(Practical upshot: if the first use of Cro::HTTP::Client was a mass of concurrent requests, you could end up with a crash) 22:14
cpan-p6 New module released to CPAN! Concurrent::Stack (1.2) by 03JNTHN 22:17
jnthn Can you feel the CDD? :) 22:22
22:32 pamplemousse left 22:34 rindolf left
tyil I should rename "module" to distribution to be more in line with the metrics I gather, if it's just an update 22:37
22:48 khisanth_ left 22:52 Black_Ribbon left, Black_Ribbon joined 22:56 tharkun joined
cpan-p6 New module released to CPAN! Concurrent::Queue (1.1) by 03JNTHN 22:59
timotimo jnthn: say $queue.Seq; # (what why) 23:10
 say $queue.list; # (what why)
:D
that looks like you forgot to put the explanation in :D
23:15 khisanth_ joined
jnthn haha 23:22
timotimo has been kicking off the modules.perl6.org rebuild script every time a dist got pushed 23:25
23:27 |oLa| joined, |oLa| left 23:29 wildtrees left
Kaiepi m: class Foo { proto method foo(Str() $bar) {*}; multi method foo(Str $bar) { say $bar } }; Foo.new.foo: 1 23:35
camelia Cannot resolve caller foo(Foo:D: Int:D); none of these signatures match:
(Foo: Str $bar, *%_)
in block <unit> at <tmp> line 1
23:36
Kaiepi damn, thought the proto would coerce it for me instead of having to coerce it in all dispatchees
23:42 aborazmeh joined, aborazmeh left, aborazmeh joined 23:43 holyghost joined 23:48 john_parr left 23:49 [particle]1 joined 23:51 [particle] left 23:56 pamplemousse joined