🦋 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.
00:00 Manifest0 left, reportable6 left 00:03 reportable6 joined
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]
01:02 Xliff joined
Xliff \o 01:02
Is there a way to use EVAL to declare a sub in the OUTER namespace?
01:03 xinming left
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
01:05 xinming joined
Xliff gfldex++ # Thanks, mate! 01:05
gfldex :) 01:06
01:53 andydude joined, andydude1 joined 01:55 derpydoo joined 01:57 andydude left 02:19 teatime joined 02:21 teatwo left, tea3po left 02:22 teatwo joined 03:43 rf left 03:54 kjp left, kjp joined 04:27 zara joined 04:58 zara left 05:35 MoC joined 06:00 reportable6 left 06:01 reportable6 joined
Xliff bleah 06:30
06:57 andydude1 left 07:17 jpn joined 07:22 jpn left 07:36 jpn joined 07:49 merp left 07:50 jpn left, merp joined 08:00 jpn joined 08:04 jpn left 08:17 jpn joined 08:31 jpn left 08:33 jpn joined 08:38 jpn left 08:43 sena_kun joined 09:21 jpn joined
Voldenet Xliff: there's another way, very similar 09:32
m: my &outer; { '&outer = sub { say "hello Xliff" }'.EVAL; }; outer();
camelia hello Xliff
09:40 jpn left 09:44 jpn joined 10:23 Sgeo left 10:59 derpydoo left 11:21 jpn left
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
12:00 reportable6 left 12:01 reportable6 joined 12:42 andydude joined, andydude left 13:22 MoC left
gfldex lolibloggedalittle: gfldex.wordpress.com/2023/05/21/most-trusting/ 13:50
14:00 kybr left, kybr joined 14:16 teatime left, teatwo left
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
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
15:16 rf joined 15:33 MoC joined
tbrowder__ tonyo: thnx! 15:43
15:48 andydude joined 15:57 Xliff left 16:05 Manifest0 joined
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
17:34 Sgeo joined 17:51 andydude left 17:58 andydude joined 18:00 reportable6 left 18:03 reportable6 joined
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
18:41 tobs left 18:50 tobs joined 18:57 tobs left, tobs joined 18:59 andydude left
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]
19:24 Xliff joined
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
20:14 jpn joined 20:20 jpn left 20:28 blue-coffee joined 20:39 blue-coffee left
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
21:33 MoC left 22:05 jpn joined 22:09 jpn left 22:13 sena_kun left
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
22:57 TieUpYourCamel left, andydude joined 23:20 Xliff left 23:24 Manifest0 left 23:30 andydude left 23:53 jpn joined 23:58 jpn left