»ö« 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.
El_Che AlexDaniel: did you find a replacement? 00:05
AlexDaniel El_Che: no. But according to this ticket some people volunteered for rakudo star: github.com/rakudo/star/issues/124 00:07
El_Che It's not that related, imho
other skillz needed :) 00:08
AlexDaniel yeah, just that you can't make a star release without a rakudo release :)
I'll be around and I can run Blin and provide the data
even that is automated quite a bit through ecosystem-unbitrot repo 00:09
El_Che I still fail to the usecase for Star even today :)
AlexDaniel something something windows something
Seance[m] I use it on Linux :P 00:10
AlexDaniel` Seance: what distro do you use?
Seance[m] OpenSUSE Tumbleweed
AlexDaniel` but it has rakudo 2018.12? 00:12
Seance[m] I use star because it was recommended for noobies
AlexDaniel` hmm…
star was really useful when perl6 was not packaged in most of the distros
but that changed 00:13
see repology.org/project/rakudo/versions
Seance[m] I saw Rakudo in the repos
El_Che Seance[m]: compiling stuff recommended for newbies? Damn kids :)
AlexDaniel` also github.com/perl6/user-experience/issues/29
Seance[m] <freenode_El_ "Seance: compiling stuff recommen"> Yeah, I think on the basis that it included the package manager/line noise maybe? 00:14
I'll replace it with the repo version when I'm back home (: 00:15
AlexDaniel` woah, that quote looked really weird on IRC 00:17
on debian you can install both perl6 and zef from the repos, if I'm not mistaken 00:18
but on Tumbleweed I guess you'd have to install zef yourself, although again, I'm not 100% sure
patrickb How bad would it be for rakudobrew to make all currently installed versions unusable on self-upgrade? 00:29
AlexDaniel patrickb: *shrug* 00:40
users are not supposed to use it, and devs are meant to suffer…
patrickz I'm giving rakudobrew a very thorough polish atm. I also changed the directory structure a little and moved the installed perls folder to a different location. Hence the breakage. 00:43
Out of curiosity: Why is it that users are not supposed to use it? 00:44
patrickz What I already implemented: A different mode of operation that doesn't use shims but modifies PATH in place. Autocomplete in bash. A "system" version that basically turns rakudobrew off. 01:03
Still on my todo list: A "register" command that allows to register externaly built perl 6es in rakudobrew. 01:05
Anyways. I'm off to bed. 01:06
o/
Xliff sena_kun, jnthn: I cannot get "say" output from CRO::HTTP::Client. Is that being redirected, or supressed, somehow? 03:24
The reason I am asking is because say statements within those modules are not showing up, even though code progression indicates that they should be. 03:25
cpan-p6 New module released to CPAN! Smack (0.1.2) by 03HANENKAMP 03:27
MasterDuke sacomo: setting the environment variable RAKUDO_MODULE_DEBUG=1 should give you more info about what precomp is doing. also, do you have some example code somewhere demonstrating the problem? 03:34
zostay m: my %x = a => 1, b => [1, 2]; class Foo { has Int $.a; has Int @.b; }; Foo.new(|%x) 04:12
camelia Type check failed in assignment to @!b; expected Int but got Array ($[1, 2])
in block <unit> at <tmp> line 1
zostay is there a way to construct %x such that the array gets passed as a list rather than an item?
m: my $x = \(a => 1, b => [1, 2]); class Foo { has Int $.a; has Int @.b; }; Foo.new(|$x) 04:14
camelia ( no output )
zostay ... is one way 04:15
but if I'm building up the input bit by bit, I can't do that and %x.Capture doesn't get me there 04:17
I swear I'm still recovering from GLR
MasterDuke zostay: i'm not actually sure why your second example works, but the first fails because b just happens to contain only Ints, it's not typed as an Array of Ints 05:03
i think the usual description for what perl6 does is "nominal typing". things have to explicitly match "by name", not just by what they contain 05:07
sortiz m: my %x = a => 1, b => [1, 2]; class Foo { has Int $.a; has Int @.b; }; Foo.new(|( for %x.list { $_.freeze; $_ } ).Capture).perl.say 05:25
camelia Foo.new(a => 1, b => Array[Int].new(1, 2))
sortiz A trick to decontainerize b
Geth doc: aa1da7602a | (JJ Merelo)++ | doc/Type/Channel.pod6
Clarify sentence, closes #2638
05:48
synopsebot Link: doc.perl6.org/type/Channel
jmerelo releasable6: status
releasable6 jmerelo, Next release will happen when it's ready. 2 blockers. 319 out of 338 commits logged
jmerelo, Details: gist.github.com/53dc3be90c992c8c9c...532588226f
zostay m: my %x = a => 1, b => [1, 2]; class Foo { has $.a; has @.b; }; dd Foo.new(|%x) 06:07
camelia Foo.new(a => 1, b => [[1, 2],])
zostay MasterDuke: that exhibits the same break with expectation I'm having, I just use the typing to help demonstrate what I was aiming for.
m: my %x = a => 1, b => Array[Int].new(1, 2); class Foo { has Int $.a; has Int @.b; }; Foo.new(|%x) 06:08
camelia Type check failed in assignment to @!b; expected Int but got Array[Int] (Array[Int].new(1, 2))
in block <unit> at <tmp> line 1
sortiz zostay, see my trick above to decontainerize the hash elements. 06:09
zostay Yeah, I see it. I've found that using $ as my sigil tends to lead to fewer problems lately. Maybe I'll just stop using @ and % altogether because the containers really throw me off. 06:11
My own solution was more like: Foo.new(|%x, |%x<b>) 06:15
sortiz m: my %x = a => 1, b => Array[Int].new(1, 2); class Foo { has Int $.a; has Int @.b; }; Foo.new(|( for %x { (.key => .value<>) }).Capture).perl.say 06:21
camelia Foo.new(a => 1, b => Array[Int].new(1, 2))
sortiz o/ #perl6 06:26
antoniogamiz hey :D 08:32
masak antoniogamiz: hi 08:40
antoniogamiz how should I document Complex exponentiation involving zeros (#2632 math section) if .exp method is inherited from Numeric? 08:42
masak you mean like this? 08:52
m: say (1 + i) ** 0
camelia 1+0i
masak or 08:53
m: say (1 + i).exp(0)
camelia 0+0i
masak huh; maybe I don't understand .exp :)
m: say 3.exp(2) 08:55
camelia 8
masak ok, seems I had the arguments reversed.
antoniogamiz masak: yep I refer to 3.exp(2) for example 09:00
antoniogamiz I'll add the infix:<**> method to Complex I think 09:01
jmerelo antoniogamiz++ 09:04
Geth doc: antoniogamiz++ created pull request #2652:
Complex exponentiation involving zeros #2632
09:34
antoniogamiz with that I think math section of #2632 is finished :D 09:36
jmerelo antoniogamiz: not until you address the comments :-) 11:05
xinming_ m: class T { has @!a; method test { @!a[* - 1].perl.say; } }; T.new(:a<x y z>).test(); 15:41
camelia Failure.new(exception => X::OutOfRange.new(what => "Effective index", got => -1, range => "0..^Inf", comment => Any), backtrace => Backtrace.new)
xinming_ m: my @a = <x y z>; (@a[* - 1 ]).perl.say; 15:42
camelia "z"
xinming_ Are these bugs?
m: class T { has @!a; method test { @!a[* - 1].perl.say; }; submethod BUILD (@!a) { } }; T.new(:a<x y z>).test(); 15:43
camelia Too few positionals passed; expected 2 arguments but got 1
in submethod BUILD at <tmp> line 1
in block <unit> at <tmp> line 1
xinming_ m: class T { has @!a; method test { @!a[* - 1].perl.say; }; submethod BUILD (@!a) { } }; T.new(<x y z>).test();
camelia Default constructor for 'T' only takes named arguments
in block <unit> at <tmp> line 1
xinming_ m: class T { has @!a; method test { @!a[* - 1].perl.say; }; submethod BUILD (@!a) { } }; T.new(:a<x y z>).test();
camelia Too few positionals passed; expected 2 arguments but got 1
in submethod BUILD at <tmp> line 1
in block <unit> at <tmp> line 1
xinming_ m: class T { has @!a; method test { @!a[* - 1].perl.say; }; submethod BUILD (:@!a) { } }; T.new(:a<x y z>).test();
camelia "z"
xinming_ hmm, My problem, ignore me 15:44
masak xinming_: the decision (long ago) to make private attrs not initializable through the default .new keeps haunting us. I'm still not sure it was the right call, and I'm very sure it's surprising to people. 15:55
yes, it would expose the names of private attrs to the called. I'm just not sure that's worse than what we have now
Kaiepi i sorted out the unfinished business i had so i'll be able to start my grant work later today! 16:03
sena_kun \o/ 16:12
Kaiepi++ 16:13
SmokeMachine jnthn: where should I open a issue for comma? 16:37
SmokeMachine .tell jnhtn where should I open a issue for comma? 16:38
yoleaux SmokeMachine: I'll pass your message to jnhtn.
SmokeMachine .tell jnthn its saying that there are some errors here... usercontent.irccloud-cdn.com/file/.../image.png 16:39
yoleaux SmokeMachine: I'll pass your message to jnthn.
sena_kun there are indeed errors, as `model` is a custom MOP-created type of class, I suspect. So while actual Perl 6 implementation during compilation process knows the keyword is correct as it is in the symbol table(simply speaking), our parser has no way to do that as we cannot execute code during parsing. 16:43
we do support `monitor` though 16:45
sena_kun SmokeMachine, about the feedback. 16:51
you can create an account on the website and then use our feedback form.
sena_kun SmokeMachine, you want to start from "Buy" button, which will help you to create an account, and then you just don't make the actual subscription if you want to play out with community version for now. 16:54
SmokeMachine sena_kun: any way to open a PR to add model keyword?
sena_kun SmokeMachine, how do you plan to create a PR without sources available? A bug report/issue can be opened using the feedback form, so 1)create an account; 2)use it. 16:56
SmokeMachine sena_kun: :( good point...
Ill do it...
sena_kun SmokeMachine, you can ask me if there are any questions. 16:57
Altreus Is there magic I can do to debug what a function returns without messing with every single return statement? 17:11
sena_kun my $foo = func(); note $foo.^name? 17:12
or $foo.WHAT if you want, but `^name` is better.
or you meant something other than that?
Altreus So like
If I use the function in many places I have to fudge with the calls 17:13
And if the function has a few return statements I have to fudge with those
I thought, maybe there's some sort of phaser that can see the return value just before the function actually returns it
That way I don't have to add debug to multiple places, be it the call sites or the return parts 17:14
sena_kun have you considered using a wrapper?
I mean, give me a second... 17:15
docs.perl6.org/language/functions#...d_routines <- see this.
tobs m: sub f { rand }; &f.wrap({ my $res = callsame; say "f returned $res this time"; $res }); say f # sena_kun was faster 17:16
camelia f returned 0.168257101076411 this time
0.168257101076411
Altreus ah yeah this could do it!
sena_kun you can possibly do `$func.wrap({ my $res = callsame($foo-args); note $res; return $res; })` and just use it.
Altreus thanks :)
sena_kun oops, I am not so fast. :)
but the code is cooler than my pseudocode, so tobs++
Altreus I knew perl6 wouldn't let me down :D 17:17
Altreus and I found the (a) bug, nice 17:18
gonna have to remember this
Kaiepi .tell timotimo you've done networking work right? can you take a look at github.com/rakudo/rakudo/issues/2733 and comment on it? 18:07
yoleaux Kaiepi: I'll pass your message to timotimo.
Geth doc: 4f333647cc | cfa++ | doc/Language/syntax.pod6
Typo.
19:57
synopsebot Link: doc.perl6.org/language/syntax
sena_kun m: my (@a, $b = 'foo'); say $b; 20:11
camelia (Any)
sena_kun I seem to misunderstand something... 20:12
m: my (@a, $b) = [], "foo"; say $b; 20:13
camelia (Any)
sena_kun m: my ($b, @a) = "foo", []; say $b; 20:14
camelia foo
Juerd I'm surprised my (@a, $b = 'foo'); is valid syntax even :) 20:26
sena_kun well, I'd feel it very natural to work, but odds are against me tonight. :) 20:27
I guess this time feels < reals. ;) 20:28
Juerd I find binding easier to understand most of the time, when it comes to listy things
m: my (@a, $b) := [], "foo"; say $b; 20:29
camelia foo
cpan-p6 New module released to CPAN! TAP (0.0.9) by 03LEONT 21:57
cpan-p6 New module released to CPAN! App-Prove6 (0.0.10) by 03LEONT 22:12
cono m: &[/].arity.say 22:14
camelia 0
cono any ideas why infix isn't 2 ?
m: &[/].say
camelia &infix:</>
cono rakudo knows that this is infix 22:15
tobs m: &infix:</>.candidates».arity.say 22:17
camelia (0 1 2 2 2 2 2 2 2 2 2 2 2 2)
tobs cono: it is a multi which has a 0-arity candidate. Maybe that's why. 22:18
or maybe just because it's a multi and arity isn't well-defined anymore.
leont Yeah. multis can have an arity, but usually they're (|) 22:20
cono ah,, thanks 22:21
timotimo there is not only arity but also count 23:11
m: say &infix:</>.count 23:12
camelia 2
timotimo cono: ^ this could clear things up 23:13
Kaiepi huh, i had no idea rakudo had some deprecated to-json/from-json subs until the regex in one of them broke a build 23:35
timotimo ouch :) 23:36
Kaiepi why is \x10FFFF an illegal endpoint for a character class on the jvm?
timotimo was rakudo properly outputting the deprecation messages and it was just that nobody checked the logs? 23:37
or was the mecanism broken somehow?
Kaiepi not sure, i'll paste the error message once the build errors out again 23:38
guifa What is the module to ‘use’ to be able to smart match against resources?
timotimo what are resources? 23:39
guifa In a module
timotimo then what does smart match mean? 23:39
guifa my $foo = %*RESOURCES<bar>; if $foo ~~ Resource (that’s what it returns with a WHAT)
timotimo oh 23:40
guifa Want to allow someone to pass a Str or a Resource reference
timotimo try .^long_name or so
guifa (for lazy loading)
guifa doesn’t think it’s best to load 40+ localization files if only one will ultimately get used :-) 23:41
timotimo aye
i hate how muchg all these localization files take up on my computer
guifa They ideally shouldn’t take up much space at all. I think the biggest problem is when there’s lots of of them that are all like 1/100th the minimum block size though and there’s 100 of them. But I’ve not seen a localization format yet that supports merging the files together. 23:43
Kaiepi timotimo, pastebin.com/g1CzC59j
guifa Actually, maybe I could support passing a zip file and just extract the ones as necessary
Is there a way to get a listing of the files in the resources folder? I tried .keys, and {*} and such but they all errored out 23:52
timotimo damn thats weird 23:53
sorry i haven't used the resouzrces mechanism much at all yet 23:54
kaiepi, is that a regex in the new implementration that recently got pulled in from json::fast?
Kaiepi it appears to be the case timotimo 23:55
guifa Yeah same. It *seems* that you either have to know the files names in advance. Not impossible to work with but a bit more complex for coding :-)
timotimo hm, was there a way to get at the current distribution thingie? that should have the meta info in it 23:57
tadzik mmm, Commma! 23:59