🦋 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.
tbrowder__ .tell uzl[m] Briggs isn't interested. He doesn't mind following his TOC but interested parties would have to deal with his publisher. 00:41
tellable6 tbrowder__, I'll pass your message to uzl[m]
Xliff \o 01:02
Is there a way to use EVAL to declare a sub in the OUTER namespace?
gfldex m: my &outer; { &outer = 'sub { say "hello Xliff" }'; }; outer(); 01:04
camelia Type check failed in assignment to &outer; expected Callable but got Str ("sub \{ say \"hello ...)
in block <unit> at <tmp> line 1
gfldex m: my &outer; { &outer = 'sub { say "hello Xliff" }'.EVAL; }; outer();
camelia hello Xliff
Xliff gfldex++ # Thanks, mate! 01:05
gfldex :) 01:06
Xliff bleah 06:30
Voldenet Xliff: there's another way, very similar 09:32
m: my &outer; { '&outer = sub { say "hello Xliff" }'.EVAL; }; outer();
camelia hello Xliff
gfldex TIL: `trusts` takes a Package too. 11:27
ENODOC++; # :(
lizmat what would that mean ? 11:28
you can't inherit from a Package ? 11:29
gfldex Blogpost incomming. :) 11:33
gfldex lolibloggedalittle: gfldex.wordpress.com/2023/05/21/most-trusting/ 13:50
jdv eval? say "foo" 14:23
!eval say "foo"
evalable6: say "foo"
evalable6 foo
jdv bisectable6: say "foo" 14:24
bisectable6 jdv, Will bisect the whole range automagically because no endpoints were provided, hang tight
jdv, ¦6c (68 commits): «foo␤»
jdv, Nothing to bisect!
tonyo m: enum A <a b c>; for A.values -> $v { say $v ~~ a; }; # tbrowder__ 14:32
camelia True
False
False
Xliff \o 14:56
Can someone explain to me how I can use --doc?
gfldex: Why is infix:</> just a class in your blog post. I would figure that would contain much of what is in sub speed() 15:03
gfldex It's just there to construct the new unit. 15:04
inspiration for this blogpost: www.youtube.com/watch?v=MAGdU-G5OZg 15:06
avuserow Xliff: raku --doc MyFile.rakumod # convert to plain text and dump to the terminal 15:09
you can also do `raku --doc=Markdown MyFile.rakumod` and it will use Pod::To::Markdown and print to the terminal, assuming you have that module installed 15:10
tbrowder__ tonyo: thnx! 15:43
rf Morning folks 16:13
guifa o/ 16:44
Anton Antonov @guifa You recently gave some advice about building grammars, here, in this IRC. Do you have your advice consolidated in an article or presentation? 17:17
guifa Not on grammars. I think my tl;dr advice is small to big on grammars, big to small on actions 17:18
Also, always ensure you consume at least *something* lol 17:20
Anton Antonov Ok. I think you said also to start with tokens. 17:21
guifa yeah. rules and such can be useful, but I think they can cause some more trouble than they're worth when learning 17:22
Anton Antonov 👍 17:26
librasteve github.com/librasteve/raku-Physics.../issues/20 18:21
Anton Antonov Does anyone here got access to Bard's API -- i.e. PalLM API ? 18:39
leont I've been meaning to write a Slang to add binary literals, but given the RakuAst transition it may be easier to wait for that? Or maybe I should add it to the code grammar instead? 19:12
tbrowder__ .tell uzl[m] I emailed JJ and he said, quote, "You can copy anything you want, it's got a Cc license, so as long as you mention the original, we're good." End quote. Then he said, quote, "...So just go ahead and fork the repo. I'll try to help when possible." End quote. 19:22
tellable6 tbrowder__, I'll pass your message to uzl[m]
Xliff \o 19:24
What exception emits a "Malformed UTF bytes" message, and why is that fatal?
Anton Antonov @leont I would say it is always better to have a separate grammar, and then related slangs, or ASTs, or whatever. 19:43
vrurg Xliff: it's thrown by the backend. I'm not familiar with UTF guts to know why is it fatal. But it feels like a legitimate outcome for a broken UTF string. 20:42
Xliff OK. I have a proto sub MAIN defined in a module. I'd like to load this module like so "use My::Module <parameter-to-proto-main>". 22:21
Is there a way I can pass the string "parameter-to-proto-main to the proto sub MAIN before it executes the MAIN in the script that uses My::Module? 22:22
I've tried some excercises with sub EXPORT, but then the script doesn't load the proto. 22:23