🦋 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.
00:01 MilkmanDan joined 00:02 thundergnat joined
thundergnat rypervenche: There isn't really a UInt type. Just constraining to non negative should be sufficient. (There's uint, but that's a native type) 00:04
m: subset Non-negative where { $_ ~~ Int|Rat and $_ >= 0 }; sub test (Non-negative $t) { dd $t }; .&test for 1/2, 2, '3';
camelia 0.5
Constraint type check failed in binding to parameter '$t'; expected Non-negative but got Str ("3")
in sub test at <tmp> line 1
in block <unit> at <tmp> line 1
thundergnat Although it doesn't seem to complain about UInt. 00:05
m: subset Non-negative where { $_ ~~ UInt|Rat and $_ >= 0 }; sub test (Non-negative $t) { dd $t }; .&test for 1/2, 2, '3';
camelia 0.5
Constraint type check failed in binding to parameter '$t'; expected Non-negative but got Str ("3")
in sub test at <tmp> line 1
in block <unit> at <tmp> line 1
guifa rypervenche: I would do subset NonnegativeRat where { $^i > 0 && $^i ~~ Int | Rat }
rypervenche guifa: You're really loving those positional arguments, huh? 00:09
guifa ha I guess the i-for-integer is strong with me 00:10
00:15 sena_kun joined 00:16 MilkmanDan left, Altai-man left 00:21 MilkmanDan joined
rypervenche Nice, got my little script working. :) That took a while, but the end result is a lot shorter and cleaner than it was when I started. repl.it/@rypervenche/Dollar-dollar...#main.raku 00:21
Not quite happy with how I have to use those variable names for the decontainerizing, so I'll have to figure out a better way to do that. 00:22
codesections rypervenche: That does look pretty short/clean, thanks for sharing :) Which variable names do you not like? 00:48
rypervenche codesections: The :$key and :$variable that I have to use or the decont doesn't work. I need to go through my history, I think someone gave me another possible way to do it. 00:49
Since my sorting of the baghash creates a sequence of pairs. 00:50
codesections You could just do .key and .value in the body of the for loop 00:52
which doesn't really save anything there, but gets rid of the declaration 00:53
01:04 Kaiepi left 01:05 Kaiepi joined 01:06 vike left 01:08 vike joined 01:16 jmcgnh joined 01:34 aborazmeh joined, aborazmeh left, aborazmeh joined 01:35 epony left 01:37 epony joined, Doc_Holliwood left 01:45 molaf left 01:49 defaultxr joined 01:58 molaf joined
rypervenche Ooh, that's cool. I never knew how $_ worked with multiple variables like that. 02:00
Err no, it's my misinterpretation of it. Still a single item. Got it. 02:01
I think that was my problem. I was seeing it as two things instead of a single pair. 02:02
02:06 Manifest0 left, Manifest0 joined 02:42 gnufr33dom joined 02:46 vrurg_ left 02:50 MilkmanDan left, MilkmanDan joined 02:51 vrurg joined 03:03 nicholatian left, nicholatian joined 03:04 a3r0 left, karupanerura left, a3r0 joined, marcusr left 03:05 skids left, dataangel left, dataangel joined, skids joined 03:06 karupanerura joined 03:08 zacts joined 03:09 marcusr joined 03:14 Altai-man joined 03:16 MilkmanDan left, vrurg left 03:17 sena_kun left, vrurg joined 03:26 bdju left, bdju joined 04:08 Kaiepi left 04:09 Kaiepi joined 04:10 aborazmeh left 04:13 Kaiepi left, Kaiepi joined 04:27 MilkmanDan joined 04:35 tejr left 04:47 tejr joined
raku-bridge <stu002> Is there a shorthand notation for multiple "does" mixins? E.g. for class A does B does C does D something like class A does (A, B, C) ? 04:48
04:49 cpage left 04:59 leont joined 05:15 sena_kun joined, gnufr33dom left 05:17 Altai-man left, skids left 05:20 bocaneri joined 05:21 zacts left, gnufr33dom joined 05:25 Doc_Holliwood joined 05:28 zacts joined 05:35 lucasb left 06:00 aborazmeh joined, aborazmeh left, aborazmeh joined 06:02 cpan-raku left 06:03 cpan-raku joined, cpan-raku left, cpan-raku joined 06:06 Sgeo left 06:18 MilkmanDan left 06:20 gnufr33dom left 06:25 gnufr33dom joined
Geth advent: Leont++ created pull request #59:
Add article for RFC22
06:35 aborazmeh left 06:43 stoned75 joined
Geth advent: cc578b3021 | (Leon Timmermans)++ | 20th/articles/rfc22.md
Add article for RFC22
advent: 7172ad1470 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 20th/articles/rfc22.md
Merge pull request #59 from Leont/rfc22

Add article for RFC22
06:51 kensanata joined 06:52 zacts left, ensamvarg3 joined
leont Confused now, he gave review comments and then merged it 07:08
07:14 Altai-man joined 07:16 sena_kun left 07:29 rindolf joined 07:31 dolmen joined 07:38 dakkar joined 08:03 oddp joined 08:04 aborazmeh joined, aborazmeh left, aborazmeh joined 08:29 MilkmanDan joined
kensanata Sounds like "good enough to merge but I'd love to see these minor points addressed in future patches"? 08:33
tellable6 2020-06-25T22:40:08Z #raku <AlexDaniel> kensanata: if you're on a debian derivative, any reason you can't use rakudo that is packaged in the repos?
2020-06-25T22:42:52Z #raku <AlexDaniel> kensanata: ah, I've read your last message. Rakudo 2018.12 is not bad at all, but you can easily have 2020.05.1 from unstable
kensanata Hah. 08:34
08:43 dolmen left 08:46 dolmen joined 08:52 oddp left 08:53 rockxloose left 08:54 rockxloose joined 08:56 aborazmeh left 09:05 kensanata left, kensanata joined 09:09 dolmen left 09:13 dolmen joined 09:15 sena_kun joined 09:17 Altai-man left 09:18 Prince213 joined 09:34 patrickb joined 09:35 Black_Ribbon left 09:39 Prince213 left 09:55 tejr left 09:57 thundergnat left 10:02 tejr joined 10:04 Prince213 joined 10:05 Doc_Holliwood left 10:06 stux|RC left 10:09 stux|RC joined 10:14 JJMerelo joined
kensanata I'm looking at my old Perl6+Cro project and can't get stuff install anymore. When I run zef install . I'm getting the error "Could not find Oddmuse::Storage::File::Test in: ... file#/home/alex/src/oddmuse6" which is true, since it's in in the lib/ subdirectory. How do I tell zef that? 10:20
In my Makefile, I have a test target that runs prove6 -l -j=$(jobs) t – what's the equivalent of prove6 these days? 10:21
Yikes, when I use RAKULIB=lib zef install . I'm getting "Cannot look up attributes in a NQPMu type object" ... 10:24
kensanata reads docs.raku.org/language/modules again... 10:26
kensanata replaces all .pm6 extensions with .rakumod, all .t extensions with .rakutest, adds use lib 'lib'; after every use Test; ... 10:33
kensanata runs zef install App::Prove6 ... I'm starting to feel that when I'm done I'm going to write a blog post. 10:34
10:36 molaf left 10:53 perotti30 joined
perotti30 hi 10:53
10:53 perotti30 left 10:59 patrickb left
lizmat ++kensanata 11:11
11:14 Altai-man joined 11:17 sena_kun left
kensanata I still get that weird error "Cannot look up attributes in a NQPMu type object" which forces me to delete lib/.precomp after some changes to my source files. 11:17
How weird.
And zef still doesn't install the latest Algorithm::Diff. I got my patch into github.com/Takadonet/Algorithm--Diff.git two years ago. What needs to happen for this to be "released"? 11:18
11:18 JJMerelo left
kensanata But other than that: "All tests successful." TEARS OF JOY!! 11:19
Interesting, my make test works, but zef install . still doesn't work: apparently the use lib 'lib' has to come first. Strange that this wasn't necessary for my own testing. 11:26
11:27 dolmen left 11:39 molaf joined
cpan-raku New module released to CPAN! Oddmuse6 (0.0.5) by 03SCHROEDER 11:44
kensanata Wohoooo
Altai-man kensanata++ 11:46
kensanata, by the way, `use lib 'lib` should not be necessary, no? 11:47
kensanata Altai-man: I'm not sure. I got a ton of errors about modules not being found. 11:49
11:49 dolmen joined
kensanata (Before installation) 11:49
As in: trying to run my tests. 11:50
Altai-man kensanata, can you check if all the files presumably missing are specified in `provides` section of META6.json? 11:51
kensanata At one point that was a problem (they were still listed using .p6 extensions).
Altai-man: I'd be happy to be proven wrong, though. I will zef uninstall the thing and then I'll take a look at github.com/kensanata/oddmuse6/blob...s.rakutest – I'll simply delete line 17, OK? 11:52
Altai-man kensanata, yes. I mean, it will work, but this path is relative and it might go bad if tests are run from other directory (though unlikely). If all files are specified in META6.json, you should be able to safely test things using `zef test` as long as META6.json is correct. 11:54
11:55 ab5tract joined, ab5tract_ joined
kensanata Altai-man: You never run raku t/foo.rakutest? 11:57
Altai-man: This is my first problem: "Error while compiling /home/alex/src/oddmuse6/t/changes.rakutest Could not find Oddmuse::Storage::File::Test" as I'm running raku t/changes.rakutest.
I'm not sure how to run zef test. What do I specify? I usually just use raku t/foo.t, or prove6 t. 11:58
When I run zef test . I also get the same error: "Error while compiling /home/alex/src/oddmuse6/t/changes.rakutest [Oddmuse6] Could not find Oddmuse::Storage::File::Test"
11:59 ab5tract left
kensanata Hm, I guess that module is missing in github.com/kensanata/oddmuse6/blob...META6.json 12:00
How do I specify this Oddmuse::Storage::File::Test module which is not required for installation?
Altai-man kensanata, move this file to e.g. `t/lib` directory and instead of `use lib 'lib'` use, for example, `use lib $*PROGRAM.parent.add("lib");`, which will run file relative to currently executed one. 12:03
See e.g. github.com/Altai-man/cro-ldap/tree/master/t for example
kensanata Altai-man: OK, so I move the file lib/Oddmuse/Storage/File/Test.rakumod to t/lib/Oddmuse/Storage/File/Test.rakumod and changed use lib 'lib' to use lib $*PROGRAM.parent.add("lib"), and now I get a different error: "Error while compiling /home/alex/src/oddmuse6/t/changes.rakutest Could not find Oddmuse::Storage" (which is in lib, not t/lib) and is listed in META6.json. 12:09
Altai-man kensanata, how do you run tests? 12:10
kensanata So I guess I can no longer run tests directly using raku? What about prove6, do you use it? And how can I run zef test such that it only runs this one test?
Altai-man: I use raku t/foo.rakutest, or prove6 t 12:11
And of course zef install does something that I don't understand but also involves running tests.
Altai-man kensanata, are you running executable for prove to work with passing it -Ilib? 12:12
E.g. `prove --jobs=4 -e "perl6-m -Ilib" t/` or something.
kensanata My Makefile has `prove6 -l -j $(jobs) t`
Altai-man Hmm, `-l` should make it work. :S 12:13
kensanata github.com/kensanata/oddmuse6/blob...kefile#L22 for context 12:14
Altai-man: I dunno, it seems to me that I want three ways of running tests: alone, with maximum ouput; in parallel, with summarised output; by zef, because that's what it does.
Altai-man: As it stands, both `raku t/changes.rakutest` and `prove6 -l -j 4 t` complaing about not finding Oddmuse6::Storage; they do list the directories searched. For prove6, file#/home/alex/src/oddmuse6/lib is listed, but /home/alex/src/oddmuse6/t/lib is not. When calling raku directly, file#/home/alex/src/oddmuse6/t/lib is listed but /home/alex/src/oddmuse6/lib is not. 12:17
So... I dunno, looks like there is no way to make it work like you did? 12:18
Altai-man kensanata, I can't reproduce it. 12:19
kensanata, if I run `raku -Ilib t/changes.rakutest` it works for me.
Oh, wait
12:19 patrickb joined
kensanata You add -Ilib 12:19
Altai-man Yes?
kensanata I did not. 12:20
OK, now it works for all three use cases. 12:26
Altai-man kensanata, the thing here is that paths to look up for modules need to be specified somehow. It can be done either using command line with `raku -I$relative-path-to-include` or inside the script or zef does that for you. For your cases, prove and prove6 jsut runsyour specified executable, so it effectively equals to "run raku ..." for each file", thus it needs the -I to work. Single file is the same, needs -I. And zef is smart enough to know what to do. 12:27
Thus you can avoid having `use lib 'lib'` in your code and save some pains.
kensanata I'll just believe you that use lib 'lib' is painful. :) 12:28
Altai-man Might be. :)
kensanata Committed and pushed; thanks, Altai-man 12:31
Altai-man yw
codesections A Hash is mutable (keys can be added/deleted and values can be changed); a Map is immutable. I was thinking Raku had a way to have an Associative with fixed keys but mutable values, but I can't recall what that would be. A Map containing scalars, maybe? 12:32
jnthn codesections: Yes, that should do it 12:39
codesections Thanks! What's the syntax for that? I thought it was the below, but that's not quite working: 12:41
m: my $map := %(a => my $ = 1).Map; $map<a> += 1;
camelia Cannot modify an immutable Int (1)
in block <unit> at <tmp> line 1
jnthn m: my %m := Map.new((a => my $, b => my $)); %m<a>++; %m<b>++ xx 2; dd %m 12:44
camelia Map.new((:a(1),:b(2)))
codesections Thanks :)
12:46 Noisytoot left
codesections (also, I totally did *not* realize that the list repetition operator could be applied to functions. That's very cool! So a bonus thanks for showing me that for free :) ) 12:47
jnthn That's...uh...very lazy of me :D But yeah, it thunks its left hand side. :) 12:48
m: say rand xx 5
camelia (0.36513925719676554 0.1644709703389835 0.7754803132304698 0.604364218723919 0.6034782571067162)
codesections Oh, for anyone else interested in this, I just realized that my original attempt that the Map-with-scalars syntax with .Map instead of Map.new was only wrong because I didn't need the % 12:56
m: my $map := (a => my $ = 1).Map; say $map<a> += 1;
camelia 2
12:59 Noisytoot joined 13:00 _jrjsmrtn joined 13:01 gnufr33dom left 13:02 __jrjsmrtn__ left 13:08 aborazmeh joined, aborazmeh left, aborazmeh joined 13:15 holyghost joined, sena_kun joined 13:17 Altai-man left, Prince213 left 13:24 Kaiepi left 13:26 Kaiepi joined 13:36 gnufr33dom joined 13:38 saadsadd joined 13:42 gnufr33dom left 13:47 gnufr33dom joined 13:50 saadsadd left 13:51 Kaiepi left 13:56 Prince213 joined 13:57 skids joined 14:30 aborazmeh left, demostanis joined
demostanis Hello guys! Can anyone rate my Github pages? hubtodate.mooo.com/ 14:30
For now, the only document almost finished is "Creating your own rules" 14:31
14:41 Sgeo joined 14:55 zacts joined 14:59 gnufr33dom left 15:14 Altai-man joined 15:16 sena_kun left 15:26 kensanata left
xinming_ Is there a way to specify .precomp $ROOT dir globally? 15:26
moritz demostanis: feedback for your website: what the heck is it about? 15:27
it does something automatically with github, but what, and more importantly, why? What problem does it solve? why should I care? 15:28
you should try to answer these questions as concisely as possible at the very top
demostanis As said, reasons *why* you should use it are in the GitHub's README. Should I paste it in the main page of the website? 15:31
Many distributions lack some software which can be found on GitHub, most of the time because they are not popular enough. You have the choice to install the binaries at the risk of keeping outdated software on your computer... OR to use HubToDate.
moritz demostanis: well, you wanted feedback on the website, that was my feeddback :-) 15:32
demostanis I'll just paste the Github's README... 15:33
tadzik if you advertise a website, it's probably more effective to describe it on the website rather than a github repo's README that people would otherwise have to manually check (after they learn that it exists) :)
demostanis It explains well
15:33 JJMerelo joined
moritz so, let me try to rephrase, to see if I understood it 15:34
it's some kind of "package manager" that keeps software up-to-date that I use that's hosted on github
JJMerelo m: my %þ = :is-mighty; say Q:h«Þor %þ»
camelia Þor %þ
tellable6 2020-08-11T14:25:12Z #raku-dev <[Coke]> jjmerelo: I owe you an article, planning to finish it after I get out of $dayjob today
moritz correct?
JJMerelo .tell [Coke] thanks! 15:35
tellable6 JJMerelo, I'll pass your message to [Coke]
demostanis Yep
moritz then my next question is: with what kind of software does it work? how does it prevent things from breaking by pulling to the latest version?
rypervenche Is =cut used in Raku? Or is that a Perl thing? 15:37
15:37 Doc_Holliwood joined
JJMerelo rypervenche Perl 15:37
xinming_ m: my $sig = :(Int $y); $sig.raku.say; ((3,) ~~ $sig).raku.say;
camelia :(Int $y)
demostanis moritz: With any software, the user needs to provide in rules files how to install it using a shell command
JJMerelo m: my %þ = :is-mighty; say q:h«Þor %þ»
camelia Þor %þ
moritz rypervenche: =cut isn't used in Raku 15:38
demostanis It doesn't pull directly the Github repository, it fetches releases
xinming_ Int his example, Is it possible to extract the value of $y after $sig matched?
JJMerelo m: my %þ = :is-mighty; say «Þor %þ»
camelia (Þor %þ)
rypervenche Ok, thanks. I'm upading a PR for Rouge to hopefully get Raku into Gitlab's syntax highlighting.
JJMerelo m: my %þ = :is-mighty; say «Þor %þ»:h
camelia 5===SORRY!5=== Error while compiling <tmp>
You can't adverb «Þor %þ»
at <tmp>:1
------> 3my %þ = :is-mighty; say «Þor %þ»:h7⏏5<EOL>
expecting any of:
pair value
demostanis hubtodate.mooo.com/ Better?
xinming_ What I mean is, binding the data to signatures, and extract data from the signature object.
JJMerelo m: my %þ = :is-mighty; say "Þor %þ"
camelia Þor %þ
JJMerelo m: my %þ = :is-mighty; say "Þor {%þ}"
camelia Þor is-mighty True
jdv79 aren't github release just tags with metadata? that's "in the repo".
JJMerelo m: my %þ = :is-mighty; say q:h"Þor {%þ}"
camelia Þor {%þ}
JJMerelo m: my %þ = :is-mighty; say Q:h"Þor {%þ}" 15:39
camelia Þor {%þ}
demostanis jdv79: It's often standalone executables, or everything needed to run the software inside a tar archive without having to pull the entire codebase 15:40
15:42 kensanata joined
JJMerelo m: my %þ = :is-mighty; say q:h"Þor %þ<>" 15:44
camelia Þor is-mighty True
JJMerelo m: my %þ = :is-mighty; say "Þor %þ<>"
camelia Þor is-mighty True
15:44 dolmen left
JJMerelo m: my %þ = :is-mighty; say "Þor %þ" 15:44
camelia Þor %þ
JJMerelo m: my %þ = :is-mighty; say q:h"Þor %þ"
camelia Þor %þ
JJMerelo m: my %þ = :is-mighty; say q:h /Þor %þ/ 15:46
camelia Þor %þ
JJMerelo m: my %þ = :is-mighty; say q:h /Þor %þ<>/
camelia Þor is-mighty True
JJMerelo m: my %þ = :is-mighty; say "Þor %þ<>"
camelia Þor is-mighty True
jdv79 oh, right. you can add other files in addition to the tag. 15:47
JJMerelo m: my %þ = :is-mighty; say Q:h"Þor %þ<>"
camelia Þor is-mighty True
JJMerelo m: my %þ = :is-mighty; say Q "Þor %þ<>"
camelia Þor %þ<>
15:51 Prince213 left, Prince213 joined
JJMerelo m: my %þ = :42foo, :33bar; say Q:h:c "Þor %þ<> { [+] %þ.values}" 15:53
camelia Þor bar 33
foo 42 75
JJMerelo m: my %þ = :42foo, :33bar; say Q:h:c "Þor %þ<> → { [+] %þ.values}"
camelia Þor bar 33
foo 42 → 75
JJMerelo m: my %þ = :42foo, :33bar; say Q:h "Þor %þ<> → { [+] %þ.values}"
camelia Þor bar 33
foo 42 → { [+] %þ.values}
codesections What are you up to there, JJMerelo? :) 15:54
JJMerelo github.com/Raku/doc/issues/3553 codesections
codesections I see. Interesting 15:56
JJMerelo codesections in general, "docs" is what I'm up to (now that the book is finished). So after a few of these, you will see either a push to docs or a StackOverflow question if I can't figure it out...
codesections Cool. Are you doing it with camelia so that others can pitch in? Or do you not have a local REPL available? 15:57
(If the latter, wow – I can't imagine being able to figure things out without a local REPL to interrogate!) 15:58
JJMerelo codesections I'm just lazy and camelia puts the output format we use in the documentation. And, of course, some times someone pitches in and solves the thing. 15:59
codesections No, I have one or may REPLs. It's mostly the "laziness" part of "laziness, hubris and impatience". A bit of impatience, I guess, too. 16:00
16:02 molaf left
codesections Interesting. As it always is to peek into someone else's workflow. Personally, remembering to put in m: and having to copy-paste from IRC would overwhelm any gains from camelia formatting the output. But, like I said, it's interesting to see other workflows :) 16:02
JJMerelo m: my @þ= <33 44>; say Q:a "Array contains @þ<>"
camelia Array contains 33 44
JJMerelo m: my @þ= <33 44>; say Q:a "Array contains @þ[3]" 16:03
camelia Use of uninitialized value element of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
Array contains
in block <unit> at <tmp> line 1
JJMerelo m: my @þ= <33 44>; say Q:a "Array contains @þ[1]"
camelia Array contains 44
JJMerelo m: my @þ= <33 44>; say Q:a "Array contains @þ[]"
camelia Array contains 33 44
moritz m: require ::('Test'); 16:05
camelia ( no output )
JJMerelo m: my @þ= <33 44>; say Q:a "Array contains @þ" 16:06
camelia Array contains @þ
16:06 aluaces left
JJMerelo codesections I'd have to cut and paste from somewhere, difficult to obtain the nl funny character otherwise, plus the quotes, plus OUTPUT... 16:07
Geth doc: 3a7b09b8ad | (JJ Merelo)++ | doc/Language/quoting.pod6
Adds examples of quoting constructs using adverbs.

This helps #3553
doc: 06644b7a56 | (JJ Merelo)++ | doc/Language/quoting.pod6
Adds additional example, and clarifies when it effectively works

Thanks @jnthn for clarification. This closes #3553
linkable6 Link: docs.raku.org/language/quoting
linkable6 DOC#3553 [closed]: github.com/Raku/doc/issues/3553 [docs] Adverbial :h to quoting constructs has no docs.
JJMerelo codesections ^^^ result...
Also I've looked up roast in the meantime. It always helps to see working examples. 16:09
[Coke] . 16:10
tellable6 2020-08-11T15:35:12Z #raku <JJMerelo> [Coke] thanks!
JJMerelo m: my @þ= <33 44>; say Q:a "Array contains @þ.elems"
camelia Array contains @þ.elems
JJMerelo m: my @þ= <33 44>; say Q:a "Array contains @þ.elems()"
camelia Array contains 2
16:11 dog_star joined, stoned75 left
dog_star hey, sorry if this is a silly question but i can't find an answer to it - are multidimensional arrays typed the same way was one-dimensional arrays, eg for a 2 dimensional array whose elements are cells, would it be typed `my Cell @grid`? 16:12
16:13 stoned75 joined
JJMerelo m: my Int @m[2;2] = <1 2 3 4>; say @m; 16:15
camelia Assignment to array with shape 2 2 must provide structured data
in block <unit> at <tmp> line 1
JJMerelo m: my Int @m[2;2] = [1, 2; 3 4]; say @m;
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3my Int @m[2;2] = [1, 2; 37⏏5 4]; say @m;
expecting any of:
infix stopper
statement end
statement modi…
jnthn Missing , after the
JJMerelo m: my Int @m[2,2] = [1, 2, 3, 4]; say @m; 16:16
camelia Assignment to array with shape 2 2 must provide structured data
in block <unit> at <tmp> line 1
JJMerelo m: my Int @m[2,2] = [1, 2; 3, 4]; say @m;
camelia [[1 2]
[3 4]]
JJMerelo so dog_star yes :-) ^^^^
dog_star JJMerelo: hm ok thank you! i guess my problem is something else, let me look at it a bit
Geth doc: 8567ef5a05 | (JJ Merelo)++ | doc/Language/quoting.pod6
Adds additional example and clarifications

Thanks @jnthn for clarification, again. This closes #3553, again
linkable6 Link: docs.raku.org/language/quoting
DOC#3553 [closed]: github.com/Raku/doc/issues/3553 [docs] Adverbial :h to quoting constructs has no docs.
lucs dog_star: Shirley? Is that you? 16:19
dog_star m: my Int @m[2,2] = [1, 2; 3, 4]; say @m[1;1];
camelia 4
dog_star lucs: not aware of a shirley! i'm phoebe 16:20
lucs 's joke falls flat. Oh well...
JJMerelo lucs er... maybe we're missing all the context 16:21
lucs www.youtube.com/watch?v=B_XuPXGMpLA 16:23
dog_star i'm thinking either the Airplane movies or some pun on 'dog star' that i haven't heard yet :p i have had people ask me 'why so sirius'
lucs The star Sirius is also known as the Dog Star.
dog_star oooh, a combination of both
not enough coffee to get the double-pun this morning 16:24
lucs Sorry :)
dog_star you're good! that's clever
JJMerelo lucs now that's what I call a complicated context.
JJMerelo lols with a slight delay 16:25
dog_star oho i think i know what my problem is, but i am not sure the solution yet
JJMerelo dog_star give it a shoot.
JJMerelo waits patiently to see if this joke works... 16:26
lucs JJMerelo: Um, not sure... :/ 16:27
dog_star m: my Int @a; for ^20 -> $x { for ^5 -> $y { @a[$x;$y] = $x * $y } }
camelia Type check failed in assignment to @a[0]; expected Int but got Array ([])
in block at <tmp> line 1
in block <unit> at <tmp> line 1
JJMerelo lucs a star that shoots...
JJMerelo ducks
dog_star so my guess is that subscript `$x;$y` is not being parsed how i expected, but am not sure how to correct it
JJMerelo dog_star you need to shape it in advance.
dog_star m: my Int @a[20;20]; for ^20 -> $x { for ^5 -> $y { @a[$x;$y] = $x * $y } } 16:28
camelia ( no output )
dog_star huzza
so the autovivification isn't clever enough on multi-dimensional arrays?
JJMerelo dog_star not enough to discover a shape, I'm afraid... After all, @a[$x;$y] has no idea what are the dimensions. 16:30
jnthn A multi-dimensional array is a different thing from an array of arrays; auto-viv will vivify an array, but if the top-level array is typed to contain Int then the assignment won't work out
dog_star that makes sense - i'm coming from an APL/k world, so i am trying to understand the semantics of arrays a bit deeper here
jnthn (A multi-dim array is really allocated as a single blob of memory.) 16:31
dog_star jnthn: ok, that makes sense! in some langs they are equivalent and in some they aren't
JJMerelo: from k i am used to subscripts working like arr[dim1;dim2;dim3...] so maybe i was projecting :) 16:32
JJMerelo dog_star it really makes sense. But I guess that, from the point of view of the implementation, it needs a bit of more work... 16:35
dog_star JJMerelo: oh, i am also the "dog star" on twitter whose thread you are replying to, by the way
yeah, i may add some little PRs for these gotchas, noting them down... 16:36
JJMerelo dog_star love to hear you're fascinated :-) That would be great :-)
codesections dog_star: How do you like Raku's APL-like features? I spent a month or so last year diving into APL, and liked it a lot. But Raku seems to have a lot of what I liked – plus a lot more. But I'd be really interested in thoughts from someone with more experience with those languages
16:37 dakkar left
JJMerelo codesections "plus a lot more" is something we keep hearing about Raku 16:38
dog_star codesections: i'll have to get back to you after i learn a bit more :) have only been looking into it a day or so so far 16:39
codesections JJMerlo: hopefully in a good way? I could see that going either way :D
JJMerelo I followed a doctoral seminar on APL circa 1989. It was a really cool thing. I guess it still is...
dog_star i did give a quick intro talk about apl at a conference: www.youtube.com/watch?v=UltnvW83_CQ 16:40
JJMerelo codesections well, having a lot of stuff in a language is not a bad thing if you live in 2020, I guess. Except if you're talking about frameworks, and the language is Javascript
dog_star JJMerelo: i think it can be either way! i actually like how small APL and k are. but diving into raku is reminding me of a lot of interesting tricks that i haven't seen since i was messing with common lisp and/or haskell, depending on the feature 16:41
i want to make it clear that this is not negative, but raku right now feels most similar to, uh, supercollider... which also had a lot of apl (specifically J) influence! 16:42
codesections Yeah, I agree, at least to a point. Though I think Raku is also, from a certain point of view, a pretty *small* language – it has a lot of orthogonal features (which, yes, can be a lot). But those can be put together in ways that prevent the need for a *ton* of standard library methods that make the effective size of other languages much larger 16:43
dog_star specifically, raku's "whatever" concept is something that i've only ever seen in supercollider before
JJMerelo Now that's a first. Also, supercolliders are *huge*
16:44 TreyHarris left
dog_star JJMerelo: that may be a joke going over my head again, but i mean the audio synthesis language: en.wikipedia.org/wiki/SuperCollider 16:44
16:45 TreyHarris joined
codesections e.g., having first-class Regexs eliminates a huge chunk of `is_ascii`, `is_numeric`, `ends_with`, etc. string processing 16:45
dog_star codesections: in that case, that does sound like a lot of what i like about apl!
JJMerelo I meant the physical supercollider things, the ones used to throw atoms against each other. Now, supercollider was mentioned here recently... Let me check.
dog_star nice talk, I had forgotten all the symbols... 16:48
dog_star it does make me happy that i can still use some of the APL symbols in raku :p 16:49
JJMerelo BTW, there are still some slots open for the 20th anniversary calendar raku-advent.blog 16:50
Pick one of the original Requests for Change, tell us how they eventually ended up in the language, add you rname here github.com/Raku/advent/tree/master/20th 16:51
codesections dog_star: you might be interested keeping an eye on ab5tract's project to add more APL operators to Raku via a module: github.com/ab5tract/raku-SilverAPL 16:52
It's early, but seems pretty cool. (And exposes the metaprogrammabilty that makes me so excited about Raku)
dog_star JJMerelo: ooh, maybe... not sure if i want to pick up a new project right now if it's something else i would need to do ASAP though 16:53
JJMerelo dog_star well, the one for the advent calendar this winter is also open... all of them, too :-)
dog_star JJMerelo: let me look into the winter one, because i am looking for more prompts for projects right now 16:54
JJMerelo dog_star the winter one is totally open, simply some tutorial or article about Raku. Same repo, different file...
codesections I've been meaning to ask, where does Raku's excitement about Christmas come from? (The Advent calendar, the Christmas release, etc)
JJMerelo BTW, the flapper on the doc tests is coming back again travis-ci.org/github/Raku/doc/builds/716978461 It's totally unrelated to anything, and we've had it for a many releases. It's a flapper, and also impossible to golf as far as I can tell. 16:55
codesections Did it start with claims that Perl 6 would be "out by Christmas" (if so, who's claims? Larry?) and just grow from there? 16:56
JJMerelo Maybe jnthn or [Coke] can have a look at it... If it's an error, it must be deep down in MoarVM or whatever.
codesections more complicated, and actually fascinating story. Check out the initial post (by YT) to see how it happened and how Raku became a truly community emergent language 16:57
codesections raku-advent.blog/2020/07/31/20-yea...-tomorrow/
lizmat received word that Naoum Hankache lives close to the harbour in Beyrouth
codesections Hmm? I know the history of Raku/Perl6 in broad strokes. And have read that post. I was asking more specifically about Christmas 16:58
lizmat his mother and sister have multiple bone fractures but have been released from hospital
lizmat wishes Naoum all the best
moritz tough living over there, I also wish everybody the best 17:03
and thanks lizmat++ for the info
tbrowder codesections: i'm not sure i've heard larry articulate exactly why, i'll give you my take on it: Larry is a Christian and it's obvious in the public life he has lead. as a Christan the Christmas Story and its Advent are central and sacred. the release on Christmas is kind of like a pointer to highlight it, but not in a profane manner. 17:11
tellable6 2020-08-10T19:01:41Z #raku <thundergnat> tbrowder Glad Rosettacode was useful for you. There's a lot of interesting code on there (and some not so good too... ) 17:12
lizmat it was actually cognominal++ who tipped me
codesections d'oh, thanks tbrowder. I'd totally missed the Christmas → Christian connection (which *should* be obvious, but…). I'd picked up on Bless, apocalypse, etc. 17:14
jnthn I think the Christmas joke may have originated around the Pugs time, and was along the lines of 17:15
"every day will be like Christmas when we have Perl 6"
17:15 sena_kun joined
tbrowder can anyone tell me how to get p6doc or rakudoc working again? i think i just read to clone p6doc repo and zef install rakudoc... 17:15
jnthn By the time I got involved in Rakudo development (2008ish) it was already well established, at least :)
tbrowder jnthn: yes, a Christmas present for sure 17:16
did you see my email?
codesections Interesting. I find some of this history really cool. I've been going back and watching some of the old State of the Onion talks that address design goals for perl6/Raku, and it makes for fascinating context 17:17
17:17 Altai-man left
jnthn tbrowder: Yes, sorry; I'll try and get to it this evening. 17:17
(Turns out admin tasks don't take vacations even when I do... :-))
(And they managed to swallow most of yesterday evening) 17:18
tbrowder ok, not pushing, just want to pr my apache vhost macro
jnthn Time to go home and cook something. :) bbl o/
tbrowder bye 17:19
[Coke] any pointers on how to get "say \c[grinning face]" working in a cmd or powershell window? 17:23
regarding christmas, that may have been larry's original tintent (who knows) but by the time we did the release it was just the running gag 17:25
17:31 aluaces joined, aluaces is now known as alberto, alberto is now known as Guest71214
[Coke] m: say "\c[grinning face]" 17:38
camelia 😀
[Coke] \o/ - windows terminal + chcp 65001, all good. 17:39
17:55 molaf joined 17:58 natrys joined
tbrowder ref rakudoc, finally got it installed (failed to RTFM and then had to "zef nuke rakudoc" and follow instructionsu 18:02
18:02 ensamvarg3 left
tbrowder [Coke] see how it all fits together TIMTOWTDI 18:04
wonder if anyone else has had to use "zef nuke" in the wild? 18:05
18:05 skids left 18:10 sjm_uk joined 18:15 cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined 18:18 bocaneri left 18:44 Prince213 left 18:46 Prince213 joined 18:50 ab5tract_ left 18:51 ab5tract_ joined 18:53 Celelibi left, tobs left 18:54 tobs joined 18:56 Black_Ribbon joined
cpan-raku New module released to CPAN! PDF::Class (0.4.5) by 03WARRINGD 18:57
18:58 Celelibi joined
xinming_ What module is used to traverse tree structure? 19:01
I mean existing module, A bit like Tree::Traverse in perl5, something like that.
codesections xinming: I'm not familiar with anything off the top of my head (which doesn't mean it isn't out there – I haven't explored the module ecosystem in depth yet). Raku is pretty good at traversing trees natively, though. Can you be more specific about what you're trying to do? 19:05
er, xinming_, sorry
xinming_ Ok, my $tree = %(a => [1..10], b => %(sub-tree), c => 'plain-str'); A traverse module will walk through the whole structure and call process sub on array and hash under a tree. :-) 19:07
I can write that, it's just good when we have existing sollution. 19:08
19:08 sjm_uk left
codesections Does deepmap provide similar functionality to what you're looking for? docs.raku.org/routine/deepmap 19:09
xinming_ Not sure. 19:10
I don't know if it supports inplace update of value.
19:12 eseyman left
codesections m: my %inner = a => 1, b => 2; my %outer = a => %inner, b => 3; %outer.deepmap({$_ += 5}); say %outer 19:13
camelia {a => {a => 6, b => 7}, b => 8}
codesections xinming_: looks like it does ^^^
19:14 Altai-man joined
xinming_ m: my %inner = a => 1, b => 2; my %outer = a => %inner, b => 3; %outer.deepmap({$_ = 'new-' ~ $_}); 19:15
camelia ( no output )
xinming_ m: my %inner = a => 1, b => 2; my %outer = a => %inner, b => 3; %outer.deepmap({$_ = 'new-' ~ $_}); say %outer
camelia {a => {a => new-1, b => new-2}, b => new-3}
xinming_ Seems so
19:16 sena_kun left
tbrowder xinming_: check modules.raku.org and search for "file" and there a couple of choices 19:19
cpan-raku New module released to CPAN! Mi6::Helper (0.0.1) by 03TBROWDER 19:28
19:43 skids joined 19:47 eseyman joined 19:53 Kaiepi joined 20:08 rindolf left, rypervenche left 20:11 rypervenche joined 20:31 tejr left 20:34 tejr joined 20:42 zacts left 20:49 kensanata left
raku-bridge <stu002> I'm looking for examples of a routine that "does" a trait. Assuming that's even a sensible thing to do. It's so I can make some assertions on how the routine behaves. 21:00
Geth doc: tbrowder++ created pull request #3554:
Add short description for a NativeCall helper
tbrowder .tell Skarsnik see raku/doc pr #3554 21:12
tellable6 tbrowder, I'll pass your message to Skarsnik
tbrowder JJMerelo: i know you probably don't want non-core modules mentioned in the docs, but there are already exceptions and i vote for the nativecall helper to be shown near the native call description. 21:14
21:15 sena_kun joined 21:17 Altai-man left 21:27 rockxloose left 21:28 rockxloose joined 21:35 demostanis left 21:37 natrys left 21:40 zacts joined 21:57 natrys joined 22:04 xxpor left
rypervenche m: say (1,2,3,4,5,6,7,8,9) (==) ("123456789".comb xx 9)[0]; 22:07
camelia False
rypervenche Am I doing something wrong here?
m: say ("123456789".comb xx 9)[0]
camelia (1 2 3 4 5 6 7 8 9)