🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:11 wamba left, wamba joined 00:12 OpenZen joined 00:19 finanalyst left 00:21 OpenZen left 00:26 finanalyst joined 00:40 TimToady left 00:44 wamba left 00:45 TimToady joined 01:29 finanalyst left 01:33 molaf left 01:35 Altai-man_ joined 01:38 sena_kun left 01:46 molaf joined 02:07 Kaiepi left 02:08 Kaiepi joined 02:17 OpenZen joined 02:23 mowotter left, pilne left 02:46 KindTwo joined 02:48 KindOne left 02:50 KindTwo is now known as KindOne, vike1 left 02:54 KindTwo joined, KindOne left 02:58 KindTwo is now known as KindOne 03:11 KindTwo joined 03:13 KindOne left 03:15 xinming_ left 03:16 KindTwo is now known as KindOne, xinming_ joined 03:36 sena_kun joined
Nasrudin Is it possible to make a class attribute be a code reference where the code reference has a defined signature? 03:37
03:37 finanalyst joined 03:38 Altai-man_ left, abraxxa left 03:39 abraxxa joined
Nasrudin . 03:44
04:04 Doc_Holliwood joined 04:11 abraxxa left 04:13 abraxxa joined 04:15 xinming_ left 04:16 xinming_ joined 04:29 deadmarshal joined 04:40 finanalyst left 04:52 vike1 joined 04:57 deadmarshal left 05:05 deadmarshal joined 05:13 brtastic joined 05:14 wamba joined 05:15 OpenZen left 05:19 aborazmeh left 05:20 mike__ joined 05:24 mike__ left 05:28 deadmarshal left 05:32 ToddAndMargo joined
ToddAndMargo Hi All. What does this error mean? "cannot use a $! parameter in a signature where no $?CLASS is availableat /home/CDs/Windows/NtUtil/Informative2.pm6:40" 39: submethod BUILD ( Str :$!title = "Inform", :@buttons = (), :@entries = (), GtkWindowPosition :$!position = GTK_WIN_POS_CENTER ) { my 05:34
$arg_arr = CArray[Str].new; $arg_arr[0] = $*PROGRAM.Str; my $argc = CArray[int32].new; $argc[0] = 1; my $argv = CArray[CArray[Str]].new; $argv[0] = $arg_arr; for @buttons -> $el { @!buttons.push: { :name($el.key), :lable($el.value) } }; for
@entries -> $el { @!entries.push: { :name($el.key), :lable($el.value) } }; gtk_init($argc, $argv); self.init; }
4: is the Str :$!title = "Inform",
40 no 4
40 not 4 05:35
05:35 Altai-man_ joined 05:38 sena_kun left 05:50 Maylay left
Geth_ doc: 4755bd8134 | (Tim Smith)++ | bin/p6doc
p6doc: Add a deprecation comment to inform developers

Hopefully this will help people find the right place to apply their efforts. And prevent JJ from having to link to #2983 in more new PRs.
Examples of the need include #3196, #3202, #3422
06:03
linkable6 DOC#2983 [open]: github.com/Raku/doc/issues/2983 [build][meta] Version 2.0 Roadmap
linkable6 DOC#3196 [closed]: github.com/Raku/doc/pull/3196 Add search command for p6doc
DOC#3202 [open]: github.com/Raku/doc/issues/3202 [meta] p6doc builds index on first use
DOC#3422 [closed]: github.com/Raku/doc/pull/3422 p6doc: Fix the INTERACT disambiguation mode
doc: 8a83f39fce | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | bin/p6doc
Merge pull request #3467 from softmoth/p6doc-deprecated

p6doc: Add a deprecation comment to inform developers
doc: 98bad76bc3 | (Stoned Elipot)++ | doc/Type/SetHash.pod6
Fix link to set operators
linkable6 Link: docs.raku.org/type/SetHash
doc: 6ecd48ccc8 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/SetHash.pod6
Merge pull request #3468 from Raku/sethash-link-set-ops

Fix link to set operators
doc: 6cfa4a3a6f | (Tim Smith)++ | doc/Language/create-cli.pod6
create-cli: Minor improvements to enum example
06:05
linkable6 Link: docs.raku.org/language/create-cli
doc: f476a2089f | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/create-cli.pod6
Merge pull request #3469 from softmoth/patch-1

create-cli: Minor improvements to enum example
06:08 ToddAndMargo left 06:13 deadmarshal joined 06:21 stoned75 joined 06:22 deadmarshal left 06:25 finanalyst joined 06:32 Doc_Holliwood left 06:37 brtastic left 06:43 rbt left 06:44 rbt joined, deadmarshal joined 06:50 soursBot joined 06:57 aborazmeh joined, aborazmeh left, aborazmeh joined 07:03 deadmarshal left, brtastic joined 07:11 rindolf joined 07:15 pecastro joined 07:21 jmerelo joined 07:22 dakkar joined 07:35 rindolf left 07:36 sena_kun joined 07:37 hacktor left 07:38 Altai-man_ left 07:51 sarna joined 08:04 wamba left 08:11 eseyman left 08:13 kst left 08:17 kensanata joined 08:26 sarna left 08:29 lichtkind joined, leont joined
gfldex lolibloggedalittle: gfldex.wordpress.com/2020/06/08/re...ilarities/ 08:39
08:50 Sgeo left 08:52 sarna joined 09:01 dudz left 09:02 deadmarshal joined 09:05 soursBot left 09:06 soursBot joined 09:10 mowcat joined 09:11 deadmarshal left 09:13 lichtkind_ joined 09:15 lichtkind left
moritz gfldex++ 09:20
09:26 rindolf joined 09:28 eseyman joined 09:35 Altai-man_ joined 09:38 sena_kun left
Geth_ ecosystem/JJ-patch-11: 6b9f3382ee | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Add a working auth version to the ecosystem

While this PR is accepted: github.com/azawawi/perl6-sdl2/pulls
09:45
ecosystem: JJ++ created pull request #502:
Add a working auth version of SDL2 to the ecosystem
09:46 dudz joined, dudz left, dudz joined
Geth_ ecosystem/JJ-patch-11: 2f2c9a0622 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Changes to a branch

To be able to change the source
09:51
09:52 luk_v joined
Geth_ ecosystem: 6b9f3382ee | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Add a working auth version to the ecosystem

While this PR is accepted: github.com/azawawi/perl6-sdl2/pulls
09:54
ecosystem: 2f2c9a0622 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Changes to a branch

To be able to change the source
ecosystem: f0b9100bf6 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #502 from Raku/JJ-patch-11

Add a working auth version of SDL2 to the ecosystem
luk_v weekly: www.heise.de/select/ix/2020/13/200...0085200014 --> german IX magazin has an multi-page article about raku and interview with jnthn (has to purchased) 10:00
notable6 luk_v, Noted! (weekly)
10:00 luk_v left 10:45 Doc_Holliwood joined 10:46 [particle] left, rbt left 10:47 [particle] joined, rbt joined 10:50 xinming_ left 10:51 xinming_ joined 10:55 daxim left 11:00 daxim joined 11:21 Doc_Holliwood left 11:24 xinming_ left 11:25 MasterDuke left, xinming_ joined 11:26 daxim left 11:32 daxim joined 11:36 sena_kun joined 11:38 Altai-man_ left 11:39 finanalyst left 11:40 [particle]1 joined 11:41 [particle] left 11:43 aluaces left 11:48 MasterDuke joined 11:52 soursBot left, soursBot joined 11:56 aborazmeh left
elcaro m: say $*RAKU.compiler.version 11:57
camelia v2020.05.1.262.g.0.a.84.aa.7.f.6
11:57 soursBot left 11:59 soursBot joined 12:04 deadmarshal joined, aluaces joined, aluaces is now known as alberto 12:05 alberto is now known as Guest58680
lizmat which is HEAD :-) 12:09
12:10 rbt left 12:11 rbt joined 12:12 deadmarshal left
MasterDuke with MVM_GC_DEBUG = 1, `*_(un)blocked()` calls removed, and `sym_facts->value.i = (MVMint64)entry;` commented out; nqp and rakudo both built and passed tests. starting now with MVM_GC_DEBUG = 3, but it's going to take a while 12:26
jnthn, timotimo, nine: i think at this point i need to learn a little more about how facts work to understand if that's a proper fix or if the code is doing anything else questionable 12:28
12:32 wamba joined 12:35 a3f left 12:38 a3f joined 12:47 Guest58680 is now known as aluaces 12:49 Doc_Holliwood joined 12:51 jmerelo left
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2020/06/08/2020-...0-rakoons/ 13:01
13:02 skids joined 13:03 patrickb joined
patrickb o/ 13:07
Is automatic module detection / use for perfomance reasons an antipattern in raku? If not are there any examples of this in our current ecosystem?
jnthn greppable6: try require 13:08
greppable6 jnthn, 85 lines, 47 modules: gist.github.com/7a40096893698d9903...d695b15122
jnthn May be some examples in ^
patrickb I'll have a look. Thanks! 13:10
lizmat afk for an hour or so& 13:18
tbrowder lizmat++ 13:23
g'day all 13:24
in looping over an array, how can i test for a Nil value? i've tried smart matching a variable i've assigned Nil to but that doesn't work. the docs discuss Nil in great detail i but haven't yet figured out my problem. 13:27
i'm seeing this error message in some rakudo core code...back in a moment... 13:28
err msg: Use of Nil in string context 13:29
i haven't yet pinned down the exact point it happens. 13:32
m: my @s = Nil, 2; .say for @s 13:33
camelia (Any)
2
13:33 a3f left
tbrowder m: my $s = 2; say so $s ~~ Any 13:34
camelia True
tbrowder conundrum!!
13:35 a3f joined, Altai-man_ joined
tbrowder m: my @s = Nil, 2; for @s { say so $_ ~~ Nil } 13:36
camelia False
False
tbrowder m: my @s = Nil, 2; for @s { say so $_.defined} 13:37
camelia False
True
tbrowder aha!
13:38 sena_kun left
tbrowder i've been testing in the wrong place i think 13:39
patrickb I'm looking at github.com/moritz/perl6-all-module...AP.pm#L531 There is a `has &colored = ...`. That's the first time I see a `has` without a twigil. What's the meaning of that? It seems to be undocumented. 13:44
13:45 eery joined
jdv79 lizmat: thanks as usual for the weekly 13:45
13:46 vike1 left
leont It does pretty much the same as a ! twigil, but without the twigil 13:48
That said, it's probably clearer to use a twigil
patrickb leont: Thanks for the explanation! 13:55
13:55 xinming_ left 13:56 xinming_ joined 13:57 vike1 joined
[Coke] how would you get at the &colored? 13:57
m: class A { has &thing }; dd A.new.thing 13:58
camelia No such method 'thing' for invocant of type 'A'
in block <unit> at <tmp> line 1
[Coke] m: class A { has \thing }; dd A.new.thing #only & is special?
camelia 5===SORRY!5=== Error while compiling <tmp>
has scoped term definitions (only 'my' is supported at the moment) not yet implemented. Sorry.
at <tmp>:1
------> 3class A { has \thing7⏏5 }; dd A.new.thing #only & is special?
expecting…
leont [Coke], like I said, it's like ! twigil, so it's private 13:59
jdv79 isn't any sigil/twigil/?nogil? except one including a dot in the second position like that? 14:02
14:04 sarna left
Geth_ doc: 6bd9f62501 | Coke++ | bin/p6doc
whitespace

pass xt/trailing-whitespace.t
14:11
14:12 soursBot left
[Coke] leont: seems like it should be disallowed - there's a way to get private subs without abusing has. 14:12
m: class A { has &thing; dd &thing }; A.new
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable &!thing used where no 'self' is available
at <tmp>:1
------> 3class A { has &thing; dd &thing7⏏5 }; A.new
[Coke] eh. OK. 14:13
14:14 soursBot joined
[Coke] looks like you can do the same with 'has $thing', so it's consistent. 14:16
14:24 melezhik joined 14:29 team\andinus joined 14:32 soursBot left 14:35 oddp joined 14:37 Sgeo joined 14:48 patrickb left 14:49 jmerelo joined, rbt left 14:50 rbt joined 14:51 soursBot joined 14:53 mscha joined
mscha m: my @a = 4,0; say any(@a) > 0; say any(@a) != 0; # huh? 14:54
camelia any(True, False)
False
[Coke] m: say ! (any(0,4) eq 0) 14:58
camelia False
[Coke] m: say ! (any(0,4) == 0)
camelia False
mscha Is this a bug or a feature? 15:04
15:07 brtastic left
MasterDuke well, it's been that way for a long time gist.github.com/Whateverable/0934b...e8ea3ae6f3 15:10
[Coke] anyone have an idea how to fix this concurrency issue? (multiple instances of raku trying to update a file at the same time) : github.com/Raku/doc/issues/3466 15:24
m: say !any(True,False)
camelia False
[Coke] m: say so any(True,False)
camelia True
[Coke] so, first, "is the junction true" ? yes. then negate it... 15:25
mscha I reported the (potential) bug: github.com/rakudo/rakudo/issues/3748
[Coke] Is there a user module for locking that works across processes? 15:26
mscha: added my note as well 15:28
oddp m: for ^3 { LAST say now - INIT now } 15:29
camelia 0.002992
oddp m: for ^3 { LAST say now - FIRST now }
camelia Use of Nil in numeric context
Instant:1591630181.825314
in code at <tmp> line 1
oddp Why's FIRST not valid here?
[Coke] jnthn: should the IO handle .lock work across processes, or only in a single process?
m: for ^3 { say FIRST 3 }
camelia Nil
Nil
Nil
[Coke] m: for ^3 { my $a = FIRST 3 ; say $3 } 15:30
camelia Nil
Nil
Nil
[Coke] m: for ^3 { FIRST { say 1} } 15:31
camelia 1
[Coke] I think you'd need to save the result of the FIRST to a state var and use that.
... Maybe FIRST isn't returning the value ? 15:33
15:34 mscha left
[Coke] m: my $n; for ^3 { FIRST {$n = now}; LAST say now - $n } # this works 15:34
camelia 0.00103279
15:36 sena_kun joined 15:38 Altai-man_ left
oddp Hm, okay, guess that one goes in my "inconsistencies" markdown file. 15:39
Thanks for taking a look.
AlexDaniel that `any` behavior is meant to be this way 15:41
I mean, I don't agree with it, but apparently you can read it two different ways 15:42
which in my book means it should be outright banned 15:44
15:44 KindOne left, KindTwo joined
AlexDaniel I'm trying to find the discussion about it but failing 15:46
15:47 stoned75 left 15:49 KindTwo is now known as KindOne, stoned75 joined, brtastic joined
ShimmerFairy Is FIRST supposed to be one of those "inlineable" phasers in the first place? 15:50
15:54 Xliff joined
oddp m: for ^3 { LAST say now - ENTER now } 15:55
camelia 0.000064
oddp "Phasers marked with a * have a runtime value, and if evaluated earlier than their surrounding expression, they simply save their result for use in the expression later when the rest of the expression is evaluated" 15:56
Ah, okay. And FIRST is not one of them, it seems.
15:59 brtastic left
[Coke] oddp++ # thanks, was trying to find a ref in the docs about it 16:00
16:03 Doc_Holliwood left 16:12 brtastic joined 16:16 jmerelo left
jnthn [Coke]: I believe .lock on a file handle boils down to flock or similar, but iirc it's advisory rather than enforced? 16:23
16:25 aborazmeh joined, aborazmeh left, aborazmeh joined
[Coke] ok. So probably want a userspace module for "real" locking? 16:25
jnthn Well, anything that is inter-process is going to depend on what the OS provides 16:26
lizmat "real" locking from Raku's point of view, or from the OS"s point of view?
jnthn If it's inter-process, has to be the OS 16:27
gavv.github.io/articles/file-locks...ry-locking
That...makes it look "interesting" 16:28
MasterDuke AlexDaniel: i remember having a conversation about it with TimToady a couple years ago. something about how you negate stuff in english compared to de Morgan's
AlexDaniel MasterDuke: yeah, that conversation!
MasterDuke++ for finding it # colabti.org/irclogger/irclogger_lo...-08-21#l51 16:32
16:32 dakkar left
AlexDaniel MasterDuke: please link it in the ticket 16:33
[Coke] ... github.com/carlini/printf-tac-toe 16:35
ShimmerFairy For some reason that's making me think of Lisp's FORMAT 16:38
jdv79 is rakoon the best we can do? do we really want to be the trash panda community? 16:46
16:47 abraxxa left
[Coke] Best I've seen so far. 16:48
there's probably some history in chat with other options
oddp Non-native speaker here, but isn't "koon" a slur?
ShimmerFairy only with a 'c', and only on its own. raccoon is a perfectly normal word, after all. 16:50
16:50 xinming joined
jdv79 also how does a butterfly and a raccoon mix in terms of logo/mascot - really weird combo. 16:53
16:53 xinming_ left
[Coke] jdv79: I'd recommend starting a problem solving ticket so we can at least link to an IRC discussion from somewhere. 17:08
(or better, have it on the ticket.) 17:09
17:10 rbt left 17:11 rbt joined 17:18 finanalyst joined 17:20 KindTwo joined 17:21 KindOne left 17:24 KindTwo is now known as KindOne 17:30 aborazmeh left 17:35 Altai-man_ joined 17:38 sena_kun left
timotimo you can put butterfly wings on anything 17:41
why not a raccoon
17:51 brtastic left 17:56 xinming left 17:58 xinming joined 17:59 kensanata left 18:00 Doc_Holliwood joined 18:02 lichtkind_ left
raku-bridge <tmtvl> I suggested "rakuneers" and "lizmat and the rakunauts" (the best band this side of OOP), snoofkin likes Rakuneers. 18:02
leont m: class F { method b {}; say &b.signature }
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
b used at line 1
leont Can anyone tell me what I should be doing instead?
timotimo does it have to be inside the class body? 18:03
m: class F { method b {}; say F.^lookup("b").signature }
camelia (F: *%_)
timotimo m: class F { method b(int $a, str $b) {}; say F.^lookup("b").signature }
camelia (F: int $a, str $b, *%_)
timotimo "&b" is a lexical variable lookup, it'd only find stuff also declared "my", which subs are by default / implicitly, but methods are installed into the class's method table only 18:04
m: class F { our method b(int $a, str $b) {}; say F.^lookup("b").signature; say F::.keys }
camelia No such method 'signature' for invocant of type 'Mu'
in block <unit> at <tmp> line 1
timotimo m: class F { our method b(int $a, str $b) {}; say F::.keys }
camelia (&b)
timotimo looks like this way you can get a method into the package of the class, but it won't be available as a method any more? 18:05
18:16 lucasb joined 18:18 kini left
leont Solved it my doing «my &foo = method() {}» :-) 18:20
18:24 kini joined 18:25 molaf left, sauvin left 18:26 kini left 18:28 kini joined 18:34 softmoth joined 18:35 skyl4rk left 18:40 [particle]1 left 18:47 soursBot left 18:51 skyl4rk joined 18:58 mowcat left
softmoth .ask JJMerelo Is there a work-in-progress branch of noisgul/perl6-p6doc that's not listed on its GitHub Network? I started playing around with converting it to rakudoc to see what is involved (REF Raku/doc#2983), and would like to proceed if that'd be okay. 19:00
linkable6 DOC#2983 [open]: github.com/Raku/doc/issues/2983 [build][meta] Version 2.0 Roadmap
tellable6 softmoth, I'll pass your message to JJMerelo
19:01 Roamer` joined 19:03 soursBot joined 19:06 pilne joined 19:18 brtastic joined 19:19 brtastic left 19:20 brtastic joined 19:27 aborazmeh joined, aborazmeh left, aborazmeh joined 19:31 aborazmeh_ joined, aborazmeh_ left, aborazmeh_ joined 19:32 aborazmeh left, aborazmeh_ is now known as aborazmeh 19:36 sena_kun joined 19:38 Altai-man_ left 19:45 brtastic left 19:55 molaf joined 19:57 xinming left, xinming joined 20:03 rindolf left 20:14 soursBot left 20:16 soursBot joined 20:36 kensanata joined 21:00 softmoth left 21:11 rbt left, rbt joined 21:15 vike1 left 21:24 wamba left, vike1 joined 21:28 kensanata left 21:35 Altai-man_ joined 21:36 kensanata joined 21:38 sena_kun left 21:45 lichtkind joined 21:54 kensanata left 21:56 devmikey joined 22:05 mowcat joined 22:11 soursBot left 22:15 leont left 22:21 Black_Ribbon joined 22:27 lichtkind_ joined 22:30 lichtkind left, melezhik left, orinthe left, soursBot joined 22:31 orinthe joined 22:34 uvb joined 22:39 soursBot left 22:40 orinthe left, orinthe joined 22:41 dogbert11 left 22:48 finanalyst left
oddp In crystal I can declare a hash with an additional block that's called whenever keys are missing: 22:50
`chans = Hash(String, Channel(Int32)).new { |h, k| h[k] = Channel(Int32).new }`
The default trait doesn't work like that, it seems. Is there another similar way in raku or do I have to check for key existance at each access location?
23:08 stoned75 left 23:10 pilne left 23:22 aborazmeh left 23:24 Doc_Holliwould joined 23:27 holli__ joined 23:28 Doc_Holliwood left, pecastro left 23:30 Doc_Holliwood joined, Doc_Holliwould left 23:32 Doc_Holliwould joined 23:33 holli__ left, lichtkind_ left 23:34 dogbert11 joined 23:35 holli__ joined 23:36 Doc_Holliwood left 23:37 sena_kun joined
raku-bridge <Snoofkin> I don't know of any super-neat way of doing it, but you could always mix in a role like so: 23:37
<Snoofkin> role Defaultable[$value] { method AT-KEY(\k) { if self.EXISTS-KEY(k) { callsame; } else { return $value } } } 23:38
<Snoofkin> and then you declare a hash like my %hash does Defaultable[42]
23:39 Altai-man_ left, Doc_Holliwould left, Doc_Holliwood joined 23:41 Doc_Holliwould joined
raku-bridge <Snoofkin> Make sure to use "does" rather than "but" there or it won't work—see docs.raku.org/language/objects#ind...try-Mixins 23:42
23:42 holli__ left
oddp Interesting. Time to check out that section of the docs. Will try that, thanks a lot! 23:42
Btw., what's bridged here? Discord? Gitter?
raku-bridge <Snoofkin> I'm talking from Discord
<Snoofkin> I hope everything is coming through okay lol 23:43
oddp All fine, thanks again.
23:43 holli__ joined
raku-bridge <Snoofkin> No problem. Have fun with your project 23:43
23:44 Doc_Holliwood left
raku-bridge <Snoofkin> btw if you use Discord, this server is listed on the raku.org community page 23:45
23:47 Doc_Holliwould left, Doc_Holliwood joined 23:50 Doc_Holliwould joined 23:51 holli__ left 23:52 gdonald left 23:53 holli__ joined, Doc_Holliwood left 23:54 xelxebar_ left, xelxebar joined 23:56 Doc_Holliwould left, Doc_Holliwood joined 23:58 Doc_Holliwould joined 23:59 holli__ left