🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
Geth doc/main: a4b1c308b8 | cfa++ | doc/Type/independent-routines.rakudoc
Fix link markup.

Closes #4254.
00:04
Geth doc/main: 50f82d30a8 | cfa++ | doc/Language/regexes.rakudoc
Remove formatting codes from regexes table

These are currently unsupported (and therefore incorrectly rendered).
A grep of the doc tree suggests that no other `=table`s are currently using formatting codes.
Related issue: github.com/Raku/doc-website/issues/195.
01:37
Geth doc/type-links: 99f060a811 | (Will Coleda)++ | xt/rakudoc-types.rakutest
Add test for Type link formatting.

Accepted formatting is, e.g.:
L<C<Int>|/type/Int>
02:12
doc/type-links: f1e00509db | (Will Coleda)++ | xt/rakudoc-types.rakutest
Find Foo::Bar types.
02:20
doc/type-links: bd4d0c3c47 | (Will Coleda)++ | xt/rakudoc-types.rakutest
Remove stale comment
02:30
doc: coke++ created pull request #4256:
Type links
02:31
rf What dist do people use for SHA256 hashing? 03:09
tonyo raku.land/cpan:BDUGGAN/Digest::SHA256::Native 03:27
tellable6 2023-03-05T03:01:29Z #raku <rf> tonyo: There is a bug with Fez, I uploaded a dist about 20 minutes ago, and I had a typo in the changelog. I went to go remove and re-upload but it says its been 24 hours.
tonyo rf: not sure how long it's been but give it another go after an hour+ to see if it's a bad cache 03:30
tellable6 tonyo, I'll pass your message to rf
Geth doc/type-links: a8963e1d62 | (Will Coleda)++ | 2 files
clean up test descriptions
04:53
doc/type-links: aa83d5088d | (Will Coleda)++ | xt/rakudoc-types.rakutest
Support #tags on link urls
Geth doc/type-links: 6eac901a4f | (Will Coleda)++ | xt/rakudoc-types.rakutest
remove debug output
12:28
rf Morning folks 13:10
tellable6 2023-03-06T03:30:08Z #raku <tonyo> rf: not sure how long it's been but give it another go after an hour+ to see if it's a bad cache
rf Is there any way for me to pattern match a Hash's structure 13:28
m: my %my-map = foo => 'bar', baz => 'e'; given %my-map { { foo => 'bar', baz => 'e' } { say 'works' }; default { say 'nope' } } 13:30
camelia ===SORRY!=== Error while compiling <tmp>
Unexpected block in infix position (missing statement control word before the expression?)
at <tmp>:1
------> %my-map { { foo => 'bar', baz => 'e' }⏏ { say 'works' }; default { say 'nope' …
rf m: my %my-map = foo => 'bar', baz => 'e'; given %my-map { when { foo => 'bar', baz => 'e' } { say 'works' }; default { say 'nope' } }
camelia works
rf m: my %my-map = foo => 'bar', baz => 'abc'; given %my-map { when { foo => 'bar', baz => 'e' } { say 'works' }; default { say 'nope' } }
camelia nope
rf Hmm, can I just match on keys?
m: my %my-map = foo => 'bar', baz => 'abc'; given %my-map.keys { when ('foo', 'bar') { say 'works' }; default { say 'nope' } } 13:31
camelia nope
rf m: my %my-map = foo => 'bar', baz => 'abc'; given %my-map.keys { when ('foo', 'baz') { say 'works' }; default { say 'nope' } }
camelia nope
rf m: my %my-map = foo => 'bar', baz => 'abc'; given %my-map { when { foo => *, baz => * } { say 'works' }; default { say 'nope' } } 13:36
camelia nope
rf m: my %my-map = foo => 'bar', baz => 'abc'; given %my-map { when { foo => Any, baz => Any } { say 'works' }; default { say 'nope' } }
camelia nope
Nemokosch did sub-signature matching not work? 13:38
m: my %my-map = foo => 'bar', baz => 'abc'; given %my-map { when :(:$foo, :$bar) { say 'works' }; default { say 'nope' } } 13:39
Raku eval nope
Nemokosch rip
oh damn, foo and baz
m: my %my-map = foo => 'bar', baz => 'abc'; given %my-map { when :(:$foo, :$baz) { say 'works' }; default { say 'nope' } }
Raku eval works
Nemokosch 🥳
rf Sweet. 13:40
Thanks!
[Coke] Looking for community feedback: Should the "official" doc link for a Foo::Bar type in core be /type/Foo/Bar or /type/Foo::Bar - both are supported on the website right now but we are going to make all the links in the source conform to one of those. 15:30
I have a preference for the former but understand users might prefer the latter. 15:31
dakkar [Coke]: since the existence of class/role/subset `Foo::Bar` implies the existence of package `Foo`, the fully hierarchical `/type/Foo/Bar` looks fine; only problem: `/type/Foo` may not refer to an actual type 15:47
so would that 404, or redirect to a description of package Foo?
Nemokosch I already had a take: unlike Java and Python, it's a mere convention to organize namespaces like hierarchical folders. It's fine that Rakudo rolls with this but it is rather an implementation detail, not something to organize high-level content by 15:54
[Coke] If there is anything at the top level package level, it'd show up. If not, a 404. 15:58
In some cases, there isn't anything in the package. Maybe we could force it to be a listing of all children folders.
dakkar's point here contrasts with nemokosch's - it does make sense to group content under Foo:: - namespaces imply grouping. 16:01
dakkar [Coke]: `/type/Foo` should describe *type* Foo 16:02
if there's no type, it should either 404 or redirect to `/package/Foo` or `/class/Foo` or whatever
Nemokosch consider that there is Proc and Proc::Async, IO and IO::Path and so on
dakkar (or are we showing classes/roles under `/type/`? still, packages are definitely not types, right?) 16:03
Nemokosch one could argue that this is the problem itself - to make Proc and Proc::Async objects of the same kind
one can carry the analogy through by consistently translating :: to /, that's a fair point 16:04
dakkar uh? both Proc and Proc::Async are classes
Nemokosch exactly 16:05
dakkar so they are "of the same kind"… I'm clearly failing to understand something
Nemokosch they essentially do the same thing, thre is no hierarchy between them
dakkar there's namespace containment
Nemokosch yes, and that rather seems a source of confusion than anything useful 16:06
dakkar mah, we've been fine with that in perl5 for decades
Nemokosch in practice, they are classes that address the same problem, they are siblings, if anything
No, not "fine" with that
there is a reason why Perl5 had to go 16:07
dakkar perl5 hasn't gone anywhere 😁
Nemokosch unfortunately, but it should have, that was the whole point of Perl 6
dakkar what problems has the "nested namespaces don't imply anything else" caused?
Nemokosch how many problems should they cause? is confusion not enough? 16:08
dakkar you are the first person I see to report confusion (in ~25 years), but of course my sample set is not necessarily representative 16:09
Nemokosch but then again not everybody uses Perl
[Coke] dakkar: there is no /class/Foo
Nemokosch by the way, this is a good illustration of the schizophrenia this project has been suffering from
too radical for Perl users, not radical enough to not carry the Perl baggage 16:10
dakkar [Coke]: ok, I guess there's also no /package/Foo, we only document names that can be used as (nominal?) types 16:11
[Coke] (should 404) - ok, that's the current setup.
dakkar 404 is sensible enough
[Coke] dakkar: correct. Something we can think about updating, but that's a different issue.
dakkar `/type/Foo/Bar` would be wrong for perl5 (because the existence of `Foo::Bar` does not imply the existence of `Foo`), but it's fine for raku 16:12
Nemokosch Foo is allowed to have nothing to do with Foo::Bar, though, and (for the better or maybe for the worse) the core uses this possibility, as illustrated 16:14
[Coke] so we basically have one vote for each. (dakkar, Nemo*) - if anyone has a preference, please let us know in #raku-doc, where I now retreat to.
tonyo vote on what? 16:28
oh, module path on the docs site? i think the module name rather than treating it as a path is more consistent with how CURs work 16:29
Nemokosch do all objects in Raku have .WHO available on them? 16:31
dakkar Nemokosch: I believe so
tellable6 dakkar, I'll pass your message to Nemokosch
lizmat although I think it's technically possible to create an object that has a HOW but not a WHO, I don't think we currently have any 16:33
but I could well be wrong :-)
Geth doc/type-links: 96dbf7cd6f | (Will Coleda)++ | xt/rakudoc-types.rakutest
Prefer colons in link URLs.
16:35
Nemokosch to me, that means, basically any symbol can act like a namespace?
lizmat as long as its a valid identifier 16:37
Nemokosch hm, okay 16:52
so I mean what follows is that if you have some Foo::Bar, that doesn't really tell you anything about Foo in itself, only Foo.WHO (that it contains Bar as a key) 16:53
so even if there is a hierarchy, that hierarchy is not between Foo and whatever Bar links to 16:54
Geth doc/missing-c: 90102adbf0 | (Will Coleda)++ | xt/rakudoc-brackets.rakutest
Add test for <> (missing formatcode)
16:57
dakkar correct, it's namespace containment, not any "hierarchy" (which feels a vague term to me)
Geth doc: coke++ created pull request #4257:
Add test for <> (missing formatcode)
16:58
Geth doc/type-links: 3a8c16c082 | (Will Coleda)++ | xt/rakudoc-types.rakutest
Types should be C<> on their own page.
17:21
lizmat PSA: the Rakudo Weekly News will be later today or tomorrow 17:47
shmup weeeee 18:05
Geth doc/main: cae02e1565 | cfa++ | doc/Language/regexes.rakudoc
Fix table header
18:28
lizmat PSA: the Rakudo Weekly News will be tomorrow 20:24
Geth doc/missing-c: 5028c1227e | (Will Coleda)++ | xt/rakudoc-brackets.rakutest
Skip comments

Comments can have text like C<push> that looks correct, but since it's all just text, this would otherwise trigger a test failure.
21:22
doc/missing-c: 454e06dfeb | (Will Coleda)++ | 17 files
Fixup some missing C<> in pod.
Geth doc/missing-c: 96857487a2 | (Will Coleda)++ | xt/rakudoc-brackets.rakutest
whitelist infix:<> prefix:<>
21:37
doc/missing-c: 40d34ca852 | (Will Coleda)++ | 2 files
Fixup some missing C<> in pod.