🦋 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/type-links: f1b9f67bc6 | (Will Coleda)++ | xt/rakudoc-types.rakutest
ignore X<> markers.
00:11
Geth doc/type-links: fbe58443c6 | (Will Coleda)++ | xt/rakudoc-types.rakutest
Only report exact case matches.

Be sneaky and work even on case-insensitive file systems.
00:27
tonyo rf: i'm likely going to regenerate a lot to make anything that's a boolean be a junction with the right value/type 01:10
rf: the escaping is in there and it *should* just work as is but just some updates
rf tonyo++ 01:20
Just tested it out and it's amazing
tonyo yea it's way easier/better than i thought it'd be 01:26
rf Might actually use this in prod 01:27
Voldenet github.com/tony-o/ryml/blob/b216c9...akumod#L16 01:31
this lacks escaping " as &quot; ' as &#39; and & as &amp; 01:32
tonyo i'll give it proper escaping shortly
working on making these bools better rendered
Geth doc: cfa++ created pull request #4262:
Remove formatting codes from various examples
02:08
tonyo proper escaping and better bool renders ^^ 02:20
just in
Geth ¦ doc: cfa self-assigned Leaky, nested tags in the $*REPO section github.com/Raku/doc/issues/4261 02:23
doc/main: 8898dc5c8e | cfa++ | doc/Language/compilation.rakudoc
Fix C<B<...>> markup/formatting error

Closes #4261.
02:28
rf .tell dakkar thanks for pointing out the missing 2's in my splits, I found a few bugs that got squashed with that change 03:00
tellable6 rf, I'll pass your message to dakkar
Geth doc/main: 7f9b27debd | (Elizabeth Mattijsen)++ | doc/Type/IterationBuffer.rakudoc
Tweak IterationBuffer documentation a bit

After having written tests, I noticed some properties were missing
11:16
doc/main: d0ac898f51 | (Elizabeth Mattijsen)++ | doc/Type/List.rakudoc
Document sub rotor
11:32
doc/main: 261e2a1830 | (Elizabeth Mattijsen)++ | doc/Type/IterationBuffer.rakudoc
Date some IterationBuffer features
11:35
Geth doc/main: e3ec1efeda | (Elizabeth Mattijsen)++ | doc/Type/Telemetry.rakudoc
Document safe-snapper module
11:47
Geth doc/main: 71391b1cb3 | (Elizabeth Mattijsen)++ | doc/Type/Cool.rakudoc
Document Cool.uniparse
11:55
Geth doc/main: 16258ab187 | (Elizabeth Mattijsen)++ | doc/Language/traits.rakudoc
Document class|role is implementation-detail
12:06
doc/main: ceb58f25d7 | (Elizabeth Mattijsen)++ | doc/Type/QuantHash.rakudoc
Document QuantHash.Map
12:07
Geth doc/main: bfa8305a05 | (Elizabeth Mattijsen)++ | 2 files
Document Any|Seq.slice
12:19
Geth doc/main: df826546dc | (Elizabeth Mattijsen)++ | doc/Language/create-cli.rakudoc
Document %*SUB-MAIN-OPTS<coerce-allomorphs-to>
12:39
doc/main: 6ca70da1f6 | (Elizabeth Mattijsen)++ | 2 files
Document spurt without data
12:50
Geth doc/main: 4aea97f4e1 | (Elizabeth Mattijsen)++ | doc/Language/setbagmix.rakudoc
Date the (==) operator

Also mention raku.land/zef:lizmat/Set::Equality as an alternative
13:01
rf Morning folks 13:21
Xliff \o 15:11
Can someone tell me why A.^can('BUILD').head.file comes out as "src/Perl6/World.nqp" but $?FILE comes out as "A.pm6"? 15:12
This is in a BEGIN block.
rf m: A.^can('BUILD').head.file.say 15:30
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared name:
A used at line 1
Xliff rf: Not going to work via camelia. Has to be file-based. 15:32
[Coke] I tried that with a random item I had - no output; I assume the module also needs a BUILD? 15:50
ah, there it is 15:51
Xliff: on my machine (old mac mini), I see them both as fully qualified. 15:52
(also running 2022.07)
same on latest m2 mac running 2023.02 15:54
(if I put the two output lines in a BEGIN block, the one with "can" generates Nil instead) 15:55
[Coke] folks, off topic: wanted to rant about living in a future where my washer bricks itself doing a recall-based firware update over the air and I need a tech to come out and flash it. 16:00
... while there's a load of wet clothes in it, no less.
el does raku irc has an off topic channel 16:12
lizmat I think #raku is the closes that comes to it, atm 16:16
an off-topic channel is easily made though
tonyo [Coke]: haha..i just put a wedgewood stove in the house for a very similar reason
dakkar Xliff: interesting! given `class A { submethod BUILD { } }`, `BEGIN { A.^can('BUILD')».file».say }` prints the nqp file, but the same code outside of `BEGIN` (i.e. later) prints the source file 16:19
tellable6 2023-03-09T03:00:47Z #raku <rf> dakkar thanks for pointing out the missing 2's in my splits, I found a few bugs that got squashed with that change
dakkar rf: glad to help! 16:20
Xliff: CHECK also prints the nqp file, INIT prints the right source 16:21
dakkar Xliff: I suspect some MOPpery at INIT time 16:21
tonyo rf: does humming bird have session management? 16:23
dakkar (I would expect all the meta-class stuff to happen before the end of CHECK, so it can be saved in the precompiled form… but I'm probably missing something)
tonyo s/anagement/iddleware
rf tonyo: Not at the moment 16:39
I've written a few middlewares for services that implement it though
It is in my backlog though
I'm planning to model it after: github.com/aantron/dream/tree/mast...sion#files this frameworks session system 16:41
Where it's just a middleware you register globally
Anton Antonov Has anyone tried "Humming-Bird" on macOS? Specifically the example(s) here: dev.to/rawleyfowler/writing-micro-...-bird-59k4 16:42
rf All of my testing is on Linux @Anton, but I have a MacOS pipeline for CI so it *should* work.
Are you running into an issue? 16:43
Anton Antonov @rf Sure -- I run into issues anytime I try to install almost anything depending on "native call." For the linked example above, the issues come from installing "DBIish" . 16:47
rf Hmm, I am not sure I will be of too much assistance for MacOS, what is it complaining about? 16:48
Odds are you need to install a DB library 16:55
ugexe fwiw in your CI pipeline you probably use --/test when installing dependencies, which might be the source of their failures 16:57
Anton Antonov @rf Yeah, that might be the case. I am not experimenting with it further.
rf DBIish isn't a dep of my project, I used it in my blog post with my project 16:58
Anton Antonov right
rf You could realistically pull in any DB library, that is the magic so-to-say
Anton Antonov hmmm... ok 17:03
tonyo rf: that'd be easy to implement 17:07
rf tonyo: Yeah, I am about to make a PR with a fairly naive implementation of global middleware 17:09
Then I'll look into adding more middleware options in Humming-Bird::Middleware 17:10
Geth doc/main: f6a037fed0 | cfa++ | doc/Type/List.rakudoc
use v6.e.PREVIEW for rotor examples
17:22
Geth doc/main: 23dca2842e | cfa++ (committed using GitHub Web editor) | 11 files
Remove formatting codes from various examples (#4262)

These don't currently render correctly on the doc website and in some cases make example source more difficult to read and maintain. Output presentation has also been tidied.
  (If these codes are permitted in future, consider reverting this commit.)
19:06
tonyo does the middleware just take a func? 19:10
rf_ tonyo: yes 19:12
Also idk why im rf_ now. 19:13
Nemokosch for some reason it was occupied, idk 19:14
you can set the nick though
rf tonyo: Actually everything in Humming-Bird is just functions. Then they all compose together to make the endpoints on the routing tree
Now I am rf not rf_ :)
tonyo oh, so i could potentially write the middleware 19:17
(doesn't need to be in a specific repo)
rf Yup 19:19
Anyone can write any middleware as long as it types Request -> Response -> Callback : (Request -> Response -> Callback) -> Response 19:20
Callback is a recursive type
So you can short circuit early be returning a Response in your middleware, or simply call &next() 19:21
which will continue down the function chain
tonyo but is there any TCO 19:22
also, rad
rf Yes
We compose to a single function 19:23
As crazy as that sounds
At runtime of course.
Then there's also "advice" that type Response --> Response which run at the end of the stack, and "error" which handles any exceptions thrown during the route stack execution 19:24
Those are all composed in as well
Hence "composable framework"
rf . 23:24
Voldenet rf: the full-middleware approach to routing has performance problems and massive stacks 23:37
I've used it and at the end it was faster to just have gigantic map with (path, request -> response)
rf That's basically what it compiles to 23:41
Voldenet ah, nice
rf A trie of sorts that maps to a function request -> response
Voldenet it's also useful to consider per-route middleware settings 23:42
rf The middleware, route handler, error handlers, and advice are sort of "compiled" into one function
Voldenet for example, you add global "auth" middleware for everything, but options for authentication are taken from the route defined later 23:43
it introduces extremely tangled structure unfortunately 23:44
rf The chain knows nothing about the next, or previous members, just that there is a next member or not 23:47
Voldenet I know, that's why it would introduce complexity, since middleware for picking the route would need to set chosen route in $request 23:48
and actual route dispatching would be done by other middleware
rf No, they also don't know about which route they're on. 23:49
If you don't want middleware on a route, don't. Or use a router 23:50
There are a few mechanisms to segregate middelwares from routes you don't want them on
rf I guess you could discover your current route with request.path, but I don't think it would be necessary for what you're asking 23:52
Voldenet I've seen a lot of overhead in multiple middlewares doing that in the past 23:53
but I don't know what's the good architecture for that, it's either hard to compose or slow 23:55