🦋 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.
Xliff Does Raku still have USAGE? 02:41
ab5tract Xliff: it’s been deprecated in favor of GENERATE-USAGE 07:28
patrickb rougerakudev: You can look at github.com/rakudo/rakudo/blob/main...ner/main.c 08:33
Compile that as a library and you should be good to to go.
tbrowder roguerakudev: depends on how you need use it. see the docs on interfacing with C, and a bit with C++. 11:08
in my working years, while larry and damian lizmat and others were creating raku, i used perl to drive C and FORTRAN progs. raku can do that much easier. also excels at data postprocessing. 11:11
antononcube rougerakudev == Rog ? 13:08
@tbrowder Are you an (ex-)pilot? 13:25
lizmat antononcube afaik, indeed! 13:37
antononcube @lizmat Ok. I just characterized @tbrowder as "Raku-bound ex-pilot" on Reddit. But @trbrowder can be: (1) a current pilot, and (2) "just" ex-air-force, not an ex-pilot. 13:45
roguerakudev yeah 13:48
I guess the bot uses actual usernames, not server nicknames
the name sounds a bit redundant in the context of a Raku channel, so I wish it would use Rog instead...
antononcube Can help it! > Bad bot Rog not. 13:51
tbrowder i like to say "former fighter pilot" 13:58
now i just fight with raku and debian 13:59
antononcube @tbrowder Ok, good -- my characterization is correct. 14:00
tbrowder hm, not fight, a mostly friendly wrestling match with a few cuss words now and then
speaking of raku, using mi6 i discovered a new thing with generating markdown in the dist.ini and can't believe i haven't heard anyone mention it 14:02
i usually generate a module's markdown from pure pod files (rakudoc), but now i'm writing the pod closer to the action inside a rakumod file. 14:04
and that requires a "-I." on the cli to ensure the rakumod gets compiled. probably obvious to everyone else but this is new to me 14:06
[Coke] if you're running code inside an uninstalled checkout, you need to tell it how to find the modules, yup. 14:38
patrickb One of the next tasks on my list is creating a simple raku lexer. I'm unsure if I better start from scratch (taking some existing raku lexer as inspiration) or try to strip down rakudos grammar. Any opinions on what might be a better approach? 15:44
s/a/the/ (though if you have a different idea, I'm all ears as well) 15:47
lizmat if you want to try strip down Rakudo's grammar, I suggest you use the RakuAST grammar 15:54
of course, the big issue is really that Raku is capable of changing its lexer on the fly
librasteve I would write my own starting here www.perplexity.ai/search/please-wr...AcupvgqQfw 16:02
why? I think that raku is a very intricate and huge language and just mentally capturing it's lexer is a big and likely unnecessary overhead, whereas from a language user (ie a coder) pov, the Grammar / Actions capabilities are very straightforward and provide great defaults and guardrails 16:05
patrickb lizmat: I just want something good enough to sprinkle some color on a piece of code. I'm pretty sure I can just ignore that issue. 16:10
lizmat is the code guaranteed to be valid Raku ?
patrickb I.e. if you "use BeSqlInsteadOfRaku;" then your colors are random, but then just use a different highlighter. :-P 16:11
For my use case technically yes, but given I invest time to create something suitable for highlighting, I should aim for a thing that works on anything. 16:13
lizmat use RakuAST::Deparse::Highlight; say highlight($source); # how does that work for you?
if that does, then no investment needed :-)
patrickb I think we had a bit of discussion about the topic somewhere some time ago. I need a highlighter for the raku debugger I'm working on. That needs to highlight any code it reads from disk or gets passed from the debug server. As it is code currently executingp, it should be valid Raku code. But there is the code execution at begin time issue. And the Raku version debugged is not necessarily the 16:18
same that is running the debugger. In general, I think it's worthwhile for us to have a no-strings-attached tool to highlight Raku written Raku.
lizmat sure, then by all means... :-) 16:19
patrickb :-)
lizmat but in that case, i'd say get your inspiration from highlighters such as used by vim and JS 16:20
rather than the Raku grammar
patrickb The most feature rich highlighter that I know of is the one of chroma. I guess I'll have a look at that one then... 16:21
Thanks for the input! 16:23
librasteve: Thanks for the link!
[Coke] lizmat: Bug in RAKUDOC_RAKUAST rakudoc, I think: C«%*ENV<PATH>» 16:47
old parser renders as %*ENV<PATH> - new as %*EN
lizmat a golf would be appreciated.... fwiw, I'm starting to run out of mental stack space 16:48
:-)
[Coke] That was the golf! I'll open a ticket though so you don't need to keep this in current mem. :) 16:49
lizmat thanks!
[Coke] also: notice that we have two very similar tags in rakudo/rakudo issues: "Fixed in RakuAST" and "Addressed in RakuAST" - do we want these combined? If so, pick one and I'll update all the tickets. 16:54
er, *I noticed* 16:55
ab5tract [Coke]: So far those have been used as "Done" vs "Aspirational" 17:33
so maybe it would make sense to change from "Addressed" to "Addressable" 17:45
[Coke] ahhhh, that makes sense. 17:48
ab5tract yeah, certainly the current wording wouldn't ah just lead you to this 17:49
erm, fat fingered 17:50
" certainly the current wording wouldn't just automatically lead you to this distinction"
[Coke] the test comparing old and rakuast pod rendering keeps finding occasional places where we were accidentally relying on a bug in the old renderer. 18:48
e.g. C< some stuff C<other stuff> > used to just be `some stuff other stuff`. lizmat++ 18:49