🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
00:00 reportable6 left 00:03 reportable6 joined 00:45 kurahaupo left, kurahaupo joined 00:54 vrurg_ joined, vrurg left 01:50 kurahaupo left 04:37 linkable6 left, reportable6 left, evalable6 left, quotable6 left, nativecallable6 left, bisectable6 left, sourceable6 left, greppable6 left, coverable6 left, statisfiable6 left, notable6 left, releasable6 left, shareable6 left, benchable6 left, evalable6 joined, sourceable6 joined, benchable6 joined, quotable6 joined, shareable6 joined 04:38 coverable6 joined, nativecallable6 joined, greppable6 joined, statisfiable6 joined, reportable6 joined, linkable6 joined 04:39 releasable6 joined, bisectable6 joined, notable6 joined 06:00 reportable6 left 06:02 reportable6 joined 06:50 kurahaupo joined 06:53 sena_kun joined
Geth rakudo/main: 45b3a05093 | (Elizabeth Mattijsen)++ | src/core.c/Exception.pm6
Allow Nil as payload to X::AdHoc

This allows "die Nil" to be distinguished from "die Any", or in a CATCH block:
CATCH {
   when X::AdHoc {
... (6 more lines)
09:20
10:11 kurahaupo_ joined 10:14 kurahaupo left 11:56 kurahaupo_ left 12:00 reportable6 left 12:02 reportable6 joined 12:08 kurahaupo joined 13:09 squashable6 left 13:11 squashable6 joined 13:24 kurahaupo left 13:27 squashable6 left 13:29 squashable6 joined 13:35 jgaz left 13:37 kurahaupo joined
Geth roast: ceb959646c | (Elizabeth Mattijsen)++ | S26-documentation/09-configuration.t
Fix tests related to pod configuration

  - Apparently in the legacy grammar, something like 2.3 is rendered
   as a Num, rather than as a Rat. This is fixed in RakuAST, so
   change the test and mark them as TODO for now.
  - In the legacy grammar, a mutable hash was returned for something
   like :foo{:a, :b}. In RakuAST it's an immutable Map. Change the
   test for Map, which will also accept hashes, so no TODO necessary
13:47
rakudo/main: dd5125aecd | (Elizabeth Mattijsen)++ | 4 files
RakuAST: add .literalize method to selected ::Node classes

RakuDoc configuration can become very complex, basically everything is allowed, as long as the result is a constant "literal" value if you will.
This adds a src/core.c/Literalize.pm6 file that augments the ... (10 more lines)
13:53
lizmat 815! nine ^^ 13:54
[Coke] lizmat++ 15:01
Geth rakudo/main: fc879d6f2e | (Elizabeth Mattijsen)++ | src/Raku/Actions.nqp
RakuAST: fix storage of the # numbered alias

It needs to be something trueish, so 1 will do. "True" is not the Bool::True that we know from HLL Raku
15:13
lizmat 816!
Geth rakudo/main: c427590256 | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/LegacyPodify.pm6
RakuAST: use first space when collapsing \s+

This effectively keeps a non-breaking whitespace when it is the first (or only) whitespace between 2 non-whitespace characters
15:51
rakudo/main: 6604178bef | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/LegacyPodify.pm6
RakuAST: properly handle non-breaking space logic

when creating legacy pod
17:36
lizmat 817!
[Coke] NUMBERS ARE INCREASING, BRAIN HAPPY 17:38
I get the benefit and I'm just sitting here looking on. :) 17:39
lizmat :-) yw
17:41 linkable6 left, evalable6 left, linkable6 joined 17:43 evalable6 joined 18:00 reportable6 left 18:02 reportable6 joined 18:15 MasterDuke joined
MasterDuke hm. i think i've successfully transferred the logic of github.com/rakudo/rakudo/pull/5242 to PERFORM-CHECK, but i'm having no luck getting the error reporting right 18:17
Geth rakudo/main: 703378eac7 | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/LegacyPodify.pm6
RakuAST: handle empty leading / trailing correctly in declarator doc
18:22
rakudo/main: 5ea3f79af6 | (Elizabeth Mattijsen)++ | 2 files
RakuAST: implement "only" subs

This seems to have slipped through the cracks and was easy to do
18:23
lizmat 819!
Geth roast: fe773f511f | (Elizabeth Mattijsen)++ | S26-documentation/module-comment.t
Tweak check for trailing declarator block

In RakuAST, trailing declarator docs *must* start at the line they apply to. Since this also works in the legacy grammar, and the intent was to test a blockless module statement, it seems fair to change this without too much worry.
18:41
lizmat 820!
nine Wow, nice progress! 18:47
lizmat yeah that last one was a bit of a cheat 18:48
the whole trailing declarator thing is going to require some discussion
also: the order in which declarator docs appear in $=pod is different in RakuAST 18:49
because PERFORM-CHECK is depth-first
so if you have leading doc on:
class Outer { class Inner { } } 18:50
then in legacy the Outer doc will be first, and the Inner then follows
in RakuAST the order is reversed
I don't see a simple solution to that yet
MasterDuke huh. i tried adding `if $*RESOLVER -> $res {` (modeled after cf3d937fc0511bfcaedc676dcb6e1951be8d85bc), but that causes `Too few positionals passed; expected 6 arguments but got 3` instead. well, might be able to play around some more this evening 18:51
lizmat OTOH, I don't really see why declarator docs need to be in $=pod anyways
Geth rakudo/main: 08da4bfee4 | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/LegacyPodify.pm6
RakuAST: don't lose one level of [] when setting leading/trailing

Because binding will not itemize, causing the array to disappear when setting. And don't ask my why this is needed, this is how pod has been generated since 2014 at least.
19:11
nine Does the order even matter? 19:21
lizmat it does for the tests :-( 19:22
but I think I have an idea
Geth rakudo/main: a1d39af53e | (Elizabeth Mattijsen)++ | 2 files
RakuAST: only ::Doc::(Block|Declarator) need to CHECK
19:24
nine And that's not just because the tests are badly written?
lizmat good question 19:31
vrurg_ Heh, we were too fast in eradicating COMPOSE phaser... 19:51
19:51 vrurg_ is now known as vrurg
lizmat why ? 19:51
gfldex I could have made good use of it in my last blog post. :-> 19:52
nine Xliff: what do you mean by the Need RakuAST node "not working"?
tellable6 nine, I'll pass your message to Xliff
vrurg Role body is executed prior to the role getting specialized. And there is no way to do any fixups after it is actually applied to a class. 19:53
Say, I wanted to set attribute's 'is required' conditionally, depending on T being a definite in `role R[::T] { has T $.attr; }`. But it only makes sense to do on the target class. And when the body is being ran the class doesn't have it yet. 19:55
lizmat fwiw I think that could be done rather easily now 19:56
vrurg gfldex: If I remember correctly, role body works well for your case.
lizmat by letting the role body also return a list of COMPOSE phasers that should be applied to the class ? 19:57
vrurg lizmat: In RakuAST? Hope so. Can be done when no higher priority tasks are on the list.
gfldex I was hoping that I can do more with combining COERCE and parametric roles.
vrurg gfldex: did you see my reply on reddit? 19:58
gfldex Neither are used of then in code in the wild.
I did. Followup blogpost will include your fix.
nine vrurg: I wonder whether what you want is more something that macros are a good solution for 20:13
vrurg nine: nope. An attribute is being held with the generic type on the role. It's only after the instantiation when its copy gets the final type. All this is done by the metamodel. 20:15
For the purpose of type checking and dispatching it would be great for two classes to share the same role, but require/not require the attribute to be set depending on class' demands. 20:17
nine That was a rather quick "no" considering that we don't even know what macros will look like exactly. It's not even clear whether a role is required for what you need. There could as well be a macro that added the attribute in question to a class and make it required if...well required.
vrurg nine: Type checking is the key. If code needs to know wether the attribute is there a role is the best. It could, of course, be like `role R { method attr {...} }` – and leave it up to the classes themselves to declare it. Then a macro would, perhaps, work for that. 20:20
Then, speaking of readability, `class Foo does R[Str:D] { ... }` is way better than to keep in mind that "ok, this is a macro and it implies the role gets consumed". 20:22
lizmat nine: meh, looks like the idea wrt order of doc blocks, won't fly 20:28
it looks like there are ::Doc blocks getting created on which the PERFORM-CHECK method is not called 20:29
thus causing holes in $=pod, and thus either needing a fixup step, or some other idea 20:30
$!pod-content.grep({$_.defined}).Array to the rescue 20:37
20:46 sena_kun left 21:58 squashable6 left, evalable6 left, linkable6 left, notable6 left, benchable6 left, releasable6 left, greppable6 left, quotable6 left, sourceable6 left, coverable6 left, bisectable6 left, nativecallable6 left, reportable6 left, statisfiable6 left, shareable6 left, bloatable6 left, unicodable6 left, committable6 left, tellable6 left, nativecallable6 joined, greppable6 joined 21:59 bloatable6 joined, tellable6 joined, committable6 joined, statisfiable6 joined, coverable6 joined 22:00 quotable6 joined, bisectable6 joined, notable6 joined, unicodable6 joined, benchable6 joined 22:01 releasable6 joined, squashable6 joined, linkable6 joined, shareable6 joined, evalable6 joined, reportable6 joined, sourceable6 joined 22:28 gfldex left
Geth rakudo/main: a2102a963a | (Elizabeth Mattijsen)++ | 4 files
RakuAST: ensure that pod blocks are generated in right order

By giving each RakuAST::Doc block that will be generated into Pod:: objects an ordinal number at the moment they're created, and use that number as in index into $=pod.
Sadly, not all created RakuAST::Doc blocks get the CHECK handling ... (5 more lines)
23:13
lizmat 821!
23:35 gfldex joined