[00:25] *** MasterDuke joined
[00:26] <MasterDuke> https://github.com/rakudo/rakudo/blob/main/src/Raku/Actions.nqp#L471-L478 seems to be the relevant code

[00:26] *** librasteve_ left
[00:27] <timo> oh i totally missed that there was a -n there

[00:30] <timo> my rakudo isn't up to latest and in there i get 1 as the output, and when i change `my` to `state` I get the number of lines

[00:31] <MasterDuke> yeah, state works

[00:31] <timo> oh, i thought it outputs the last line rather than the value in the variable?

[00:31] <MasterDuke> it outputs the value of .words.elems on the last line, instead of the sum of all of them

[00:32] <timo> oh, that could be

[00:32] <MasterDuke> i.e., as if `$w` was being declared for each line

[00:39] <timo> i thought that's the same as without rakuast that you need `state` if you want the value to stick around

[00:40] <MasterDuke> not when "predeclaring" it with BEGIN

[00:41] <timo> that's a little odd though

[00:43] <MasterDuke> though i think `state` was created as a more convenient form of using BEGIN for this kind of thing

[00:43] <timo> not sure state was for exactly this :D

[00:46] <MasterDuke> heh, this is about %110 of my use-cases for state

[00:49] <timo> well, that makes sense :)

[00:49] <timo> I tend to start with -e and lines().map

[00:50] <timo> that usually makes it easier to expand to a script that has a "second stage" that would otherwise have to be a huge END block

[00:51] <timo> but of course -ne and -pe are meant to be useful in a larger pipeline of commands, too

[00:51] <MasterDuke> i would just grow and grow the END block. it would end up wrapping several times in a full-screen terminal

[00:52] <MasterDuke> once or twice i did end up converting it into an actual script, with multiple lines, indentation, the whole works

[00:54] <MasterDuke> earlier today i wrote `perl -nE 'if (/<(\d+\.\d+)>) { $t += $1 }; END { say $t }' <path/to/file>`, because i was on a computer that didn't have raku installed

[00:56] <MasterDuke> right now that sort of thing is my main use case for perl/raku, usually a bit more complicated though

[00:58] <MasterDuke> so bringing it back to the original example. using `RAKUDO_RAKUAST=1` it works with `state`, but not with `BEGIN`, legacy frontend works with both

[01:36] *** MasterDuke left
[02:59] *** ShimmerFairy left
[03:00] *** ShimmerFairy joined
[03:29] *** djinni` left
[03:42] *** djinni` joined
[03:58] *** ntv joined
[03:58] *** apogee_ntv left
[03:59] *** ntv is now known as apogee_ntv

[04:32] <ugexe> MasterDuke: nah i've just been focused on getting things to work, although i do look at optimization stuff if it is blocking me, e.g. https://github.com/rakudo/rakudo/pull/6125

[04:32] <tellable6> ugexe, I'll pass your message to MasterDuke

[04:36] <ugexe> But note zef doesn’t work under rakuast so I’m not sure we’re that close to a clean enough blin run 

[08:42] *** apogee_ntv left
[08:43] *** apogee_ntv joined
[10:00] <Geth> ¦ rakudo/main: 4 commits pushed by (Nick Logan)++, (Elizabeth Mattijsen)++

[10:00] <Geth> ¦ rakudo/main: c2db2a1c58 | RakuAST: re-allocate @!compstuff in IMPL-LINK-META-OBJECT if cleanup nulled it

[10:00] <Geth> ¦ rakudo/main: ce27945111 | EVAL: register compiled code refs and drain cleanup for AST EVAL

[10:00] <Geth> ¦ rakudo/main: 45b604d745 | Test: regression for #6169 (.assuming in precompiled module loaded via another)

[10:00] <Geth> ¦ rakudo/main: a716df8f53 | Merge pull request #6170 from ugexe/ugexe/issue-6169

[10:00] <Geth> ¦ rakudo/main: review: https://github.com/rakudo/rakudo/compare/b49217d2d751...a716df8f53c6

[10:21] <lizmat> m: dd sprintf(q/%#o/,-10)   # meh

[10:21] <evalable6> lizmat, rakudo-moar a716df8f5: OUTPUT: «Cannot test a716df8f53c61176dbec515cb187a9751130bde2 (Commit exists, but an executable could not be built for it)»

[10:21] <linkable6> (2026-05-09) https://github.com/rakudo/rakudo/commit/a716df8f53 Merge pull request #6170 from ugexe/ugexe/issue-6169

[10:21] <lizmat> m: dd sprintf(q/%#o/,-10)   # meh

[10:21] <evalable6> lizmat, rakudo-moar a716df8f5: OUTPUT: «Cannot test a716df8f53c61176dbec515cb187a9751130bde2 (Commit exists, but an executable could not be built for it)»

[10:21] <lizmat> weird

[10:22] * lizmat rebuilds from scratch

[10:25] <lizmat> intriguing... build fails from scratch

[10:34] <lizmat> hmmm... cannot repro  :-(

[10:34] <lizmat> m: dd sprintf(q/%#o/,-10)   # meh

[10:34] <evalable6> lizmat, rakudo-moar a716df8f5: OUTPUT: «Cannot test a716df8f53c61176dbec515cb187a9751130bde2 (Commit exists, but an executable could not be built for it)»

[10:34] <linkable6> (2026-05-09) https://github.com/rakudo/rakudo/commit/a716df8f53 Merge pull request #6170 from ugexe/ugexe/issue-6169

[10:34] <Geth> ¦ rakudo/main: 0dcdb5c50e | (Elizabeth Mattijsen)++ | src/core.e/Format.rakumod

[10:34] <Geth> ¦ rakudo/main: Make Format.raku subclass safe

[10:34] <Geth> ¦ rakudo/main: review: https://github.com/rakudo/rakudo/commit/0dcdb5c50e

[10:35] <lizmat> originally planned as a part of a bigger commit, checking if it builds now

[10:37] <lizmat> m: dd sprintf(q/%#o/,-10)   # meh

[10:37] <evalable6> lizmat, rakudo-moar a716df8f5: OUTPUT: «Cannot test a716df8f53c61176dbec515cb187a9751130bde2 (Commit exists, but an executable could not be built for it)»

[10:37] <linkable6> (2026-05-09) https://github.com/rakudo/rakudo/commit/a716df8f53 Merge pull request #6170 from ugexe/ugexe/issue-6169

[10:38] <lizmat> anyways, the result is: "0-12"

[10:38] <lizmat> which is wrong

[10:54] <lizmat> m: dd sprintf(q/%#o/,-10)   # meh

[10:54] <evalable6> lizmat, rakudo-moar 0dcdb5c50: OUTPUT: «"0-12"␤»

[11:05] <disbot2> <librasteve> wonders if there's Grammar for sprintf s?

[11:06] <lizmat> yes, there is: the original one lives in NQP, and the new one lives in src/core.e/Formatter/Grammar.rakumod

[11:07] <lizmat> in NQP: src/HLL/sprintf.nqp

[11:15] <disbot2> <librasteve> ++

[11:17] <lizmat> mind you, I did a lot of work on Formatter in the 2020-2023 years... but then I stopped because it couldn't be really put into production because of precomp issues

[11:18] <lizmat> I now see there's a bunch of issues that need to be fixed, and am working on that

[11:18] <lizmat> (what didn't help was that the spectests for the new implementation were not run by standard spectest)

[11:43] *** shareable6 left
[11:44] *** shareable6 joined
