🦋 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.
[Coke] vendethiel: IMO, we should not have placeholder releases in the ecosystem. 00:14
tonyo placeholders shouldn't be needed with the auth system .. dist:auth:ver:api 00:16
prevents name sitting on good dist names
vendethiel Tell that to ingy :-) 00:19
I don’t think you can say this is about namesquatting, the opposite rather. 00:20
00:30 buildable6 left 00:33 buildable6 joined 01:33 buildable6 left 01:35 lizmat_ joined, buildable6 joined 01:38 lizmat left 01:40 buildable6 left, buildable6 joined
ingy [Coke]: yamlscript should be released in full to raku quite soon 01:44
it is just a shared library binding, so not a lot of raku work to do 01:45
as vendethiel says is is being worked on (very heavily) by me and vendethiel :) 01:46
02:35 buildable6 left 02:36 buildable6 joined 02:48 hythm joined 03:06 dbonnafo joined 03:10 dbonnafo left 03:33 nine left, camelia left 03:36 buildable6 left 03:37 nine joined 03:38 buildable6 joined 03:42 camelia joined 04:38 buildable6 left 04:39 hythm left, buildable6 joined
[Coke] ingy++ vendethiel++ 04:46
Xliff How can I add a method to a role, dynamically? 04:48
04:55 lichtkind joined 05:24 Xliff left 05:28 dbonnafo joined 05:39 buildable6 left 05:43 buildable6 joined 05:57 CIAvash joined
nemokosch What is yamlscript anyway? 06:39
m: role Foo {}; Foo.HOW.^methods.ⅆ 06:40
evalable6 (exit code 1) Died with X::Method::NotFound
in block <unit> at /tmp/UftwSxa2BJ line 1
Raku eval Exit code: 1 No such method 'raku' for invocant of type 'NQPRoutine' in block <unit> at main.raku line 1
nemokosch Meh
m: role Foo {}; .say for Foo.HOW.^methods 06:41
evalable6 (exit code 1) Died with X::Method::NotFound
in block <unit> at /tmp/XmNd23YNkc line 1
Raku eval Exit code: 1 No such method 'say' for invocant of type 'NQPRoutine' in block <unit> at main.raku line 1
nemokosch m: role Foo {}; .Str.say for Foo.HOW.^methods 06:42
evalable6 (exit code 1) Died with X::Method::NotFound
in block <unit> at /tmp/rl49T9C0GD line 1
Raku eval Exit code: 1 No such method 'Str' for invocant of type 'NQPRoutine' in block <unit> at main.raku line 1
nemokosch What even exists on it
06:43 buildable6 left
m: role Foo {}; Foo.HOW.^methods.say 06:43
evalable6 (archetypes new set_selector_creator new_type p…
Raku eval (archetypes new set_selector_creator new_type parameterize !produce_parameterization add_possibility select_candidate specialize update_role_typecheck_list role_typecheck_list type_check candidates lookup methods attributes parents roles ver auth language-revision is-implementation-detail WHY set_why !get_default_candidate !get_nonsignatured_candidate publish_type_cache name set_name shortname set_shortname
evalable6 nemokosch, Full output: gist.github.com/58a65c3e226768d164...f96de697e2
add_stash pretend_to_be pretending_to_be configure_punning set_pun_repr pun_repr make_pun pun inheritalize find_method is_method_call_punned get_boolification_mode set_boolification_mode publish_boolification_spec EXISTS-KEY DELETE-KEY DELETE-POS cache list flat eager serial List Slip Array Seq hash Hash Map elems end keys kv values pairs antipairs invert splice pick roll match classify categorize reverse combinations
permutations join tree push append unshift prepend EXISTS-POS AT-POS ZEN-KEY ASSIGN-POS BIND-POS all any one none AT-KEY BIND-KEY ASSIGN-KEY FLATTENABLE_LIST FLATTENABLE_HASH Set SetHash Bag ...)
06:46 buildable6 joined 06:56 dbonnafo left 07:44 dbonnafo joined 07:46 buildable6 left 07:47 buildable6 joined 07:48 dbonnafo left 07:54 dakkar joined 07:59 Manifest0 joined 08:15 sena_kun joined 08:25 CIAvash left 08:26 CIAvash joined 08:35 CIAvash left, CIAvash joined 08:47 buildable6 left 08:49 buildable6 joined 08:53 buildable6 left, buildable6 joined 08:54 lizmat_ left 08:55 lizmat joined 08:56 Sgeo left 09:24 jpn joined 09:27 CIAvash left 09:49 buildable6 left
gfldex .seen Xliff 09:49
tellable6 gfldex, I saw Xliff 2023-10-26T04:48:12Z in #raku: <Xliff> How can I add a method to a role, dynamically?
gfldex gfldex: .tell Xliff see: gfldex.wordpress.com/2023/05/17/pl...g-strings/ 09:50
09:50 jpn left 09:52 jpn joined, buildable6 joined
gfldex .tell Xliff see: gfldex.wordpress.com/2023/05/17/pl...g-strings/ 09:58
tellable6 gfldex, I'll pass your message to Xliff
erik`` Hi! I am trying to groc grammars. I'm looking to conditionally substitute part of a string depending on context. When a method in the action recognizes this context, I want another set of methods to become active. Is this possible? 10:03
10:05 dbonnafo joined 10:10 dbonnafo left
lizmat that sounds like a slang ? 10:18
erik`` I will try to look into slangs. Thank you for the pointer. 10:50
vendethiel erik``: that’s when parsing using grammars, yes? Wouldn’t you just have two different rules in your grammar? 10:52
You can also use a dynamic variable
10:52 buildable6 left 10:54 buildable6 joined
erik`` vendethiel: This is when parsing using grammars, you are right. The problem is that I want the effect of an action for a specific rule to depend on the context which it appears in. To give some more details about what I am doing: I am parsing a datalog program, and if an expression appears as the left hand side of a deduction rule, I want the action to behave differently. 11:00
Deduction rule in datalog, so not a rule in raku. 11:01
lizmat then using a dynamic variable feels like the simplest solution
erik`` All right, I will investigate dynamic variables. 11:03
vendethiel What’s the difference between both? 11:09
Sounds like something that should be resolved later than att parse time
lizmat you can create a dynamic variable inside a token/rule/regex with :my $*FOO
:my $*FOO;
actually, the semicolon is needed
erik`` vendethiel: difference between what? 11:16
My intention was to solve this inside an action. Should I not take this approach?
vendethiel Your grammar should produce a syntax tree 11:19
11:19 nine left, nine joined
I think to parse datalog you shouldn’t need it at this stage 11:19
lizmat well, not necessarily: e.g. the sprintf grammar produces a string :-) 11:20
erik`` I am intending to make relatively simple modifications to the datalog code, and thought to simply let the action do the pattern matching for where to substitute. 11:22
And then build the resulting code simultaneously.
11:36 camelia left 11:38 camelia joined, nine left 11:39 nine joined 11:42 teatwo joined 11:43 jpn left, nine left, camelia left 11:44 nine joined 11:45 tea3po left 11:49 camelia joined 11:54 buildable6 left 11:57 buildable6 joined 12:03 jpn joined 12:30 whatnext joined
whatnext Hello - just a heads up to the raku community that I have a job posted here: www.upwork.com/jobs/~0138b3bac01123f8c3 12:31
12:52 antim0d3s joined
[Coke] whatnext++ 12:52
12:54 sdfgsdfg left 12:57 buildable6 left 13:00 buildable6 joined
whatnext (y) 13:26
antononcube That could be handled with standard rule- and actions programming. (Without dynamic variables, etc.) 13:27
13:27 dbonnafo joined 13:31 dbonnafo left 13:53 dbonnafo joined 14:00 buildable6 left 14:01 buildable6 joined 14:05 dbonnafo left 14:15 camelia left, camelia joined 14:18 grondilu joined
grondilu m: say grammar { token TOP { <+print-[$]>+ } }.parse: q{foo$bar} 14:19
camelia Cannot resolve caller print(Mu:U: <anon|1>:D); none of these signatures matches:
(Mu: *%_)
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
grondilu why is it calling &print?
m: say q{foo$bar} ~~ /<+print-[$]>+/
camelia 「foo」
grondilu m: say q{foo$bar} ~~ /<+print>+/
camelia 「foo$bar」
grondilu m: say grammar { token TOP { <+print>+ } }.parse: q{foo$bar} 14:20
camelia Cannot resolve caller print(Mu:U: <anon|1>:D); none of these signatures matches:
(Mu: *%_)
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
grondilu m: say grammar { token TOP { <print>+ } }.parse: q{foo$bar}
camelia Cannot resolve caller print(Mu:U: <anon|1>:D); none of these signatures matches:
(Mu: *%_)
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
grondilu o_O
m: say grammar { token TOP { <print>+ } }.parse: q{foo}
camelia Cannot resolve caller print(Mu:U: <anon|1>:D); none of these signatures matches:
(Mu: *%_)
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
grondilu looks like a bug tbd 14:21
*tbh
m: say grammar { token TOP { <graph>+ } }.parse: q{foo}
camelia 「foo」
graph => 「f」
graph => 「o」
graph => 「o」
14:38 Sgeo joined 15:01 buildable6 left 15:02 buildable6 joined 15:09 TieUpYourCamel left 15:40 notna joined 15:52 stanrifkin joined 15:53 whatnext left 15:56 dbonnafo joined 15:58 notna left 16:00 jpn left 16:03 buildable6 left 16:06 buildable6 joined 16:31 dakkar left 16:53 lizmat_ joined 16:57 lizmat left, lizmat_ left 16:58 lizmat joined 17:06 buildable6 left 17:07 buildable6 joined 17:12 buildable6 left, buildable6 joined 17:16 buildable6 left, buildable6 joined 17:20 buildable6 left, buildable6 joined
grondilu no one? 17:48
m: say grammar { token TOP { <print>+ } }.parse: q{foo}
camelia Cannot resolve caller print(Mu:U: <anon|1>:D); none of these signatures matches:
(Mu: *%_)
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
grondilu ^is that a bug?
17:52 dbonnafo left
lizmat am about to go afk 17:55
but that does not look like a bug: where is <print> supposed to be coming from? 17:56
grondilu isn't it a predefined character class?
m: say q{foo$bar} ~~ /<print>+/
camelia 「foo$bar」
print => 「f」
print => 「o」
print => 「o」
print => 「$」
print => 「b」
print => 「a」
print => 「r」
grondilu as in "printable character" 17:57
docs.raku.org/language/regexes#Pre...er_classes
m: say grammar { token TOP { <+print+space>+ } }.parse: q{foo} 17:59
camelia Cannot resolve caller print(Mu:U: <anon|1>:D); none of these signatures matches:
(Mu: *%_)
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
grondilu m: say grammar { token TOP { <+graph+space>+ } }.parse: q{foo}
camelia 「foo」
grondilu m: say grammar { token TOP { <+graph+space-cntrl>+ } }.parse: q{foo}
camelia No such method 'space-cntrl' for invocant of type '<anon|1>'
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
grondilu m: say grammar { token TOP { <+graph+space - cntrl>+ } }.parse: q{foo} 18:00
camelia 「foo」 18:01
18:08 buildable6 left 18:12 buildable6 joined 18:17 melezhik joined
melezhik .tell SmokeMachine: build is not good with the latest Rakudo version - ci.sparrowhub.io/report/3732 18:19
tellable6 melezhik, I'll pass your message to SmokeMachine
18:24 melezhik left 19:10 AlexDaniel joined 19:12 buildable6 left 19:14 buildable6 joined 19:17 sourceable6__ left, quotable6 left, benchable6__ left, linkable6__ left, greppable6 left, nativecallable6 left, tellable6 left, unicodable6 left, bloatable6 left, committable6 left, releasable6 left, coverable6 left, notable6__ left, buildable6 left, bisectable6 left, shareable6 left, evalable6 left 19:19 buildable6 joined, evalable6 joined, linkable6 joined 19:20 coverable6 joined, unicodable6 joined, quotable6 joined, committable6 joined, sourceable6 joined, tellable6 joined, greppable6 joined, nativecallable6 joined 19:21 bisectable6 joined, releasable6 joined, bloatable6 joined, shareable6 joined, notable6 joined, benchable6 joined 19:26 tellable6 left, tellable6 joined, notable6 left, notable6 joined 19:48 Xliff joined
Xliff \o 19:48
tellable6 2023-10-26T09:58:21Z #raku <gfldex> Xliff see: gfldex.wordpress.com/2023/05/17/pl...g-strings/
19:49 dbonnafo joined
Xliff How can I get a list of classes? 19:50
gfldex: Ah! Thanks for that. However that does not work from outside the role body, it seems. 19:52
m: role A { }; A.HOW.^can('declares_method').gist.say 19:53
camelia 0
19:53 dbonnafo left
Xliff m: role A { ::?ROLE.HOW.^can('declares_method').gist.say }; 19:54
camelia ( no output )
Xliff m: role A { ::?ROLE.^can('^declares_method').gist.say };
camelia ( no output )
20:09 stanrifkin left 20:11 eseyman left 20:19 buildable6 left 20:20 buildable6 joined
tbrowder__ I'm trying to recover from an exception when an installed module's prog attempts to access a file NOT listed in the META6.json file's "resources" list. The module is available at 'github.com/tbrowder/Demo.git'. The relevant code is in this gist: 20:28
gist.github.com/tbrowder/86176edb5...325f796410 20:30
20:30 dbonnafo joined
tbrowder__ I tried to follow the pertinent flow from the docs, but failed to trap the fatal attempt in the installed module. 20:31
Of note the doc example had a "bad-sub" with an empty signature so I tried to fake it. 20:32
Any help is most welcome. 20:33
20:35 dbonnafo left
gfldex Xliff: Please note that you have to finish a role before the first class uses it. 20:35
There is right now no way to get a list of all type-objects, if that's what you are looking for. 20:36
I got pretty far patching that into Rakudo, tho. Will try again after v6.e is released. 20:37
20:49 jpn joined
tbrowder__ *and appreciated! 21:07
21:17 Voldenet left 21:18 jpn left 21:20 buildable6 left 21:22 buildable6 joined, Voldenet joined 21:29 dbonnafo joined 21:34 dbonnafo left 21:41 Voldenet left 21:51 jrjsmrtn left 21:52 Voldenet joined 21:53 jrjsmrtn joined
leont I'm having a writers block with my slides, starting to get worried :-/ 21:55
21:55 jpn joined 21:58 codesections1 joined 22:00 jpn left 22:01 codesections1 left
lizmat everybody: please look the other way and don't pay any attention to leont 22:05
:-)
leont Heheh
xinming tbrowder__: $ ./rakudo-m -e ' $*DISTRO.name.say; $*DISTRO.version.say;' 22:13
tellable6 2023-10-25T13:34:41Z #raku <tbrowder__> xinming can you please post results here of running $*DISTRO.name and $*DISTRO.version on your system? i'm curious about the response on other linux systems
xinming gentoo
v6.5.3.gentoo
librasteve grondilu: I have replicated your issue with <print> ... suggest you make an issue on rakudo on github 22:16
SmokeMachine .tell melezhik thank you! I’ll take a look shortly
tellable6 SmokeMachine, I'll pass your message to melezhik
22:22 buildable6 left 22:23 buildable6 joined 22:25 jrjsmrtn left 22:27 buildable6 left 22:28 buildable6 joined 22:30 dbonnafo joined 22:35 dbonnafo left, jrjsmrtn joined 22:36 dbonnafo joined
grondilu done: github.com/rakudo/rakudo/issues/5443 22:40
22:41 dbonnafo left
librasteve ^^++ 22:42
22:46 sena_kun left
nemokosch @grondilu is there a predefined <print> character class? 22:49
sorry a bit lagging behind
librasteve docs.raku.org/language/regexes#Pre...er_classes 22:51
Xliff gfldex: How far along were you before you stopped patching? 22:53
And what would it take to get that finished?
nemokosch well that's kind of worrying 22:55
docs.raku.org/language/traps#Using...en/regexes it's probably this phenomenon on steroids
22:57 manu_ joined, manu_ is now known as eseyman 23:17 lichtkind left 23:23 buildable6 left 23:26 buildable6 joined 23:42 tea3po joined 23:45 teatwo left, jpn joined 23:50 jpn left