🦋 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 reportable6 left 00:02 reportable6 joined 00:10 jpn joined 00:15 jpn left 00:21 melezhik left 00:29 jpn joined 00:39 CodeTortoise left 00:52 jgaz left 00:53 jpn left 01:01 derpydoo left 01:03 xinming left 01:05 xinming joined 01:08 jpn joined 01:14 jpn left 01:17 NemokoschKiwi joined 01:26 jpn joined 01:31 jpn left 01:41 eseyman left 01:42 Voldenet left 01:45 jpn joined 01:49 Voldenet joined 01:50 NemokoschKiwi left 02:01 Voldenet left 02:22 jpn left 02:36 silug left 02:37 jpn joined, squashable6 left 02:38 squashable6 joined, Voldenet joined 02:39 silug joined 02:41 silug left 02:43 jpn left 02:59 ProperNoun left 03:05 Homer_Simpson joined
Homer_Simpson is there a way to type a string liteal and then make a n identifier from it 03:05
eg 'item' in $item 03:06
literal* an* 03:07
Nemokosch yes there is but you should really ask yourself why you want to do it 03:10
03:12 jpn joined
you can ask the symbol table accessed by `::` - that can give you symbols that exist but it cannot store new symbols 03:13
docs.raku.org/language/packages#Pseudo-packages 03:16
03:17 Kaipei left
the lookup story starts right below: docs.raku.org/language/packages#Lo...g_up_names 03:17
03:24 jpn left 03:29 silug joined
Homer_Simpson awesome 03:35
so like this: my $::'foo'; or like this: my $str = 'bar'; $::$str; 03:37
I can't get it to work 03:53
my $::('foo'); 03:54
my $bar = 'bar'; my $::($bar);
03:54 jpn joined
Homer_Simpson maybe replit just sucks 03:55
I wish there was an android raku compiler
with an ide 03:56
03:56 silug left
Homer_Simpson replit app has stopped working even after resetting/reinstall 03:56
04:00 jpn left 04:04 silug joined
Homer_Simpson usercontent.irccloud-cdn.com/file/SnRDC2Co/.jpg 04:10
04:12 jpn joined 04:26 jpn left 04:37 jpn joined 04:42 jpn left
Homer_Simpson oh ok they are only package scoped 04:53
05:33 jpn joined 05:39 Kaipei joined 05:42 jpn left 05:45 Kaipei left 05:56 jpn joined 06:00 reportable6 left, reportable6 joined 06:14 jpn left 06:57 jpn joined 07:23 jpn left 07:28 sarna left, sarna joined
jaguart m: constant undef="not-defined"; say undef; 07:32
camelia ===SORRY!=== Error while compiling <tmp>
Unsupported use of undef as a value. In Raku please use: something
more specific: an undefined type object such as Any or Int, :!defined as
a matcher, Any:U as a type constraint, Nil as the absence…
jaguart m: our Str constant undef="not-defined"; say undef; 07:33
camelia ===SORRY!=== Error while compiling <tmp>
Unsupported use of undef as a value. In Raku please use: something
more specific: an undefined type object such as Any or Int, :!defined as
a matcher, Any:U as a type constraint, Nil as the absence…
07:53 jpn joined 08:05 jpn left 08:16 lucerne joined 08:17 lucerne left 08:37 bartolin left 08:48 jpn joined 08:52 jpn left 09:00 Demos[m] left 09:11 lizmat_ left, lizmat joined 09:12 tib_ joined
jaguart oh - but case sensitive :) whew 09:15
m: constant UNDEF = "nope"; say "lala ", UNDEF;
camelia lala nope
Voldenet I wouldn't use UNDEF 09:28
I'd do something like `class foo { default { foo.new }}; foo.default` 09:30
or `class y { our sub default { y.new } }; y::default.say` 09:32
09:41 Kaipei joined 09:43 jpn joined
Nemokosch Homer_Simpson: as I said, you cannot create new variables to all symbol tables. You can create for ones that have a Stash, as opposed to a PseudoStash 09:43
Voldenet: I guess it's rather the principle that is funny 09:45
That you naively do something and the compiler "misguesses" what your motives are 09:46
Perhaps it shouldn't shut you down if you yourself created a term called undef 09:47
Geth ecosystem/main: 8f8740e49b | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Just a couple to go
Nemokosch by the way... I'd like to gather allies for a somewhat similar, fairly fundamental issue 09:55
Grammars have regexes and tokens which are installed as methods, right? 09:56
This wouldn't necessarily be a problem - if they weren't downright installed with completely unmarked names, hence instantly name-conflicting with all methods that a Grammar class has 09:57
leont: perhaps you can empathize with this problem; I think this is much like the problem of lexical exports, except in a somewhat closer world 09:59
however, it seems to me that the offered remedies are also worse, basically "just know by heart what methods your Grammar can have and avoid those names" 10:00
closer->more closed
10:31 eseyman joined 10:37 jpn left, jpn joined 10:42 jpn left 10:43 Geth left, Geth joined 10:47 sena_kun joined 11:04 jpn joined 11:05 Kaipei is now known as Kaiepi 11:09 squashable6 left
lizmat weekly: www.reddit.com/r/rakulang/comments...session_2/ 11:10
notable6 lizmat, Noted! (weekly)
11:10 squashable6 joined 11:14 Homer_Simpson left 11:28 jpn left 12:00 reportable6 left 12:03 reportable6 joined 12:14 squashable6 left 12:17 squashable6 joined 13:17 evalable6 left, linkable6 left, reportable6 left, squashable6 left, benchable6 left 13:18 linkable6 joined, benchable6 joined, reportable6 joined 13:19 squashable6 joined 13:20 evalable6 joined 13:36 jgaz joined 14:00 jpn joined 14:04 jpn left 14:30 jgaz left, jgaz joined 14:36 jpn_ joined 14:43 ProperNoun joined 14:53 jpn_ left 14:59 TieUpYourCamel left 15:01 jpn joined 15:28 jpn left 15:39 jpn joined 16:09 TieUpYourCamel joined 16:14 Geth left, Geth joined 16:34 CodeTortoise joined 16:43 CodeTortoise left 17:10 epony left 17:21 jpn left 17:26 jgaz left 17:28 epony joined, melezhik joined 17:59 jgaz joined 18:00 reportable6 left, reportable6 joined
melezhik testing the bridge ... 18:13
Anton Antonov <@779471841270038528> How? 🙂 18:40
melezhik Anton, maybe this sounds "silly" I wanted to make it sure that messages from discord raku-bridge also appears here )) 18:55
I just need done it before )) 18:56
need -> never
19:00 evalable6 left, linkable6 left 19:02 linkable6 joined, evalable6 joined 19:03 CodeTortoise joined 19:14 CodeTortoise left
Anton Antonov 👍 19:22
19:44 melezhik left 19:53 derpydoo joined 19:59 jpn joined 20:22 epony left 20:29 epony joined 20:40 jpn left 20:54 pippo joined
pippo m: my @a=[:level(1)]; class A {has $.level}; my $instance=A.new(@a.shift); 20:55
camelia Default constructor for 'A' only takes named arguments
in block <unit> at <tmp> line 1
20:56 vrurg_ joined, vrurg left
pippo my @a=[:level(1)]; @a.shift ~~ :level(1); 20:58
my @a=[:level(1)]; say @a.shift ~~ :level(1);
evalable6 True
pippo my @a=[:level(1)]; say @a.shift ~~ :level(1); class A {has $.level}; my $i = A.new(:level(1)); say $i; my $j = A.new(@a.shift); 20:59
my @a=[:level(1)]; say @a.shift ~~ :level(1); class A {has $.level}; my $i = A.new(:level(1)); say $i; my $j = A.new(@a.shift); say $j; 21:00
m: my @a=[:level(1)]; say @a.shift ~~ :level(1); class A {has $.level}; my $i = A.new(:level(1)); say $i; my $j = A.new(@a.shift); say $j;
camelia True
Default constructor for 'A' only takes named arguments
in block <unit> at <tmp> line 1

A.new(level => 1)
pippo m: my @a=[:level(1)]; class A {has $.level}; my $i = A.new(@a.shift); say $i; 21:01
camelia Default constructor for 'A' only takes named arguments
in block <unit> at <tmp> line 1
pippo ^^ anybody could explain me why this does not work please? 21:02
21:03 CodeTortoise joined, jpn joined 21:04 CodeTortoise left 21:12 jpn left
guifa The default constructor for a class is .new(:$attr, :$attr…) 21:23
the problem is
you're passing the Pair as a positional argument
Nemokosch guifa: maybe you know how to pass a pair as a positional argument to a _sub-signature_? 21:27
pippo: I have something for you based on what guifa said 21:34
21:34 NemokoschKiwi joined
NemokoschKiwi m: my @a=[:level(1)]; class A {has $.level}; my $i = A.new(|(@a.shift)); say $i; 21:35
camelia A.new(level => 1)
NemokoschKiwi 🥳
pippo Uaaaaaaaaaaa!!! thank you!!!!!!!!!!!!!
NemokoschKiwi you're welcome. Everybody learns something :D 21:38
21:38 pippo left, NemokoschKiwi left, pippo joined
pippo me many! Cheers 21:39
21:40 pippo left 21:51 Manifest0 joined
Manifest0 Hi. I made a little script in raku, but from time to time the script core dumps. 21:55
I have no idea why. Is anybody interested in the coredump file? Should i open a github issue with just the coredump? 21:56
21:57 jpn joined
Nemokosch What is the script doing, if I may? 21:57
Iirc I only got a dump once, in a situation with heavy use of junctions 21:58
so basically some concurrent access
Manifest0 It's a console rss reader. It will use cro-http to get the rss, and write it to a sqlite db. 22:00
Nemokosch if the dump should happen while invoking Cro, it might be a good idea to delegate the issue directly there; it can be more visible and most knowledgeable implementors tend to have Cro affiliations anyway 22:03
Manifest0 i don't know if it's while invoking cro. It's possible. I have a react loop that reacts every 120s to update the feeds, and also reacts for a key press (i have a text interface). The crash seems to happen when i press the keys to navigate while the cro is extracting the url. 22:10
I'm going to ask in #raku-dev 22:11
Nemokosch Yes, unfortunately, that's a complex and errorprone part, react blocks, that is. Perhaps it takes someone with a good grasp of the internals to say if you did something wrong or it's just downright a bug. Until then, I'd say make sure to check out docs.raku.org materials, including the "traps" section 22:15
22:22 vrurg_ is now known as vrurg 23:09 Woodi left 23:11 epony left 23:16 Woodi joined 23:20 CodeTortoise joined 23:22 sena_kun left
Geth ecosystem/main: 48cdc93d9f | thundergnat++ (committed using GitHub Web editor) | META.list
Migrate modules to fez ecosystem
23:56 Homer_Simpson joined