🦋 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.
MasterDuke hm. 'exists' isn't quite like the other stat calls. the other ones all throw an exception if the file doesn't exist, and require a concrete object that's the result of a successful stat 02:39
i could just have 'exists' redo the stat and not throw an exception, which is how it's currently done 02:40
but then it's the only one that wouldn't need to take a stat struct as an argument and could(should?) instead just take a path 02:42
i'm not quite sure how much i should have the syscalls mimic moarvm's api or rakudo's api 02:44
i was going to pr my moarvm and rakudo changes, but now i think it needs a little more thought. it wouldn't be major changes either way (i don't think), but it's a little too late for me to be sure i've got all the possibilities covered 02:46
Geth rakudo/main: 5fa96e3755 | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/Fixups.pm6
RakuAST: handle synthetics in Markup parser properly

The initial implementation assumed that one could use the same index in both the Uni representation, as well as an index in nqp::eqat. Synthetic codepoints break this assumption, as they are always decoded as decomposed.
... (6 more lines)
08:24
rakudo/main: 7d037bbb42 | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/Fixups.pm6
RakuAST: fix off-by-one error on << >> parsing
08:45
lizmat notable6: weekly 10:06
notable6 lizmat, 1 note: 2023-06-26T19:54:27Z <lizmat>: dev.to/lizmat/moving-printf-format...rward-1m3p
lizmat notable6: weekly reset
notable6 lizmat, Moved existing notes to “weekly_2023-07-03T10:06:35Z”
Geth ¦ nqp: patrickbkr self-assigned CI pipeline is broken github.com/Raku/nqp/issues/805 12:32
lizmat And yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/07/03/2023-...g-rakudoc/ 12:58
Xliff I am still having issues with "Malformed UTF8 characters" in my react block. 13:25
"react { whenever $proc.stdout {} and whenever $proc.stderr {} ... }" seem to be the culprits. 13:26
How can I isolate these so that they do NOT kill my script. It's critical I get this fixed and working so I can show $dayJob raku is Production ready!
lizmat are you 100% sure the process doesn't produce invalid UTF8 ? 13:29
Xliff No. 13:30
But I don't care if the Proc produces invalid UTF8. 13:31
Maybe put stdout and stdin into :bin somehow?
lizmat docs.raku.org/type/Proc#routine_new shows a :bin arg 13:33
and run does as well: docs.raku.org/type/independent-routines#sub_run
nemokosch I regularly just piped the process into iconv and ignored the non-compliant characters xD 13:43
Xliff lizmat: Doesn't look like Proc::Async.new does, but I think the .stderr and .stdout methods do, so that's what I'm going to try. Thanks! 13:45
Geth roast: d504d52613 | (Elizabeth Mattijsen)++ | S32-list/repeated.t
Remove unneeded =finish

Probably leftover from some debugging
16:20
rakudo/main: b17f9c1c78 | (Elizabeth Mattijsen)++ | src/Raku/Grammar.nqp
RakuAST: make =finish a directive

As discussed in
   github.com/finanalyst/Rakudoc-BETA/issues/17
following Damian's comments
   github.com/finanalyst/Rakudoc-BETA...1616831157
16:35
timo m: say Format ~~ Callable 16:41
camelia ===SORRY!=== Error while compiling <tmp>
Expected a term, but found either infix ~~ or redundant prefix ~
(to suppress this message, please use a space like ~ ~)
at <tmp>:1
------> say Format ~~⏏ Callable
timo ... man i haven't rakued properly in too long 16:42
oh, i made a different mistake than i thought 16:43
m: use v6.e.PREVIEW; say Formatter ~~ Callable # lizmat, should Callable be does-ed by Formatter? 16:44
camelia False
lizmat no, don't think so?
it is not a Callable, it produces one ? 16:45
hmmm...
timo oh then 16:46
m: use v6.e.PREVIEW; say Format ~~ Callable # lizmat, should Callable be does-ed by Format?
camelia False
timo i probably confused the two
lizmat m: use v6.e.PREVIEW; say Formatter.new('%s') ~~ Callable
camelia True
timo ah, oh
lizmat maybe Formatter shouldn't be a class 16:47
but just a package holding Formatter::Grammar and Formatter::Actions 16:48
actually: Formatter::Syntax 16:49
fwiw, in the back of my mind I thought of Formatter.new also accepting a :grammar and an :actions argument in the future 16:50
timo yeah, something to allow custom syntaxes for format strings to be put in the ecosystem would be nice 16:51
lizmat with defaults on dynamic variables
timo have something that does for format strings what rakudo grammars did to regexes
lizmat anyways, I'm glad it's working as much as it is, although I have still some issues to fix in it 16:52
leont Remind me, what's the minimum Rakudo version when you want to use RakuAST in a module? 16:59
timo the docs.raku.org page on it says "available from language version `6.e+`" which kind of makes it sounds like we have a version 6.e and a different version 6.e+ 17:12
timo version 6.e+ and related RakuAST features are only available to subscribers to RakuPRO:tm: 17:35
MasterDuke Xliff: does whatever Proc-related function you're using have an `:enc` option? if so (or you can use one that does), maybe `:enc('utf8-c8')` would help 18:00
MasterDuke unrelated to that, anyone have thoughts/suggestions about how to handle `nqp::const::STAT_EXISTS` functionality with my new syscall mechanism? 18:02
ugexe hmmm. it looks like nodejs uses access instead of stat to test for existence 18:10
github.com/nodejs/node/blob/22da09...25-L300C29 18:11
regardless, it returns a bool based on if there was an error or not and doesn't return a stat structure 18:20
lizmat leont: rakudo.org/post/announce-rakudo-release-2023.02 was the first to have "use experimental :rakuast 18:27
MasterDuke ugexe: yep, for the other stat functions i'm acting on a stat struct/repr object that was saved from an initial call, which will throw an exception if the file doesn't exist (not functionality i added, i'm just using the existing moarvm functions) 18:34
so i do something like: my $s = nqp::syscall('stat'); say nqp::syscall('stat-filesize', $s);`, which doesn't perform another actual stat call in the stat-filesize implementation 18:36
but for `nqp::syscall('stat-exists')`, i would have to call it again and not throw an exception (which is how it's implemented currently in moarvm). but then it sort of breaks the assumption that one stat is performed and all the other stuff is based on the results from that 18:37
but i haven't yet looked very closely at what exactly raku/rakudo does, so maybe it'll be easier to implement that how i'm thinking than the current nqp:: op's functionality 18:39
Geth rakudo/main: a31bdc7813 | (Elizabeth Mattijsen)++ | src/Raku/Grammar.nqp
RakuAST: fix typo in exception handling call
19:42
Geth rakudo/rakuast-phase-cleanup: 12 commits pushed by (Jonathan Worthington)++
review: github.com/rakudo/rakudo/compare/f...3783b52a51
21:24
japhb Huh, that isn't a terribly useful comparison link, Geth. 21:42
Xliff MasterDuke: That's another thought. Thanks! Right now I am using .stderr/.stdout with (:bin) 21:47
Is UTF8 the only encoding that will throw a fatal exception? 21:48
lizmat japhb: looks like it was mostly a rebase 22:51