|
00:25
MasterDuke joined
|
|||
| MasterDuke | github.com/rakudo/rakudo/blob/main...#L471-L478 seems to be the relevant code | 00:26 | |
|
00:26
librasteve_ left
|
|||
| timo | oh i totally missed that there was a -n there | 00:27 | |
| 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:30 | ||
| MasterDuke | yeah, state works | 00:31 | |
| timo | oh, i thought it outputs the last line rather than the value in the variable? | ||
| MasterDuke | it outputs the value of .words.elems on the last line, instead of the sum of all of them | ||
| timo | oh, that could be | 00:32 | |
| MasterDuke | i.e., as if `$w` was being declared for each line | ||
| timo | i thought that's the same as without rakuast that you need `state` if you want the value to stick around | 00:39 | |
| MasterDuke | not when "predeclaring" it with BEGIN | 00:40 | |
| timo | that's a little odd though | 00:41 | |
| 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 | ||
| MasterDuke | heh, this is about %110 of my use-cases for state | 00:46 | |
| timo | well, that makes sense :) | 00:49 | |
| I tend to start with -e and lines().map | |||
| 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:50 | ||
| 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 | ||
| once or twice i did end up converting it into an actual script, with multiple lines, indentation, the whole works | 00:52 | ||
| 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:54 | ||
| right now that sort of thing is my main use case for perl/raku, usually a bit more complicated though | 00:56 | ||
| 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 | 00:58 | ||
|
01:36
MasterDuke left
02:59
ShimmerFairy left
03:00
ShimmerFairy joined
03:29
djinni` left
03:42
djinni` joined
03:58
ntv joined,
apogee_ntv left
03:59
ntv is now known as apogee_ntv
|
|||
| 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. github.com/rakudo/rakudo/pull/6125 | 04:32 | |
| tellable6 | ugexe, I'll pass your message to MasterDuke | ||
| ugexe | But note zef doesnāt work under rakuast so Iām not sure weāre that close to a clean enough blin run | 04:36 | |
|
08:42
apogee_ntv left
08:43
apogee_ntv joined
|
|||
| Geth | rakudo/main: 4 commits pushed by (Nick Logan)++, (Elizabeth Mattijsen)++ | 10:00 | |
| lizmat | m: dd sprintf(q/%#o/,-10) # meh | 10:21 | |
| evalable6 | Cannot test a716df8f53c61176dbec515cb187a9751130bde2 (Commit exists, but an executable could not be built for it) | ||
| linkable6 | (2026-05-09) github.com/rakudo/rakudo/commit/a716df8f53 Merge pull request #6170 from ugexe/ugexe/issue-6169 | ||
| lizmat | m: dd sprintf(q/%#o/,-10) # meh | ||
| evalable6 | Cannot test a716df8f53c61176dbec515cb187a9751130bde2 (Commit exists, but an executable could not be built for it) | ||
| lizmat | weird | ||
| lizmat rebuilds from scratch | 10:22 | ||
| intriguing... build fails from scratch | 10:25 | ||
| hmmm... cannot repro :-( | 10:34 | ||
| m: dd sprintf(q/%#o/,-10) # meh | |||
| evalable6 | Cannot test a716df8f53c61176dbec515cb187a9751130bde2 (Commit exists, but an executable could not be built for it) | ||
| linkable6 | (2026-05-09) github.com/rakudo/rakudo/commit/a716df8f53 Merge pull request #6170 from ugexe/ugexe/issue-6169 | ||
| Geth | rakudo/main: 0dcdb5c50e | (Elizabeth Mattijsen)++ | src/core.e/Format.rakumod Make Format.raku subclass safe |
||
| lizmat | originally planned as a part of a bigger commit, checking if it builds now | 10:35 | |
| m: dd sprintf(q/%#o/,-10) # meh | 10:37 | ||
| evalable6 | Cannot test a716df8f53c61176dbec515cb187a9751130bde2 (Commit exists, but an executable could not be built for it) | ||
| linkable6 | (2026-05-09) github.com/rakudo/rakudo/commit/a716df8f53 Merge pull request #6170 from ugexe/ugexe/issue-6169 | ||
| lizmat | anyways, the result is: "0-12" | 10:38 | |
| which is wrong | |||
| m: dd sprintf(q/%#o/,-10) # meh | 10:54 | ||
| evalable6 | "0-12" | ||