🦋 Welcome to the main IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs can be inspected at colabti.org/irclogger/irclogger_log/raku
Set by lizmat on 21 April 2021.
00:00 sno joined 00:03 dataangel joined 00:07 sno left 00:11 lichtkind left, MasterDuke left 00:16 Xliff joined
Xliff m: my $m = (3.14159).^can('Int'); $m.^name.say; $m.name.say; $m.signature.gist.say 00:16
camelia List
No such method 'name' for invocant of type 'List'. Did you mean any of
these: 'none', 'note', 'Num', 'race'?
in block <unit> at <tmp> line 1
Xliff m: my $m = (3.14159).^lookup('Int'); $m.^name.say; $m.name.say; $m.signature.gist.say 00:17
camelia Method
Int
(Rat: *%_ --> Int:D)
Xliff m: my $m = (my $n = 3.14159).^lookup('Int'); $m.^name.say; $m.name.say; $m.signature.gist.say; $m($n).say 00:18
camelia Method
Int
(Rat: *%_ --> Int:D)
3
00:32 sno joined 00:46 stoned75_ left 00:52 aborazmeh left 00:56 frost-lab joined 01:06 hypocritical joined
hypocritical hello! 01:07
moon-child hypocritical: sup
01:13 dataangel left 01:18 pecastro left 01:39 sno left 01:43 sno joined 01:50 sno left 01:52 sno joined 01:55 kvw_5 joined 01:57 sno left 01:58 sno joined 01:59 kvw_5_ left 02:01 cxreg left 02:06 sno left 02:08 sno joined 02:12 cxreg joined 02:14 sno left 02:16 sno joined 02:24 sno left 02:25 sno joined 02:31 sno left 02:34 sno joined 02:39 kurahaupo_ joined, sno left 02:41 sno joined 02:47 sno left 02:49 sno joined 02:55 hypocritical left, sno left, kurahaupo_ left, kurahaupo joined 02:57 sno joined 03:01 kurahaupo_ joined 03:02 guifa2 left 03:03 sno left 03:04 kurahaupo left 03:06 sno joined 03:10 kurahaupo_ left, kurahaupo joined
Geth doc: fd5a7f738a | Coke++ | META6.json
p2h needed for one xt test
03:18
doc: 7b7d1c3393 | Coke++ | doc/Type/DateTime.pod6
remove typo from last commit
03:19 sno left 03:22 sno joined 03:36 sno left 03:37 sno joined 03:43 sno left 03:45 sno joined 03:51 sno left 03:54 sno joined 04:01 sno left 04:03 sno joined 04:08 sno left 04:10 sno joined 04:16 sno left 04:18 sno joined 04:25 sno left 04:26 sno joined 04:46 sno left 04:47 sno joined 04:54 sno left 04:56 sno joined 05:02 sno left 05:03 sno joined 05:09 sno left 05:10 sno joined, jmerelo joined 05:16 [Sno] joined 05:18 sno left 05:31 kurahaupo left, kurahaupo joined 05:36 [Sno] left 05:45 [Sno] joined 05:54 ufobat_ joined 05:56 rindolf joined 06:01 wamba joined 06:04 parabolize left
kybr is there a way to access class members? class Foo { my $count = 0; } ... Foo.count = 1? Foo::count = 1? 06:10
i've only seen examples that use these from within the class 06:11
moon-child m: class Foo { has $.count = 0 }; my $foo = Foo.new; $foo.count = 7; say $foo.count
camelia Cannot modify an immutable Int (0)
in block <unit> at <tmp> line 1
moon-child m: class Foo { has $.count is rw = 0 }; my $foo = Foo.new; $foo.count = 7; say $foo.count 06:12
camelia 7
kybr yes. thanks, but i'm asking about variables that are associated with the class, not any instance. i think you make them with my rather than has. 06:14
in c++, they call them 'static members' 06:15
m: class Str-with-ID is Str { my $.counter = 0; has Str $.string; has Int $.ID; method TWEAK() { $!ID = $.counter++; } } 06:16
camelia ( no output )
moon-child m: class Foo { my $.blub = 2 }; say ++Foo.blub 06:18
camelia 3
moon-child however that doesn't work if you declare it without the .. There is a low-level accessor thingy but I forget what it's called 06:19
kybr thanks. i was missing the .
06:20 domidumont joined 06:31 asymptotically joined
jmerelo m: "a".split(",").say 06:35
camelia (a)
06:59 Sgeo left 07:01 stoned75 joined 07:05 pecastro joined 07:14 wamba left 07:15 wamba joined 07:22 abraxxa joined 07:29 brtastic joined 07:32 brtastic1 joined 07:33 brtastic left, brtastic1 is now known as brtastic 07:34 dakkar joined 07:48 Black_Ribbon left, cgfbee left 08:06 kini left
samcv CONFERENCE: Call for papers - deadline just 2 days away!! Please share in your social media and other chat channels: news.perlfoundation.org/post/tprci...lforpapers 08:07
we need more raku talks :)
08:14 kini joined 08:16 kurahaupo_ joined 08:17 kurahaupo_ left, kurahaupo left 08:18 kurahaupo joined 08:20 abraxxa1 joined 08:23 abraxxa1 left 08:24 abraxxa1 joined, abraxxa1 left 08:26 abraxxa1 joined 08:27 sena_kun left, cgfbee joined, abraxxa1 left 08:28 sena_kun joined
bartolin_ committable6: 5ca26c2abc,e2ec1607f9 dd IntStr.new(2, "2").lc ## github.com/rakudo/rakudo/issues/4347 08:29
committable6 bartolin_, ¦5ca26c2: «"2"␤» ¦e2ec160: «IntStr.new(0, "2")␤»
08:30 abraxxa1 joined
bartolin_ I'm not sure I like the new behaviour (second commit) ... 08:30
08:31 abraxxa1 left, abraxxa1 joined 08:33 parv joined 08:41 ThaEwat left, patrickbkr[m] left, demostanis[m] left, CIAvash left, uzl[m] left, tusooa left, pwr22 left, Garland_g[m] left, Tirifto[m] left, MitarashiDango[m left, draco100[m] left, kiti_nomad[m] left, Nasrudin left, AlexDaniel` left 08:43 LizBot left, LizBot joined 08:44 squashable6 left 08:45 squashable6 joined 08:47 sena_kun left 08:49 sena_kun joined 08:52 Garland_g[m] joined 09:06 abraxxa1 left 09:07 abraxxa1 joined 09:24 kiti_nomad[m] joined, patrickbkr[m] joined, tusooa joined, demostanis[m] joined, ThaEwat joined, Tirifto[m] joined, pwr22 joined, Nasrudin joined, MitarashiDango[m joined, AlexDaniel` joined, uzl[m] joined, CIAvash joined, draco100[m] joined 09:28 kurahaupo left 09:29 kurahaupo joined 09:34 abraxxa1 left 09:35 abraxxa1 joined 09:36 bloatable6 joined 09:48 wamba left 09:50 kurahaupo left 09:51 kurahaupo joined
lizmat bartolin_: that's a bug 09:58
10:04 aindilis` joined 10:07 natrys joined 10:08 aindilis left
El_Che hallo 10:16
lizmat \o/ 10:19
bartolin_ lizmat: ah phew ;) 10:20
lizmat should be fixed with github.com/rakudo/rakudo/commit/bb069a99cf
bartolin_ thanks. I'll try that out on the JVM backend. 10:21
10:29 abraxxa left 10:35 wamba joined 10:43 natrys left 10:44 natrys joined 11:10 eseyman left, ufobat_ left 11:34 stoned75 left 11:36 stoned75 joined 11:49 frost-lab left 11:53 eseyman joined, wamba left 12:14 DiffieHellman left 12:15 DiffieHellman joined
Geth ¦ problem-solving: lizmat self-assigned Preserving / Accessing Raku IRC Log History github.com/Raku/problem-solving/issues/280 12:16
problem-solving/move-repo-to-raku: a830d70241 | (Elizabeth Mattijsen)++ | solutions/meta/move-repo-to-raku.md
Suggest moving to "raku" organisation

Note, this is only part of solving issue #280.
12:23
problem-solving: lizmat++ created pull request #281:
Suggest moving to "raku" organisation
12:24
12:41 softmoth joined 12:44 kurahaupo left 12:57 kurahaupo joined 13:02 kurahaupo left 13:12 jmerelo left, kurahaupo joined 13:26 wamba joined 13:39 hypocritical joined 14:02 softmoth left 14:14 wamba left 14:15 softmoth joined 14:17 hypocritical left, parabolize joined 14:22 softmoth_ joined 14:25 softmoth left 14:39 Sgeo joined
Xliff m: my $a = ''; $a.succ.say 14:44
camelia
15:10 aindilis` left 15:14 b2gills left
Xliff Have the new IO::Path methods landed on docs, yet? 15:22
15:27 silug joined 15:40 aborazmeh joined 15:42 jmerelo joined 15:51 brtastic left 15:52 natrys left 16:08 natrys joined 16:27 grimler32 left 16:35 dakkar left 16:54 patrickb joined, MasterDuke joined 17:19 natrys left 17:22 natrys joined 17:40 patrickb left 18:03 xelxebar_ joined, xelxebar left
tonyo andinus: you around? 18:06
18:20 Black_Ribbon joined
Xliff Why am I getting "No exception handler located for warn" in a pure raku program? 18:23
18:26 wamba joined 18:30 domidumont left 18:32 abraxxa joined 18:33 jmerelo left
tonyo Yes 18:39
18:39 aindilis joined 18:42 aindilis left 18:43 aindilis joined 18:45 simcop2387 left 18:46 simcop2387 joined 18:49 aindilis left
Xliff Does anyone know why am I getting "No exception handler located for warn" in a pure raku program? 18:57
lizmat are CATCH blocks involved ?
Xliff Doesn't raku provide its own warn handler?
Yes
And yes, I also provide a CX::Warn, now. 18:58
Still getting the error, which implies I might not be doing it in the right case.
s/case/place/
lizmat actually, I meant CONTROL blocks
warn is a CONTROL exception, is it not ? 18:59
Xliff Oh! Yeah. No CONTROL blocks.
lizmat Hmmm... perhaps a stack trace with --ll-exception ? 19:00
19:15 MasterDuke left 19:17 abraxxa left 19:19 MasterDuke joined 19:30 wamba left, wamba joined 19:31 patrickb joined 19:33 _jrjsmrtn joined 19:35 __jrjsmrtn__ left 19:42 oddp joined 19:44 softmoth_ left
Geth doc/supply-batch-ms-3744: bf1b3f0dba | (Stoned Elipot)++ | doc/Type/Supply.pod6
Use a more appropriate tense
19:45
20:12 squashable6 left 20:15 squashable6 joined 20:26 kurahaupo left 20:29 kurahaupo joined 20:35 patrickb left, stoned75 left, kurahaupo left 20:44 kurahaupo joined 21:02 asymptotically left 21:05 MasterDuke left 21:07 MasterDuke joined 21:08 rindolf left 21:10 softmoth_ joined 21:11 softmoth_ is now known as softmoth 21:13 aborazmeh left 21:18 kurahaupo left 21:26 oddp left 21:29 kurahaupo joined 21:56 kurahaupo left 21:59 kurahaupo joined 22:00 b2gills joined 22:02 gitsome joined 22:03 kurahaupo left
gitsome Anyone notice funny behavior with variable hash keys using %hash<<$key>>? If the key has a space in it, only the part before the space is used for the key 22:04
22:04 wamba left
moon-child gitsome: I assume you want %hash{$key} 22:06
gitsome That is what I used, but I was experimenting with the <<>> syntax and apparently that is buggy 22:08
moon-child it's not
m: my $words = "a b"; my @ls = <<$words>>; .say for @ls; my %h; %h<<a b>> = 5, 6; say %h 22:09
camelia a
b
{a => 5, b => 6}
moon-child does ^^ clarify?
gitsome Well, $key = "this key"; will only use $key --> 'this'. The rest of the key will not be part of the key 22:10
22:10 aluaces left
moon-child %h<<this key>> = 5,6 ←→ %h<this> = 5, %h<key> = 6 22:10
if the 6 is missing, then
%h<<this key>> = 5 ←→ %h<this> = 5, %h<key> = Any 22:11
gitsome I see how that works for a literal. It is treating the input as 2 keys. So for the var $key is treated the same. It assumes that 2 keys are the input. Well, that is unexpected 22:12
22:13 kurahaupo joined
ugexe use {$foo} or <<"$foo">> 22:15
docs.raku.org/syntax/%3C%3C%20%3E%3E 22:16
moon-child 'syntax &lt;&lt; &gt;&gt;' oof 22:18
gitsome Yeah, the {} syntax is the simplest. I don't really see a good use for <<"">>. Plus that is 4 added characters to get the same effect 22:20
ugexe yeah as you can see in that link <<>> isnt a special thing just for hashes, it just happens to work for hashes similarly to how it works everywhere else 22:21
so in cases like that it seems a little goofy
m: say <<a b c>>.raku 22:22
camelia ("a", "b", "c")
22:25 kurahaupo left 22:28 kurahaupo joined 22:31 aborazmeh joined 22:40 aborazmeh left
gitsome So is $hash<"$key"> a functional syntax. I did not think about quoting the variable. $hash<$key> does nothing 22:40
22:40 MasterDuke left
gitsome I rarely use a non-variable as a key. I am a bad key person - using them to store all kinds of things and maybe using a 0 or 1 for the value 22:42
22:42 MasterDuke joined
japhb gitsome: Maybe you want a Set or Bag instead then? 22:45
$hash<key> and $hash{"key"} are the two normally used syntaxes for a constant string key 22:46
gitsome Yeap, don't use many constant string in my hash keys. I don't see a Set or a Bag in the documentation 22:48
japhb LOTS of Associative-style collections. See docs.raku.org/images/type-graph-Associative.svg and click on any role (blue) or class (black) name 22:50
22:52 Black_Ribbon left
Xliff m: my @a = <<maybe "this might" help>>.join(':').say 22:53
camelia maybe:this might:help
Xliff Which is mighty useful when you have strings that need to embed a space yet remain one item.
m: my @a = <that's "no true" here>.join(':').say 22:54
camelia that's:"no:true":here
22:54 natrys left
ugexe that... makes very little sense 22:55
the array assignment serves no purpose, and if it did you are assigning a string (via .join) to it
Xliff The use of Join is to show element breaks 22:56
That string initializer entirely makes sense.
Oh. Actually, it doesn't. LOL
It's irrelevant. I just wanted to show the difference between <<>> and <>
gfldex .say returns True 22:57
Xliff m: (my @a = <<maybe "this might" help>>).elems.say; # 3
camelia 3
Xliff m: (my @a = <that's "not true" here>).elems.say # 4
camelia 4
gfldex m: (my @a = <that's "not true" h'ere>).elems.say 22:58
camelia 4
gfldex m: (my @a = <<that's "not true" h'ere>>).elems.say
camelia 3
Xliff gfldex: Exactly my point!
gfldex Q does not complain in general. So it wont complain about unbalanced inner quote pairs. 22:59
23:10 kurahaupo left 23:13 kurahaupo joined, gitsome left 23:14 pecastro left 23:20 aborazmeh joined