🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
Voldenet m: my %h = <a b c d e f>; %h[]:k.say; %h<>:k.say 00:04
camelia (0)
(a e c)
Voldenet m: my %h = <a b c d e f>; %h[]:k.say; %h[]:v.say; %h<>:k.say; %h<>:v.say 00:07
camelia (0)
(e => f c => d a => b)
(e c a)
(f d b)
Voldenet xinming: ^ that's may be an example explaining the difference :)
rypervenche libertas: Set your PATH. Since at some point they're going to fix your Void package and then all you'll need to do is remove the PATH export. 00:08
Voldenet m: 1[]:v.say; 1[].k.say; 00:09
camelia (1)
No such method 'k' for invocant of type 'Int'. Did you mean 'kv'?
in block <unit> at <tmp> line 1
Voldenet m: 1[]:v.say; 1[]:k.say;
camelia (1)
(0)
[Coke] it would be nifty if the cpan-raku bot also gave a link to the new modules. 00:16
Voldenet xinming: more specifically, <> uses github.com/rakudo/rakudo/blob/mast...e.pm6#L158 and [] uses github.com/rakudo/rakudo/blob/mast...e.pm6#L505 - the template for those methods is here github.com/rakudo/rakudo/blob/mast...SLICE.raku 01:22
Kaiepi releasable6, statsu 04:30
releasable6 Kaiepi, I cannot recognize this command. See wiki for some examples: github.com/Raku/whateverable/wiki/Releasable
Kaiepi releasable6, status
releasable6 Kaiepi, Next release in ≈7 days and ≈14 hours. 4 blockers. 0 out of 209 commits logged
Kaiepi, Details: gist.github.com/f19850f477e7894537...d6de2e557a
Kaiepi if i'm writing a lazy gather with a for loop in it for taking values, do i put lazy before both the gather and for or just the gather? 12:10
xinming Kaiepi: You need lazy 12:12
Altreus Where are ::?CLASS and ::?ROLE documented?
xinming Kaiepi: something like this my $res := lazy gather inflate-config(%config); 12:14
Kaiepi: This is the code in my script.
Kaiepi a golf for what i have is `lazy gather { my @foo = ...; for @foo { take $_ } }` 12:18
xinming Kaiepi: Yea 12:19
Kaiepi Altreus, docs.raku.org/language/variables#i...::%3FCLASS apparently, but that's not very extensive...
::?CLASS/$?CLASS mean different things depending on what kind of type you use it in 12:21
with classes it's always the class you're using it in itself, but with roles it's the class the role gets mixed into or punned as iirc
::?ROLE/$?ROLE is more straightforward, it's just the role itself you're using it in 12:23
Kaiepi oh docs.raku.org/language/variables#i...-$%3FCLASS talks about the rest of the symbols like ::?CLASS/::?ROLE 12:25
Altreus > with roles it's the class the role gets mixed into 12:28
No it's not: Multi method 'from-json' with signature :(API::Discord::JSONy:D: $json, *%_) must be implemented by API::Discord::Channel::API::Discord::Channel::ButReal
API::Discord::JSONy is the name of the role that contains ::?CLASS at that point
Altreus That may also be a bug :P 12:31
I've asked the same question on my issue: github.com/rakudo/rakudo/issues/34...-586585404 12:32
That doc also doesn't say ::?ROLE at all 12:33
tbrowder .tell lizmat see what you started: github.com/tbrowder/App-PigLatin-R.../README.md 12:44
Altreus interesting - If there's only one method of a multi, or it's not multi, ::?CLASS resolves to the consuming class
apparently it's more complex than that :D 12:47
Altreus I can't reproduce the message I got :/ 12:53
Is there a handles but for attributes instead of methods, so that attribute assignment is passed through to the delegate object? 13:14
Altreus Hmm, looks like setting attributes is already handled with an rw method, so handles should really export that behaviour 13:20
Altreus Once again, something that works in a simple case does not work in practice 13:24
lizmat twitter.com/gellyfish/status/12286...8646059008 # Alpine Linux anyone? 15:06
cpan-raku New module released to CPAN! Gnome::Gtk3 (0.23.2) by 03MARTIMM 15:26
guifa gah. When Raku is TOO Unicode smart 17:00
Tried to put something in quotes in a string, only to find realize it was a combining mark and internally Raku set the quote + mark as a separate character and didn’t recognize it as starting with a combiner
lizmat so, do you think raku did the wrong thing ? 17:03
Geth doc/fix-cont: 65adef3976 | (Stoned Elipot)++ | doc/Language/operators.pod6
Fix index entries and descriptions of (cont), ∋ and ∌
17:22
doc: stoned++ created pull request #3219:
Fix index entries and descriptions of (cont), ∋ and ∌
17:25
Geth doc: 65adef3976 | (Stoned Elipot)++ | doc/Language/operators.pod6
Fix index entries and descriptions of (cont), ∋ and ∌
17:39
doc: e842026200 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/operators.pod6
Merge pull request #3219 from Raku/fix-cont

Fix index entries and descriptions of (cont), ∋ and ∌
linkable6 Link: docs.raku.org/language/operators
Geth doc: a8d1d07f1f | (Stoned Elipot)++ | doc/Language/operators.pod6
Fix examples for ⊈
18:07
linkable6 Link: docs.raku.org/language/operators
guifa lizmat: Eh, maybe maybe not. There are very good reasons for both ways and either way will lead inevitably to gotchas 18:53
But the way that Raku is doing it is just fine, the number of times that someone will work with combiner marks at the beginnign of the string is small. 18:57
Where it might really catch people is in regex when trying to parse other standards. I know the JSON::Tiny had to do some slightly weird stuff (because the sequence quote, combining-tilde, quote, is perfectly valid as a string element in JSON) 18:58
TreyHarris I jush discovered I have .precomp directories scattered virtually everywhere in my homedir, including in places where there's definitely no Raku code (like ~/.ssh/.precomp). Do new .precomps just get created whatever the cwd is when a command is issued? 20:28
s/command is issued/Raku program is invoked/ 20:29
sena_kun TreyHarris: did you by accident set PERL6LIB to home?
sena_kun not necessarily now, but before 20:30
TreyHarris sena_kun: oh, it takes the first argument of PERL6LIB?
that explains it, I errantly had '.' there before as we discussed a couple weeks ago
sena_kun TreyHarris: it isn't, but on compiling it searches for everything in PERL6LIB, so it is likely a consequence of this. :( 20:31
TreyHarris so even if there were no libraries in ~/.ssh, if $perl6lib[1] were '.', it would.... oh? huh
sena_kun that's my guess, not a truth. :S
but even so, it seems odd to me to create .precomp if there are no files to compile around 20:32
TreyHarris I haven't finished spot-checking but I think in those cases the contents are just like .precomp/70DADB84C1F635367560F789D898FE305353E566/0B/0BDF8C54D33921FEA066491D8D13C96A7CB144B9.repo-id as the only regular file 20:33
sena_kun maybe it is wise to make it lazy until there will be anything to put in there... or not. 20:34
Geth doc: 18b42f2cfc | (Stoned Elipot)++ | doc/Language/operators.pod6
actually use the Unicode character U+220C
21:18
linkable6 Link: docs.raku.org/language/operators
Kaiepi did something change with how threading works?
i use this short piece of code to test the thread safety of Trait::Traced and get an estimate on whether my changes affect its performance fpaste.scsys.co.uk/587831 21:19
on 2020.01 this would trace on 2-3 threads at once but now it always traces as if it were entirely synchronous on master 21:20
oh, it sometimes does manage to trace on a couple threads, but not very often 21:26
TreyHarris sena_kun: searching each of the 423 .precomp dirs in my homedir, in all the ones that contain just 1-3 plain files, they're all '.lock' or '*.repo-id'. starting with dirs that have 4 or more, they start containing files with binary compunit data.
But in even one that has 48 plain files (cloning Raku/ecosystem), it has 46 *.repo-id's, one .lock, and one data blob 21:27
okay, so, long story short: can I configure a single place for .precomp to go? given the mishegas over when rakudo attempts to write .precomps to system directories where the user has no write access, I'm guessing the answer is no? 21:29
cpan-raku New module released to CPAN! Sys::Lastlog (0.0.12) by 03JSTOWE 21:41
Geth doc: 9de03a4d2b | (Tom Browder)++ (committed using GitHub Web editor) | doc/Type/Cool.pod6
Add the missing atan2 subroutine signature

Better explain the method and function arguments. Add examples of the sub use.
21:44
linkable6 Link: docs.raku.org/type/Cool
Altreus lizmat: do you exist? Can you help me understand what I did wrong? gist.github.com/Altreus/f9e40a1e6b...97f4f3a92a 22:28
if anything
tobs I guess you had the repl .gist the attribute containing the delayed object, which caused it to spring into existence. 22:34
Geth doc: fd79b73ffc | (Trey Harris)++ | doc/Type/Cool.pod6
atan2: adjust wording a bit, fix formatting

Swapping "the x-axis" and the description of the vector makes the sentence a bit easier to understand, IMO. I think it's useful to mention that unary `atan2` is identical to `atan`.
Also re-wrap atan2 section and remove trailing whitespace
22:39
linkable6 Link: docs.raku.org/type/Cool
rypervenche Is there a way to turn the Str "123..234" into the range 123..234 ? 22:54
I've got a CLI option that accepts a range with - between two numbers. I'm doing a smartmatch to make sure the correct syntax is used, as well as replacing the - with ... It turns it into a string though and I'm not sure how to convert that into a range. 22:57
s/.../../ rather 22:58
TreyHarris m: my $x = "231"; my $y = "235"; say(eager $x.Numeric..$y.Numeric); 23:00
camelia (231 232 233 234 235)
TreyHarris rypervenche: something like ^ ?
rypervenche Hmmm, I guess I might have to pull out the two numbers and then create the list that way. I was hoping to be able to do something like this and then somehow convert it to a range: 23:03
$custom ~~ s/ (\d**1..3) '-' (\d**1..3) /($0..$1)/
TreyHarris Altreus: See gist.github.com/treyharris/e029f2c...1e41ab2854 -- tobs is exactly right 23:04
guifa rypervenche: this is where making little subs is really nice 23:08
sub to-range (\s) { Range.new: |s.comb(/<digit>+/)».Int }; say "182..439".&to-range
m: sub to-range (\s) { Range.new: |s.comb(/<digit>+/)».Int }; say "182..439".&to-range
camelia 182..439
guifa now you can .&to-range on any string you want
rypervenche ooOOoo, there's that magic that I didn't know how to do. I'll read up on all of those pieces. Thanks.
Out of curiosity, why a sigilless variable? 23:09
guifa No particular reason in this case 23:13
TreyHarris rypervenche: you can't modify a sigilless variable, so it makes that explicit
sigilless parameter, I mean
guifa ^^ that’s one of the reasons I use it in some of my subs, but strictly speaking, all variables are unmodifiable unless declared rewritable or copies 23:14
the sigilless just gives you a bit more visual reminder of “I’m constant”
rypervenche Ahhh
TreyHarris also, generally, using sigilless's in signatures makes it more likely that a calling syntax will conform if you're using lists as tuples or Slips or such 23:15
guifa Also IIRC there’s some optizations that can happen in the background because of some …. 23:16
guifa waves hands as if speaking gibberish
… and then profit
rypervenche nodnods. 23:17
Altreus TreyHarris: tobs: thanks! How pesky! 23:20
TreyHarris Well, REPL by their very name will evaluate-and-print, so any lazy thing will be evaluated unless you go to an effort to protect it from that 23:21
guifa as to the rest of the sub, it’s pretty straightforward. But the .&sub syntax is nice when you wish you had a method for something but it doesn’t exist 23:23
guifa It works great for writing custom coercers 23:23
Altreus It didn't occur to me that that would count as evaluating :D 23:26
lizmat: I hope this is fixable github.com/lizmat/Object-Delayed/issues/5
I am going to bed :)
TreyHarris one thing to keep in mind using comb like that... this is perfectly syntactical and perfectly wrong:
Altreus: anything you type to a REPL is evaluated 23:27
unless it has an escape character like in some REPL's like colon for :help
m: sub to-range (\s) { Range.new: |s.comb(/<digit>+/) }; say eager ("182..193".&to-range) 23:28
camelia (182 183 192 193)
guifa ^^ correct. comb always gives you a string, gotta be careful with that 23:31
lizmat TreyHarris: if you use .comb with a Regex, you can also specify :match to get Match objects 23:46
m: dd "a".comb(/./,:match)
camelia (Match.new(:orig("a"), :from(0), :pos(1)),).Seq
stigo rakudo 2020.01 is now in nixpkgs-unstable \o/ 23:47
MasterDuke m: say (EVAL "2..5").WHAT 23:48
camelia (Range)