🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
guifa o/ 03:26
jaguart Folks - anyone available for a 1hr paid zoom raku tutorial specifically on Grammars, please DM me with timezone, rate, availability, payment arrangement. I'm a Perl programmer, looking to move to Raku, have a specific use-case but can't quite get my Grammar recursive foo working. I have a simple test.raku to use as the starting point, about 280 lines - most of which is test data. 07:24
moritz (sent you a privmsg) 07:42
elcaro moritz: fyi, your snippet shows that `&::($name)` also returns the ref 12:15
lizmat clickbaits rakudoweekly.blog/2022/02/07/2022-06-basicly/ 13:09
tbrowder who am i today? 14:34
yea!
El_Che confused?
tbrowder yes, but prob was client and help desk helped me 14:35
tbrowder i was logged in with a random nick and didn’t know how to fix it…now i have the desired nickname back. 17:10
tbrowder cro question (also asked on #cro): can anyone explain how to create a systemd setup to manage the cro app? 17:21
moritz `cro run` runs in the foreground, yes? 17:24
then in the [Services] section, you can just write ExecStart=/path/to/your/cro run 17:25
possibly configure working directory and some environment variables 17:26
WorkingDirectory= and Environment= 17:29
or to start from the basics: you must write a systemd unit file (with the directives I've mentioned above)
moritz then you can either start them as the current user (systemctl --user start ...), or install them system wide by putting them into /etc/systemd/system/; then you need to run `systemctl daemon-reload` to the make sure systemd looks for new unit files 17:31
... and then you can run something like `systemctl start your-service` to start it, and with `systemctl enable ...` you can have it started automatically 17:32
tbrowder: ^^ does that help?
guifa ah moritz is around! 17:33
guifa might start bugging him mercilessly soon now that he's returned to Binex development 17:34
tbrowder moritz: yes, thank you! 18:04
leont When writing rakudoc, how can I link to another module's documentation? 18:52
tbrowder L<>? 19:00
it works for some situations like READMEs on github where one may use pod::to::markdown. 19:03
the only way i know is to link to the module’s repo 19:04
leont I added some L<>, but they don't appear to work 19:23
E.g. raku.land/cpan:LEONT/Protocol::MQTT 19:25
Like, you probably want either Protocol::MQTT::Client or Net::MQTT, but there's no way to send a user to either of those documentation pages 19:26
Actually, is there any way to show more than one module in a dist at all? I have the impression none of our ecosystem sites support it 20:05
tonyo 21:34
tonyo leont: didn't see you asked here, responded on twitter but you could do something like `curl -s 360.zef.pm | jq '.[] | select(.provides|has("Fez::CLI"))` (changing `Fez::CLI` to whatever you're seeking) to find out what dists report that module provided 21:35
leont That's barely easier than browsing the git repository 21:43
But it dosen't solve the real problem: actually showing the documentation of the other modules in a dist 21:44
tonyo leont: ah, i misread your gripe as how to _find_ what provides that module and not the other way round
leont Is there any way to encode a unicode-normalized string? A Uni object doesn't have an encode method, and .Str.encode seems to undo the normalization (because NFG I assume) 22:34
m: my $a = "ë"; say $a.NFC.Str.encode eq $a.NFD.Str.encode 22:37
camelia True
gfldex m: $*ENODOC++ for Parameter.new.constraint_list; 22:42
camelia ( no output )
gfldex lizmat++ # for cool code in cool module :) 22:43
gfldex Thinking about it, this might actually be an ENOAPI. 22:59
Thinking about it, this might actually be an ENOAPI. 23:00
leont I've used it, but I suspect it isn't really api. 23:08
curiosa Hello 23:32
how do I know the line number when emitting a warning while parsing using a grammar?
gfldex curiosa: You have to use a counter in the rule that is parsing lines. 23:34
A grammar doesn't really know what a line is, so it can't do that for you.
curiosa gfldex i'm not parsing lines but declarations 23:42
a linebreak is a whitespace to me
I would still like to put a warning with a line number in case of redeclaration of a symbol 23:43
it's not about software but about the user
I can imagine some weird workaround 23:44
MasterDuke i'm not sure if it works in user grammars, but you could try experimenting with something like github.com/rakudo/rakudo/blob/mast....nqp#L1009 23:45
curiosa oh I will check it thanks MasterDuke