🦋 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.
rypervenche Oh wow, I'm stupid for not having tried out Getopt::Long sooner. I didn't realize it supported the default MAIN arguments and gave me the functionality that I wanted. :O 01:39
cpan-raku New module released to CPAN! Game::Covid19 (0.0.1) by 03ELIZABETH 11:52
New module released to CPAN! Game::Covid19 (0.0.2) by 03ELIZABETH 12:00
SmokeMachine the link for `Raku Introductory course` on www.raku.org/downloads is broken 12:45
[Coke] moritz: ping 14:03
Geth doc: codesections++ created pull request #3510:
Correct associativity for infix:<Z>
14:04
moritz [Coke]: pong(ish) 14:05
Geth doc: d3cb49f7b3 | (Daniel Sockwell)++ | doc/Language/operators.pod6
Correct associativity for infix:<Z>

This commit corrects the associativity for the `infix:<Z>` operator from `assoc<chain>` to `assoc<list>`. `Z` has list associativity because `$a Z $b Z $c == infix:<Z>($a, $b, $c)`. It does not have chain associativity: `($a Z $b Z $c) ≠ ($a Z $b) and ($b Z $c)`.
The chart at the top of the page already correctly indicated that `Z` has list associativity and thus does not need to be updated.
14:06
linkable6 Link: docs.raku.org/language/operators
doc: 9cac6c359b | (Will Coleda)++ (committed using GitHub Web editor) | doc/Language/operators.pod6
Merge pull request #3510 from codesections-forks/Z-operator

Correct associativity for infix:<Z>
[Coke] moritz: trying to fix rakudo.org bugs.
the docs indicate that the site is running on www.p6c.org - do you know if this is still true? 14:07
moritz [Coke]: that's false, p6c.org has been gone for over a year
[Coke] (tried to ssh in, no clue if I had an account, but it's just hanging on my end)
ok. readme at github.com/perl6/rakudo.org needs to be updated.
moritz rba should know where it's running now
[Coke] er, linked to by...
rba: hio 14:08
moritz++ thanks 14:09
[Coke] opened a ticket and tagged rba on github for the doc Q.
.seen rba 14:12
tellable6 [Coke], I saw rba 2020-06-15T10:17:23Z in #raku-dev: <rba> This domain mismatch I could fix. Content not though.
codesections m: say 1 R/ 2; #`(is the same as) say infix:<R/> 1, 2; 14:16
camelia 2
2
codesections m: #`(But this doesn't work) (1, 2, 3) RZ <a b c>;
camelia Don't know setting RESTRICTED
at gen/moar/ModuleLoader.nqp:258 (/home/camelia/rakudo-m-inst-2/share/perl6/lib/Perl6/ModuleLoader.moarvm:previous_setting_name)
from gen/moar/ModuleLoader.nqp:262 (/home/camelia/rakudo-m-inst-2/share/perl6/lib/…
codesections m: #`(Even though this does:) say infix:<RZ> (1, 2, 3), <a b c>;
camelia Don't know setting RESTRICTED
at gen/moar/ModuleLoader.nqp:258 (/home/camelia/rakudo-m-inst-2/share/perl6/lib/Perl6/ModuleLoader.moarvm:previous_setting_name)
from gen/moar/ModuleLoader.nqp:262 (/home/camelia/rakudo-m-inst-2/share/perl6/lib/…
codesections Is that a bu?g
er, that didn't generate the correct error. Let me try without the comment: 14:17
m: say (1, 2, 3) RZ <a b c>;
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing infix inside R
at <tmp>:1
------> 3say (1, 2, 3) RZ7⏏5 <a b c>;
expecting any of:
infix
infix stopper
petr36 Nice day 😎 14:31
Or night)) 14:32
petr36 I can't find any information about raku on jvm. Can anyone help me? 14:34
[Coke] there is a JVM backend for Rakudo - it is not at full parity to the MoarVM backend. (it's part of the same compiler - just targeting a different backend) 14:38
you can build from source. one sec.
github.com/rakudo/rakudo#configuri...on-the-jvm 14:39
codesections Related question, while we're talking about backends: is there a JS backend? I've seen a couple of references to one, but I'm guessing it's no longer maintained/never really released (based on there not being much info) 14:40
jdv79 iirc there's one person that works on the js backend pm...something 14:41
eery afaik you can install it with npm 14:42
codesections Oh, you know what, there *is* an npm package – but it's still called `perl6-runtime` rather than `raku` as I'd seen in docs previously 14:45
[Coke] codesections: yes, there is a js backend (it's pmurias)
eery "npm install raku" and "npm install rakudo" work for me 14:48
petr36 Thanks 😊 14:49
codesections good to know. Thanks :) 14:50
eery but it's erroring out on a hello world raku script, hmmmm 14:51
timotimo perl6.github.io/6pad/ - try this
it takes a lot of time the first time it loads because rakudo's so big
eery oh, I think this node is just too ole, nvm 14:52
timotimo rakudo does require support for ... integers of some kind i think?
petr36 Anyone used CommaIde? 14:53
What you think about it? 14:54
eery nqp-runtime uses a function added in node 10, I'm running node 9. I dom't use JS much 14:55
[Coke] moritz: github.com/perl6/rakudo.org/blob/m...he.conf#L7 ? 14:56
moritz looks VERY old
[Coke] thought you might want to commit a fix or file a bug or whatever. :) 14:57
Also, we might want to setup an infrastructure gmail address or something. 14:58
moritz git rm's 15:01
[Coke] moritz: so are all those redirects defined somewhere else now? 15:07
(or some of them)
anyone use Mojo enough to diagnose github.com/perl6/rakudo.org/issues/42 ? 15:16
Grinnz [Coke]: looks like a problem with the AssetPack plugin setup 15:18
metacpan.org/pod/Mojolicious::Plug...ESCRIPTION 15:21
i think the error message is that it can't find the 'sass' program
[Coke] Grinnz: so maybe we should make CSS::Sass a required dep instead of optional? 15:25
Grinnz seems like it would solve that, assuming it can be installed 15:26
[Coke] trying locally 15:27
[Coke] couldn't build CSS::Sass... looks like *it* has an unsatisfied dep... 15:31
however, installing the ruby sass gem worked wonderfully.
Grinnz++ 15:36
updated readme.
Should we track git commits to the rakudo.org website here? 15:38
hankache hello #raku 15:55
tellable6 2020-06-01T18:36:43Z #raku-dev <tyil> hankache maybe you can help here stackoverflow.com/questions/621372...in-windows
timotimo o/ 16:07
kawaii Hello timotimo :)
guifa2 For module stuff, is there any way for a named parameter during 'use' to take a value different than true? 17:14
SmokeMachine does %?RESOURCES exists on tests?
[Coke] rakudo.org site isn't getting updated automatically, which may explain why the new release isn't on the front page yet 17:15
guifa2 e.g. "use Ops::Custom :substract<less> :add<plus>; my $a = 2 plus 2;" ?
SmokeMachine: yes 17:16
err, well it depends
SmokeMachine I'm not being able to use that. :( 17:17
guifa2 do you mean can you access resources by using %?RESOURCES? or will %?RESOURCES be available in the module files?
SmokeMachine access %?RESOURCES<some/file>
[Coke] guifa2: see docs.raku.org/language/modules#Exp..._importing 17:18
guifa2 [Coke]: yeah, I'm reading that, but it says that the named arguments just pull in what's in the package EXPORT::named-arg, it doesn't look like there's a way to pass in the value of the named arg 17:19
[Coke] no, I think you might have to predeclare for normal stuff. 17:20
SmokeMachine guifa2: I do something like that here: github.com/FCO/Red/blob/master/lib/Red.pm6#L69
[Coke] use lib does it somehow, though. one sec.
SmokeMachine but with positional parameters 17:21
guifa2 SmokeMachine: ah, then no. Because the test file is being run external to the module (just like any other script would be run). You could probably make a hidden option that exports a sub like "resources-for-test-purposes-only ($filename) { %?RESOURCES{$filename} }" if it's crucial for testing. 17:22
SmokeMachine guifa2: thanks 17:23
guifa2 One thing I did for a test file that needed a data file was to include it in a directory in the t/ directory. E.g., t/01-test-foo.t, and then t/01-test-foo/data.bar
[Coke] ah, use lib has special code in do_pragma. 17:24
guifa2 [Coke]: boo. that would be kind of cool if it could be passed via a special dynamic var @*ARGS or something. Obviously packages don't have signatures 17:25
guifa2 I was hoping to do 17:25
use Intl::UserLanguagae <fallback1 fallback2 fallback2> :override<for-testing1 for-testing2>
Meh, folks testing their localization runtimes can deal with one more line of code ;-) 17:26
codesections m: say "\c72"; # This goes from codepoint ==> letter 19:32
camelia H
codesections Is there a method that goes in the other direction?
[Coke] m: say H.chr 19:34
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
H used at line 1
[Coke] m: say H.ord
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
H used at line 1
[Coke] ... dammit. :)(
m: say "H".ord #doh 19:35
camelia 72
[Coke] ^^
that was a thinko, wow.
codesections Thanks :)
[Coke] m: say 72.chr 19:38
camelia H
[Coke] and that's the method version of the string interpolation
guifa2 [Coke] & codesections: you should probably use .ords unless you're sure you're dealing with a single codepoint 19:44
m: say "-́".ord
camelia 45
guifa2 m: say "-́".ords
camelia (45 769)
[Coke] guifa2++
guifa2 (I actually use that character regularly so it's one I think a lot about hahaha) 19:45
Also, for as much as I *love* Raku's string handling (being grapheme based), it makes doing some things a bit trickier when algorithms are designed around codepoints instead 19:48
cpan-raku New module released to CPAN! Game::Covid19 (0.0.3) by 03ELIZABETH
guifa2 hasn't even looked at it but
lizmat++
lizmat guifa: docs.raku.org/type/Uni ?? 19:49
ShimmerFairy The biggest deficiency in non-Str strings at the moment is that you can't do regexes on them, but worst case you can "just" do something like / [ :m (a) { mess with ~$0 } ] / 19:50
guifa2 was about to type something but, what what ShimmerFairy said. Regex :-( 19:51
The <local-alpha> token has some stuff that allows for a bare combining mark. I'm still debating the best ways to handle those cases (that aren't very edge case for languages like Hebrew and Arabic). But it's in the middle of a token so I've got to do a Str -> codepoints conversion 19:52
ShimmerFairy For example, I had to parse double-quote strings in my .XCompose file, which can start with diacritics that merge with the ", but I managed that with [ :m (<["]>) { my @codes = (~$0).NFC.list; ... } ] 19:53
lucs lizmat: Different game, also covid-19 inspired :-) : juliasfairies.com/articles/pandemic...on-leroux/ 19:54
guifa2 I think for the most part, it will catch people making modules, and that's fine by me. Module authors are generally more aware of these implementation details and deal with them accordingly
ShimmerFairy Years ago I proposed adverbs that would let you do that same task as [ :nfc '"' ~ '"' <-["]>+ ] instead, but it's a pretty rare thing to come up so it's not in the language (yet?). (So far, only that one time have I needed to step outside of NFG) 19:55
lizmat lucs: cool
guifa2 does 'play :34age' 19:58
You're moderately ill.
You'll need 6 weeks for recovery.
You've permanently lost 1% of your constitution.
lizmat pretty good still 19:59
guifa2 Less so for my grandpa's age :-( 20:00
lizmat yeah, /me is on a 6% death-rate 20:05
guifa2 ShimmerFairy: same here. This is the first time I've had to really deal with it head on. The only thing I'm not convinced on is how to return a match of 'a' when the matched character is 'á'. My instinct is to reject the match outright but I dunno. I need to play around with ICU more to see how they handle it 20:18
ShimmerFairy m: say "á" ~~ m:m/a/ 20:19
camelia 「á」
ShimmerFairy m: my $*SLASH; "á" ~~ m:m/(a) {$*SLASH = (~$0).NFD.list[0].chr}/; say $*SLASH; 20:21
camelia a
[Coke] m: my $a = "á"; $a ~~ m:ignoremark/ ('a') /; say $/[0].Str.samemark('a'); 20:22
camelia a
ShimmerFairy Assuming samemark handles the rare extended grapheme cluster with prepended combining characters, that would be the better approach. 20:23
[Coke] moritz: github.com/perl6/rakudo.org - indicates that that apache.conf was actually in use. is the readme also out of date? 20:28
moritz [Coke]: given that there's a much newer nginx.conf, I assume so :( 20:34
patrickb Coke afaik the nginx.conf matches the actual conf in use quite well, but currently not exactly. 20:36
codesections m: subset Ascii of Str where { /^<[\c0 .. \c127]>*$/ }; sub f(Ascii $s) {}; say &f.signature; say &f.signature.params[0]; 20:40
camelia (Str $s where { ... })
Str $s where { ... }
codesections there's not a way to get Raku to show the type constraint in that `where` clause, is there?
moritz m: subset Ascii of Str where /^<[\c0 .. \c127]>*$/; # maybe easier if you don't wrap it in a code block? 20:42
camelia ( no output ) 20:42
codesections That doesn't seem to make a difference in `.signature`'s output, unfortunately 20:44
(though it's a good change, regardless)
jdoege Howdy all. Pursuant to my questions the other day about Rakudo Star, is there a list somewhere of what modules were included with Rakudo Star? The link that should lead to a page with such a list returns a 404. 22:31
lizmat jdoege: I'm not sure, but I'm afraid all people who could answer this, are currently sleeping or on their way to sleep 22:33
I know I am, but I don't have answer :-( 22:34
jdoege I'll ask again Monday morning. 22:44
El_Che jdoege: github.com/rakudo/star/blob/master...odules.txt 22:45
jdoege El_Che: Thanks! 22:50