»ö« 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.
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
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
Xliff Has there been any progress on this front? stackoverflow.com/questions/487722...ll-cstruct 04:49
Xliff Also, where is the discussion of 6.e occurring? 05:13
tadzik damn, Riga is stuffed :o 05:27
Xliff Oh. THAT'S where everyone is. 05:47
I wish I was there.
Oh. Not til august. 05:48
Xliff How would I upgrade all installed packages with zef? 06:24
"zef upgrade" just gives me usage info. 06:25
Xliff Can anyone tell me what I'm doing wrong, here: gist.github.com/Xliff/f19d33100a8c...65f33d15dc 07:38
antoniogamiz o/ 07:44
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
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.
Xliff Nope. Getting nothing from the server. 08:39
chloekek Then that's why it reaches the timeout. :') 08:40
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」
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」)
()
chloekek Is Rakudo called so because it does Raku? 09:02
lizmat weekly: blogs.perl.org/users/damian_conway/...f-pie.html 09:12
notable6 lizmat, Noted! 09:13
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
Xliff «~~« ?? 09:46
Xliff Geez! These hyper ops! 09:47
timotimo hyped for those hyper ops 09:48
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.
Xliff aaand.. I'd be wrong. 09:56
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
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 :(
:) *
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
tyil in general, I keep the value of the api field the same as the major release number 10:08
antoniogamiz that makes sense 10:08
tyil since major release numbers get bumped when something backwards incompatible change is introduced in semantic versioning 10:08
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
Xliff How would you execute the following bash commands using Proc::Async? 10:32
echo "Hallo, sleeping for 120 seconds ..."; sleep 10
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
Xliff daxim: perlmonks.org/?node_id=11103288 10:55
daxim that's delicious 10:56
Xliff++ 10:57
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?
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.
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
Xliff Whoops! 11:21
Fixed. 11:22
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)
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
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
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
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.
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
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.
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
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
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?
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
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
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
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
Xliff "NativeLibs:ver<0.0.5+>" <- Is that how you specify version dependency in META6.json? 17:22
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.
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
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
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
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
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`?
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
Kaiepi m: role A { method a { say ::?CLASS.^name } }; class B does A {}; B.new.a 18:22
camelia B
AlexDaniel Xliff: any progress?
Xliff blin is installed. 18:26
wildtrees whats the sigil, or how do I assignv values to a subset of Array[Str] lets say ? 18:28
Xliff o/ Madeleien! 18:32
Xliff AlexDaniel: Failed to open file /usr/local/home/cbwood/Projects/p6-Amazon-AWS-EC2/config-default.json 18:38
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]
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
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.
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
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…
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
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?
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
Xliff useTest.pl6 – AlwaysFail 19:45
So... long standing issue, if it is one.
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.
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
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
cpan-p6 New module released to CPAN! PDF::ISO_32000 (0.0.6) by 03WARRINGD 21:21
cpan-p6 New module released to CPAN! IO::Socket::Async::SSL (0.7.4) by 03JNTHN 21:56
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
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
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
jnthn haha 23:22
timotimo has been kicking off the modules.perl6.org rebuild script every time a dist got pushed 23:25
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